Linter: add warnings for rules affecting code quality

These rules were currently silenced to limit the noise,
but we should avoid introducing new problematic code instances,
and refactor to fix the issues when possible, since in many cases
this hinders the TS migration.
This commit is contained in:
larabr 2025-10-17 16:52:06 +02:00
parent 48d1cfd15f
commit 8dd8839694
No known key found for this signature in database
GPG Key ID: 2A4BEC40729185DD

View File

@ -42,7 +42,7 @@ export default defineConfig(
rules: { rules: {
'arrow-body-style': 'off', 'arrow-body-style': 'off',
'arrow-parens': ['error','as-needed'], 'arrow-parens': ['error','as-needed'],
'class-methods-use-this': 'off', // TODO warn 'class-methods-use-this': 'warn',
'comma-dangle': ['error', 'never'], 'comma-dangle': ['error', 'never'],
'@typescript-eslint/comma-spacing': 'off', '@typescript-eslint/comma-spacing': 'off',
@ -64,12 +64,12 @@ export default defineConfig(
'no-else-return': 'off', 'no-else-return': 'off',
'no-empty': ['error', { 'allowEmptyCatch': true }], 'no-empty': ['error', { 'allowEmptyCatch': true }],
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }], 'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1, 'maxBOF':0 }],
'no-nested-ternary': 'off', // TODO warn 'no-nested-ternary': 'warn',
'no-param-reassign': 'off', // TODO get rid of this 'no-param-reassign': 'warn', // TODO get rid of this
'no-plusplus': 'off', 'no-plusplus': 'off',
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], 'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
'object-curly-newline': 'off', 'object-curly-newline': 'off',
'@typescript-eslint/no-shadow': 'off', // TODO get rid of this '@typescript-eslint/no-shadow': 'warn', // TODO get rid of this
'object-property-newline': [ 'object-property-newline': [
'error', 'error',
{ {
@ -85,8 +85,8 @@ export default defineConfig(
'padded-blocks': 'off', 'padded-blocks': 'off',
'prefer-arrow-callback': 'off', 'prefer-arrow-callback': 'off',
'prefer-destructuring': 'off', 'prefer-destructuring': 'off',
'prefer-rest-params': 'off', // TODO get rid of this 'prefer-rest-params': 'warn', // TODO get rid of this
'prefer-spread': 'off', // TODO get rid of this 'prefer-spread': 'warn', // TODO get rid of this
'prefer-template': 'off', 'prefer-template': 'off',
'quote-props': 'off', 'quote-props': 'off',
'quotes': 'off', // superseded by @stylistic/quotes 'quotes': 'off', // superseded by @stylistic/quotes