eslint-config-nodejs-pmb 0.3.6 → 0.3.8
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/package.json +1 -1
- package/rules.js +11 -2
package/package.json
CHANGED
package/rules.js
CHANGED
|
@@ -7,6 +7,13 @@ const configDeps = [
|
|
|
7
7
|
];
|
|
8
8
|
const devDepPatternsGen = require('./devDepPatterns.js');
|
|
9
9
|
|
|
10
|
+
const ignorePatterns = [
|
|
11
|
+
'/build/output/',
|
|
12
|
+
'/dist.*',
|
|
13
|
+
'/dist/',
|
|
14
|
+
'tmp.*',
|
|
15
|
+
];
|
|
16
|
+
|
|
10
17
|
function uniq(a) { return Array.from(new Set(a)).sort(); }
|
|
11
18
|
|
|
12
19
|
const jsFextsNoDot = ['js', 'mjs'];
|
|
@@ -49,9 +56,9 @@ const rules = {
|
|
|
49
56
|
'key-spacing': 'off', // b/c it doesn't support all the combinations I want
|
|
50
57
|
'lines-around-directive': 'off',
|
|
51
58
|
'max-len': ['error', lineLengthRules],
|
|
59
|
+
'n/global-require': 'off', // I'd rather exempt just top-level arrays
|
|
52
60
|
'no-console': 'off',
|
|
53
61
|
'no-control-regex': 'off',
|
|
54
|
-
'n/global-require': 'off', // I'd rather exempt just top-level arrays
|
|
55
62
|
'no-div-regex': 'error',
|
|
56
63
|
'no-extra-semi': 'off',
|
|
57
64
|
'no-multiple-empty-lines': 'off',
|
|
@@ -60,12 +67,13 @@ const rules = {
|
|
|
60
67
|
'object-curly-newline': 'off',
|
|
61
68
|
'padded-blocks': 'off',
|
|
62
69
|
'prefer-arrow-callback': 'off',
|
|
70
|
+
'prefer-destructuring': ['error', { array: false, object: true }],
|
|
63
71
|
'prefer-template': 'off',
|
|
64
72
|
'quote-props': 'off',
|
|
73
|
+
'regexp/no-invalid-regexp': 'error',
|
|
65
74
|
'semi': ['error', 'always'],
|
|
66
75
|
'strict': ['error', 'safe'],
|
|
67
76
|
'unicode-bom': 'off',
|
|
68
|
-
'regexp/no-invalid-regexp': 'error',
|
|
69
77
|
|
|
70
78
|
// Ugly but unfortunately node v12+ native ESM forces us to:
|
|
71
79
|
'import/extensions': ['error', 'ignorePackages'],
|
|
@@ -104,6 +112,7 @@ const config = {
|
|
|
104
112
|
'plugin:n/recommended',
|
|
105
113
|
],
|
|
106
114
|
|
|
115
|
+
ignorePatterns,
|
|
107
116
|
overrides,
|
|
108
117
|
|
|
109
118
|
parser: require.resolve('@babel/eslint-parser'),
|