chore: add tslint (#37)

* chore: tslint

* chore: workflow lint

Co-authored-by: Amour1688 <lcz_1996@foxmail.com>
This commit is contained in:
xrk
2020-07-19 14:47:24 +08:00
committed by GitHub
parent 6b0b7534a4
commit ee0d544c24
10 changed files with 321 additions and 106 deletions

View File

@ -12,7 +12,12 @@ module.exports = {
jest: true,
es6: true,
},
extends: 'eslint-config-airbnb-base',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: [
'eslint-config-airbnb-base',
'plugin:@typescript-eslint/recommended'
],
rules: {
'no-nested-ternary': [0],
'no-param-reassign': [0],
@ -20,6 +25,18 @@ module.exports = {
'no-plusplus': [0],
'import/no-extraneous-dependencies': [0],
'consistent-return': [0],
'no-bitwise': [0]
'no-bitwise': [0],
'prefer-destructuring': [2, { 'array': false }],
'import/extensions': [2, 'ignorePackages', { ts: 'never' }],
'@typescript-eslint/ban-ts-comment': [0],
'@typescript-eslint/explicit-module-boundary-types': [0],
'@typescript-eslint/no-explicit-any': [0]
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}
}
}
};