-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
128 lines (128 loc) · 2.72 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
module.exports = {
env: {
node: true,
mocha: true,
browser: true,
'jest/globals': true,
},
plugins: ['jest', 'prettier'],
extends: [
'airbnb-typescript',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-comments/recommended',
'plugin:promise/recommended',
'plugin:unicorn/recommended',
'prettier',
'prettier/react',
'prettier/@typescript-eslint',
],
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
rules: {
'arrow-body-style': 'off',
'consistent-return': 'off',
curly: 'error',
'import/prefer-default-export': 'warn',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.stories.tsx',
'**/*.stories.ts',
'**/*.spec.tsx',
'**/*.spec.ts',
],
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
pathGroups: [
{
pattern: '@/**',
group: 'internal',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
'import/prefer-default-export': 'off',
'jsx-a11y/label-has-associated-control': 'warn',
'no-console': 'off',
'no-restricted-imports': [
'error',
{
patterns: ['*.mocked*'],
},
],
'no-underscore-dangle': [
'error',
{
allow: [
'__blinkit_branding_initial__',
'__injected_globals__',
'__community__',
'__features__',
'__changedDep',
'__community__',
'__dep',
'_id',
],
},
],
'no-plusplus': [
'error',
{
allowForLoopAfterthoughts: true,
},
],
'no-undef': ['error'],
'nonblock-statement-body-position': ['error', 'below'],
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'unicorn/better-regex': 'warn',
'unicorn/no-array-reduce': 'off',
'unicorn/no-null': 'off',
'unicorn/prevent-abbreviations': 'off',
'unicorn/prefer-dom-node-remove': 'off',
'unicorn/prefer-spread': 'warn',
'@typescript-eslint/no-implied-eval': 'warn',
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'class-methods-use-this': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/interactive-supports-focus': 'off',
},
overrides: [
{
files: ['**/*.spec.tsx', '**/*.stories.tsx'],
rules: {
'no-restricted-imports': 'off',
'unicorn/no-array-callback-reference': 'off',
},
},
],
globals: {
Meteor: true,
check: true,
NodeJS: true,
T: true,
JSX: true,
__blinkit_branding_initial__: true,
__community__: true,
},
};