@genesislcap/eslint-config 14.441.0 → 14.442.0

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.
Files changed (3) hide show
  1. package/README.md +1 -2
  2. package/index.js +28 -3
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # ESLint configuration
2
2
 
3
- Shared [ESLint](https://eslint.org/) configuration.
4
-
3
+ Shared [ESLint](https://eslint.org/) configuration for Genesis apps. It is **not** run by the default monorepo **`npm run lint`** pipeline (that uses Oxlint, Oxfmt, and Stylelint). Use **`genx lint -l eslint`**, **`npm run lint:eslint`**, or **`npm run lint:with-eslint`** when you need this full policy, together with the root **`eslint.config.mjs`** (flat config) in this monorepo.
5
4
 
6
5
  ## Installation
7
6
 
package/index.js CHANGED
@@ -1,5 +1,3 @@
1
- const path = require('path');
2
-
3
1
  module.exports = {
4
2
  parser: '@typescript-eslint/parser',
5
3
  plugins: ['@typescript-eslint', 'eslint-plugin-import', 'unused-imports', 'react-hooks'],
@@ -9,7 +7,7 @@ module.exports = {
9
7
  sourceType: 'module',
10
8
  },
11
9
  extends: ['google', 'plugin:prettier/recommended', 'plugin:import/typescript'],
12
- ignorePatterns: ['**/dist/**', '.eslintrc.js'],
10
+ ignorePatterns: ['**/dist/**', '**/.genx/**', '.eslintrc.js'],
13
11
  settings: {
14
12
  'import/resolver': {
15
13
  node: false,
@@ -45,6 +43,22 @@ module.exports = {
45
43
  ignoreRegExpLiterals: true,
46
44
  },
47
45
  ],
46
+ // Allow `/// <reference />` (Vite / TS) without a space after `//` — same line is valid TS, not a style slip.
47
+ 'spaced-comment': [
48
+ 'error',
49
+ 'always',
50
+ {
51
+ line: {
52
+ markers: ['/'],
53
+ exceptions: ['-', '+'],
54
+ },
55
+ block: {
56
+ balanced: true,
57
+ markers: ['!'],
58
+ exceptions: ['*'],
59
+ },
60
+ },
61
+ ],
48
62
  'eol-last': ['error', 'always'],
49
63
  'require-await': ['off'],
50
64
  'require-yield': ['error'],
@@ -100,6 +114,17 @@ module.exports = {
100
114
  ],
101
115
  },
102
116
  overrides: [
117
+ {
118
+ // Playwright `test.extend` fixture factories — not React; hooks rules misfire on `async ({ use }) =>`.
119
+ files: [
120
+ 'packages/foundation/foundation-testing/src/playwright-bdd/**/*.ts',
121
+ 'packages/foundation/foundation-testing/src/playwright/test.ts',
122
+ ],
123
+ rules: {
124
+ 'react-hooks/rules-of-hooks': 'off',
125
+ 'react-hooks/exhaustive-deps': 'off',
126
+ },
127
+ },
103
128
  {
104
129
  files: [
105
130
  '*.styles.ts',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/eslint-config",
3
3
  "description": "ESLint config",
4
- "version": "14.441.0",
4
+ "version": "14.442.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "engines": {
7
7
  "node": ">=22.0.0"
@@ -28,8 +28,8 @@
28
28
  "access": "public"
29
29
  },
30
30
  "scripts": {
31
- "lint": "genx lint --profile",
32
- "lint:fix": "genx lint --fix"
31
+ "lint": "genx lint -l ox",
32
+ "lint:fix": "genx lint -l ox --fix"
33
33
  },
34
- "gitHead": "7aa35983955df48854be7f8e1ea6d56eff71c3b5"
34
+ "gitHead": "ad425e4ea17dad7d5b580200f2ca31758896d07f"
35
35
  }