-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
"tests", | ||
"resolvers/*/test", | ||
"scripts", | ||
"memo-parser" | ||
"memo-parser", | ||
"lib" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,7 +69,8 @@ | |
"babylon": "^6.18.0", | ||
"chai": "^4.3.4", | ||
"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 commentThe 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 |
||
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", | ||
"eslint-import-resolver-node": "file:./resolvers/node", | ||
"eslint-import-resolver-typescript": "^1.0.2 || ^1.1.1", | ||
"eslint-import-resolver-webpack": "file:./resolvers/webpack", | ||
|
@@ -95,7 +96,7 @@ | |
"typescript-eslint-parser": "^15 || ^22.0.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" | ||
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the release of the stable version of eslint v8, I added eslint v8 to peerDeps. |
||
}, | ||
"dependencies": { | ||
"array-includes": "^3.1.3", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,11 @@ if [[ "$TRAVIS_NODE_VERSION" -lt "8" ]]; then | |
echo "Downgrading eslint-import-resolver-typescript..." | ||
npm i --no-save eslint-import-resolver-typescript@1.0.2 | ||
fi | ||
|
||
if [ "${ESLINT_VERSION}" = '8' ]; then | ||
# This is a workaround for the crash in the initial processing of the ESLint class. | ||
echo "Installing self" | ||
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 commentThe 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 commentThe 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 commentThe 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. |
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.
#2191 (comment)