mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
eslint: update rules
This commit is contained in:
2 files changed
+6
-5
No files matched your search
@@ -204,6 +204,7 @@ const base = (option, ...args) => antfu(
|
|||||||
}],
|
}],
|
||||||
'style/jsx-closing-bracket-location': 'off',
|
'style/jsx-closing-bracket-location': 'off',
|
||||||
'style/jsx-closing-tag-location': 'off',
|
'style/jsx-closing-tag-location': 'off',
|
||||||
|
'style/jsx-curly-spacing': ['warn', { children: true, when: 'never' }],
|
||||||
'style/jsx-function-call-newline': 'off',
|
'style/jsx-function-call-newline': 'off',
|
||||||
'style/jsx-indent-props': 'off',
|
'style/jsx-indent-props': 'off',
|
||||||
'style/jsx-one-expression-per-line': 'off',
|
'style/jsx-one-expression-per-line': 'off',
|
||||||
@@ -332,13 +333,13 @@ const base = (option, ...args) => antfu(
|
|||||||
},
|
},
|
||||||
github.getFlatConfigs().react,
|
github.getFlatConfigs().react,
|
||||||
deMorgan.configs.recommended,
|
deMorgan.configs.recommended,
|
||||||
{
|
...((option.vue ?? true) ? [{
|
||||||
files: ['**/*.vue'],
|
files: ['**/*.vue'],
|
||||||
rules: {
|
rules: {
|
||||||
'vue/block-order': ['warn', { order: ['template', 'script[setup]', 'script:not([setup])', 'style[scoped]', 'style:not([scoped])'] }],
|
'vue/block-order': ['warn', { order: ['template', 'script[setup]', 'script:not([setup])', 'style[scoped]', 'style:not([scoped])'] }],
|
||||||
'vue/singleline-html-element-content-newline': 'off',
|
'vue/singleline-html-element-content-newline': 'off',
|
||||||
},
|
},
|
||||||
},
|
}] : []),
|
||||||
{
|
{
|
||||||
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.cts', '**/*.mjs', '**/*.mts'],
|
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.cts', '**/*.mjs', '**/*.mts'],
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
"main": "base.mjs",
|
"main": "base.mjs",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro",
|
"repository": "https://github.com/hydro-dev/Hydro",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antfu/eslint-config": "^6.1.0",
|
"@antfu/eslint-config": "^6.2.0",
|
||||||
"@eslint-react/eslint-plugin": "^2.2.3",
|
"@eslint-react/eslint-plugin": "^2.3.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
||||||
"@typescript-eslint/parser": "^8.46.2",
|
"@typescript-eslint/parser": "^8.46.2",
|
||||||
"eslint-plugin-de-morgan": "^2.0.0",
|
"eslint-plugin-de-morgan": "^2.0.0",
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^7.0.1",
|
"eslint-plugin-react-hooks": "^7.0.1",
|
||||||
"eslint-plugin-react-refresh": "^0.4.24",
|
"eslint-plugin-react-refresh": "^0.4.24",
|
||||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||||
"globals": "^16.4.0"
|
"globals": "^16.5.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"eslint": ">= 9"
|
"eslint": ">= 9"
|
||||||
|
|||||||
Reference in new issue
Block a user