Skip to content

Commit

Permalink
feat(projects): supplement eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Ohh-889 committed Nov 23, 2024
1 parent 0690ee7 commit 1a6314e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig(
noUselessIndex: true
}
],

'import/order': [
'error',
{
Expand All @@ -35,6 +36,7 @@ export default defineConfig(
pathGroupsExcludedImportTypes: ['builtin']
}
],

'no-underscore-dangle': 'off',

'react/hook-use-state': [
Expand All @@ -43,9 +45,30 @@ export default defineConfig(
allowDestructuredState: true
}
],

'react/jsx-closing-bracket-location': ['warn', 'tag-aligned'],
'react/jsx-closing-tag-location': 'warn',
'react/jsx-curly-brace-presence': [
'warn',
{
children: 'never',
propElementValues: 'always',
props: 'never'
}
],
'react/jsx-curly-newline': ['warn', { multiline: 'consistent', singleline: 'consistent' }],
'react/jsx-equals-spacing': ['warn', 'never'],
'react/jsx-fragments': ['warn', 'syntax'],
'react/jsx-newline': 'warn',
'react/jsx-no-undef': ['off'],

'react/jsx-no-useless-fragment': 'warn',
'react/jsx-one-expression-per-line': [
'warn',
{
allow: 'single-child'
}
],
'react/jsx-props-no-multi-spaces': 'warn',
'react/jsx-sort-props': [
'warn',
{ callbacksLast: true, ignoreCase: true, multiline: 'last', shorthandFirst: true }
Expand Down

0 comments on commit 1a6314e

Please sign in to comment.