diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6f26f5..11f53b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: Install and test eslint-plugin-ava on: push: branches: - - master + - main pull_request: paths-ignore: - '*.md' @@ -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: diff --git a/create-ava-rule.js b/create-ava-rule.js index f6d3a6a..44ab3a8 100644 --- a/create-ava-rule.js +++ b/create-ava-rule.js @@ -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; diff --git a/package.json b/package.json index ddcaf3b..f0aef02 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" } diff --git a/rules/no-only-test.js b/rules/no-only-test.js index a711e8a..1f2615a 100644 --- a/rules/no-only-test.js +++ b/rules/no-only-test.js @@ -37,6 +37,7 @@ module.exports = { url: util.getDocsUrl(__filename), }, fixable: 'code', + hasSuggestions: true, schema: [], }, }; diff --git a/rules/no-skip-test.js b/rules/no-skip-test.js index c839bdd..42421e6 100644 --- a/rules/no-skip-test.js +++ b/rules/no-skip-test.js @@ -37,6 +37,7 @@ module.exports = { url: util.getDocsUrl(__filename), }, fixable: 'code', + hasSuggestions: true, schema: [], }, };