Skip to content

Commit 62e2d88

Browse files
ota-meshiljharb
authored andcommitted
[New] Support eslint v8
1 parent 9a744f7 commit 62e2d88

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
lines changed

.github/workflows/node-4+.yml

+21
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
matrix:
2727
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
2828
eslint:
29+
- 8
2930
- 7
3031
- 6
3132
- 5
@@ -44,24 +45,44 @@ jobs:
4445
env:
4546
TS_PARSER: 2
4647
exclude:
48+
- node-version: 15
49+
eslint: 8
50+
- node-version: 13
51+
eslint: 8
52+
- node-version: 11
53+
eslint: 8
54+
- node-version: 10
55+
eslint: 8
56+
- node-version: 9
57+
eslint: 8
4758
- node-version: 9
4859
eslint: 7
60+
- node-version: 8
61+
eslint: 8
4962
- node-version: 8
5063
eslint: 7
64+
- node-version: 7
65+
eslint: 8
5166
- node-version: 7
5267
eslint: 7
5368
- node-version: 7
5469
eslint: 6
70+
- node-version: 6
71+
eslint: 8
5572
- node-version: 6
5673
eslint: 7
5774
- node-version: 6
5875
eslint: 6
76+
- node-version: 5
77+
eslint: 8
5978
- node-version: 5
6079
eslint: 7
6180
- node-version: 5
6281
eslint: 6
6382
- node-version: 5
6483
eslint: 5
84+
- node-version: 4
85+
eslint: 8
6586
- node-version: 4
6687
eslint: 7
6788
- node-version: 4

.nycrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"tests",
1414
"resolvers/*/test",
1515
"scripts",
16-
"memo-parser"
16+
"memo-parser",
17+
"lib"
1718
]
1819
}

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
77
## [Unreleased]
88

99
### Added
10+
- Support `eslint` v8 ([#2191], thanks [@ota-meshi])
1011
- [`no-unresolved`]: add `caseSensitiveStrict` option ([#1262], thanks [@sergei-startsev])
1112
- [`no-unused-modules`]: add eslint v8 support ([#2194], thanks [@coderaiser])
1213
- [`no-restricted-paths`]: add/restore glob pattern support ([#2219], thanks [@stropho])
@@ -924,6 +925,7 @@ for info on changes for earlier releases.
924925
[#2212]: https://github.com/import-js/eslint-plugin-import/pull/2212
925926
[#2196]: https://github.com/import-js/eslint-plugin-import/pull/2196
926927
[#2194]: https://github.com/import-js/eslint-plugin-import/pull/2194
928+
[#2191]: https://github.com/import-js/eslint-plugin-import/pull/2191
927929
[#2184]: https://github.com/import-js/eslint-plugin-import/pull/2184
928930
[#2179]: https://github.com/import-js/eslint-plugin-import/pull/2179
929931
[#2160]: https://github.com/import-js/eslint-plugin-import/pull/2160
@@ -1517,6 +1519,7 @@ for info on changes for earlier releases.
15171519
[@noelebrun]: https://github.com/noelebrun
15181520
[@ntdb]: https://github.com/ntdb
15191521
[@nwalters512]: https://github.com/nwalters512
1522+
[@ota-meshi]: https://github.com/ota-meshi
15201523
[@panrafal]: https://github.com/panrafal
15211524
[@paztis]: https://github.com/paztis
15221525
[@pcorpet]: https://github.com/pcorpet

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"babylon": "^6.18.0",
7070
"chai": "^4.3.4",
7171
"cross-env": "^4.0.0",
72-
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0",
72+
"escope": "^3.6.0",
73+
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8",
7374
"eslint-import-resolver-node": "file:./resolvers/node",
7475
"eslint-import-resolver-typescript": "^1.0.2 || ^1.1.1",
7576
"eslint-import-resolver-webpack": "file:./resolvers/webpack",
@@ -95,7 +96,7 @@
9596
"typescript-eslint-parser": "^15 || ^22.0.0"
9697
},
9798
"peerDependencies": {
98-
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0"
99+
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
99100
},
100101
"dependencies": {
101102
"array-includes": "^3.1.3",

tests/dep-time-travel.sh

+8
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,11 @@ if [[ "$TRAVIS_NODE_VERSION" -lt "8" ]]; then
3434
echo "Downgrading eslint-import-resolver-typescript..."
3535
npm i --no-save eslint-import-resolver-typescript@1.0.2
3636
fi
37+
38+
if [ "${ESLINT_VERSION}" = '8' ]; then
39+
# This is a workaround for the crash in the initial processing of the ESLint class.
40+
echo "Installing self"
41+
npm i --no-save eslint-plugin-import@'.' -f
42+
echo "Build self"
43+
npm run build
44+
fi

tests/src/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ describe('CLI regression tests', function () {
9797
},
9898
],
9999
errorCount: 1,
100-
...(semver.satisfies(eslintPkg.version, '>= 7.32 || ^8.0.0-0') && {
100+
...(semver.satisfies(eslintPkg.version, '>= 7.32 || ^8.0.0') && {
101101
fatalErrorCount: 0,
102102
}),
103103
warningCount: 0,

0 commit comments

Comments
 (0)