Skip to content

Commit

Permalink
Support ESLint 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored Oct 20, 2021
1 parent fb251f3 commit 5730f92
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Install and test eslint-plugin-ava
on:
push:
branches:
- master
- main
pull_request:
paths-ignore:
- '*.md'
Expand All @@ -20,8 +20,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install --no-audit
- run: npm test
- run: npx c8 ava
- uses: codecov/codecov-action@v2
# `xo` can't work on ESLint 8 and Node.js 16 yet
- if: ${{ matrix.node-version == '^14.17' }}
run: npm install eslint@7 && npx xo

# FIXME: https://github.com/avajs/eslint-plugin-ava/issues/333
# integration:
Expand Down
2 changes: 1 addition & 1 deletion create-ava-rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function getTestModifierNames(node) {
return util.getTestModifiers(node).map(property => property.name);
}

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

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
"c8": "^7.7.3",
"chalk": "^4.1.1",
"del": "^6.0.0",
"eslint": "^7.32.0",
"eslint": "^8.0.1",
"eslint-ava-rule-tester": "^4.0.0",
"eslint-plugin-eslint-plugin": "^3.5.3",
"eslint-plugin-eslint-plugin": "^4.0.1",
"execa": "^5.1.1",
"listr": "^0.14.3",
"outdent": "^0.8.0",
Expand Down Expand Up @@ -82,6 +82,7 @@
"ava/no-ignored-test-files": "off",
"eslint-plugin/prefer-message-ids": "off",
"eslint-plugin/require-meta-docs-description": "off",
"eslint-plugin/require-meta-has-suggestions": "off",
"import/extensions": "off",
"unicorn/prefer-module": "off"
}
Expand Down
1 change: 1 addition & 0 deletions rules/no-only-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
url: util.getDocsUrl(__filename),
},
fixable: 'code',
hasSuggestions: true,
schema: [],
},
};
1 change: 1 addition & 0 deletions rules/no-skip-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
url: util.getDocsUrl(__filename),
},
fixable: 'code',
hasSuggestions: true,
schema: [],
},
};

0 comments on commit 5730f92

Please sign in to comment.