-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
43 lines (40 loc) · 1.16 KB
/
.eslintrc.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
38
39
40
41
42
43
const fs = require('fs');
const path = require('path');
process.env.BABEL_ENV = 'development';
process.env.NODE_ENV = 'development';
const prettierOptions = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8'),
);
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'react-app',
'prettier',
],
plugins: ['@typescript-eslint', 'prettier'],
rules: {
'prettier/prettier': ['error', prettierOptions],
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
// '@typescript-eslint/explicit-function-return-type': ['warn'],
},
overrides: [
{
files: ['**/*.{ts?(x),js}'],
rules: { 'prettier/prettier': ['warn', prettierOptions] },
},
{
files: ['**/*.config.js', '**/.*rc.js', 'internals/**/*.js'],
rules: { '@typescript-eslint/no-var-requires': 0 },
},
{
files: ['**/*.test.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-empty-function': 0,
},
},
],
};