Eslint-plugin-import: [import/first] Impossible to turn off absolute-import from dervied config

Created on 18 Feb 2020  路  2Comments  路  Source: benmosher/eslint-plugin-import

The base config we use sets
'import/first': ['error', 'absolute-first'],
However, while we want the imports to be at the top, we don't need them to be sorted beyond that. As such, we don't need 'absolute-first' set.
Before, we redefined the rule through
"import/first": ["error", ""],
However, since 2.20.1 the config only allows 'absolute-first' string in options. Since there is only one option to redefine, and severity changes don't override options, it is impossible to unset 'absolute-first' from derived config right now.

This seems like unintended behavior.
Could you perhaps add an option to explicitly turn off absolute-first?

enhancement help wanted

All 2 comments

That seems perfectly reasonable, a PR is welcome.

Any news on the PR I made?

Was this page helpful?
0 / 5 - 0 ratings