@fullstacksjs/eslint-config 11.1.0 → 11.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "11.1.0",
3
+ "version": "11.1.1",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "peerDependencies": {
70
70
  "cypress": ">=8",
71
- "eslint": ">=9",
71
+ "eslint": "9",
72
72
  "graphql": ">=15",
73
73
  "prettier": "3",
74
74
  "react": ">=16",
package/src/init.d.ts CHANGED
@@ -15,7 +15,7 @@ export interface Options {
15
15
  storybook?: boolean;
16
16
  prettier?: boolean;
17
17
  playwright?: boolean;
18
- typescript?: { projects: string[] | string };
18
+ typescript?: { projects: string[] | string | boolean; tsconfigRootDir?: string };
19
19
  disableExpensiveRules?: boolean;
20
20
  }
21
21
 
@@ -11,7 +11,17 @@ function typescript(options = {}) {
11
11
  return {
12
12
  files: [globs.ts, globs.tsx],
13
13
  plugins: { '@typescript-eslint': plugin },
14
- languageOptions: { parser },
14
+ languageOptions: {
15
+ parser,
16
+ parserOptions: {
17
+ ...predicate(options.typescript && options.typescript.projects, {
18
+ project: options.typescript.projects,
19
+ }),
20
+ ...predicate(options.typescript && options.typescript.tsconfigRootDir, {
21
+ tsconfigRootDir: options.typescript.tsconfigRootDir,
22
+ }),
23
+ },
24
+ },
15
25
  rules: {
16
26
  '@typescript-eslint/adjacent-overload-signatures': 'error',
17
27
  '@typescript-eslint/array-type': 'error',
@@ -175,7 +185,7 @@ function typescript(options = {}) {
175
185
  }),
176
186
  '@typescript-eslint/no-mixed-enums': 'error',
177
187
  '@typescript-eslint/no-redundant-type-constituents': 'warn',
178
- '@typescript-eslint/no-throw-literal': ['warn', { allowThrowingUnknown: false }],
188
+ // '@typescript-eslint/no-throw-literal': ['warn', { allowThrowingUnknown: false }],
179
189
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
180
190
  '@typescript-eslint/no-unsafe-enum-comparison': 'warn',
181
191
  '@typescript-eslint/no-unnecessary-condition': [