1

I am using eslint ("ember-cli-eslint") for my ember application. Whenever i run the tests, eslint includes files from addon's as well(check screenshot). We have 5 custom add-ons which is used in this project. Eslint currently includes the files from these add-ons. Need guidance on how to exclude files from eslint.

enter image description here

I have also created ".eslintignore" file and added below line, but its of not use

modules/**/*.js
ykaragol
  • 6,139
  • 3
  • 29
  • 56
syed imty
  • 1,018
  • 1
  • 9
  • 27
  • Do your addons have `isDevelopingAddon` in their `index.js`? If so, add `hintingEnabled: function() { return false; }` to their `index.js`. – ykaragol Apr 04 '17 at 08:20
  • 1
    Thanks, This worked. Can you add this as answer, will gladly accept it – syed imty Apr 04 '17 at 09:08

1 Answers1

1

An addon's hintings are run when isDevelopingAddon function of addon returns true. To disable it, you should give hintingEnabled: function() { return false; } in index.js.

Releated issue: https://github.com/ember-cli/ember-cli/issues/5594

--

Edit

Returning false from hintingEnabled also disables linter to run in that add-on. So if you want to enable linter in add-on and disable it while using in another app use the following check:

return this.moduleName() === this.app.project.name()

ykaragol
  • 6,139
  • 3
  • 29
  • 56