forked from basehub-ai/help-center-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
87 lines (84 loc) · 2.28 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
// const { resolve } = require('node:path')
// const project = resolve(process.cwd(), 'tsconfig.json')
/*
* This is a custom ESLint configuration for use with
* Next.js apps.
*
* This config extends the Vercel Engineering Style Guide.
* For more information, see https://github.com/vercel/style-guide
*
*/
module.exports = {
extends: [
'next',
"next/core-web-vitals",
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
// parserOptions: {
// project,
// },
globals: {
React: true,
JSX: true,
},
plugins: ['react', 'react-hooks', 'simple-import-sort', '@typescript-eslint'],
parser: '@typescript-eslint/parser',
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: ['packages/*/tsconfig.json', 'apps/*/tsconfig.json'],
},
},
react: {
version: 'detect',
},
},
ignorePatterns: ['node_modules/', 'dist/'],
// add rules configurations here
rules: {
'no-extra-boolean-cast': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'react/no-unknown-property': 'off',
'react/prop-types': 'off',
'import/no-default-export': 'off',
'react/display-name': 'off',
'react/no-unescaped-entities': 0,
curly: ['error', 'multi-line'],
'react/jsx-no-target-blank': [2, { allowReferrer: true }],
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks:
'(useIsomorphicLayoutEffect|useDeepCompareMemo|useIsoLayoutEffect|useDebouncedCallback|useThrottledCallback|useGsapContext)',
},
],
'@typescript-eslint/no-unused-vars': [
2,
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'no-console': [1, { allow: ['warn', 'error'] }],
'@typescript-eslint/ban-ts-comment': 0,
'prefer-const': [
'error',
{
destructuring: 'all',
ignoreReadBeforeAssign: false,
},
],
// '@typescript-eslint/no-floating-promises': 'error',
// '@typescript-eslint/await-thenable': 'error',
// '@typescript-eslint/no-misused-promises': 'error',
},
env: {
es6: true,
browser: true,
node: true,
},
}