2021-04-20 07:03:18 +08:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
|
|
const basic = require('@antfu/eslint-config-basic')
|
|
|
|
|
2019-07-18 04:11:55 +08:00
|
|
|
module.exports = {
|
|
|
|
extends: [
|
2021-04-20 05:45:40 +08:00
|
|
|
'@antfu/eslint-config-basic',
|
2021-04-20 07:03:18 +08:00
|
|
|
'plugin:@typescript-eslint/recommended',
|
2019-07-18 04:11:55 +08:00
|
|
|
],
|
2021-04-20 07:03:18 +08:00
|
|
|
overrides: basic.overrides,
|
2019-07-18 04:11:55 +08:00
|
|
|
rules: {
|
2021-09-13 11:31:02 +08:00
|
|
|
'import/named': 'off',
|
|
|
|
|
2019-07-18 04:11:55 +08:00
|
|
|
// TS
|
2019-07-19 14:41:36 +08:00
|
|
|
'@typescript-eslint/semi': ['error', 'never'],
|
2019-07-18 04:11:55 +08:00
|
|
|
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
|
|
|
|
'@typescript-eslint/type-annotation-spacing': ['error', {}],
|
2021-12-12 08:17:49 +08:00
|
|
|
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
2020-08-12 19:24:32 +08:00
|
|
|
|
2021-12-12 08:17:49 +08:00
|
|
|
// Override JS
|
|
|
|
'no-useless-constructor': 'off',
|
2021-06-24 20:57:50 +08:00
|
|
|
'indent': 'off',
|
|
|
|
'@typescript-eslint/indent': ['error', 2],
|
2020-10-21 14:38:36 +08:00
|
|
|
'no-unused-vars': 'off',
|
2021-03-16 00:30:01 +08:00
|
|
|
'@typescript-eslint/no-unused-vars': 'error',
|
2020-10-21 14:38:36 +08:00
|
|
|
'no-redeclare': 'off',
|
|
|
|
'@typescript-eslint/no-redeclare': 'error',
|
2021-12-12 08:17:49 +08:00
|
|
|
'no-use-before-define': 'off',
|
2021-12-12 08:20:58 +08:00
|
|
|
'@typescript-eslint/no-use-before-define': ['error', { functions: false, classes: false, variables: true }],
|
2020-10-21 14:38:36 +08:00
|
|
|
|
2020-08-12 19:24:32 +08:00
|
|
|
// off
|
2019-07-18 04:11:55 +08:00
|
|
|
'@typescript-eslint/camelcase': 'off',
|
|
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
|
|
'@typescript-eslint/explicit-member-accessibility': 'off',
|
|
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
2019-07-19 14:41:36 +08:00
|
|
|
'@typescript-eslint/no-parameter-properties': 'off',
|
|
|
|
'@typescript-eslint/no-empty-interface': 'off',
|
2019-08-23 00:19:43 +08:00
|
|
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
2020-06-04 12:49:19 +08:00
|
|
|
'@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',
|
2021-12-06 05:40:37 +08:00
|
|
|
'@typescript-eslint/no-namespace': 'off',
|
2020-08-12 20:08:06 +08:00
|
|
|
},
|
2019-07-18 04:11:55 +08:00
|
|
|
}
|