voss-node-configs 1.0.65 → 1.0.67
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/node.js +16 -17
- package/package.json +5 -7
- package/tsconfig.back-end.json +12 -1
package/node.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import baseConfig from './base.js';
|
|
2
|
+
import n from 'eslint-plugin-n';
|
|
3
|
+
import globals from 'globals';
|
|
2
4
|
|
|
3
5
|
export default [
|
|
4
6
|
...baseConfig,
|
|
@@ -6,29 +8,26 @@ export default [
|
|
|
6
8
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
7
9
|
languageOptions: {
|
|
8
10
|
globals: {
|
|
9
|
-
node
|
|
10
|
-
process: 'readonly',
|
|
11
|
-
Buffer: 'readonly',
|
|
12
|
-
__dirname: 'readonly',
|
|
13
|
-
__filename: 'readonly',
|
|
14
|
-
global: 'readonly',
|
|
15
|
-
console: 'readonly',
|
|
11
|
+
...globals.node,
|
|
16
12
|
},
|
|
17
13
|
ecmaVersion: 2022,
|
|
18
14
|
sourceType: 'module',
|
|
19
15
|
},
|
|
16
|
+
plugins: {
|
|
17
|
+
n,
|
|
18
|
+
},
|
|
20
19
|
rules: {
|
|
21
20
|
// Node.js specific rules
|
|
22
21
|
'@typescript-eslint/no-require-imports': 'off', // Allow require() in Node.js
|
|
23
|
-
'global-require': 'off', // Allow require() anywhere in Node.js
|
|
24
|
-
'no-process-exit': 'error', // Prevent process.exit() usage
|
|
25
|
-
'no-sync': 'warn', // Warn about synchronous methods
|
|
26
|
-
'no-
|
|
27
|
-
'prefer-global/buffer': 'error', // Prefer global Buffer
|
|
28
|
-
'prefer-global/console': 'error', // Prefer global console
|
|
29
|
-
'prefer-global/process': 'error', // Prefer global process
|
|
30
|
-
'prefer-global/url-search-params': 'error', // Prefer global URLSearchParams
|
|
31
|
-
'prefer-global/url': 'error', // Prefer global URL
|
|
22
|
+
'n/global-require': 'off', // Allow require() anywhere in Node.js
|
|
23
|
+
'n/no-process-exit': 'error', // Prevent process.exit() usage
|
|
24
|
+
'n/no-sync': 'warn', // Warn about synchronous methods
|
|
25
|
+
'n/no-deprecated-api': 'error', // Disallow deprecated Node APIs (e.g. new Buffer())
|
|
26
|
+
'n/prefer-global/buffer': 'error', // Prefer global Buffer
|
|
27
|
+
'n/prefer-global/console': 'error', // Prefer global console
|
|
28
|
+
'n/prefer-global/process': 'error', // Prefer global process
|
|
29
|
+
'n/prefer-global/url-search-params': 'error', // Prefer global URLSearchParams
|
|
30
|
+
'n/prefer-global/url': 'error', // Prefer global URL
|
|
32
31
|
},
|
|
33
32
|
},
|
|
34
|
-
];
|
|
33
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voss-node-configs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.67",
|
|
4
4
|
"description": "Shared TypeScript and ESLint configs for Node.js projects",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./tsconfig.base": "./tsconfig.base.json",
|
|
@@ -35,18 +35,16 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@eslint/js": "~9.39.0",
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
39
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
38
40
|
"eslint": "~9.39.0",
|
|
39
41
|
"eslint-config-prettier": "^10.1.8",
|
|
42
|
+
"eslint-plugin-n": "^17.24.0",
|
|
43
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
40
44
|
"eslint-plugin-react-hooks": "~5.2.0",
|
|
41
45
|
"globals": "^15.0.0"
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
44
|
-
"@eslint/js": "~9.39.0",
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
46
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
47
|
-
"eslint": "~9.39.0",
|
|
48
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
49
|
-
"globals": "^15.0.0",
|
|
50
48
|
"typescript-eslint": "^8.0.0"
|
|
51
49
|
},
|
|
52
50
|
"license": "MIT",
|
package/tsconfig.back-end.json
CHANGED
|
@@ -5,5 +5,16 @@
|
|
|
5
5
|
"resolveJsonModule": true,
|
|
6
6
|
"target": "esnext",
|
|
7
7
|
"noEmit": true
|
|
8
|
-
}
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"src/**/*",
|
|
11
|
+
"scripts/**/*",
|
|
12
|
+
"cli/**/*",
|
|
13
|
+
"test/**/*",
|
|
14
|
+
"tests/**/*",
|
|
15
|
+
"test-helpers/**/*",
|
|
16
|
+
"migrations/**/*",
|
|
17
|
+
"knexfile.ts",
|
|
18
|
+
"vitest.*.ts"
|
|
19
|
+
]
|
|
9
20
|
}
|