voss-node-configs 1.0.17 → 1.0.18

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/back-end.js ADDED
@@ -0,0 +1,51 @@
1
+ import baseConfig from './base.js';
2
+ import globals from 'globals';
3
+
4
+ export default [
5
+ ...baseConfig,
6
+ {
7
+ ignores: ['build/**', 'knexfile.js'], // ⛔ exclude all build output
8
+ },
9
+ {
10
+ files: ['**/*.mjs'],
11
+ languageOptions: {
12
+ globals: {
13
+ ...globals.node,
14
+ },
15
+ ecmaVersion: 'latest',
16
+ sourceType: 'module',
17
+ },
18
+ },
19
+ {
20
+ files: ['**/*.js'],
21
+ languageOptions: {
22
+ globals: {
23
+ ...globals.node,
24
+ },
25
+ ecmaVersion: 'latest',
26
+ sourceType: 'script', // or "module" if you're using ESM
27
+ },
28
+ },
29
+ {
30
+ files: ['**/*.ts'],
31
+ languageOptions: {
32
+ globals: {
33
+ console: 'readonly',
34
+ exports: 'readonly',
35
+ module: 'readonly',
36
+ require: 'readonly',
37
+ process: 'readonly',
38
+ Buffer: 'readonly',
39
+ __dirname: 'readonly',
40
+ __filename: 'readonly',
41
+ global: 'readonly',
42
+ },
43
+ },
44
+ rules: {
45
+ // Backend-specific overrides
46
+ '@typescript-eslint/no-var-requires': 'off', // Allow require() in backend
47
+ 'no-process-exit': 'error', // Prevent process.exit() usage
48
+ 'no-sync': 'error', // Warn about synchronous methods
49
+ },
50
+ },
51
+ ];
package/front-end.js ADDED
@@ -0,0 +1,27 @@
1
+ import baseConfig from './base.js';
2
+
3
+ export default [
4
+ ...baseConfig,
5
+ {
6
+ files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
7
+ languageOptions: {
8
+ globals: {
9
+ browser: 'readonly',
10
+ window: 'readonly',
11
+ document: 'readonly',
12
+ console: 'readonly',
13
+ },
14
+ ecmaVersion: 2022,
15
+ sourceType: 'module',
16
+ },
17
+ rules: {
18
+ // Frontend-specific rules
19
+ 'no-console': 'warn', // Warn about console in frontend
20
+ '@typescript-eslint/no-require-imports': 'error', // Disallow require() in frontend
21
+ 'global-require': 'error', // Disallow require() in frontend
22
+ 'no-alert': 'error', // Disallow alert() in frontend
23
+ 'no-confirm': 'error', // Disallow confirm() in frontend
24
+ 'no-prompt': 'error', // Disallow prompt() in frontend
25
+ },
26
+ },
27
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voss-node-configs",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Shared TypeScript and ESLint configs for Node.js projects",
5
5
  "exports": {
6
6
  "./tsconfig.base": "./tsconfig.base.json",
@@ -21,8 +21,8 @@
21
21
  "tsconfig.front-end.build.json",
22
22
  "tsconfig.front-end.dev.json",
23
23
  "tsconfig.front-end.node.json",
24
- "eslint/front-end.js",
25
- "eslint/back-end.js"
24
+ "front-end.js",
25
+ "back-end.js"
26
26
  ],
27
27
  "devDependencies": {
28
28
  "@eslint/js": "^9.0.0",