forked from suanmei/callapp-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
33 lines (33 loc) · 999 Bytes
/
.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
module.exports = {
extends: ['airbnb-base', 'plugin:import/typescript', 'plugin:unicorn/recommended', 'prettier'],
plugins: ['prettier', 'unicorn'],
env: {
node: true,
browser: true,
},
rules: {
'no-plusplus': 'off',
'import/no-extraneous-dependencies': ['error', { peerDependencies: true }],
'prettier/prettier': 'error',
'unicorn/prefer-includes': 'off',
'unicorn/prevent-abbreviations': 'off',
},
overrides: [
{
files: ['*.ts'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier/@typescript-eslint',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-param-reassign': 'off',
// airbnb 配置导致 tsx 文件引用一直报错
'import/extensions': ['error', 'ignorePackages', { ts: 'never' }],
},
},
],
};