Skip to content

Commit

Permalink
refactor: upgrade eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Jul 14, 2024
1 parent 5b7a65d commit 3726f23
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 125 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

coverage/
dist/
node_modules/
62 changes: 20 additions & 42 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,10 @@ export default [
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/ban-tslint-comment': 'error',
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/block-spacing': 'error',
'brace-style': 'off',
'@typescript-eslint/brace-style': 'error',
'block-spacing': 'error',
'brace-style': 'error',
'@typescript-eslint/class-literal-property-style': 'error',
'comma-spacing': 'off',
'@typescript-eslint/comma-spacing': 'error',
'comma-spacing': 'error',
'@typescript-eslint/consistent-generic-constructors': 'error',
'@typescript-eslint/consistent-indexed-object-style': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
Expand All @@ -83,17 +80,12 @@ export default [
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'func-call-spacing': 'off',
'@typescript-eslint/func-call-spacing': 'error',
'key-spacing': 'off',
'@typescript-eslint/key-spacing': 'error',
'keyword-spacing': 'off',
'@typescript-eslint/keyword-spacing': 'error',
'lines-around-comment': 'off',
'@typescript-eslint/lines-around-comment': 'error',
'func-call-spacing': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'lines-around-comment': 'error',
'max-params': 'off',
'@typescript-eslint/max-params': 'error',
'@typescript-eslint/member-delimiter-style': 'error',
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/method-signature-style': 'error',
'no-array-constructor': 'off',
Expand All @@ -111,8 +103,7 @@ export default [
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-non-null-assertion': 'error',
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': 'error',
'no-extra-semi': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
Expand Down Expand Up @@ -144,8 +135,7 @@ export default [
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-this-alias': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'error',
'no-throw-literal': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
Expand All @@ -168,8 +158,7 @@ export default [
'@typescript-eslint/no-useless-empty-export': 'error',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
'padding-line-between-statements': 'off',
'@typescript-eslint/padding-line-between-statements': 'error',
'padding-line-between-statements': 'error',
'@typescript-eslint/parameter-properties': 'error',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/prefer-enum-initializers': 'error',
Expand All @@ -196,49 +185,38 @@ export default [
'@typescript-eslint/restrict-template-expressions': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'semi': 'off',
'@typescript-eslint/semi': 'error',
'semi': 'error',
'@typescript-eslint/sort-type-constituents': 'error',
'space-before-blocks': 'off',
'@typescript-eslint/space-before-blocks': 'error',
'space-infix-ops': 'off',
'@typescript-eslint/space-infix-ops': 'error',
'space-before-blocks': 'error',
'space-infix-ops': 'error',
'@typescript-eslint/strict-boolean-expressions': 'error',
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/triple-slash-reference': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/typedef': 'error',
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/unified-signatures': 'error',

// my specials:
'indent': 'off',
'@typescript-eslint/indent': ['error', 'tab', { 'SwitchCase': 1 }],
'indent': ['error', 'tab', { 'SwitchCase': 1 }],

'linebreak-style': ['error', 'unix'],

'quotes': 'off',
'@typescript-eslint/quotes': ['error', 'single'],
'quotes': ['error', 'single'],

'object-curly-spacing': 'off',
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],

'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'comma-dangle': ['error', 'always-multiline'],

'lines-between-class-members': 'off',
'@typescript-eslint/lines-between-class-members': ['error'],
'lines-between-class-members': ['error'],

'@typescript-eslint/naming-convention': 'error',

'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': 'off',

'no-extra-parens': 'off',
'@typescript-eslint/no-extra-parens': ['error', 'all', { 'conditionalAssign': false, 'nestedBinaryExpressions': false, 'ternaryOperandBinaryExpressions': false }],
'no-extra-parens': ['error', 'all', { 'conditionalAssign': false, 'nestedBinaryExpressions': false, 'ternaryOperandBinaryExpressions': false }],

'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }],
'space-before-function-paren': ['error', { 'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always' }],

'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { 'functions': false }],
Expand Down
Loading

0 comments on commit 3726f23

Please sign in to comment.