selaux / eslint-plugin-filenames

Eslint plugin to check filenames.
318 stars 35 forks source link

Option to ignore certain paths #11

Closed dentuzhik closed 7 years ago

dentuzhik commented 7 years ago

Would be great to be able validation on certain paths, but still being able to lint them using all other eslint rules.

selaux commented 7 years ago

Doesn't adding a .eslintrc file that disables the rule to a directory work?

dentuzhik commented 7 years ago

Probably I don't get an idea, can you provide a draft of example?

selaux commented 7 years ago

Put a .eslintrc file into the directory where you want do disable the rule with the following content:

{
  "rules": {
    "filenames/match-exported": 0
  }
}
selaux commented 7 years ago

Works?

dentuzhik commented 7 years ago

Sorry, didn't have much time to check. Yes, it does work, however ignoring files matching globs is impossible. I think it relates to the eslint itself, rather to the plugin (found this), so feel free to close the issue.

selaux commented 7 years ago

Yes, otherwise every rule would have to implement that for itself.