Skip to content

Commit 1a6314e

Browse files
committed
feat(projects): supplement eslint rules
1 parent 0690ee7 commit 1a6314e

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

eslint.config.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default defineConfig(
2323
noUselessIndex: true
2424
}
2525
],
26+
2627
'import/order': [
2728
'error',
2829
{
@@ -35,6 +36,7 @@ export default defineConfig(
3536
pathGroupsExcludedImportTypes: ['builtin']
3637
}
3738
],
39+
3840
'no-underscore-dangle': 'off',
3941

4042
'react/hook-use-state': [
@@ -43,9 +45,30 @@ export default defineConfig(
4345
allowDestructuredState: true
4446
}
4547
],
48+
49+
'react/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
50+
'react/jsx-closing-tag-location': 'warn',
51+
'react/jsx-curly-brace-presence': [
52+
'warn',
53+
{
54+
children: 'never',
55+
propElementValues: 'always',
56+
props: 'never'
57+
}
58+
],
4659
'react/jsx-curly-newline': ['warn', { multiline: 'consistent', singleline: 'consistent' }],
60+
'react/jsx-equals-spacing': ['warn', 'never'],
61+
'react/jsx-fragments': ['warn', 'syntax'],
62+
'react/jsx-newline': 'warn',
4763
'react/jsx-no-undef': ['off'],
48-
64+
'react/jsx-no-useless-fragment': 'warn',
65+
'react/jsx-one-expression-per-line': [
66+
'warn',
67+
{
68+
allow: 'single-child'
69+
}
70+
],
71+
'react/jsx-props-no-multi-spaces': 'warn',
4972
'react/jsx-sort-props': [
5073
'warn',
5174
{ callbacksLast: true, ignoreCase: true, multiline: 'last', shorthandFirst: true }

0 commit comments

Comments
 (0)