prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.39k stars 255 forks source link

is there a way to override all configuration? #213

Closed xblurx closed 2 years ago

xblurx commented 2 years ago

Hi I was integrating eslint-config-prettier into a project, and ran into this issue: Here is our current .eslintrc config (simpified)

module.exports = {
...
extends: [
    ...some rules
    'prettier'
    ],

rules: {
    ...overrideEslintRules,
    }
}

if, to say, we're overriding an indent rule in overrideEslintRules to [2, 4, { SwitchCase: 1 }], that would mean eslint-config-prettier 's disabling of indent does not work anymore

The question is, is there any way to still override all of it with eslint-config-prettier ? Cause in rules we have so much rules that are often overlap with prettier, and disabling them manually renders eslint-config-prettier unnecessary. Thanks.

lydell commented 2 years ago

Hi!

Removing stuff from rules that is unnecessary or conflicts with Prettier is the way to go. Personally I’ve done exactly that in many projects, so that I ended up not needing eslint-config-prettier at all. I just run the CLI helper tool sometimes to check that I don’t have any conflicts.

xblurx commented 2 years ago

makes sense, thanks