Skip to content

Commit b23c35b

Browse files
committed
Wire up Eslint for TS
1 parent 4f958b7 commit b23c35b

File tree

3 files changed

+246
-9
lines changed

3 files changed

+246
-9
lines changed

.eslintrc.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
module.exports = {
22
root: true,
3-
extends: ['airbnb-base', 'prettier'],
4-
plugins: ['import'],
3+
parser: '@typescript-eslint/parser',
4+
extends: [
5+
'airbnb-base',
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/recommended',
8+
'plugin:import/typescript',
9+
'prettier',
10+
],
11+
plugins: ['@typescript-eslint', 'import'],
512
rules: {
6-
curly: 'error',
13+
'@typescript-eslint/explicit-module-boundary-types': 'off',
14+
'import/extensions': 'off',
15+
'import/no-cycle': 'off',
16+
'import/prefer-default-export': 'off',
717
'no-bitwise': 'off',
818
'no-cond-assign': 'off',
19+
'no-continue': 'off',
20+
'no-use-before-define': 'off',
921
'no-mixed-operators': 'off',
1022
'no-multi-assign': 'off',
1123
'no-new-func': 'off',
1224
'no-param-reassign': 'off',
1325
'no-plusplus': 'off',
1426
'no-underscore-dangle': 'off',
15-
'no-continue': 'off',
16-
'import/prefer-default-export': 'off',
27+
'operator-linebreak': 'off',
28+
curly: 'error',
1729
},
1830
};

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
},
3131
"devDependencies": {
3232
"@babel/preset-typescript": "^7.14.5",
33+
"@typescript-eslint/eslint-plugin": "^4.28.0",
34+
"@typescript-eslint/parser": "^4.28.0",
3335
"eslint": "^7.29.0",
3436
"eslint-config-airbnb-base": "^14.2.1",
3537
"eslint-config-prettier": "^8.3.0",

0 commit comments

Comments
 (0)