@aarongoldenthal/eslint-config-standard 15.0.0 → 16.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/jest-config.js +24 -3
- package/package.json +10 -10
- package/unicorn-config.js +2 -0
package/jest-config.js
CHANGED
|
@@ -4,7 +4,6 @@ module.exports = {
|
|
|
4
4
|
env: {
|
|
5
5
|
jest: true
|
|
6
6
|
},
|
|
7
|
-
extends: ['plugin:jest/recommended'],
|
|
8
7
|
plugins: ['jest'],
|
|
9
8
|
rules: {
|
|
10
9
|
'jest/consistent-test-it': [
|
|
@@ -12,12 +11,25 @@ module.exports = {
|
|
|
12
11
|
{ fn: 'it', withinDescribe: 'it' }
|
|
13
12
|
],
|
|
14
13
|
'jest/expect-expect': 'error',
|
|
14
|
+
'jest/max-expects': ['error', { max: 5 }],
|
|
15
15
|
'jest/max-nested-describe': 'error',
|
|
16
16
|
'jest/no-alias-methods': 'error',
|
|
17
17
|
'jest/no-commented-out-tests': 'error',
|
|
18
|
+
'jest/no-conditional-expect': 'error',
|
|
19
|
+
'jest/no-conditional-in-test': 'error',
|
|
20
|
+
'jest/no-deprecated-functions': 'error',
|
|
18
21
|
'jest/no-disabled-tests': 'error',
|
|
22
|
+
'jest/no-done-callback': 'error',
|
|
19
23
|
'jest/no-duplicate-hooks': 'error',
|
|
20
|
-
'jest/no-
|
|
24
|
+
'jest/no-export': 'error',
|
|
25
|
+
'jest/no-focused-tests': 'error',
|
|
26
|
+
'jest/no-hooks': 'off',
|
|
27
|
+
'jest/no-identical-title': 'error',
|
|
28
|
+
'jest/no-interpolation-in-snapshots': 'error',
|
|
29
|
+
'jest/no-jasmine-globals': 'error',
|
|
30
|
+
'jest/no-jest-import': 'error',
|
|
31
|
+
'jest/no-large-snapshots': 'off',
|
|
32
|
+
'jest/no-mocks-import': 'error',
|
|
21
33
|
'jest/no-restricted-matchers': [
|
|
22
34
|
'error',
|
|
23
35
|
{
|
|
@@ -25,6 +37,9 @@ module.exports = {
|
|
|
25
37
|
toBeFalsy: 'Avoid `toBeFalsy`'
|
|
26
38
|
}
|
|
27
39
|
],
|
|
40
|
+
'jest/no-standalone-expect': 'error',
|
|
41
|
+
'jest/no-test-prefixes': 'error',
|
|
42
|
+
'jest/no-test-return-statement': 'error',
|
|
28
43
|
'jest/prefer-called-with': 'error',
|
|
29
44
|
'jest/prefer-comparison-matcher': 'error',
|
|
30
45
|
'jest/prefer-equality-matcher': 'error',
|
|
@@ -33,6 +48,7 @@ module.exports = {
|
|
|
33
48
|
'jest/prefer-hooks-in-order': 'error',
|
|
34
49
|
'jest/prefer-hooks-on-top': 'error',
|
|
35
50
|
'jest/prefer-lowercase-title': 'error',
|
|
51
|
+
'jest/prefer-mock-promise-shorthand': 'error',
|
|
36
52
|
'jest/prefer-snapshot-hint': 'error',
|
|
37
53
|
'jest/prefer-spy-on': 'error',
|
|
38
54
|
'jest/prefer-strict-equal': 'error',
|
|
@@ -40,7 +56,12 @@ module.exports = {
|
|
|
40
56
|
'jest/prefer-to-contain': 'error',
|
|
41
57
|
'jest/prefer-to-have-length': 'error',
|
|
42
58
|
'jest/prefer-todo': 'error',
|
|
59
|
+
'jest/require-hook': 'error',
|
|
60
|
+
'jest/require-to-throw-message': 'error',
|
|
43
61
|
'jest/require-top-level-describe': 'error',
|
|
44
|
-
'jest/
|
|
62
|
+
'jest/valid-describe-callback': 'error',
|
|
63
|
+
'jest/valid-expect': 'error',
|
|
64
|
+
'jest/valid-expect-in-promise': 'error',
|
|
65
|
+
'jest/valid-title': 'error'
|
|
45
66
|
}
|
|
46
67
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aarongoldenthal/eslint-config-standard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Standard ESLint configuration settings",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"homepage": "https://gitlab.com/gitlab-ci-utils/eslint-config-standard",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"eslint-config-prettier": "^8.5.0",
|
|
38
|
-
"eslint-plugin-jest": "^26.
|
|
39
|
-
"eslint-plugin-jsdoc": "^39.3.
|
|
38
|
+
"eslint-plugin-jest": "^26.8.7",
|
|
39
|
+
"eslint-plugin-jsdoc": "^39.3.6",
|
|
40
40
|
"eslint-plugin-node": "^11.1.0",
|
|
41
|
-
"eslint-plugin-sonarjs": "^0.
|
|
42
|
-
"eslint-plugin-unicorn": "^
|
|
41
|
+
"eslint-plugin-sonarjs": "^0.15.0",
|
|
42
|
+
"eslint-plugin-unicorn": "^43.0.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"eslint": "^8.
|
|
46
|
-
"jest": "^28.1.
|
|
47
|
-
"jest-junit": "^
|
|
48
|
-
"markdownlint-cli": "^0.
|
|
49
|
-
"prettier": "^2.
|
|
45
|
+
"eslint": "^8.22.0",
|
|
46
|
+
"jest": "^28.1.3",
|
|
47
|
+
"jest-junit": "^14.0.0",
|
|
48
|
+
"markdownlint-cli": "^0.32.2",
|
|
49
|
+
"prettier": "^2.7.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"eslint": "^8.14.0"
|
package/unicorn-config.js
CHANGED
|
@@ -68,10 +68,12 @@ module.exports = {
|
|
|
68
68
|
'unicorn/prefer-dom-node-dataset': 'error',
|
|
69
69
|
'unicorn/prefer-dom-node-remove': 'error',
|
|
70
70
|
'unicorn/prefer-dom-node-text-content': 'error',
|
|
71
|
+
'unicorn/prefer-event-target': 'off',
|
|
71
72
|
'unicorn/prefer-export-from': 'off',
|
|
72
73
|
'unicorn/prefer-includes': 'error',
|
|
73
74
|
'unicorn/prefer-json-parse-buffer': 'off',
|
|
74
75
|
'unicorn/prefer-keyboard-event-key': 'error',
|
|
76
|
+
'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
75
77
|
'unicorn/prefer-math-trunc': 'off',
|
|
76
78
|
'unicorn/prefer-modern-dom-apis': 'error',
|
|
77
79
|
'unicorn/prefer-modern-math-apis': 'error',
|