Last active
June 25, 2024 09:25
-
-
Save alisaliso/4d10f834ce135199eb6ed6209a91aa51 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
es6: true, | |
}, | |
globals: { | |
React: 'writable', | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: 9, | |
sourceType: 'module', | |
}, | |
plugins: [ | |
"react", "react-hooks", "react-refresh", "perfectionist", "import", "sonarjs", "unused-imports" | |
], | |
rules: { | |
"perfectionist/sort-objects": [ | |
"warn", | |
{ | |
order: "asc", | |
type: "natural", | |
}, | |
], | |
"react/button-has-type": "error", | |
"react/destructuring-assignment": [ | |
"warn", | |
"always", | |
{ | |
destructureInSignature: "always", | |
}, | |
], | |
"react/function-component-definition": [ | |
"error", | |
{ | |
namedComponents: "arrow-function", | |
}, | |
], | |
"react/jsx-curly-brace-presence": "error", | |
"react/jsx-fragments": "error", | |
"react/jsx-key": [ | |
"error", | |
{ | |
checkFragmentShorthand: true, | |
checkKeyMustBeforeSpread: true, | |
warnOnDuplicates: true, | |
}, | |
], | |
"react/jsx-max-depth": [ | |
"warn", | |
{ | |
max: 5, | |
}, | |
], | |
"react/jsx-no-leaked-render": [ | |
"warn", | |
{ | |
validStrategies: ["ternary"], | |
}, | |
], | |
"react/jsx-no-script-url": "error", | |
"react/jsx-no-useless-fragment": "error", | |
"react/jsx-pascal-case": "error", | |
"react/jsx-sort-props": "off", | |
"react/no-children-prop": "error", | |
"react/no-danger": "error", | |
"react/no-danger-with-children": "error", | |
"react/no-unknown-property": [ | |
"error", | |
{ | |
ignore: ["css"], | |
}, | |
], | |
"react/no-unstable-nested-components": [ | |
"error", | |
{ | |
allowAsProps: true, | |
}, | |
], | |
"react/prop-types": "off", | |
"react/react-in-jsx-scope": "off", | |
"react/self-closing-comp": "warn", | |
"react-hooks/exhaustive-deps": "warn", | |
"react-hooks/rules-of-hooks": "warn", | |
"react-refresh/only-export-components": "warn", | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment