eslint-config/packages/typescript/index.js
2020-10-21 14:42:56 +08:00

39 lines
1.3 KiB
JavaScript

module.exports = {
plugins: [
'@typescript-eslint',
],
parser: '@typescript-eslint/parser',
extends: [
'@antfu/eslint-config-basic',
'plugin:@typescript-eslint/recommended',
],
rules: {
// TS
'no-useless-constructor': 'off',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/member-delimiter-style': ['error', { multiline: { delimiter: 'none' } }],
'@typescript-eslint/type-annotation-spacing': ['error', {}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [2, { args: 'none', ignoreRestSiblings: true }],
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'error',
// off
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@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',
},
}