-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (54 loc) · 1.37 KB
/
Copy patheslint.config.js
File metadata and controls
56 lines (54 loc) · 1.37 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
// @ts-check
import { tanstackConfig } from '@tanstack/eslint-config'
import eslintPluginPath from 'eslint-plugin-path'
import eslintPluginReact from 'eslint-plugin-react'
export default [
...tanstackConfig,
{
files: ['**/*.{jsx,tsx}'],
plugins: {
react: eslintPluginReact,
},
rules: {
'react/jsx-max-props-per-line': ['error', { maximum: 1 }],
'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'],
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/jsx-indent-props': ['error', 2],
},
},
{
rules: {
semi: ['error', 'always'],
'arrow-body-style': ['error', 'as-needed'],
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }],
'import/no-cycle': 'off',
'import/order': 'off',
'sort-imports': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/require-await': 'off',
'pnpm/json-enforce-catalog': 'off',
},
},
{
ignores: [
'eslint.config.js',
'prettier.config.js',
'.content-collections/**',
'.output/**',
],
},
{
files: ['**/*.{js,ts,jsx,tsx}'],
plugins: {
path: eslintPluginPath,
},
rules: {
'path/no-relative-imports': ['error', { maxDepth: -1 }],
},
settings: {
path: {
config: 'tsconfig.json',
},
},
},
]