Is it possible with ESLint to ignore one specific rule for an entire directory?
In my case, I would like to ignore import/prefer-default-export
for a directory named commonComponents
eslint
Is it possible with ESLint to ignore one specific rule for an entire directory?
In my case, I would like to ignore import/prefer-default-export
for a directory named commonComponents
Best Answer
ESLint configuration (
.eslintrc
) files are hierarchical:You can disable the
import/prefer-default-export
rule for thecommonComponents
directory by creating a.eslintrc
file with the following content in that directory: