Repository navigation
Expand file tree
/
Copy patheslint.config.mjs
More file actions
64 lines (62 loc) · 1.8 KB
/
Copy patheslint.config.mjs
File metadata and controls
64 lines (62 loc) · 1.8 KB
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
// @ts-check
import { defineConfig } from 'eslint-config-hyoban'
import importBoundaries from './plugins/eslint-import-boundaries.mjs'
export default defineConfig(
{
formatting: false,
ignores: (originals) => [
...originals,
'.vscode/**',
'dist/**',
'docs/**',
],
lessOpinionated: true,
preferESM: false,
react: true,
stylistic: false,
tailwindCSS: false,
},
{
settings: {
tailwindcss: {
whitelist: ['center'],
},
},
rules: {
'unicorn/prefer-math-trunc': 'off',
'@eslint-react/no-clone-element': 0,
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 0,
'antfu/no-top-level-await': 'off',
'e18e/prefer-static-regex': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/require-returns-description': 'off',
'prefer-exponentiation-operator': 'off',
// NOTE: Disable this temporarily
'react-compiler/react-compiler': 0,
'react-hooks/exhaustive-deps': 'error',
'react-naming-convention/ref-name': 'off',
'react-naming-convention/use-state': 'off',
'react/no-array-index-key': 'off',
'react-refresh/only-export-components': 'off',
'no-restricted-syntax': 0,
'no-restricted-globals': [
'error',
{
name: 'location',
message: 'Use `useLocation` from react-router to get the route info.',
},
],
'ts/no-explicit-any': 'off',
'ts/no-use-before-define': 'off',
},
},
{
// Module ownership by resolved import target: every linted file, every
// import form. The boundary table lives with the rule.
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}'],
plugins: { lumaforge: importBoundaries },
rules: {
'lumaforge/import-boundaries': 'error',
},
},
)