dolsem / eslint-plugin-filename-rules

MIT License
36 stars 8 forks source link

ignore option? #2

Closed ash-r1 closed 4 years ago

ash-r1 commented 4 years ago

I want to use it with pascalcase optioin, but I have to ignore some files, e.g. .eslintrc.js or rollup.config.js etc...

How about ignoring option?

dolsem commented 4 years ago

If you want to skip linting those files entirely you can add them to .eslintignore. If you want to just disable this rule only, you can do it the usual way by adding / eslint-disable filename-rules/match / at the top of the file. Let me know if that solves your problem.

ash-r1 commented 4 years ago

I want to keep other linting rules for these files.

/ eslint-disable filename-rules/match / at the top of the file.

wow, thanks. It solves the problem.

Tzahile commented 2 years ago

I wanted to ignore all index.js files (maybe there's an option that supports it?) after matching all to PascalCase. In this case, I added an override rule:

'overrides': [
    {
      'files': ['**/index.vue'],
      'rules': {
        'filename-rules/match': [0]
      }
    }
]