-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[New] Support for ESLint v8 #2191
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to find ways so the existing tests do not change at all, to increase confidence that we're not breaking eslint 2-7 support.
Hmm. I'm not sure what caused this error.
I think I've fixed it so that this issue doesn't happen. I have removed the |
That message suggests that we're pulling |
https://github.com/import-js/eslint-plugin-import/pull/2191/files#diff-7d2908b010ec724c0f3a0d7615cb91f4673d765d52c6ba6607501e23470f2966R51 But the line number in the error seems to point to the previous module (line number 43, new line number is 51). |
I think the way things work is that the previous version ends up in node_modules, so it's possible the try/catch stuff would need to be landed and published first - but hopefully there's another alternative. |
FileEnumerator#iterateFiles loads the node_modules plugin from eslintrc. |
npm i --no-save eslint-plugin-import@'.' -f | ||
echo "Build self" | ||
npm run build | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it link as a workaround to get the test to work which fails due to eslint-plugin-import in node_modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is published, will this workaround no longer be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect that the workaround will be unnecessary if we release eslint-plugin-import and change it to use it.
I think that we can also undo .nycrc
change.
https://github.com/import-js/eslint-plugin-import/pull/2191/files#r690041296
At this point, I think we've been able to confirm that at least the no-unused-modules.js changes work. |
@@ -71,7 +71,8 @@ | |||
"chai": "^4.3.4", | |||
"coveralls": "^3.1.0", | |||
"cross-env": "^4.0.0", | |||
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0", | |||
"escope": "^3.6.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a workaround to prevent the babel-eslint patch from crashing.
https://github.com/babel/babel-eslint/blob/v8.2.6/lib/patch-eslint-scope.js#L31
@@ -10,6 +10,7 @@ | |||
"exclude": [ | |||
"coverage", | |||
"test", | |||
"tests" | |||
"tests", | |||
"lib" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was necessary because it takes a long time to load eslint-plugin-import.
I think I've done everything I can do with eslint v8 beta right now. |
The test one, sure - but for the rule, I think it's better if it fails in eslint 8 prior to us supporting it officially. |
I will open a PR that changes |
d9b1da2
to
4733e0a
Compare
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues: - [x] wait for import-js/eslint-plugin-import#2191 to be released - [ ] wait for gajus/eslint-plugin-flowtype#496 to be released - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues: - [x] wait for import-js/eslint-plugin-import#2191 to be released - [ ] wait for gajus/eslint-plugin-flowtype#496 to be released - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues: - [x] wait for import-js/eslint-plugin-import#2191 to be released - [ ] wait for gajus/eslint-plugin-flowtype#496 to be released - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [ ] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [ ] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] wait for mysticatea/eslint-plugin-node#294 to be released and merged here - [x] wait for facebook/react#22248 to be released and merged here - [ ] release minor/patch version of Adeira Eslint Config before merging this breaking change - [ ] ...
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (#3625)
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (adeira/universe#3625) adeira-source-id: b194be7e4f2fc10d51a10ed8753c440414e36b4d
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (adeira/universe#3625) adeira-source-id: b194be7e4f2fc10d51a10ed8753c440414e36b4d
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (adeira/universe#3625) adeira-source-id: b194be7e4f2fc10d51a10ed8753c440414e36b4d
See: - https://eslint.org/blog/2021/10/eslint-v8.0.0-released - https://eslint.org/docs/user-guide/migrating-to-8.0.0 Known unresolved issues (with low impact )that we decided to accept: - mysticatea/eslint-plugin-node#301 Known issues that need to be fixed first: - [x] wait for import-js/eslint-plugin-import#2191 to be released and merged here - [x] wait for gajus/eslint-plugin-flowtype#496 to be released and merged here - [x] wait for testing-library/eslint-plugin-testing-library#462 to be released and merged here - [ ] ~wait for mysticatea/eslint-plugin-node#294 to be released and merged here~ replaced (probably temporarily) with `eslint-plugin-n` which supports Eslint 8 - [x] wait for facebook/react#22248 to be released and merged here - [x] release minor/patch version of Adeira Eslint Config before merging this breaking change - [x] switch `NEXT_VERSION_ERROR` to `ERROR` (adeira/universe#3625) adeira-source-id: b194be7e4f2fc10d51a10ed8753c440414e36b4d
This PR updates this plugin to support ESLint v8.
Fixes #2211