debian-image-builder-frontend/.eslintrc.yml
lucasgarfield 4000b8d5e5 ESLint: Add prefer-const rule
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.
2023-02-10 11:37:06 +01:00

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