forked from Milkdown/milkdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (54 loc) · 1.73 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
/* Copyright 2021, Milkdown 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:prettier/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['simple-import-sort', 'header', 'eslint-plugin-tsdoc'],
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', { ignore: ['unist', 'mdast'] }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'tsdoc/syntax': 'warn',
'header/header': ['error', 'block', ' Copyright 2021, Milkdown 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.config.ts'],
rules: {
'import/no-default-export': 'off',
},
},
],
};