Require const declarations for variables that are never reassigned after being declared. If a variable is never reassigned, using the const declaration is better. const declaration tells readers, “this variable is never reassigned,” reducing cognitive load and improving maintainability.
31 lines
627 B
YAML
31 lines
627 B
YAML
extends: "@redhat-cloud-services/eslint-config-redhat-cloud-services"
|
|
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
|