syed imty
syed imty

Reputation: 1028

Ember JS : Exlude running eslint on js files of addon

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

Upvotes: 1

Views: 475

Answers (1)

ykaragol
ykaragol

Reputation: 6221

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()

Upvotes: 1

Related Questions