-
Notifications
You must be signed in to change notification settings - Fork 0
/
typescript.js
37 lines (36 loc) · 1.05 KB
/
typescript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const jsExts = ['.js', '.jsx'];
const tsExts = ['.ts', '.tsx'];
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier/@typescript-eslint',
],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/member-delimiter-style': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true, allowTypedFunctionExpressions: true },
],
},
overrides: [
{
files: jsExts.map(ext => `**/*${ext}`),
rules: {
camelcase: 'error',
'@typescript-eslint/camelcase': 'off',
'no-array-constructor': 'error',
'@typescript-eslint/no-array-constructor': 'off',
'no-unused-vars': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};