@aarongoldenthal/eslint-config-standard 25.0.0 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +3 -3
- package/package.json +10 -10
- package/playwright-config.js +19 -1
- package/unicorn-config.js +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -8,11 +8,11 @@ for `eslint`, `@eslint-community/eslint-plugin-eslint-comments` (formerly
|
|
|
8
8
|
`eslint-plugin-n` (formerly `eslint-plugin-node`), `eslint-plugin-playwright`,
|
|
9
9
|
`eslint-plugin-promise`, `eslint-plugin-sonarjs`, `eslint-plugin-unicorn`, and
|
|
10
10
|
`eslint-plugin-vitest`. This package defines all required configurations as
|
|
11
|
-
`peerDependencies` so they
|
|
11
|
+
`peerDependencies` so they're installed and don't have to be defined in each
|
|
12
12
|
project.
|
|
13
13
|
|
|
14
14
|
Per recommended best practices, the following configurations include `overrides`
|
|
15
|
-
so they
|
|
15
|
+
so they're only applicable to a subset of files:
|
|
16
16
|
|
|
17
17
|
- `jest-config`, `vitest-config`: applicable to files matching
|
|
18
18
|
`['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)']`,
|
|
@@ -39,7 +39,7 @@ configure .eslintrc.json with this configuration:
|
|
|
39
39
|
}
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
There is also a `recommended-vitest` configuration that
|
|
42
|
+
There is also a `recommended-vitest` configuration that's the same as the
|
|
43
43
|
`recommended` config, but includes the `vitest-config` instead of the
|
|
44
44
|
`jest-config`, and can be configured with:
|
|
45
45
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aarongoldenthal/eslint-config-standard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"description": "Standard ESLint configuration settings",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
"eslint": "8.56.0",
|
|
39
39
|
"jest": "29.7.0",
|
|
40
40
|
"jest-junit": "16.0.0",
|
|
41
|
-
"markdownlint-cli2": "0.
|
|
42
|
-
"prettier": "3.
|
|
41
|
+
"markdownlint-cli2": "0.12.1",
|
|
42
|
+
"prettier": "3.2.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@eslint-community/eslint-plugin-eslint-comments": "4.1.0",
|
|
46
46
|
"eslint": "^8.27.0",
|
|
47
47
|
"eslint-config-prettier": "9.1.0",
|
|
48
|
-
"eslint-plugin-jest": "27.
|
|
49
|
-
"eslint-plugin-jsdoc": "
|
|
50
|
-
"eslint-plugin-n": "16.
|
|
51
|
-
"eslint-plugin-playwright": "
|
|
48
|
+
"eslint-plugin-jest": "27.9.0",
|
|
49
|
+
"eslint-plugin-jsdoc": "48.1.0",
|
|
50
|
+
"eslint-plugin-n": "16.6.2",
|
|
51
|
+
"eslint-plugin-playwright": "1.3.0",
|
|
52
52
|
"eslint-plugin-promise": "6.1.1",
|
|
53
|
-
"eslint-plugin-sonarjs": "0.
|
|
54
|
-
"eslint-plugin-unicorn": "
|
|
55
|
-
"eslint-plugin-vitest": "0.3.
|
|
53
|
+
"eslint-plugin-sonarjs": "0.24.0",
|
|
54
|
+
"eslint-plugin-unicorn": "51.0.1",
|
|
55
|
+
"eslint-plugin-vitest": "0.3.22"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/playwright-config.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const maxExpects = 5;
|
|
4
|
+
|
|
3
5
|
module.exports = {
|
|
4
6
|
overrides: [
|
|
5
7
|
{
|
|
@@ -10,22 +12,36 @@ module.exports = {
|
|
|
10
12
|
plugins: ['playwright'],
|
|
11
13
|
rules: {
|
|
12
14
|
'playwright/expect-expect': 'error',
|
|
15
|
+
'playwright/max-expects': ['error', { max: maxExpects }],
|
|
13
16
|
'playwright/max-nested-describe': 'error',
|
|
14
17
|
'playwright/missing-playwright-await': 'error',
|
|
18
|
+
'playwright/no-commented-out-tests': 'error',
|
|
19
|
+
'playwright/no-conditional-expect': 'error',
|
|
15
20
|
'playwright/no-conditional-in-test': 'error',
|
|
21
|
+
'playwright/no-duplicate-hooks': 'error',
|
|
16
22
|
'playwright/no-element-handle': 'error',
|
|
17
23
|
'playwright/no-eval': 'error',
|
|
18
24
|
'playwright/no-focused-test': 'error',
|
|
19
25
|
'playwright/no-force-option': 'error',
|
|
26
|
+
'playwright/no-get-by-title': 'error',
|
|
27
|
+
'playwright/no-hooks': 'off',
|
|
20
28
|
'playwright/no-nested-step': 'error',
|
|
21
29
|
'playwright/no-networkidle': 'error',
|
|
22
30
|
'playwright/no-nth-methods': 'error',
|
|
23
31
|
'playwright/no-page-pause': 'error',
|
|
24
32
|
'playwright/no-raw-locators': 'error',
|
|
33
|
+
'playwright/no-restricted-matchers': 'off',
|
|
25
34
|
'playwright/no-skipped-test': 'error',
|
|
35
|
+
'playwright/no-standalone-expect': 'error',
|
|
36
|
+
'playwright/no-unsafe-references': 'error',
|
|
26
37
|
'playwright/no-useless-await': 'error',
|
|
27
38
|
'playwright/no-useless-not': 'error',
|
|
39
|
+
'playwright/no-wait-for-selector': 'error',
|
|
28
40
|
'playwright/no-wait-for-timeout': 'error',
|
|
41
|
+
'playwright/prefer-comparison-matcher': 'error',
|
|
42
|
+
'playwright/prefer-equality-matcher': 'error',
|
|
43
|
+
'playwright/prefer-hooks-in-order': 'error',
|
|
44
|
+
'playwright/prefer-hooks-on-top': 'error',
|
|
29
45
|
'playwright/prefer-lowercase-title': 'error',
|
|
30
46
|
'playwright/prefer-strict-equal': 'error',
|
|
31
47
|
'playwright/prefer-to-be': 'error',
|
|
@@ -33,9 +49,11 @@ module.exports = {
|
|
|
33
49
|
'playwright/prefer-to-have-count': 'error',
|
|
34
50
|
'playwright/prefer-to-have-length': 'error',
|
|
35
51
|
'playwright/prefer-web-first-assertions': 'error',
|
|
52
|
+
'playwright/require-hook': 'error',
|
|
36
53
|
'playwright/require-soft-assertions': 'off',
|
|
37
54
|
'playwright/require-top-level-describe': 'error',
|
|
38
|
-
'playwright/valid-expect': 'error'
|
|
55
|
+
'playwright/valid-expect': 'error',
|
|
56
|
+
'playwright/valid-title': 'error'
|
|
39
57
|
}
|
|
40
58
|
}
|
|
41
59
|
]
|
package/unicorn-config.js
CHANGED
|
@@ -15,7 +15,7 @@ module.exports = {
|
|
|
15
15
|
rules: {
|
|
16
16
|
'unicorn/better-regex': 'error', // Recommended
|
|
17
17
|
'unicorn/catch-error-name': 'error', // Recommended
|
|
18
|
-
'unicorn/consistent-destructuring': 'error',
|
|
18
|
+
'unicorn/consistent-destructuring': 'error',
|
|
19
19
|
'unicorn/consistent-function-scoping': 'error', // Recommended
|
|
20
20
|
'unicorn/custom-error-definition': 'error',
|
|
21
21
|
'unicorn/empty-brace-spaces': 'off', // Recommended, Prettier
|