@gtvmbh/eslint-config 1.0.7 → 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.
@@ -11,20 +11,20 @@ jobs:
11
11
  build:
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
- - uses: actions/checkout@v2
15
- - uses: actions/setup-node@v1
14
+ - uses: actions/checkout@v3
15
+ - uses: actions/setup-node@v3
16
16
  with:
17
- node-version: 12
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@v2
25
- - uses: actions/setup-node@v1
24
+ - uses: actions/checkout@v3
25
+ - uses: actions/setup-node@v3
26
26
  with:
27
- node-version: 12
27
+ node-version: 16
28
28
  registry-url: https://registry.npmjs.org
29
29
  scope: 'gtvmbh'
30
30
  - run: npm publish --access public
@@ -8,8 +8,7 @@ module.exports = {
8
8
  'jasmine': true
9
9
  },
10
10
  extends: [
11
- '@gtvmbh/eslint-config
12
- '@gtvmbh/eslint-config/eslint-config-jsdoc'
11
+ '@gtvmbh/eslint-config'
13
12
  ],
14
13
  ignorePatterns: [
15
14
  '.eslintrc.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtvmbh/eslint-config",
3
- "version": "1.0.7",
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": ">=7",
21
- "eslint-plugin-jsdoc": ">=30",
22
- "@typescript-eslint/eslint-plugin": ">=3",
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', 'always'],
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': 'off',
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': 300, 'skipComments': true
131
+ 'max': 400, 'skipComments': true
133
132
  }],
134
133
  'max-lines-per-function': ['warn', {
135
- 'max': 80
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': 'error',
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': 'warn',
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,10 +201,10 @@ 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
- '@typescript-eslint/require-array-sort-compare': 'warn',
207
+ '@typescript-eslint/require-array-sort-compare': ['warn', { 'ignoreStringArrays': true }],
208
208
 
209
209
  // When adding two variables, operands must both be of type number or of type string
210
210
  '@typescript-eslint/restrict-plus-operands': 'error',
@@ -228,7 +228,7 @@ module.exports = {
228
228
  '@typescript-eslint/typedef': 'off', // compiler noImplicitAny
229
229
 
230
230
  // Enforces unbound methods are called with their expected scope
231
- '@typescript-eslint/unbound-method': ['error', {'ignoreStatic':true}],
231
+ '@typescript-eslint/unbound-method': ['warn', {'ignoreStatic': true}],
232
232
 
233
233
  // Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter
234
234
  '@typescript-eslint/unified-signatures': 'warn',
@@ -290,7 +290,7 @@ module.exports = {
290
290
 
291
291
  // Disallow empty functions
292
292
  'no-empty-function': 'off',
293
- '@typescript-eslint/no-empty-function': 'error',
293
+ '@typescript-eslint/no-empty-function': 'off',
294
294
 
295
295
  // Disallow unnecessary parentheses
296
296
  'no-extra-parens': 'off',
@@ -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': 'warn',
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': 'warn',
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/src/vidala.js CHANGED
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
2
  rules: {
3
- 'no-restricted-imports': ['error', { 'paths': ['ViDaLa'] }]
3
+ 'no-restricted-imports': ['error', { 'patterns': ['ViDaLa/*'] }]
4
4
  }
5
5
  };
@@ -1 +0,0 @@
1
- module.exports = require('./src/jsdoc');
package/src/jsdoc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- plugins: [
3
- 'jsdoc'
4
- ],
5
- rules: {
6
- 'jsdoc/newline-after-description': 'warn'
7
- }
8
- };