eslint-config-nodejs-pmb 0.3.10 → 0.3.13

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/devDepPatterns.js CHANGED
@@ -16,10 +16,12 @@ function gen(how) {
16
16
  if (devDirs.find(d => nmSub.includes('/' + d + '/'))) { return ['**']; }
17
17
  return [
18
18
  ...devDirs.map(d => d + '/**'),
19
- '**/test.*' + jsGlob,
20
- '**{/,-,.}test{,s,/**}' + jsGlob,
21
19
  '**.spec' + jsGlob,
20
+ '**{/,-,.}test{,s,/**}' + jsGlob,
21
+ '**/[_.]build' + jsGlob,
22
22
  '**/{,.}eslintrc.js{,on}',
23
+ '**/test.*' + jsGlob,
24
+ '**/vite.config.js',
23
25
  '**/webpack.config.js',
24
26
  ];
25
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "eslint-config-nodejs-pmb",
2
- "version": "0.3.10",
3
- "description": "My favorite eslint rules",
2
+ "version": "0.3.13",
3
+ "description": "My favorite eslint rules.",
4
4
  "keywords": [],
5
5
 
6
6
  "author": "M.K. (https://github.com/mk-pmb)",
@@ -21,14 +21,15 @@
21
21
  "eslintConfig": { "extends": "." },
22
22
 
23
23
  "dependencies": {
24
- "@babel/eslint-parser": "^7.17.0",
24
+ "@babel/eslint-parser": "^7.25.9",
25
25
  "eslint-config-airbnb-base": "^15.0.0",
26
- "eslint-plugin-regexp": "^1.15.0"
26
+ "eslint-plugin-regexp": "^1.15.0",
27
+ "find-up-package-json-cjs": "^1.0.1"
27
28
  },
28
29
  "devDependencies": {
29
30
  "absdir": "^1.0.6",
30
31
  "eslint-plugin-json-light-pmb": "^1.0.7",
31
- "eslint-plugin-n": "^15.2.4",
32
+ "eslint-plugin-n": "^17.16.2",
32
33
  "p-fatal": "^0.1.5",
33
34
  "safe-sortedjson": "^1.0.8",
34
35
  "usnam-pmb": "^0.2.5"
package/rules.js CHANGED
@@ -1,6 +1,9 @@
1
1
  /* -*- tab-width: 2 -*- */
2
2
  'use strict';
3
3
 
4
+ const userProjectManifest = require('find-up-package-json-cjs').sync().parse();
5
+
6
+
4
7
  const configDeps = [
5
8
  ...require('./depsHelper.js'),
6
9
  ...require('./test/expectedPeerDependencies.js'),
@@ -91,8 +94,12 @@ const rules = {
91
94
  };
92
95
 
93
96
 
97
+
98
+ const defaultSourceType = userProjectManifest.type || 'script';
99
+
100
+
94
101
  const overrides = [
95
- { files: ['**.js'], parserOptions: { sourceType: 'script' } },
102
+ { files: ['**.js'], parserOptions: { sourceType: defaultSourceType } },
96
103
  { files: ['**.mjs'],
97
104
  rules: {
98
105
  'n/no-unsupported-features/es-syntax': 'off', // assume esmod-pmb