2020-12-10 20:02:10 +08:00
|
|
|
module.exports = {
|
|
|
|
extends: ['airbnb-typescript/base'],
|
|
|
|
parserOptions: {
|
2020-12-25 14:39:00 +08:00
|
|
|
createDefaultProgram: true,
|
2020-12-10 20:02:10 +08:00
|
|
|
project: './tsconfig.json',
|
|
|
|
},
|
|
|
|
parser: '@typescript-eslint/parser',
|
|
|
|
plugins: ['@typescript-eslint'],
|
|
|
|
rules: {
|
2020-12-10 23:46:10 +08:00
|
|
|
'no-console': 'off',
|
2020-12-10 20:02:10 +08:00
|
|
|
'no-restricted-syntax': 'off',
|
|
|
|
'no-continue': 'off',
|
|
|
|
// 禁止使用 var
|
|
|
|
'no-var': 'error',
|
|
|
|
// 优先使用 interface 而不是 type
|
|
|
|
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
|
|
|
|
},
|
2020-12-25 14:39:00 +08:00
|
|
|
};
|