feat: update ts rules
This commit is contained in:
@@ -12,9 +12,13 @@ module.exports = {
|
||||
|
||||
// TS
|
||||
'@typescript-eslint/semi': ['error', 'never'],
|
||||
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
|
||||
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
|
||||
'@typescript-eslint/type-annotation-spacing': ['error', {}],
|
||||
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
||||
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
||||
'@typescript-eslint/consistent-indexed-object-style': ['error', 'record'],
|
||||
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
||||
|
||||
// Override JS
|
||||
'no-useless-constructor': 'off',
|
||||
@@ -26,6 +30,12 @@ module.exports = {
|
||||
'@typescript-eslint/no-redeclare': 'error',
|
||||
'no-use-before-define': 'off',
|
||||
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
|
||||
'brace-style': 'off',
|
||||
'@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
|
||||
'comma-dangle': 'off',
|
||||
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
|
||||
'object-curly-spacing': 'off',
|
||||
'@typescript-eslint/object-curly-spacing': ['error', 'always'],
|
||||
|
||||
// off
|
||||
'@typescript-eslint/camelcase': 'off',
|
||||
@@ -37,7 +47,6 @@ module.exports = {
|
||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/ban-types': 'off',
|
||||
'@typescript-eslint/no-namespace': 'off',
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@antfu/eslint-config-basic": "^0.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
||||
"@typescript-eslint/parser": "^5.8.1"
|
||||
"@typescript-eslint/eslint-plugin": "^5.9.0",
|
||||
"@typescript-eslint/parser": "^5.9.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.5.0"
|
||||
"eslint": "^8.6.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user