Skip to content

Commit b1c1a52

Browse files
committed
Meta tweaks
1 parent b5561e4 commit b1c1a52

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+204
-178
lines changed

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
matrix:
1616
node-version: [^18.18]
1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-node@v3
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
2222
- run: npm install --no-audit
@@ -27,8 +27,8 @@ jobs:
2727
name: Integration tests
2828
runs-on: ubuntu-latest
2929
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions/setup-node@v3
30+
- uses: actions/checkout@v4
31+
- uses: actions/setup-node@v4
3232
- run: npm install --no-audit
3333
- run: npm run integration
3434
- uses: codecov/codecov-action@v3

create-ava-rule.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const {isDeepStrictEqual} = require('util');
3+
const {isDeepStrictEqual} = require('node:util');
44
const espurify = require('espurify');
55
const enhance = require('enhance-visitors');
66
const util = require('./util');
@@ -216,7 +216,7 @@ module.exports = () => {
216216
};
217217

218218
return {
219-
hasTestModifier: mod => getTestModifierNames(currentTestNode).includes(mod),
219+
hasTestModifier: module_ => getTestModifierNames(currentTestNode).includes(module_),
220220
hasNoUtilityModifier() {
221221
const modifiers = getTestModifierNames(currentTestNode);
222222
return !modifiers.includes('before')

docs/rules/assertion-arguments.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce passing correct arguments to assertions (`ava/assertion-arguments`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/hooks-order.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce test hook ordering (`ava/hooks-order`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/max-asserts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce a limit on the number of assertions in a test (`ava/max-asserts`)
22

3-
🚫 This rule is _disabled_ in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
🚫 This rule is _disabled_ in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-async-fn-without-await.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure that async tests use `await` (`ava/no-async-fn-without-await`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-duplicate-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure tests do not have duplicate modifiers (`ava/no-duplicate-modifiers`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-identical-title.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no tests have the same title (`ava/no-identical-title`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-ignored-test-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no tests are written in ignored files (`ava/no-ignored-test-files`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-import-test-files.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no test files are imported anywhere (`ava/no-import-test-files`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-incorrect-deep-equal.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow using `deepEqual` with primitives (`ava/no-incorrect-deep-equal`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/no-inline-assertions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure assertions are not called from inline arrow functions (`ava/no-inline-assertions`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/no-nested-tests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no tests are nested (`ava/no-nested-tests`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-only-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no `test.only()` are present (`ava/no-only-test`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
66

docs/rules/no-skip-assert.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no assertions are skipped (`ava/no-skip-assert`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-skip-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no tests are skipped (`ava/no-skip-test`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧💡 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) and manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
66

docs/rules/no-todo-implementation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure `test.todo()` is not given an implementation function (`ava/no-todo-implementation`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-todo-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure no `test.todo()` is used (`ava/no-todo-test`)
22

3-
⚠️ This rule _warns_ in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
⚠️ This rule _warns_ in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/no-unknown-modifiers.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow the use of unknown test modifiers (`ava/no-unknown-modifiers`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/prefer-async-await.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prefer using async/await instead of returning a Promise (`ava/prefer-async-await`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/prefer-power-assert.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce the use of the asserts that have no [power-assert](https://github.com/power-assert-js/power-assert) alternative (`ava/prefer-power-assert`)
22

3-
🚫 This rule is _disabled_ in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
🚫 This rule is _disabled_ in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/prefer-t-regex.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prefer using `t.regex()` to test regular expressions (`ava/prefer-t-regex`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/test-title-format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure test titles have a certain format (`ava/test-title-format`)
22

3-
🚫 This rule is _disabled_ in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
🚫 This rule is _disabled_ in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/test-title.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure tests have a title (`ava/test-title`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/use-t-throws-async-well.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure that `t.throwsAsync()` and `t.notThrowsAsync()` are awaited (`ava/use-t-throws-async-well`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/use-t-well.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Disallow the incorrect use of `t` (`ava/use-t-well`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
66

docs/rules/use-t.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure test functions use `t` as their parameter (`ava/use-t`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/use-test.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure that AVA is imported with `test` as the variable name (`ava/use-test`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

docs/rules/use-true-false.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ensure that `t.true()`/`t.false()` are used instead of `t.truthy()`/`t.falsy()` (`ava/use-true-false`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/avajs/eslint-plugin-ava#recommended-config): `flat/recommended`, ✅ `recommended`.
3+
💼 This rule is enabled in the `recommended` [config](https://github.com/avajs/eslint-plugin-ava#recommended-config).
44

55
<!-- end auto-generated rule header -->
66

index.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const path = require('path');
3+
const path = require('node:path');
44
const importModules = require('import-modules');
55

66
const rules = {
@@ -54,13 +54,13 @@ module.exports = {
5454
...rules,
5555
},
5656
},
57-
"flat/recommended": {
57+
'flat/recommended': {
5858
plugins: {
59-
'ava': 'ava'
59+
ava: 'ava',
6060
},
6161
rules: {
62-
...rules
63-
}
64-
}
62+
...rules,
63+
},
64+
},
6565
},
6666
};

license

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
3+
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "ESLint rules for AVA",
55
"license": "MIT",
66
"repository": "avajs/eslint-plugin-ava",
7+
"sideEffects": false,
78
"engines": {
89
"node": "^18.18 || >=20"
910
},
@@ -14,7 +15,7 @@
1415
"lint:js": "xo",
1516
"test": "npm-run-all lint test:unit",
1617
"test:unit": "c8 ava",
17-
"update:eslint-docs": "eslint-doc-generator --rule-doc-section-include Pass --rule-doc-section-include Fail --url-configs \"https://github.com/avajs/eslint-plugin-ava#recommended-config\""
18+
"update:eslint-docs": "eslint-doc-generator --rule-doc-section-include Pass --rule-doc-section-include Fail --url-configs \"https://github.com/avajs/eslint-plugin-ava#recommended-config\" --ignore-config=flat/recommended"
1819
},
1920
"files": [
2021
"index.js",
@@ -53,14 +54,14 @@
5354
"eslint": "^8.26.0",
5455
"eslint-ava-rule-tester": "^4.0.0",
5556
"eslint-doc-generator": "^1.0.0",
56-
"eslint-plugin-eslint-plugin": "^5.0.6",
57+
"eslint-plugin-eslint-plugin": "^6.1.0",
5758
"execa": "^5.1.1",
5859
"listr": "^0.14.3",
5960
"npm-run-all": "^4.1.5",
6061
"outdent": "^0.8.0",
6162
"pify": "^5.0.0",
6263
"tempy": "^1.0.1",
63-
"xo": "^0.52.4"
64+
"xo": "^0.58.0"
6465
},
6566
"peerDependencies": {
6667
"eslint": ">=9"
@@ -102,7 +103,9 @@
102103
"eslint-plugin/require-meta-has-suggestions": "off",
103104
"eslint-plugin/prefer-placeholders": "off",
104105
"import/extensions": "off",
105-
"unicorn/prefer-module": "off"
106+
"unicorn/prefer-module": "off",
107+
"unicorn/prefer-top-level-await": "off",
108+
"eslint-plugin/require-meta-docs-recommended": "off"
106109
}
107110
},
108111
"c8": {

0 commit comments

Comments
 (0)