@pob/eslint-config 55.3.0 → 56.1.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.
@@ -1,8 +1,8 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
- complexity: ['warn', { max: 8 }],
6
- 'max-depth': ['warn', 6],
5
+ complexity: ["warn", { max: 8 }],
6
+ "max-depth": ["warn", 6],
7
7
  },
8
8
  };
@@ -1,11 +1,11 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
- 'no-console': 'off',
5
+ "no-console": "off",
6
6
 
7
- 'import/no-extraneous-dependencies': [
8
- 'error',
7
+ "import/no-extraneous-dependencies": [
8
+ "error",
9
9
  {
10
10
  devDependencies: true,
11
11
  },
@@ -1,125 +1,125 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
5
  // https://eslint.org/docs/rules/for-direction
6
- 'for-direction': 'error',
6
+ "for-direction": "error",
7
7
 
8
8
  // https://eslint.org/docs/rules/getter-return
9
- 'getter-return': ['error', { allowImplicit: true }],
9
+ "getter-return": ["error", { allowImplicit: true }],
10
10
 
11
11
  // https://eslint.org/docs/rules/no-async-promise-executor
12
- 'no-async-promise-executor': 'error',
12
+ "no-async-promise-executor": "error",
13
13
 
14
14
  // https://eslint.org/docs/rules/no-compare-neg-zero
15
- 'no-compare-neg-zero': 'error',
15
+ "no-compare-neg-zero": "error",
16
16
 
17
17
  // https://eslint.org/docs/rules/no-cond-assign
18
- 'no-cond-assign': ['error', 'always'],
18
+ "no-cond-assign": ["error", "always"],
19
19
 
20
20
  // https://eslint.org/docs/rules/no-console
21
- 'no-console': 'warn',
21
+ "no-console": "warn",
22
22
 
23
23
  // https://eslint.org/docs/rules/no-control-regex
24
- 'no-control-regex': 'error',
24
+ "no-control-regex": "error",
25
25
 
26
26
  // https://eslint.org/docs/rules/no-debugger
27
- 'no-debugger': 'error',
27
+ "no-debugger": "error",
28
28
 
29
29
  // https://eslint.org/docs/rules/no-dupe-args
30
- 'no-dupe-args': 'error',
30
+ "no-dupe-args": "error",
31
31
 
32
32
  // https://eslint.org/docs/rules/no-dupe-else-if
33
- 'no-dupe-else-if': 'error',
33
+ "no-dupe-else-if": "error",
34
34
 
35
35
  // https://eslint.org/docs/rules/no-dupe-keys
36
- 'no-dupe-keys': 'error',
36
+ "no-dupe-keys": "error",
37
37
 
38
38
  // https://eslint.org/docs/rules/no-duplicate-case
39
- 'no-duplicate-case': 'error',
39
+ "no-duplicate-case": "error",
40
40
 
41
41
  // https://eslint.org/docs/rules/no-empty
42
- 'no-empty': 'off',
42
+ "no-empty": "off",
43
43
 
44
44
  // https://eslint.org/docs/rules/no-empty-character-class
45
- 'no-empty-character-class': 'error',
45
+ "no-empty-character-class": "error",
46
46
 
47
47
  // https://eslint.org/docs/rules/no-ex-assign
48
- 'no-ex-assign': 'error',
48
+ "no-ex-assign": "error",
49
49
 
50
50
  // https://eslint.org/docs/rules/no-extra-boolean-cast
51
- 'no-extra-boolean-cast': 'error',
51
+ "no-extra-boolean-cast": "error",
52
52
 
53
53
  // https://eslint.org/docs/rules/no-func-assign
54
- 'no-func-assign': 'error',
54
+ "no-func-assign": "error",
55
55
 
56
56
  // https://eslint.org/docs/rules/no-import-assign
57
- 'no-import-assign': 'error',
57
+ "no-import-assign": "error",
58
58
 
59
59
  // https://eslint.org/docs/rules/no-inner-declarations
60
- 'no-inner-declarations': 'error',
60
+ "no-inner-declarations": "error",
61
61
 
62
62
  // https://eslint.org/docs/rules/no-invalid-regexp
63
- 'no-invalid-regexp': 'error',
63
+ "no-invalid-regexp": "error",
64
64
 
65
65
  // https://eslint.org/docs/rules/no-irregular-whitespace
66
- 'no-irregular-whitespace': 'error',
66
+ "no-irregular-whitespace": "error",
67
67
 
68
68
  // https://eslint.org/docs/rules/no-loss-of-precision
69
- 'no-loss-of-precision': 'error',
69
+ "no-loss-of-precision": "error",
70
70
 
71
71
  // https://eslint.org/docs/rules/no-misleading-character-class
72
- 'no-misleading-character-class': 'error',
72
+ "no-misleading-character-class": "error",
73
73
 
74
74
  // https://eslint.org/docs/rules/no-obj-calls
75
- 'no-obj-calls': 'error',
75
+ "no-obj-calls": "error",
76
76
 
77
77
  // https://eslint.org/docs/rules/no-new-native-nonconstructor
78
- 'no-new-native-nonconstructor': 'error',
78
+ "no-new-native-nonconstructor": "error",
79
79
 
80
80
  // https://eslint.org/docs/rules/no-promise-executor-return
81
- 'no-promise-executor-return': 'error',
81
+ "no-promise-executor-return": "error",
82
82
 
83
83
  // https://eslint.org/docs/rules/no-prototype-builtins
84
- 'no-prototype-builtins': 'error',
84
+ "no-prototype-builtins": "error",
85
85
 
86
86
  // https://eslint.org/docs/rules/no-regex-spaces
87
- 'no-regex-spaces': 'error',
87
+ "no-regex-spaces": "error",
88
88
 
89
89
  // https://eslint.org/docs/rules/no-setter-return
90
- 'no-setter-return': 'error',
90
+ "no-setter-return": "error",
91
91
 
92
92
  // https://eslint.org/docs/rules/no-sparse-arrays
93
- 'no-sparse-arrays': 'error',
93
+ "no-sparse-arrays": "error",
94
94
 
95
95
  // https://eslint.org/docs/rules/no-template-curly-in-string
96
- 'no-template-curly-in-string': 'error',
96
+ "no-template-curly-in-string": "error",
97
97
 
98
98
  // https://eslint.org/docs/rules/no-unreachable
99
- 'no-unreachable': 'error',
99
+ "no-unreachable": "error",
100
100
 
101
101
  // https://eslint.org/docs/rules/no-unreachable-loop
102
- 'no-unreachable-loop': 'error',
102
+ "no-unreachable-loop": "error",
103
103
 
104
104
  // https://eslint.org/docs/rules/no-unsafe-finally
105
- 'no-unsafe-finally': 'error',
105
+ "no-unsafe-finally": "error",
106
106
 
107
107
  // https://eslint.org/docs/rules/no-unsafe-negation
108
- 'no-unsafe-negation': 'error',
108
+ "no-unsafe-negation": "error",
109
109
 
110
110
  // https://eslint.org/docs/rules/no-unsafe-optional-chaining
111
- 'no-unsafe-optional-chaining': 'error',
111
+ "no-unsafe-optional-chaining": "error",
112
112
 
113
113
  // https://eslint.org/docs/rules/no-unused-private-class-members
114
- 'no-unused-private-class-members': 'error',
114
+ "no-unused-private-class-members": "error",
115
115
 
116
116
  // https://eslint.org/docs/rules/no-useless-backreference
117
- 'no-useless-backreference': 'error',
117
+ "no-useless-backreference": "error",
118
118
 
119
119
  // https://eslint.org/docs/rules/use-isnan
120
- 'use-isnan': 'error',
120
+ "use-isnan": "error",
121
121
 
122
122
  // https://eslint.org/docs/rules/valid-typeof
123
- 'valid-typeof': 'error',
123
+ "valid-typeof": "error",
124
124
  },
125
125
  };
