Support ESLint v6 - #1393
Support ESLint v6#1393
Conversation
|
It's also having some sort of whitespace issue with a couple of tests as you can see here - https://ci.appveyor.com/project/benmosher/eslint-plugin-import/builds/25480510/job/i7a5k9x6j6s1hg8a#L3072. I think I've fixed it and then it comes back again haha |
1 similar comment
2 similar comments
ljharb
left a comment
There was a problem hiding this comment.
It seems like you made a bunch of unrelated formatting changes; please revert them.
|
Are you perhaps running prettier on autosave in your editor or something? If so, disable that - prettier should only be run via eslint autofix, and only on repos that use it. |
| listFilesToProcess = function (src) { | ||
| var e = new FileEnumerator() | ||
| return Array.from(e.iterateFiles(src)) | ||
| return Array.from(e.iterateFiles(src), ({ filePath, ignored })=>({ |
There was a problem hiding this comment.
| return Array.from(e.iterateFiles(src), ({ filePath, ignored })=>({ | |
| return Array.from(e.iterateFiles(src), ({ filePath, ignored }) => ({ |
|
Sorry about the double quote changes. I've reverted all of them. I have Prettier set to only work when there is a |
|
I suppose it is eslint in your editor doing that changes. The ci does not lint over |
|
Added a commit to only run tests for Would you like me to update Travis CI config to use |
|
Yes, please. |
Includes fixes for the use of `eslint/lib/util/traverser` that is now removed in ESLint 6 Co-Authored-By: golopot <golopot@gmail.com>
It's now supported
|
@ljharb OK I had to do one more thing and make |
|
Please @ljharb can you merge and release this? This is urgent now with eslint 6 in production everywhere (unfortunately).
|
|
@frederikhors If |
|
@ljharb the problem is not mine but it is here: prettier/prettier-vscode#672 |
|
Their problem is the same; upgrading to eslint v6 prior to peer deps upgrading is invalid. |
|
@ljharb still same problem today. |
The main issues are:
require.resolvewhen passing theparseroption toRuleTester(https://eslint.org/docs/user-guide/migrating-to-6.0.0#rule-tester-parser)ecmaVersionwhensourceTypeismodule(https://eslint.org/docs/user-guide/migrating-to-6.0.0#-the-default-parser-now-validates-options-more-strictly)FileEnumeratorinto what theimport/no-unused-modulesrule expects@typescript-eslint/parseris using an internal module (eslint/lib/util/traverser) which has been removed in ESLint@6 and therefore causing an error. It's been fixed in fix(parser): add simpleTraverse, replaces private ESLint util typescript-eslint/typescript-eslint#628 but not been released yet. (Updated to canary, thanks @golopot)typescript-eslint-parserbut this is an archived package. As I write this I realise I should probably use thetestVersionfunction so that tests for this are skipped oneslint>=6To test:
The only failing tests should be related to the TypeScript issue above.
Related to airbnb/javascript#2036.
Fixes #1362.