eslint-config-gits 5.0.13 → 5.0.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [5.0.14](https://gitlab.com/geenen-it-systeme/eslint-preset/compare/v5.0.13...v5.0.14) (2024-08-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Use new tseslint config ([fd3d7b2](https://gitlab.com/geenen-it-systeme/eslint-preset/commit/fd3d7b2f32bfc88f21c318106bc6b75c7d3e73b7))
7
+
1
8
  ## [5.0.13](https://gitlab.com/geenen-it-systeme/eslint-preset/compare/v5.0.12...v5.0.13) (2024-08-22)
2
9
 
3
10
 
package/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  import {fixupConfigRules, fixupPluginRules} from "@eslint/compat";
2
2
  import react from "eslint-plugin-react";
3
- import typescriptEslint from "@typescript-eslint/eslint-plugin";
4
3
  import prettier from "eslint-plugin-prettier";
5
4
  import reactHooks from "eslint-plugin-react-hooks";
6
5
  import tsParser from "@typescript-eslint/parser";
@@ -9,6 +8,7 @@ import {fileURLToPath} from "node:url";
9
8
  import js from "@eslint/js";
10
9
  import {FlatCompat} from "@eslint/eslintrc";
11
10
  import globals from 'globals';
11
+ import tseslint from 'typescript-eslint';
12
12
 
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = path.dirname(__filename);
@@ -43,18 +43,17 @@ const plugin = {
43
43
  name: 'eslint-config-gits',
44
44
  },
45
45
  configs: {
46
- recommended: [
46
+ recommended: tseslint.config([
47
+ ...tseslint.configs.recommendedTypeChecked,
47
48
  ...fixupConfigRules(compat.extends(
48
49
  "eslint:recommended",
49
50
  "plugin:react/recommended",
50
- "plugin:@typescript-eslint/recommended",
51
51
  "plugin:react-hooks/recommended",
52
52
  )),
53
53
  {
54
54
  rules,
55
55
  plugins: {
56
56
  react: fixupPluginRules(react),
57
- "@typescript-eslint": fixupPluginRules(typescriptEslint),
58
57
  prettier,
59
58
  "react-hooks": fixupPluginRules(reactHooks),
60
59
  },
@@ -68,6 +67,8 @@ const plugin = {
68
67
  ecmaVersion: "latest",
69
68
  sourceType: "module",
70
69
  parserOptions: {
70
+ projectService: true,
71
+ tsconfigRootDir: import.meta.dirname,
71
72
  ecmaFeatures: {
72
73
  jsx: true,
73
74
  },
@@ -75,15 +76,16 @@ const plugin = {
75
76
  },
76
77
  },
77
78
  {
78
- files: ['*.ts', '*.tsx'],
79
+ files: ['**/*.ts', '**/*.tsx'],
79
80
  rules: {
81
+ '@typescript-eslint/typedef': ['error'],
80
82
  '@typescript-eslint/explicit-function-return-type': ['error'],
81
83
  'react/jsx-curly-brace-presence': ['error', {props: "never", children: "never"}],
82
84
  'arrow-body-style': ['error', 'as-needed']
83
85
  },
84
86
  },
85
87
  {
86
- files: ['*.json'],
88
+ files: ['**/*.json'],
87
89
  rules: {
88
90
  'prettier/prettier': 'off',
89
91
  },
@@ -95,7 +97,7 @@ const plugin = {
95
97
  },
96
98
  },
97
99
  {
98
- files: ['*.test.ts', '*.test.tsx', '*.stories.*'],
100
+ files: ['**/*.test.ts', '**/*.test.tsx', '**/*.stories.*'],
99
101
  rules: {
100
102
  '@typescript-eslint/typedef': [
101
103
  'off'
@@ -105,7 +107,7 @@ const plugin = {
105
107
  ],
106
108
  }
107
109
  }
108
- ]
110
+ ])
109
111
  },
110
112
  rules: rules,
111
113
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gits",
3
- "version": "5.0.13",
3
+ "version": "5.0.14",
4
4
  "description": "EsLint preset for Geenen IT-Systeme",
5
5
  "repository": "https://gitlab.com/geenen-it-systeme/eslint-preset",
6
6
  "main": "index.mjs",
@@ -40,6 +40,7 @@
40
40
  "eslint-plugin-storybook": "^0.8.0",
41
41
  "globals": "^15.9.0",
42
42
  "prettier": "^3.3.3",
43
- "semantic-release": "^24.1.0"
43
+ "semantic-release": "^24.1.0",
44
+ "typescript-eslint": "^8.2.0"
44
45
  }
45
46
  }