-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypescript.js
37 lines (37 loc) · 1.36 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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'./.eslintrc.js',
'airbnb-typescript',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
ignorePatterns: [
'**/*.config.js',
'**/*.config.ts',
'**/*.html',
'**/setupTests.js',
'**/setupTests.ts',
],
plugins: ['@typescript-eslint'],
rules: {
"react/jsx-no-constructed-context-values": "off",
"import/no-extraneous-dependencies": "off",
"no-plusplus": ["off"],
'no-shadow': 'off', // TS já faz isso
'no-undef': 'off', // TS já faz isso
'@typescript-eslint/no-explicit-any': 'off',
"@typescript-eslint/default-param-last": "off",
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': [1, { ignoreRestSiblings: true }], // Para evitar 2 warnings de variáveis não usadas
'no-redeclare': 'off', // serve para function overloading no TS uso aqui: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-redeclare.md
'@typescript-eslint/no-redeclare': [1, { ignoreDeclarationMerge: true }],
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'import/extensions': 'off',
"import/no-unresolved": [2, { "caseSensitiveStrict": true }],
"react/prop-types": "off",
},
};