From 40114323e4cbe2f554c1b5945822fd31ca16dddc Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 3 Nov 2025 17:01:17 +0800 Subject: [PATCH] eslint: update rules --- framework/eslint-config/base.mjs | 5 +++-- framework/eslint-config/package.json | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/eslint-config/base.mjs b/framework/eslint-config/base.mjs index c3ebcd9bd..c16f1b5cf 100644 --- a/framework/eslint-config/base.mjs +++ b/framework/eslint-config/base.mjs @@ -204,6 +204,7 @@ const base = (option, ...args) => antfu( }], 'style/jsx-closing-bracket-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-indent-props': 'off', 'style/jsx-one-expression-per-line': 'off', @@ -332,13 +333,13 @@ const base = (option, ...args) => antfu( }, github.getFlatConfigs().react, deMorgan.configs.recommended, - { + ...((option.vue ?? true) ? [{ files: ['**/*.vue'], rules: { 'vue/block-order': ['warn', { order: ['template', 'script[setup]', 'script:not([setup])', 'style[scoped]', 'style:not([scoped])'] }], 'vue/singleline-html-element-content-newline': 'off', }, - }, + }] : []), { files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.cts', '**/*.mjs', '**/*.mts'], diff --git a/framework/eslint-config/package.json b/framework/eslint-config/package.json index 04f429b45..c322b6a06 100644 --- a/framework/eslint-config/package.json +++ b/framework/eslint-config/package.json @@ -5,8 +5,8 @@ "main": "base.mjs", "repository": "https://github.com/hydro-dev/Hydro", "dependencies": { - "@antfu/eslint-config": "^6.1.0", - "@eslint-react/eslint-plugin": "^2.2.3", + "@antfu/eslint-config": "^6.2.0", + "@eslint-react/eslint-plugin": "^2.3.1", "@typescript-eslint/eslint-plugin": "^8.46.2", "@typescript-eslint/parser": "^8.46.2", "eslint-plugin-de-morgan": "^2.0.0", @@ -14,7 +14,7 @@ "eslint-plugin-react-hooks": "^7.0.1", "eslint-plugin-react-refresh": "^0.4.24", "eslint-plugin-simple-import-sort": "^12.1.1", - "globals": "^16.4.0" + "globals": "^16.5.0" }, "peerDependencies": { "eslint": ">= 9"