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