@gtvmbh/eslint-config 1.0.8 → 1.1.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.
- package/.github/workflows/npm-publish.yml +6 -6
- package/examples/.eslintrc-javascript.js +1 -2
- package/package.json +7 -5
- package/src/default.js +4 -5
- package/src/typescript.js +8 -8
- package/eslint-config-jsdoc.js +0 -1
- package/eslint-config-ts-relaxed.js +0 -1
- package/src/jsdoc.js +0 -8
- package/src/typescript-relaxed.js +0 -12
|
@@ -11,20 +11,20 @@ jobs:
|
|
|
11
11
|
build:
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
|
-
- uses: actions/checkout@
|
|
15
|
-
- uses: actions/setup-node@
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
- uses: actions/setup-node@v3
|
|
16
16
|
with:
|
|
17
|
-
node-version:
|
|
17
|
+
node-version: 16
|
|
18
18
|
- run: npm test
|
|
19
19
|
|
|
20
20
|
publish-npm:
|
|
21
21
|
needs: build
|
|
22
22
|
runs-on: ubuntu-latest
|
|
23
23
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
25
|
-
- uses: actions/setup-node@
|
|
24
|
+
- uses: actions/checkout@v3
|
|
25
|
+
- uses: actions/setup-node@v3
|
|
26
26
|
with:
|
|
27
|
-
node-version:
|
|
27
|
+
node-version: 16
|
|
28
28
|
registry-url: https://registry.npmjs.org
|
|
29
29
|
scope: 'gtvmbh'
|
|
30
30
|
- run: npm publish --access public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gtvmbh/eslint-config",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "ESLint configurations for various project types developed by Gesellschaft für Technische Visualistik",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/GesellschaftFuerTechnischeVisualistik/gtv-linter-config.git"
|
|
12
12
|
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=16.0.0 <=18.x.x"
|
|
15
|
+
},
|
|
13
16
|
"keywords": [
|
|
14
17
|
"eslint",
|
|
15
18
|
"eslintconfig"
|
|
@@ -17,9 +20,8 @@
|
|
|
17
20
|
"author": "Gesellschaft für Technische Visualistik mbH",
|
|
18
21
|
"license": "MIT",
|
|
19
22
|
"peerDependencies": {
|
|
20
|
-
"eslint": "
|
|
21
|
-
"eslint-plugin
|
|
22
|
-
"@typescript-eslint/
|
|
23
|
-
"@typescript-eslint/parser": ">=3"
|
|
23
|
+
"eslint": "^8.47.0",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
25
|
+
"@typescript-eslint/parser": "^6.4.1"
|
|
24
26
|
}
|
|
25
27
|
}
|
package/src/default.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
3
|
'eslint:recommended',
|
|
4
|
-
'@gtvmbh/eslint-config/eslint-config-jsdoc'
|
|
5
4
|
],
|
|
6
5
|
rules: {
|
|
7
6
|
'no-extra-parens': ['warn', 'all', { 'nestedBinaryExpressions': false }],
|
|
@@ -55,7 +54,7 @@ module.exports = {
|
|
|
55
54
|
'no-param-reassign': 'error',
|
|
56
55
|
'no-proto': 'error',
|
|
57
56
|
'no-restricted-properties': 'off',
|
|
58
|
-
'no-return-assign': ['error', '
|
|
57
|
+
'no-return-assign': ['error', 'except-parens'],
|
|
59
58
|
'no-return-await': 'warn',
|
|
60
59
|
'no-script-url': 'error',
|
|
61
60
|
'no-self-compare': 'error',
|
|
@@ -114,7 +113,7 @@ module.exports = {
|
|
|
114
113
|
'id-blacklist': 'off',
|
|
115
114
|
'id-length': 'off',
|
|
116
115
|
'id-match': 'off',
|
|
117
|
-
'implicit-arrow-linebreak':
|
|
116
|
+
'implicit-arrow-linebreak': ["error", "beside"],
|
|
118
117
|
'indent': ["error", 2, { "SwitchCase": 1 }],
|
|
119
118
|
'jsx-quotes': ['error', 'prefer-double'],
|
|
120
119
|
'key-spacing': ['error', {
|
|
@@ -129,10 +128,10 @@ module.exports = {
|
|
|
129
128
|
'max-depth': 'off',
|
|
130
129
|
'max-len': 'off',
|
|
131
130
|
'max-lines': ['warn', {
|
|
132
|
-
'max':
|
|
131
|
+
'max': 400, 'skipComments': true
|
|
133
132
|
}],
|
|
134
133
|
'max-lines-per-function': ['warn', {
|
|
135
|
-
'max':
|
|
134
|
+
'max': 100
|
|
136
135
|
}],
|
|
137
136
|
'max-nested-callbacks': ['warn', 3],
|
|
138
137
|
'max-params': ['warn', 5],
|
package/src/typescript.js
CHANGED
|
@@ -9,6 +9,9 @@ module.exports = {
|
|
|
9
9
|
'@gtvmbh/eslint-config'
|
|
10
10
|
],
|
|
11
11
|
rules: {
|
|
12
|
+
|
|
13
|
+
'no-shadow': 'off',
|
|
14
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
12
15
|
|
|
13
16
|
// Require that member overloads be consecutive
|
|
14
17
|
'@typescript-eslint/adjacent-overload-signatures': 'error',
|
|
@@ -48,7 +51,7 @@ module.exports = {
|
|
|
48
51
|
'@typescript-eslint/member-delimiter-style': 'error',
|
|
49
52
|
|
|
50
53
|
// Require a consistent member declaration order
|
|
51
|
-
'@typescript-eslint/member-ordering': '
|
|
54
|
+
'@typescript-eslint/member-ordering': 'warn',
|
|
52
55
|
|
|
53
56
|
// Enforces using a particular method signature syntax.
|
|
54
57
|
'@typescript-eslint/method-signature-style': 'warn', //anscheinend ist 'property' besser, weesschne,
|
|
@@ -132,7 +135,7 @@ module.exports = {
|
|
|
132
135
|
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
|
133
136
|
|
|
134
137
|
// Prevents conditionals where the type is always truthy or always falsy
|
|
135
|
-
'@typescript-eslint/no-unnecessary-condition':
|
|
138
|
+
'@typescript-eslint/no-unnecessary-condition': 'off',
|
|
136
139
|
|
|
137
140
|
// Warns when a namespace qualifier is unnecessary
|
|
138
141
|
'@typescript-eslint/no-unnecessary-qualifier': 'warn',
|
|
@@ -155,9 +158,6 @@ module.exports = {
|
|
|
155
158
|
// Disallows returning any from a function
|
|
156
159
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
157
160
|
|
|
158
|
-
// Disallow unused variables and arguments
|
|
159
|
-
'@typescript-eslint/no-unused-vars-experimental': 'warn', // aber lieber über compiler (siehe beschreibung)?,
|
|
160
|
-
|
|
161
161
|
// Disallows the use of require statements except in import statements
|
|
162
162
|
'@typescript-eslint/no-var-requires': 'error',
|
|
163
163
|
|
|
@@ -201,7 +201,7 @@ module.exports = {
|
|
|
201
201
|
'@typescript-eslint/prefer-ts-expect-error': 'off', // cool aber TS >= 3.9,
|
|
202
202
|
|
|
203
203
|
// Requires any function or method that returns a Promise to be marked async
|
|
204
|
-
'@typescript-eslint/promise-function-async': 'error',
|
|
204
|
+
'@typescript-eslint/promise-function-async': ['error', { checkArrowFunctions: false, checkFunctionExpressions: false }],
|
|
205
205
|
|
|
206
206
|
// Requires Array#sort calls to always provide a compareFunction
|
|
207
207
|
'@typescript-eslint/require-array-sort-compare': ['warn', { 'ignoreStringArrays': true }],
|
|
@@ -310,11 +310,11 @@ module.exports = {
|
|
|
310
310
|
|
|
311
311
|
// Disallow unused expressions
|
|
312
312
|
'no-unused-expressions': 'off',
|
|
313
|
-
'@typescript-eslint/no-unused-expressions': ['error', {
|
|
313
|
+
'@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
|
|
314
314
|
|
|
315
315
|
// Disallow unused variables
|
|
316
316
|
'no-unused-vars': 'off',
|
|
317
|
-
'@typescript-eslint/no-unused-vars': '
|
|
317
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
318
318
|
|
|
319
319
|
// Disallow the use of variables before they are defined
|
|
320
320
|
'no-use-before-define': 'off',
|
package/eslint-config-jsdoc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./src/jsdoc');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('./src/typescript-relaxed');
|
package/src/jsdoc.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
'@gtvmbh/eslint-config/eslint-config-ts'
|
|
4
|
-
],
|
|
5
|
-
rules: {
|
|
6
|
-
'@typescript-eslint/strict-boolean-expressions': 'off',
|
|
7
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
8
|
-
'@typescript-eslint/no-unsafe-call': 'off',
|
|
9
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
10
|
-
'@typescript-eslint/no-unsafe-return': 'off'
|
|
11
|
-
}
|
|
12
|
-
};
|