@aarongoldenthal/eslint-config-standard 14.0.0 → 16.0.1

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/index.js CHANGED
@@ -57,6 +57,7 @@ module.exports = {
57
57
  'no-alert': 'error',
58
58
  'no-array-constructor': 'error',
59
59
  'no-console': 'off',
60
+ 'no-constant-binary-expression': 'error',
60
61
  'no-constructor-return': 'error',
61
62
  'no-div-regex': 'error',
62
63
  'no-duplicate-imports': 'error',
package/jest-config.js CHANGED
@@ -1,44 +1,75 @@
1
1
  'use strict';
2
2
 
3
3
  module.exports = {
4
- env: {
5
- jest: true
6
- },
7
- extends: ['plugin:jest/recommended'],
8
- plugins: ['jest'],
9
- rules: {
10
- 'jest/consistent-test-it': [
11
- 'error',
12
- { fn: 'it', withinDescribe: 'it' }
13
- ],
14
- 'jest/expect-expect': 'error',
15
- 'jest/max-nested-describe': 'error',
16
- 'jest/no-alias-methods': 'error',
17
- 'jest/no-commented-out-tests': 'error',
18
- 'jest/no-disabled-tests': 'error',
19
- 'jest/no-duplicate-hooks': 'error',
20
- 'jest/no-conditional-in-test': 'error',
21
- 'jest/no-restricted-matchers': [
22
- 'error',
23
- {
24
- toBeTruthy: 'Avoid `toBeTruthy`',
25
- toBeFalsy: 'Avoid `toBeFalsy`'
4
+ overrides: [
5
+ {
6
+ files: [
7
+ '**/__tests__/**/*.[jt]s?(x)',
8
+ '**/?(*.)+(spec|test).[jt]s?(x)'
9
+ ],
10
+ env: {
11
+ jest: true
12
+ },
13
+ plugins: ['jest'],
14
+ rules: {
15
+ 'jest/consistent-test-it': [
16
+ 'error',
17
+ { fn: 'it', withinDescribe: 'it' }
18
+ ],
19
+ 'jest/expect-expect': 'error',
20
+ 'jest/max-expects': ['error', { max: 5 }],
21
+ 'jest/max-nested-describe': 'error',
22
+ 'jest/no-alias-methods': 'error',
23
+ 'jest/no-commented-out-tests': 'error',
24
+ 'jest/no-conditional-expect': 'error',
25
+ 'jest/no-conditional-in-test': 'error',
26
+ 'jest/no-deprecated-functions': 'error',
27
+ 'jest/no-disabled-tests': 'error',
28
+ 'jest/no-done-callback': 'error',
29
+ 'jest/no-duplicate-hooks': 'error',
30
+ 'jest/no-export': 'error',
31
+ 'jest/no-focused-tests': 'error',
32
+ 'jest/no-hooks': 'off',
33
+ 'jest/no-identical-title': 'error',
34
+ 'jest/no-interpolation-in-snapshots': 'error',
35
+ 'jest/no-jasmine-globals': 'error',
36
+ 'jest/no-jest-import': 'error',
37
+ 'jest/no-large-snapshots': 'off',
38
+ 'jest/no-mocks-import': 'error',
39
+ 'jest/no-restricted-matchers': [
40
+ 'error',
41
+ {
42
+ toBeTruthy: 'Avoid `toBeTruthy`',
43
+ toBeFalsy: 'Avoid `toBeFalsy`'
44
+ }
45
+ ],
46
+ 'jest/no-standalone-expect': 'error',
47
+ 'jest/no-test-prefixes': 'error',
48
+ 'jest/no-test-return-statement': 'error',
49
+ 'jest/prefer-called-with': 'error',
50
+ 'jest/prefer-comparison-matcher': 'error',
51
+ 'jest/prefer-equality-matcher': 'error',
52
+ 'jest/prefer-expect-assertions': 'error',
53
+ 'jest/prefer-expect-resolves': 'error',
54
+ 'jest/prefer-hooks-in-order': 'error',
55
+ 'jest/prefer-hooks-on-top': 'error',
56
+ 'jest/prefer-lowercase-title': 'error',
57
+ 'jest/prefer-mock-promise-shorthand': 'error',
58
+ 'jest/prefer-snapshot-hint': 'error',
59
+ 'jest/prefer-spy-on': 'error',
60
+ 'jest/prefer-strict-equal': 'error',
61
+ 'jest/prefer-to-be': 'error',
62
+ 'jest/prefer-to-contain': 'error',
63
+ 'jest/prefer-to-have-length': 'error',
64
+ 'jest/prefer-todo': 'error',
65
+ 'jest/require-hook': 'error',
66
+ 'jest/require-to-throw-message': 'error',
67
+ 'jest/require-top-level-describe': 'error',
68
+ 'jest/valid-describe-callback': 'error',
69
+ 'jest/valid-expect': 'error',
70
+ 'jest/valid-expect-in-promise': 'error',
71
+ 'jest/valid-title': 'error'
26
72
  }
27
- ],
28
- 'jest/prefer-called-with': 'error',
29
- 'jest/prefer-comparison-matcher': 'error',
30
- 'jest/prefer-equality-matcher': 'error',
31
- 'jest/prefer-expect-assertions': 'error',
32
- 'jest/prefer-expect-resolves': 'error',
33
- 'jest/prefer-lowercase-title': 'error',
34
- 'jest/prefer-snapshot-hint': 'error',
35
- 'jest/prefer-spy-on': 'error',
36
- 'jest/prefer-strict-equal': 'error',
37
- 'jest/prefer-to-be': 'error',
38
- 'jest/prefer-to-contain': 'error',
39
- 'jest/prefer-to-have-length': 'error',
40
- 'jest/prefer-todo': 'error',
41
- 'jest/require-top-level-describe': 'error',
42
- 'jest/require-to-throw-message': 'error'
43
- }
73
+ }
74
+ ]
44
75
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aarongoldenthal/eslint-config-standard",
3
- "version": "14.0.0",
3
+ "version": "16.0.1",
4
4
  "description": "Standard ESLint configuration settings",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "author": "Aaron Goldenthal <npm@aarongoldenthal.com>",
24
24
  "license": "MIT",
25
25
  "engines": {
26
- "node": "^12.20.0 || ^14.15.0 || >=16.0.0"
26
+ "node": "^14.15.0 || ^16.13.0 || >=18.0.0"
27
27
  },
28
28
  "files": [
29
29
  "index.js",
@@ -35,20 +35,20 @@
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.1.4",
39
- "eslint-plugin-jsdoc": "^39.0.1",
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.13.0",
42
- "eslint-plugin-unicorn": "^42.0.0"
41
+ "eslint-plugin-sonarjs": "^0.15.0",
42
+ "eslint-plugin-unicorn": "^43.0.2"
43
43
  },
44
44
  "devDependencies": {
45
- "eslint": "^8.13.0",
46
- "jest": "^27.5.1",
47
- "jest-junit": "^13.1.0",
48
- "markdownlint-cli": "^0.31.1",
49
- "prettier": "^2.6.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
- "eslint": "^8.0.1"
52
+ "eslint": "^8.14.0"
53
53
  }
54
54
  }
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',