Skip to content

Commit 5730f92

Browse files
authored
Support ESLint 8.x
1 parent fb251f3 commit 5730f92

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.github/workflows/ci.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Install and test eslint-plugin-ava
22
on:
33
push:
44
branches:
5-
- master
5+
- main
66
pull_request:
77
paths-ignore:
88
- '*.md'
@@ -20,8 +20,11 @@ jobs:
2020
with:
2121
node-version: ${{ matrix.node-version }}
2222
- run: npm install --no-audit
23-
- run: npm test
23+
- run: npx c8 ava
2424
- uses: codecov/codecov-action@v2
25+
# `xo` can't work on ESLint 8 and Node.js 16 yet
26+
- if: ${{ matrix.node-version == '^14.17' }}
27+
run: npm install eslint@7 && npx xo
2528

2629
# FIXME: https://github.com/avajs/eslint-plugin-ava/issues/333
2730
# integration:

create-ava-rule.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function getTestModifierNames(node) {
180180
return util.getTestModifiers(node).map(property => property.name);
181181
}
182182

183-
module.exports = () => { // eslint-disable-line eslint-plugin/prefer-object-rule
183+
module.exports = () => {
184184
let isTestFile = false;
185185
let currentTestNode;
186186

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"c8": "^7.7.3",
4545
"chalk": "^4.1.1",
4646
"del": "^6.0.0",
47-
"eslint": "^7.32.0",
47+
"eslint": "^8.0.1",
4848
"eslint-ava-rule-tester": "^4.0.0",
49-
"eslint-plugin-eslint-plugin": "^3.5.3",
49+
"eslint-plugin-eslint-plugin": "^4.0.1",
5050
"execa": "^5.1.1",
5151
"listr": "^0.14.3",
5252
"outdent": "^0.8.0",
@@ -82,6 +82,7 @@
8282
"ava/no-ignored-test-files": "off",
8383
"eslint-plugin/prefer-message-ids": "off",
8484
"eslint-plugin/require-meta-docs-description": "off",
85+
"eslint-plugin/require-meta-has-suggestions": "off",
8586
"import/extensions": "off",
8687
"unicorn/prefer-module": "off"
8788
}

rules/no-only-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = {
3737
url: util.getDocsUrl(__filename),
3838
},
3939
fixable: 'code',
40+
hasSuggestions: true,
4041
schema: [],
4142
},
4243
};

rules/no-skip-test.js

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = {
3737
url: util.getDocsUrl(__filename),
3838
},
3939
fixable: 'code',
40+
hasSuggestions: true,
4041
schema: [],
4142
},
4243
};

0 commit comments

Comments
 (0)