forked from BadgerBloke/typesense-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
78 lines (78 loc) · 2.71 KB
/
.eslintrc.yml
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
env:
browser: true
es2021: true
extends:
- plugin:@next/next/recommended
- eslint:recommended
- plugin:react-hooks/recommended
- plugin:jsx-a11y/recommended
- plugin:react/recommended
- plugin:prettier/recommended
- google
# - standard-with-typescript
- prettier
parserOptions:
ecmaFeatures:
jsx: true
ecmaVersion: latest
sourceType: module
plugins:
- react
- jsx-a11y
- simple-import-sort
- prettier
settings:
react:
version: detect
rules:
react/react-in-jsx-scope: off
jsx-a11y/anchor-is-valid: off
jsx-a11y/heading-has-content: off
prettier/prettier:
- error
- { 'endOfLine': 'auto' }
simple-import-sort/imports: error
simple-import-sort/exports: error
no-console: warn
require-jsdoc:
- error
- {
'require':
{
'FunctionDeclaration': false,
'MethodDefinition': false,
'ClassDeclaration': false,
'ArrowFunctionExpression': false,
'FunctionExpression': false,
},
}
overrides:
- {
'files': ['**/*.ts', '**/*.tsx'],
'parser': '@typescript-eslint/parser',
'plugins': ['@typescript-eslint'],
'extends': ['plugin:@typescript-eslint/recommended'],
'rules':
{
'react/prop-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/ban-ts-comment': 'warn',
'new-cap': ['error', { 'capIsNewExceptions': ['Inter'] }],
'simple-import-sort/imports': ['error', { 'groups': [
# // Style imports
["^.+\\.s?css$"],
# // `react` first, `next` second, then packages starting with a character
['^react$', '^next', '^[a-z]'],
# // Packages starting with `@`
['^@'],
# // Packages starting with `~`
['^~'],
# // Imports starting with `../`
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
# // Imports starting with `./`
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
# // Side effect imports
["^\\u0000"],
] }],
},
}