ESLint - Override rules from eslint-plugin-prettier
Prettier is not so configurable. You can try configuration they have: https://prettier.io/docs/en/configuration.html
Put .prettierrc
file, or eslint config like this:
{
rules: {
'prettier/prettier': [
'error',
{
trailingComma: 'all',
tabWidth: 2,
semi: false,
singleQuote: true,
bracketSpacing: true,
eslintIntegration: true,
printWidth: 120,
},
],
}
}
It is not currently possible to disable that specific rule from prettier through configuration, but to override rules in eslint that come from the extends
block, you can either write in the rule like this:
"rules": {
"prettier/prettier": "off"
"@typescript-eslint/no-use-before-define": [
"error",
{ "functions": false, "variables": true, "classes": true },
],
}
Or to only override it for a specific file pattern you can override it in the overrides
block.
"overrides": [
{
"files": ["*.html"],
"rules": {
"prettier/prettier": "off",
"@typescript-eslint/unbound-method": "off"
}
}
]
Here I am showing both the config you were looking for, and an inherited rule from a nested package to show future visitors how to do it.