-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (71 loc) · 1.87 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* eslint-env node */
module.exports = {
env: {
browser: true,
es2021: true,
},
globals: {
module: 'readonly',
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
],
plugins: ['react', '@typescript-eslint', 'jsx-a11y', 'react-hooks'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
project: ['./packages/*/tsconfig.json', './apps/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
rules: {
'no-extra-boolean-cast': 'off',
'no-cond-assign': 'error',
'no-constant-condition': 'error',
'no-unreachable': 'error',
'no-unused-expressions': 'error',
'no-constant-binary-expression': 'error',
'no-sequences': 'error',
'react/prop-types': 'off',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
overrides: [
{
files: ['*.stories.tsx'],
rules: {
'react-hooks/rules-of-hooks': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
},
},
{
files: ['./packages/figma-variables-plugin/src/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
},
},
{
files: ['./packages/native-ui/src/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-empty-object-type': 'off',
},
},
],
settings: {
react: {
version: 'detect',
},
},
ignorePatterns: ['packages/native-ui/src/**/*.figma.tsx'],
root: true,
};