Skip to content

Commit

Permalink
[New] Support eslint v8
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi authored and ljharb committed Aug 16, 2021
1 parent 9a744f7 commit 62e2d88
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/node-4+.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
eslint:
- 8
- 7
- 6
- 5
Expand All @@ -44,24 +45,44 @@ jobs:
env:
TS_PARSER: 2
exclude:
- node-version: 15
eslint: 8
- node-version: 13
eslint: 8
- node-version: 11
eslint: 8
- node-version: 10
eslint: 8
- node-version: 9
eslint: 8
- node-version: 9
eslint: 7
- node-version: 8
eslint: 8
- node-version: 8
eslint: 7
- node-version: 7
eslint: 8
- node-version: 7
eslint: 7
- node-version: 7
eslint: 6
- node-version: 6
eslint: 8
- node-version: 6
eslint: 7
- node-version: 6
eslint: 6
- node-version: 5
eslint: 8
- node-version: 5
eslint: 7
- node-version: 5
eslint: 6
- node-version: 5
eslint: 5
- node-version: 4
eslint: 8
- node-version: 4
eslint: 7
- node-version: 4
Expand Down
3 changes: 2 additions & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"tests",
"resolvers/*/test",
"scripts",
"memo-parser"
"memo-parser",
"lib"
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
## [Unreleased]

### Added
- Support `eslint` v8 ([#2191], thanks [@ota-meshi])
- [`no-unresolved`]: add `caseSensitiveStrict` option ([#1262], thanks [@sergei-startsev])
- [`no-unused-modules`]: add eslint v8 support ([#2194], thanks [@coderaiser])
- [`no-restricted-paths`]: add/restore glob pattern support ([#2219], thanks [@stropho])
Expand Down Expand Up @@ -924,6 +925,7 @@ for info on changes for earlier releases.
[#2212]: https://github.com/import-js/eslint-plugin-import/pull/2212
[#2196]: https://github.com/import-js/eslint-plugin-import/pull/2196
[#2194]: https://github.com/import-js/eslint-plugin-import/pull/2194
[#2191]: https://github.com/import-js/eslint-plugin-import/pull/2191
[#2184]: https://github.com/import-js/eslint-plugin-import/pull/2184
[#2179]: https://github.com/import-js/eslint-plugin-import/pull/2179
[#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160
Expand Down Expand Up @@ -1517,6 +1519,7 @@ for info on changes for earlier releases.
[@noelebrun]: https://github.com/noelebrun
[@ntdb]: https://github.com/ntdb
[@nwalters512]: https://github.com/nwalters512
[@ota-meshi]: https://github.com/ota-meshi
[@panrafal]: https://github.com/panrafal
[@paztis]: https://github.com/paztis
[@pcorpet]: https://github.com/pcorpet
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"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",
Expand All @@ -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"
},
"dependencies": {
"array-includes": "^3.1.3",
Expand Down
8 changes: 8 additions & 0 deletions tests/dep-time-travel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion tests/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('CLI regression tests', function () {
},
],
errorCount: 1,
...(semver.satisfies(eslintPkg.version, '>= 7.32 || ^8.0.0-0') && {
...(semver.satisfies(eslintPkg.version, '>= 7.32 || ^8.0.0') && {
fatalErrorCount: 0,
}),
warningCount: 0,
Expand Down

0 comments on commit 62e2d88

Please sign in to comment.