eslint-config-nodejs-pmb 0.3.5 → 0.3.7

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/depsHelper.js CHANGED
@@ -4,6 +4,7 @@
4
4
  module.exports = (function depsHelper(require) {
5
5
  return [
6
6
  require('@babel/eslint-parser'),
7
+ require('eslint-plugin-regexp'),
7
8
  require('eslint-config-airbnb-base'),
8
9
  ];
9
10
  }(String));
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  { "name": "eslint-config-nodejs-pmb",
2
- "version": "0.3.5",
2
+ "version": "0.3.7",
3
3
  "description": "My favorite eslint rules",
4
4
  "keywords": [],
5
5
 
@@ -20,22 +20,24 @@
20
20
  "directories": { "test": "test" },
21
21
  "eslintConfig": { "extends": "." },
22
22
 
23
- "engines": { "npm": ">=7.0.0", "node": ">=16.0.0" },
24
23
  "dependencies": {
25
24
  "@babel/eslint-parser": "^7.17.0",
26
- "eslint-config-airbnb-base": "^15.0.0"
25
+ "eslint-config-airbnb-base": "^15.0.0",
26
+ "eslint-plugin-regexp": "^1.15.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "absdir": "^1.0.6",
30
30
  "eslint-plugin-json-light-pmb": "^1.0.7",
31
31
  "eslint-plugin-n": "^15.2.4",
32
- "p-fatal": "^0.1.3",
33
- "safe-sortedjson": "^1.0.6",
32
+ "p-fatal": "^0.1.5",
33
+ "safe-sortedjson": "^1.0.8",
34
34
  "usnam-pmb": "^0.2.5"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "eslint": "^8.13.0"
38
38
  },
39
39
 
40
- "npm vs. BOM = Unexpected token": "-*- coding: UTF-8 -*-"
40
+
41
+
42
+ "engines": { "npm": ">=7.0.0", "node": ">=16.0.0" }
41
43
  }
package/rules.js CHANGED
@@ -49,9 +49,9 @@ const rules = {
49
49
  'key-spacing': 'off', // b/c it doesn't support all the combinations I want
50
50
  'lines-around-directive': 'off',
51
51
  'max-len': ['error', lineLengthRules],
52
+ 'n/global-require': 'off', // I'd rather exempt just top-level arrays
52
53
  'no-console': 'off',
53
54
  'no-control-regex': 'off',
54
- 'n/global-require': 'off', // I'd rather exempt just top-level arrays
55
55
  'no-div-regex': 'error',
56
56
  'no-extra-semi': 'off',
57
57
  'no-multiple-empty-lines': 'off',
@@ -60,8 +60,10 @@ const rules = {
60
60
  'object-curly-newline': 'off',
61
61
  'padded-blocks': 'off',
62
62
  'prefer-arrow-callback': 'off',
63
+ 'prefer-destructuring': ['error', { array: false, object: true }],
63
64
  'prefer-template': 'off',
64
65
  'quote-props': 'off',
66
+ 'regexp/no-invalid-regexp': 'error',
65
67
  'semi': ['error', 'always'],
66
68
  'strict': ['error', 'safe'],
67
69
  'unicode-bom': 'off',
@@ -112,6 +114,7 @@ const config = {
112
114
  },
113
115
 
114
116
  plugins: [
117
+ 'regexp',
115
118
  ...configDeps.filter(mustStartWith('eslint-plugin-')),
116
119
  ],
117
120