eslint: update rules

This commit is contained in:
undefined committed 2025-11-03 17:01:17 +08:00
1 parent 2eceb57219
commit 40114323e4
2 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -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'],
+3 -3
View File
@@ -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"