voss-node-configs 1.0.59 → 1.0.61

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/base.js CHANGED
@@ -64,6 +64,18 @@ export default [
64
64
  'no-use-before-define': ['error', { functions: false, classes: true }],
65
65
  'object-shorthand': ['error', 'properties'],
66
66
  'prefer-destructuring': 'off',
67
+
68
+ // Named const required when a conditional would otherwise be the property
69
+ // value. Spreads that optionally include a property stay allowed:
70
+ // ...(ready ? { status: 'ready' } : {})
71
+ 'no-restricted-syntax': [
72
+ 'error',
73
+ {
74
+ selector: 'Property[value.type="ConditionalExpression"]',
75
+ message:
76
+ 'Extract the conditional into a named const instead of using it as an object property value.',
77
+ },
78
+ ],
67
79
  },
68
80
  },
69
81
  // Turn off ESLint rules that conflict with Prettier (must come after other configs)
package/front-end.js CHANGED
@@ -1,8 +1,10 @@
1
1
  import baseConfig from './base.js';
2
+ import reactHooks from 'eslint-plugin-react-hooks';
2
3
  import globals from 'globals';
3
4
 
4
5
  export default [
5
6
  ...baseConfig,
7
+ reactHooks.configs['recommended-latest'],
6
8
  {
7
9
  // Playwright HTML report / test artifacts (generated; not in tsconfig)
8
10
  ignores: ['playwright-report/**', 'test-results/**', 'blob-report/**'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voss-node-configs",
3
- "version": "1.0.59",
3
+ "version": "1.0.61",
4
4
  "description": "Shared TypeScript and ESLint configs for Node.js projects",
5
5
  "exports": {
6
6
  "./tsconfig.base": "./tsconfig.base.json",
@@ -37,6 +37,7 @@
37
37
  "@eslint/js": "~9.39.0",
38
38
  "eslint": "~9.39.0",
39
39
  "eslint-config-prettier": "^10.1.8",
40
+ "eslint-plugin-react-hooks": "~5.2.0",
40
41
  "globals": "^15.0.0"
41
42
  },
42
43
  "devDependencies": {
@@ -4,7 +4,6 @@
4
4
  "module": "preserve",
5
5
  "resolveJsonModule": true,
6
6
  "target": "esnext",
7
- "skipLibCheck": true,
8
7
  "noEmit": true
9
8
  }
10
9
  }
@@ -35,5 +35,6 @@
35
35
 
36
36
  /* Completeness */
37
37
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
38
+ "skipLibCheck": true, /* Skip type checking all .d.ts files. */
38
39
  }
39
40
  }
@@ -3,7 +3,6 @@
3
3
  "compilerOptions": {
4
4
  "module": "NodeNext",
5
5
  "moduleResolution": "nodenext",
6
- "skipLibCheck": true,
7
6
  "noEmit": true
8
7
  },
9
8
  "include": ["src"]
@@ -9,7 +9,6 @@
9
9
  "esModuleInterop": true,
10
10
  "resolveJsonModule": true,
11
11
  "allowSyntheticDefaultImports": true,
12
- "skipLibCheck": true,
13
12
  "isolatedModules": true,
14
13
  "types": ["vite/client"]
15
14
  }
@@ -4,7 +4,6 @@
4
4
  "target": "ES2022",
5
5
  "module": "ESNext",
6
6
  "moduleResolution": "node",
7
- "skipLibCheck": true,
8
7
  "esModuleInterop": true,
9
8
  "allowSyntheticDefaultImports": true,
10
9
  "isolatedModules": true,