-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.js
69 lines (69 loc) · 1.53 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
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
jsx: true,
},
plugins: ['@typescript-eslint', '@emotion', 'prettier', 'jsx-a11y'],
root: true,
rules: {
'no-duplicate-imports': 'warn',
'prettier/prettier': [
'warn',
{
printWidth: 100,
semi: true,
singleQuote: true,
trailingComma: 'all',
useTabs: true,
},
],
'jsx-a11y/href-no-hash': 'off',
'import/first': ['warn', 'absolute-first'],
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
warnOnUnassignedImports: true,
},
],
'import/newline-after-import': 'warn',
'use-isnan': 'warn',
'@emotion/import-from-emotion': 'error',
'@emotion/no-vanilla': 'error',
'@emotion/pkg-renaming': 'error',
'@emotion/syntax-preference': ['warn', 'string'],
'@emotion/styled-import': 'error',
'@typescript-eslint/no-empty-interface': [
'warn',
{
allowSingleExtends: false,
},
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
settings: {
'import/resolver': {
'babel-module': { allowExistingDirectories: true },
},
'import/internal-regex': '^@/',
react: {
version: 'detect',
},
},
};