Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Rules: 'warn' not working #663

Open
BlueRaja opened this issue Jun 16, 2020 · 4 comments
Open

Rules: 'warn' not working #663

BlueRaja opened this issue Jun 16, 2020 · 4 comments

Comments

@BlueRaja
Copy link

According to the documentation, I should be able to specify a rule like this:

  rules: {
    'no-bare-strings': 'warn'
  }

however, when I do that, all my files fail to lint, with the following error message:

  -:-  error  The no-bare-strings rule accepts one of the following values.
  * boolean - `true` to enable / `false` to disable,  * array -- an array of strings to whitelist,  * object -- An object with the following keys:,    * `whitelist` -- An array of whitelisted strings,    * `globalAttributes` -- An array of attributes to check on every element,    * `elementAttributes` -- An object whose keys are tag names and value is an array of attributes to check for that tag name
You specified `"warn"`  undefined

ember-template-lint version 2.8.0

@dcyriller
Copy link
Member

hm I can't reproduce the issue @BlueRaja. Could you share a more detailed configuration file?

@BlueRaja
Copy link
Author

This is our entire .template-lintrc.js

'use strict';

module.exports = {
  extends: 'recommended',
  rules: {
    'no-bare-strings': 'warn',
    'no-invalid-interactive': 'warn',
  }
};

We just upgraded to Ember 3.04 so there may be something else wrong somewhere..

@BlueRaja
Copy link
Author

BlueRaja commented Jun 17, 2020

Ah, it only happens from http://localhost/tests (or ember test --server).

If I run ./node_modules/.bin/ember-template-lint **/*.hbs manually, I don't see the issue.

@dcyriller
Copy link
Member

dcyriller commented Jun 17, 2020

ah! I have an idea then 😄

If it happens only from the dev / test server, it means the problem is actually in ember-cli-template-lint (which is deprecated).

EDIT: I'm moving the issue there

@dcyriller dcyriller transferred this issue from ember-template-lint/ember-template-lint Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants