Skip to content

Support ESLint 8.x #336

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

Merged
merged 10 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does XO fail if the package has ESLint 8 installed?

Copy link
Contributor Author

@fisker fisker Oct 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because eslint-plugin-unicorn in xo don't support eslint 8, we can fix it by adding eslint-plugin-unicorn to dependencies, but I don't think it's necessary, because xo is blocking by eslint-plugin-ava, we'll get new xo very soon.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How strange; I get it with npm 8 and it seems to be some resolution error. It's weird because you'd think the dependencies are scoped within the package. But fine, please do circle back when it's all done.


# 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: [],
},
};