eslint-config-gits 5.0.6 → 5.0.8

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,18 @@
1
+ ## [5.0.8](https://gitlab.com/geenen-it-systeme/eslint-preset/compare/v5.0.7...v5.0.8) (2024-08-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * specify eslint/compat as peerDependency ([cbb271a](https://gitlab.com/geenen-it-systeme/eslint-preset/commit/cbb271a6455e74bef36fcee4a1283e191f3d31cb))
7
+ * Static include plugin name ([25d5594](https://gitlab.com/geenen-it-systeme/eslint-preset/commit/25d55946ef1fd7d7999a9e46b1894751e7bf255b))
8
+
9
+ ## [5.0.7](https://gitlab.com/geenen-it-systeme/eslint-preset/compare/v5.0.6...v5.0.7) (2024-08-22)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * Configure globals ([e021395](https://gitlab.com/geenen-it-systeme/eslint-preset/commit/e021395a6ea4eeffe25740740351db5ec7f29de8))
15
+
1
16
  ## [5.0.6](https://gitlab.com/geenen-it-systeme/eslint-preset/compare/v5.0.5...v5.0.6) (2024-08-22)
2
17
 
3
18
 
package/README.md CHANGED
@@ -8,34 +8,17 @@ This ESLint-Config provides commonly used configuration for eslint for all our p
8
8
  ## Installation
9
9
 
10
10
  ```shell
11
- npm install --save-dev eslint eslint-config-gits globals @eslint/js @eslint/eslintr
11
+ npm install --save-dev eslint eslint-config-gits
12
12
  ```
13
13
 
14
14
  ## Example configuration
15
15
 
16
16
  ```js
17
17
  // eslint.config.mjs
18
- import globals from "globals";
19
- import path from "node:path";
20
- import {fileURLToPath} from "node:url";
21
- import js from "@eslint/js";
22
- import {FlatCompat} from "@eslint/eslintrc";
23
-
24
- const __filename = fileURLToPath(import.meta.url);
25
- const __dirname = path.dirname(__filename);
26
- const compat = new FlatCompat({
27
- baseDirectory: __dirname,
28
- recommendedConfig: js.configs.recommended,
29
- allConfig: js.configs.all
30
- });
31
-
32
- export default [...compat.extends("eslint-config-gits"), {
33
- languageOptions: {
34
- globals: {
35
- ...globals.browser,
36
- ...globals.jest,
37
- ...globals.node,
38
- },
39
- },
40
- }];
18
+ import gitsConfig from 'eslint-config-gits';
19
+
20
+ export default [
21
+ ...gitsConfig,
22
+ ];
23
+
41
24
  ```
package/index.mjs CHANGED
@@ -8,7 +8,7 @@ import path from "node:path";
8
8
  import {fileURLToPath} from "node:url";
9
9
  import js from "@eslint/js";
10
10
  import {FlatCompat} from "@eslint/eslintrc";
11
- import {name, version} from './package.json';
11
+ import globals from 'globals';
12
12
 
13
13
  const __filename = fileURLToPath(import.meta.url);
14
14
  const __dirname = path.dirname(__filename);
@@ -18,109 +18,93 @@ const compat = new FlatCompat({
18
18
  allConfig: js.configs.all
19
19
  });
20
20
 
21
- const configs = [
22
- ...fixupConfigRules(compat.extends(
23
- "eslint:recommended",
24
- "plugin:react/recommended",
25
- "plugin:@typescript-eslint/recommended",
26
- "plugin:react-hooks/recommended",
27
- )),
28
- {
29
- plugins: {
30
- react: fixupPluginRules(react),
31
- "@typescript-eslint": fixupPluginRules(typescriptEslint),
32
- prettier,
33
- "react-hooks": fixupPluginRules(reactHooks),
34
- },
35
- languageOptions: {
36
- parser: tsParser,
37
- ecmaVersion: "latest",
38
- sourceType: "module",
39
- parserOptions: {
40
- ecmaFeatures: {
41
- jsx: true,
42
- },
43
- },
44
- },
45
- },
46
- {
47
- files: ['*.ts', '*.tsx'],
48
- rules: {
49
- '@typescript-eslint/explicit-function-return-type': ['error'],
50
- 'react/jsx-curly-brace-presence': ['error', {props: "never", children: "never"}],
51
- 'arrow-body-style': ['error', 'as-needed']
52
- },
53
- },
54
- {
55
- files: ['*.json'],
56
- rules: {
57
- 'prettier/prettier': 'off',
58
- },
59
- },
60
- {
61
- files: ['**/*.stories.*'],
62
- rules: {
63
- 'import/no-anonymous-default-export': 'off',
64
- },
65
- },
66
- {
67
- files: ['*.test.ts', '*.test.tsx', '*.stories.*'],
68
- rules: {
69
- '@typescript-eslint/typedef': [
70
- 'off'
71
- ],
72
- '@typescript-eslint/explicit-function-return-type': [
73
- 'off'
74
- ],
75
- }
76
- }
77
- ]
78
-
79
- const rules = {
80
- 'no-undefined': 'error',
81
- 'prettier/prettier': [
82
- 'error',
83
- {
84
- tabWidth: 4,
85
- useTabs: false,
86
- printWidth: 80,
87
- semi: true,
88
- singleQuote: true,
89
- quoteProps: 'as-needed',
90
- jsxSingleQuote: false,
91
- trailingComma: 'es5',
92
- bracketSpacing: true,
93
- bracketSameLine: false,
94
- arrowParens: 'avoid',
95
- },
96
- ],
97
- '@typescript-eslint/explicit-function-return-type': 'off',
98
- '@typescript-eslint/no-inferrable-types': 'off',
99
- '@typescript-eslint/typedef': [
100
- 'error',
101
- {
102
- arrayDestructuring: false,
103
- arrowParameter: false,
104
- memberVariableDeclaration: true,
105
- objectDestructuring: false,
106
- parameter: false,
107
- propertyDeclaration: true,
108
- variableDeclaration: true,
109
- variableDeclarationIgnoreFunction: false,
110
- },
111
- ],
112
- '@typescript-eslint/no-unused-vars': 'error',
113
- 'default-param-last': ['error']
114
- };
115
-
116
21
  const plugin = {
117
22
  meta: {
118
- name,
119
- version
23
+ name: 'eslint-config-gits',
120
24
  },
121
25
  configs: {
122
- recommended: configs
26
+ recommended: [
27
+ ...fixupConfigRules(compat.extends(
28
+ "eslint:recommended",
29
+ "plugin:react/recommended",
30
+ "plugin:@typescript-eslint/recommended",
31
+ "plugin:react-hooks/recommended",
32
+ )),
33
+ {
34
+ plugins: {
35
+ react: fixupPluginRules(react),
36
+ "@typescript-eslint": fixupPluginRules(typescriptEslint),
37
+ prettier,
38
+ "react-hooks": fixupPluginRules(reactHooks),
39
+ },
40
+ languageOptions: {
41
+ globals: {
42
+ ...globals.browser,
43
+ ...globals.jest,
44
+ ...globals.node,
45
+ },
46
+ parser: tsParser,
47
+ ecmaVersion: "latest",
48
+ sourceType: "module",
49
+ parserOptions: {
50
+ ecmaFeatures: {
51
+ jsx: true,
52
+ },
53
+ },
54
+ },
55
+ },
56
+ {
57
+ files: ['*.ts', '*.tsx'],
58
+ rules: {
59
+ '@typescript-eslint/explicit-function-return-type': ['error'],
60
+ 'react/jsx-curly-brace-presence': ['error', {props: "never", children: "never"}],
61
+ 'arrow-body-style': ['error', 'as-needed']
62
+ },
63
+ },
64
+ {
65
+ files: ['*.json'],
66
+ rules: {
67
+ 'prettier/prettier': 'off',
68
+ },
69
+ },
70
+ {
71
+ files: ['**/*.stories.*'],
72
+ rules: {
73
+ 'import/no-anonymous-default-export': 'off',
74
+ },
75
+ },
76
+ {
77
+ files: ['*.test.ts', '*.test.tsx', '*.stories.*'],
78
+ rules: {
79
+ '@typescript-eslint/typedef': [
80
+ 'off'
81
+ ],
82
+ '@typescript-eslint/explicit-function-return-type': [
83
+ 'off'
84
+ ],
85
+ }
86
+ }
87
+ ]
88
+ },
89
+ rules: {
90
+ 'no-undefined': 'error',
91
+ 'prettier/prettier': [
92
+ 'error',
93
+ {
94
+ tabWidth: 4,
95
+ useTabs: false,
96
+ printWidth: 80,
97
+ semi: true,
98
+ singleQuote: true,
99
+ quoteProps: 'as-needed',
100
+ jsxSingleQuote: false,
101
+ trailingComma: 'es5',
102
+ bracketSpacing: true,
103
+ bracketSameLine: false,
104
+ arrowParens: 'avoid',
105
+ },
106
+ ],
107
+ 'default-param-last': ['error']
123
108
  },
124
- rules,
125
109
  };
126
110
  export default plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-gits",
3
- "version": "5.0.6",
3
+ "version": "5.0.8",
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",
@@ -14,6 +14,7 @@
14
14
  "author": "",
15
15
  "license": "ISC",
16
16
  "peerDependencies": {
17
+ "@eslint/compat": "^1",
17
18
  "@typescript-eslint/eslint-plugin": "^8",
18
19
  "eslint": "^9",
19
20
  "eslint-plugin-prettier": "^5",
@@ -36,6 +37,7 @@
36
37
  "eslint-plugin-react": "^7.35.0",
37
38
  "eslint-plugin-react-hooks": "^5.1.0-rc-1d989965-20240821",
38
39
  "eslint-plugin-storybook": "^0.8.0",
40
+ "globals": "^15.9.0",
39
41
  "prettier": "^3.3.3",
40
42
  "semantic-release": "^24.1.0"
41
43
  }