-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
64 lines (60 loc) · 1.85 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
/* Copyright 2021, vite-plugin-book by Mirone. */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:promise/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'simple-import-sort', 'header'],
env: {
browser: true,
node: true,
},
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'import/prefer-default-export': 'off',
'import/no-default-export': 'error',
'import/no-unresolved': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'header/header': ['error', 'block', ' Copyright 2021, vite-plugin-book by Mirone. '],
},
settings: {
react: {
version: 'detect',
},
},
overrides: [
{
files: ['**/*.js'],
rules: {
'global-require': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/naming-convention': 'off',
'import/no-default-export': 'off',
},
},
{
files: ['shim.d.ts', 'vite.*.ts', '*.config.ts', './src/plugin/index.ts'],
rules: {
'import/no-default-export': 'off',
},
},
{
files: ['**/*.d.ts'],
rules: {
'no-var': 'off',
},
},
],
};