-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
50 lines (50 loc) · 1.84 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
44
45
46
47
48
49
50
/**
* @see https://eslint.org/docs/user-guide/configuring#configuration-file-formats-1
*/
module.exports = {
root: true,
// The eslint-plugin- prefix can be omitted from the plugin name.
// https://eslint.org/docs/user-guide/configuring#configuring-plugins
plugins: ['jest', 'import'],
// An environment defines global variables that are predefined.
// https://eslint.org/docs/user-guide/configuring#specifying-environments
env: {
browser: true,
node: true
},
parserOptions: {
ecmaVersion: 11, // 2020
sourceType: 'module'
},
// A configuration file can extend the set of enabled rules from base configurations.
// https://eslint.org/docs/user-guide/configuring#extending-configuration-files
extends: [
// https://eslint.org/docs/user-guide/configuring#using-eslintrecommended
'eslint:recommended',
// solve prettier and eslint formatting conflicts
'plugin:prettier/recommended'
],
// A glob specific configuration works almost the same as any other ESLint config.
// Override blocks can contain any configuration options that are valid in a regular config, with the exception of `root` and `ignorePatterns`.
// https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns
overrides: [
{ files: ['**/__tests__/**'], env: { jest: true } },
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './packages/*/tsconfig.json']
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off'
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier/@typescript-eslint'
]
}
]
}