@gtvmbh/eslint-config 2.0.0-rc.4 → 2.0.0-rc.6

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.
@@ -2,11 +2,17 @@ import { defineConfig } from 'eslint/config';
2
2
  import tseslint from 'typescript-eslint';
3
3
  import javascriptConfig from './index.js';
4
4
 
5
+ const inheritedJavascriptConfig = javascriptConfig.map((config) => {
6
+ return {
7
+ ...config,
8
+ files: [...new Set([...config.files, '**/*.ts', '**/*.tsx'])]
9
+ };
10
+ });
11
+
5
12
  export default defineConfig([
6
- ...javascriptConfig,
13
+ ...inheritedJavascriptConfig,
7
14
  ...tseslint.configs.strictTypeChecked,
8
15
  {
9
- files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
10
16
  languageOptions: {
11
17
  parserOptions: {
12
18
  projectService: true
@@ -16,13 +22,25 @@ export default defineConfig([
16
22
  {
17
23
  files: ['**/*.ts', '**/*.tsx'],
18
24
  rules: {
25
+ '@typescript-eslint/member-ordering': 'off',
26
+ '@typescript-eslint/no-confusing-void-expression': ['error', {
27
+ ignoreArrowShorthand: true
28
+ }],
29
+ '@typescript-eslint/no-extraneous-class': ['error', {
30
+ allowWithDecorator: true
31
+ }],
32
+ '@typescript-eslint/restrict-template-expressions': ['error', {
33
+ allowNumber: true
34
+ }],
19
35
  '@typescript-eslint/switch-exhaustiveness-check': ['error', {
20
36
  allowDefaultCaseForExhaustiveSwitch: false,
21
37
  requireDefaultForNonUnion: true,
22
38
  considerDefaultExhaustiveForUnions: true
23
39
  }],
24
- '@typescript-eslint/member-ordering': 'off',
25
- '@typescript-eslint/no-extraneous-class': ['error', { allowWithDecorator: true }],
40
+ '@typescript-eslint/unbound-method': ['error', {
41
+ ignoreStatic: true
42
+ }],
43
+ '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off',
26
44
  'no-redeclare': 'off' // Typescript doesn't need the linter to check this
27
45
  }
28
46
  }
package/index.js CHANGED
@@ -11,20 +11,20 @@ export default defineConfig([
11
11
  files: ['**/*.js', '**/*.jsx'],
12
12
  rules: {
13
13
  // Stylistic rules
14
- '@stylistic/brace-style': '1tbs', // one true brace style
14
+ '@stylistic/brace-style': ['error', '1tbs'], // one true brace style
15
15
  '@stylistic/no-extra-semi': 'error',
16
16
  '@stylistic/no-multiple-empty-lines': ['error', {
17
17
  max: 1,
18
18
  maxBOF: 0,
19
19
  maxEOF: 1
20
20
  }],
21
- '@stylistic/padding-line-between-statements': ['error', [
22
- {
23
- blankLine: 'always',
24
- prev: '*',
25
- next: 'return'
26
- }
27
- ]],
21
+ '@stylistic/padding-line-between-statements': ['error', {
22
+ blankLine: 'always',
23
+ prev: '*',
24
+ next: 'return'
25
+ }
26
+ ],
27
+ '@stylistic/semi': ['error', 'always'],
28
28
 
29
29
  // ESLint rules
30
30
  'function-paren-newline': 'error',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtvmbh/eslint-config",
3
- "version": "2.0.0-rc.4",
3
+ "version": "2.0.0-rc.6",
4
4
  "description": "ESLint configurations for various project types developed by Gesellschaft für Technische Visualistik",
5
5
  "main": "index.js",
6
6
  "exports": {