debian-image-builder-frontend/.eslintrc.yml
regexowl 3d9f171611 ESLint: Add recommended ruleset for react-redux
This adds a recommended ruleset for react-redux to the ESLint config and adds needed dependency to devDependencies.
2024-04-02 20:21:34 +02:00

48 lines
1.1 KiB
YAML

extends: [
"plugin:jsx-a11y/recommended",
"@redhat-cloud-services/eslint-config-redhat-cloud-services",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:testing-library/react",
"plugin:react-redux/recommended"
]
globals:
insights: 'readonly'
shallow: readonly
render: 'readonly'
mount: 'readonly'
plugins:
- import
rules:
import/order:
- error
- groups:
- builtin
- external
- internal
- sibling
- parent
- index
alphabetize:
order: asc
caseInsensitive: true
newlines-between: always
pathGroups: # ensures the import of React is always on top
- pattern: react
group: builtin
position: before
pathGroupsExcludedImportTypes:
- react
prefer-const:
- error
- destructuring: any
no-console: 2
eqeqeq: error
array-callback-return: warn
# Temporarily disabled
jsx-a11y/no-autofocus: off
rulesdir/forbid-pf-relative-imports: off
overrides:
- files: "**/*.ts?(x)"
parser: "@typescript-eslint/parser"
extends: ".eslintrc-typescript.yml"