-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
70 lines (66 loc) · 1.77 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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@typescript-eslint', 'react', 'jsx-a11y'],
rules: {
// TS
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/naming-convention': 0,
// React
'react-hooks/exhaustive-deps': 0,
'react/react-in-jsx-scope': 0,
'react/jsx-curly-spacing': 0,
'react/jsx-props-no-spreading': 0,
'react/require-default-props': 0, // Since we do not use prop-types
// jsx-a11y
'jsx-a11y/anchor-is-valid': 0,
// Default
'no-else-return': 'off',
'linebreak-style': 0,
'object-curly-spacing': [2, 'always'],
'no-debugger': 0,
// Prettier
'prettier/prettier': [
2,
{
bracketSameLine: true,
plugins: ['@ianvs/prettier-plugin-sort-imports'],
importOrder: [
'<BUILTIN_MODULES>', // Node.js built-in modules
'<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups.
'', // Empty line
'^@plasmo/(.*)$',
'',
'^@plasmohq/(.*)$',
'',
'^~(.*)$',
'',
'^[./]',
],
trailingComma: 'es5',
tabWidth: 2,
semi: true,
singleQuote: true,
printWidth: 80,
bracketSpacing: true,
useTabs: false,
cssEnable: ['css', 'scss'],
javascriptEnable: ['javascript', 'javascriptreact'],
typescriptEnable: ['typescript', 'typescriptreact'],
},
],
},
};