Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[import/first] Impossible to turn off absolute-import from dervied config #1661

Closed
TheCrueltySage opened this issue Feb 18, 2020 · 2 comments · Fixed by #1664
Closed

[import/first] Impossible to turn off absolute-import from dervied config #1661

TheCrueltySage opened this issue Feb 18, 2020 · 2 comments · Fixed by #1664

Comments

@TheCrueltySage
Copy link
Contributor

TheCrueltySage commented Feb 18, 2020

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?

@TheCrueltySage TheCrueltySage changed the title [import/first] Impossible to turn off absolute-import from base config [import/first] Impossible to turn off absolute-import from dervied config Feb 18, 2020
@ljharb
Copy link
Member

ljharb commented Feb 18, 2020

That seems perfectly reasonable, a PR is welcome.

@TheCrueltySage
Copy link
Contributor Author

Any news on the PR I made?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants