forked from typesense/typesense-docsearch.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
94 lines (93 loc) · 2.18 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
/* eslint-disable import/no-commonjs */
module.exports = {
extends: ['algolia', 'algolia/jest', 'algolia/react', 'algolia/typescript'],
globals: {
__DEV__: false,
},
settings: {
react: {
pragma: 'React',
version: 'detect',
},
'import/resolver': {
node: {
extensions: ['.js', '.ts', '.tsx'],
},
},
},
rules: {
'no-param-reassign': 0,
'valid-jsdoc': 0,
'no-shadow': 0,
'prefer-template': 0,
'jest/no-disabled-tests': 0,
'react/prop-types': 0,
'react/no-unescaped-entities': 0,
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }],
'import/extensions': 0,
'no-unused-expressions': 0,
complexity: 0,
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
{
pattern: '@/**/*',
group: 'parent',
position: 'before',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
},
],
// TMP
'@typescript-eslint/explicit-function-return-type': ['off'],
'react/function-component-definition': ['off'],
'react/jsx-filename-extension': ['off'],
'jsdoc/check-examples': ['off'],
},
overrides: [
{
files: ['**/rollup.config.js', 'stories/**/*', '**/__tests__/**'],
rules: {
'import/no-extraneous-dependencies': 0,
},
},
{
files: ['cypress/**/*'],
plugins: ['cypress'],
env: {
'cypress/globals': true,
},
rules: {
'jest/expect-expect': 0,
'spaced-comment': 0,
'@typescript-eslint/triple-slash-reference': 0,
},
},
{
files: [
'scripts/**/*',
'*.config.js',
'packages/website/plugins/**/*',
'packages/website/sidebars.js',
],
rules: {
'import/no-commonjs': 0,
},
},
{
files: ['packages/website/**/*'],
rules: {
'import/no-unresolved': 0,
'import/no-extraneous-dependencies': 0,
},
},
],
};