forked from aidenybai/react-scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
89 lines (88 loc) · 3 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
const { resolve } = require('node:path');
module.exports = {
root: true,
extends: [
require.resolve('@vercel/style-guide/eslint/node'),
require.resolve('@vercel/style-guide/eslint/browser'),
require.resolve('@vercel/style-guide/eslint/typescript'),
'plugin:tailwindcss/recommended',
],
ignorePatterns: ['**/dist/**', '**/node_modules/**', '**/test/**'],
parserOptions: {
project: [
resolve(__dirname, 'tsconfig.json'), // Root tsconfig
resolve(__dirname, 'packages/scan/tsconfig.json'), // Scan package tsconfig
],
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
"@typescript-eslint/restrict-plus-operands":"off",
"@typescript-eslint/no-unused-vars":"warn",
'@typescript-eslint/explicit-function-return-type': 'off',
'import/no-default-export': 'off',
'no-bitwise': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/consistent-indexed-object-style': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-loop-func': 'off',
'eslint-comments/disable-enable-pair': 'off',
'import/no-cycle': 'off',
'no-nested-ternary': 'off',
'no-param-reassign': 'off',
'tsdoc/syntax': 'off',
'eslint-comments/require-description': 'off',
'import/no-relative-packages': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-confusing-void-expression': 'off',
'@typescript-eslint/require-await': 'off',
'import/no-named-as-default': 'off',
'no-implicit-coercion': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'object-shorthand': 'off',
"@typescript-eslint/no-unused-vars":"warn",
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'no-useless-return': 'off',
'func-names': 'off',
'@typescript-eslint/prefer-for-of': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
"no-console":'warn'
},
settings: {
'import/resolver': {
typescript: {
project: [
resolve(__dirname, 'tsconfig.json'), // Root tsconfig
resolve(__dirname, 'packages/**/tsconfig.json'), // Scan package tsconfig
],
},
},
},
overrides: [
{
files: ['*.json'],
parser: 'jsonc-eslint-parser',
plugins: ['jsonc'],
rules: {
'jsonc/no-comments': 'off',
},
},
{
files: ['*.tsx', '*.ts', '*.js'],
plugins: ['tailwindcss'],
},
{
files: ['*.mts'],
parser: '@typescript-eslint/parser',
}
],
};