@aarongoldenthal/eslint-config-standard 23.1.0 → 24.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/README.md +6 -4
- package/index.js +3 -2
- package/package.json +21 -21
- package/playwright-config.js +1 -0
- package/sonarjs-config.js +4 -1
- package/unicorn-config.js +8 -8
package/README.md
CHANGED
|
@@ -6,14 +6,16 @@ Custom standard ESLint configuration for all projects. Includes configurations
|
|
|
6
6
|
for `eslint`, `@eslint-community/eslint-plugin-eslint-comments` (formerly
|
|
7
7
|
`eslint-plugin-eslint-comments`), `eslint-plugin-jest`, `eslint-plugin-jsdoc`,
|
|
8
8
|
`eslint-plugin-n` (formerly `eslint-plugin-node`), `eslint-plugin-playwright`,
|
|
9
|
-
`eslint-plugin-promise`, `eslint-plugin-sonarjs`,
|
|
10
|
-
This package defines all required configurations as
|
|
11
|
-
installed and do not have to be defined in each
|
|
9
|
+
`eslint-plugin-promise`, `eslint-plugin-sonarjs`, `eslint-plugin-unicorn`, and
|
|
10
|
+
`eslint-plugin-vitest`. This package defines all required configurations as
|
|
11
|
+
`peerDependencies` so they are installed and do not have to be defined in each
|
|
12
|
+
project.
|
|
12
13
|
|
|
13
14
|
Per recommended best practices, the following configurations include `overrides`
|
|
14
15
|
so they are only applicable to a subset of files:
|
|
15
16
|
|
|
16
|
-
- `jest-config`: applicable to files matching
|
|
17
|
+
- `jest-config`, `vitest-config`: applicable to files matching
|
|
18
|
+
`['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)']`,
|
|
17
19
|
which is the [default filter for Jest test files](https://jestjs.io/docs/configuration#testmatch-arraystring).
|
|
18
20
|
- `playwright-config`: applicable to files matching `['**/*.pwtest.[jt]s']`,
|
|
19
21
|
which differentiates them from Jest test files.
|
package/index.js
CHANGED
|
@@ -203,9 +203,10 @@ module.exports = {
|
|
|
203
203
|
'no-nested-ternary': 'off',
|
|
204
204
|
'no-new': 'error',
|
|
205
205
|
'no-new-func': 'error',
|
|
206
|
-
'no-new-object': '
|
|
206
|
+
'no-new-object': 'off',
|
|
207
207
|
'no-new-wrappers': 'error',
|
|
208
208
|
'no-nonoctal-decimal-escape': 'error', // Recommended
|
|
209
|
+
'no-object-constructor': 'error',
|
|
209
210
|
'no-octal': 'error', // Recommended
|
|
210
211
|
'no-octal-escape': 'error',
|
|
211
212
|
'no-param-reassign': ['error', { props: false }],
|
|
@@ -219,7 +220,7 @@ module.exports = {
|
|
|
219
220
|
'no-restricted-properties': 'off',
|
|
220
221
|
'no-restricted-syntax': 'off',
|
|
221
222
|
'no-return-assign': 'error',
|
|
222
|
-
'no-return-await': '
|
|
223
|
+
'no-return-await': 'off',
|
|
223
224
|
'no-script-url': 'error',
|
|
224
225
|
'no-sequences': ['error', { allowInParentheses: false }],
|
|
225
226
|
'no-shadow': 'error',
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aarongoldenthal/eslint-config-standard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0",
|
|
4
4
|
"description": "Standard ESLint configuration settings",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"hooks
|
|
8
|
-
"hooks
|
|
9
|
-
"lint": "npm run lint
|
|
10
|
-
"lint
|
|
11
|
-
"lint
|
|
12
|
-
"prettier
|
|
13
|
-
"prettier
|
|
7
|
+
"hooks:pre-commit": "npm run lint && npm run prettier:check",
|
|
8
|
+
"hooks:pre-push": "npm audit --audit-level=high && npm test",
|
|
9
|
+
"lint": "npm run lint:js && npm run lint:md",
|
|
10
|
+
"lint:js": "eslint .",
|
|
11
|
+
"lint:md": "markdownlint-cli2 \"**/*.md\" \"#node_modules\"",
|
|
12
|
+
"prettier:check": "prettier --check .",
|
|
13
|
+
"prettier:fix": "prettier --write .",
|
|
14
14
|
"test": "jest --ci"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"author": "Aaron Goldenthal <npm@aarongoldenthal.com>",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": "^
|
|
26
|
+
"node": "^18.12.0 || >=20.0.0"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"index.js",
|
|
@@ -35,23 +35,23 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://gitlab.com/gitlab-ci-utils/eslint-config-standard",
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"eslint": "8.
|
|
39
|
-
"jest": "29.
|
|
38
|
+
"eslint": "8.50.0",
|
|
39
|
+
"jest": "29.7.0",
|
|
40
40
|
"jest-junit": "16.0.0",
|
|
41
|
-
"markdownlint-cli2": "0.
|
|
42
|
-
"prettier": "3.0.
|
|
41
|
+
"markdownlint-cli2": "0.10.0",
|
|
42
|
+
"prettier": "3.0.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@eslint-community/eslint-plugin-eslint-comments": "
|
|
45
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.1.0",
|
|
46
46
|
"eslint": "^8.27.0",
|
|
47
|
-
"eslint-config-prettier": "
|
|
48
|
-
"eslint-plugin-jest": "27.2
|
|
49
|
-
"eslint-plugin-jsdoc": "46.
|
|
50
|
-
"eslint-plugin-n": "16.0
|
|
51
|
-
"eslint-plugin-playwright": "0.
|
|
47
|
+
"eslint-config-prettier": "9.0.0",
|
|
48
|
+
"eslint-plugin-jest": "27.4.2",
|
|
49
|
+
"eslint-plugin-jsdoc": "46.8.2",
|
|
50
|
+
"eslint-plugin-n": "16.1.0",
|
|
51
|
+
"eslint-plugin-playwright": "0.16.0",
|
|
52
52
|
"eslint-plugin-promise": "6.1.1",
|
|
53
|
-
"eslint-plugin-sonarjs": "0.
|
|
53
|
+
"eslint-plugin-sonarjs": "0.21.0",
|
|
54
54
|
"eslint-plugin-unicorn": "48.0.1",
|
|
55
|
-
"eslint-plugin-vitest": "0.
|
|
55
|
+
"eslint-plugin-vitest": "0.3.1"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/playwright-config.js
CHANGED
|
@@ -21,6 +21,7 @@ module.exports = {
|
|
|
21
21
|
'playwright/no-networkidle': 'error',
|
|
22
22
|
'playwright/no-nth-methods': 'error',
|
|
23
23
|
'playwright/no-page-pause': 'error',
|
|
24
|
+
'playwright/no-raw-locators': 'error',
|
|
24
25
|
'playwright/no-skipped-test': 'error',
|
|
25
26
|
'playwright/no-useless-await': 'error',
|
|
26
27
|
'playwright/no-useless-not': 'error',
|
package/sonarjs-config.js
CHANGED
|
@@ -13,7 +13,10 @@ module.exports = {
|
|
|
13
13
|
'sonarjs/no-all-duplicated-branches': 'error',
|
|
14
14
|
'sonarjs/no-collapsible-if': 'error',
|
|
15
15
|
'sonarjs/no-collection-size-mischeck': 'error',
|
|
16
|
-
'sonarjs/no-duplicate-string': [
|
|
16
|
+
'sonarjs/no-duplicate-string': [
|
|
17
|
+
'error',
|
|
18
|
+
{ threshold: noDuplicateStringThreshold }
|
|
19
|
+
],
|
|
17
20
|
'sonarjs/no-duplicated-branches': 'error',
|
|
18
21
|
'sonarjs/no-element-overwrite': 'error',
|
|
19
22
|
'sonarjs/no-empty-collection': 'error',
|
package/unicorn-config.js
CHANGED
|
@@ -24,12 +24,12 @@ module.exports = {
|
|
|
24
24
|
'unicorn/expiring-todo-comments': 'off', // Recommended
|
|
25
25
|
'unicorn/explicit-length-check': 'error', // Recommended
|
|
26
26
|
'unicorn/filename-case': ['error', { case: 'kebabCase' }], // Recommended
|
|
27
|
-
'unicorn/import-style': '
|
|
27
|
+
'unicorn/import-style': 'error', // Recommended
|
|
28
28
|
'unicorn/new-for-builtins': 'error', // Recommended
|
|
29
29
|
'unicorn/no-abusive-eslint-disable': 'error', // Recommended
|
|
30
30
|
'unicorn/no-array-callback-reference': 'error', // Recommended
|
|
31
31
|
'unicorn/no-array-for-each': 'error', // Recommended
|
|
32
|
-
'unicorn/no-array-method-this-argument': '
|
|
32
|
+
'unicorn/no-array-method-this-argument': 'error', // Recommended
|
|
33
33
|
'unicorn/no-array-push-push': 'error', // Recommended
|
|
34
34
|
'unicorn/no-array-reduce': 'error', // Recommended
|
|
35
35
|
'unicorn/no-await-expression-member': 'error', // Recommended
|
|
@@ -45,7 +45,7 @@ module.exports = {
|
|
|
45
45
|
'unicorn/no-negated-condition': 'error', // Recommended
|
|
46
46
|
'unicorn/no-nested-ternary': 'error', // Recommended, Prettier
|
|
47
47
|
'unicorn/no-new-array': 'error', // Recommended
|
|
48
|
-
'unicorn/no-new-buffer': '
|
|
48
|
+
'unicorn/no-new-buffer': 'error', // Recommended
|
|
49
49
|
'unicorn/no-null': 'error', // Recommended
|
|
50
50
|
'unicorn/no-object-as-default-parameter': 'error', // Recommended
|
|
51
51
|
'unicorn/no-process-exit': 'error', // Recommended
|
|
@@ -82,7 +82,7 @@ module.exports = {
|
|
|
82
82
|
'unicorn/prefer-dom-node-remove': 'error', // Recommended
|
|
83
83
|
'unicorn/prefer-dom-node-text-content': 'error', // Recommended
|
|
84
84
|
'unicorn/prefer-event-target': 'error', // Recommended
|
|
85
|
-
'unicorn/prefer-export-from': '
|
|
85
|
+
'unicorn/prefer-export-from': 'error', // Recommended
|
|
86
86
|
'unicorn/prefer-includes': 'error', // Recommended
|
|
87
87
|
'unicorn/prefer-json-parse-buffer': 'off',
|
|
88
88
|
'unicorn/prefer-keyboard-event-key': 'error', // Recommended
|
|
@@ -93,13 +93,13 @@ module.exports = {
|
|
|
93
93
|
'unicorn/prefer-module': 'off', // Recommended
|
|
94
94
|
'unicorn/prefer-native-coercion-functions': 'error', // Recommended
|
|
95
95
|
'unicorn/prefer-negative-index': 'error', // Recommended
|
|
96
|
-
'unicorn/prefer-node-protocol': '
|
|
96
|
+
'unicorn/prefer-node-protocol': 'error', // Recommended
|
|
97
97
|
'unicorn/prefer-number-properties': 'error', // Recommended
|
|
98
98
|
'unicorn/prefer-object-from-entries': 'off', // Recommended
|
|
99
99
|
'unicorn/prefer-optional-catch-binding': 'error', // Recommended
|
|
100
|
-
'unicorn/prefer-prototype-methods': '
|
|
100
|
+
'unicorn/prefer-prototype-methods': 'error', // Recommended
|
|
101
101
|
'unicorn/prefer-query-selector': 'error', // Recommended
|
|
102
|
-
'unicorn/prefer-reflect-apply': '
|
|
102
|
+
'unicorn/prefer-reflect-apply': 'error', // Recommended
|
|
103
103
|
'unicorn/prefer-regexp-test': 'error', // Recommended
|
|
104
104
|
'unicorn/prefer-set-has': 'error', // Recommended
|
|
105
105
|
'unicorn/prefer-set-size': 'error', // Recommended
|
|
@@ -129,7 +129,7 @@ module.exports = {
|
|
|
129
129
|
'unicorn/require-post-message-target-origin': 'off',
|
|
130
130
|
'unicorn/string-content': 'off',
|
|
131
131
|
'unicorn/switch-case-braces': ['error', 'always'], // Recommended
|
|
132
|
-
'unicorn/template-indent': '
|
|
132
|
+
'unicorn/template-indent': 'error', // Recommended
|
|
133
133
|
'unicorn/text-encoding-identifier-case': 'error', // Recommended
|
|
134
134
|
'unicorn/throw-new-error': 'error' // Recommended
|
|
135
135
|
}
|