@@ -1,8 +1,8 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
5
  // disallow use of new operator with the require function
6
- 'no-new-require': 'error',
6
+ "no-new-require": "error",
7
7
  },
8
8
  };
@@ -1,11 +1,11 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
5
  // https://eslint.org/docs/rules/global-require
6
- 'global-require': 'error',
6
+ "global-require": "error",
7
7
 
8
8
  // disallow use of new operator with the require function
9
- 'no-new-require': 'error',
9
+ "no-new-require": "error",
10
10
  },
11
11
  };
@@ -1,13 +1,13 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
5
  // replaced by import/no-duplicates
6
- 'no-duplicate-imports': 'off',
6
+ "no-duplicate-imports": "off",
7
7
 
8
8
  // https://eslint.org/docs/rules/no-restricted-exports
9
- 'no-restricted-exports': [
10
- 'error',
9
+ "no-restricted-exports": [
10
+ "error",
11
11
  {
12
12
  restrictDefaultExports: {
13
13
  direct: false, // permits `export default` declarations
@@ -17,7 +17,7 @@ module.exports = {
17
17
  namespaceFrom: true, // restricts `export * as default from 'foo';` declarations
18
18
  },
19
19
  restrictedNamedExports: [
20
- 'then', // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
20
+ "then", // this will cause tons of confusion when your module is dynamically `import()`ed, and will break in most node ESM versions
21
21
  ],
22
22
  },
23
23
  ],
@@ -1,32 +1,32 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  module.exports = {
4
4
  rules: {
5
5
  // changed properties: 'never' to properties: 'always' ; true to 'ignoreDestructuring': false
6
6
  // http://eslint.org/docs/rules/camelcase
7
- camelcase: ['error', { properties: 'always', ignoreDestructuring: false }],
7
+ camelcase: ["error", { properties: "always", ignoreDestructuring: false }],
8
8
 
9
9
  // http://eslint.org/docs/rules/object-shorthand
10
- 'object-shorthand': ['error', 'always'],
10
+ "object-shorthand": ["error", "always"],
11
11
 
12
12
  // https://github.com/prettier/eslint-config-prettier#curly
13
13
  // prettier doesn't enforce {} with multiline
14
- curly: ['warn', 'multi-line'],
14
+ curly: ["warn", "multi-line"],
15
15
 
16
16
  // https://github.com/prettier/eslint-config-prettier#quotes
17
17
  // prettier doesn't change backtick to single
18
18
  quotes: [
19
- 'warn',
20
- 'single',
19
+ "warn",
20
+ "double",
21
21
  { avoidEscape: true, allowTemplateLiterals: false },
22
22
  ],
23
23
 
24
24
  /* disabled rules */
25
25
 
26
26
  // http://eslint.org/docs/rules/no-else-return
27
- 'no-else-return': 'off',
27
+ "no-else-return": "off",
28
28
 
29
29
  // http://eslint.org/docs/rules/arrow-body-style
30
- 'arrow-body-style': 'off',
30
+ "arrow-body-style": "off",
31
31
  },
32
32
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pob/eslint-config",
3
- "version": "55.3.0",
3
+ "version": "56.1.0",
4
4
  "description": "eslint config files",
5
5
  "keywords": [],
6
6
  "author": "Christophe Hurpeau <christophe@hurpeau.com> (http://christophe.hurpeau.com/)",
@@ -47,6 +47,7 @@
47
47
  "eslint": "^8.56.0"
48
48
  },
49
49
  "dependencies": {
50
+ "@pob/eslint-plugin": "56.1.0",
50
51
  "confusing-browser-globals": "^1.0.11",
51
52
  "eslint-plugin-import": "^2.29.1",
52
53
  "eslint-plugin-n": "^17.4.0",
package/utils.js CHANGED
@@ -1,7 +1,7 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  const isVSCode =
4
4
  process.argv &&
5
- process.argv.some((argv) => argv.includes('dbaeumer.vscode-eslint'));
5
+ process.argv.some((argv) => argv.includes("dbaeumer.vscode-eslint"));
6
6
 
7
- exports.enableIfVSCode = (ruleLevel) => (isVSCode ? ruleLevel : 'off');
7
+ exports.enableIfVSCode = (ruleLevel) => (isVSCode ? ruleLevel : "off");