Fixes #795. This commit adds rules to `.eslintrc.yml` which enforce sorting of the import declarations. Added plugin `eslint-plugin-import` allows to sort the import declarations based on their types (builtin, external, internal, etc.) and rule `sort-imports` then sorts the declarations inside these groups alphabetically.
22 lines
403 B
YAML
22 lines
403 B
YAML
extends: "@redhat-cloud-services/eslint-config-redhat-cloud-services"
|
|
globals:
|
|
insights: 'readonly'
|
|
shallow: readonly
|
|
render: 'readonly'
|
|
mount: 'readonly'
|
|
plugins:
|
|
- import
|
|
rules:
|
|
sort-imports:
|
|
- error
|
|
- ignoreCase: true
|
|
ignoreDeclarationSort: true
|
|
import/order:
|
|
- error
|
|
- groups:
|
|
- builtin
|
|
- external
|
|
- internal
|
|
- sibling
|
|
- parent
|
|
- index
|