From 1c96a75664c5d4ffa27d3ca317d0d6f545614f0a Mon Sep 17 00:00:00 2001 From: VICSOLWANG <413834325@qq.com> Date: Wed, 6 Dec 2023 11:28:08 +0800 Subject: [PATCH] feat: update rules --- eslint.config.js | 2 -- package.json | 2 +- src/config.js | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index bfbf336..6fbd130 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -12,8 +12,6 @@ export default [ { rules: { 'import/extensions': 'off', - 'import/no-named-as-default': 'off', - 'import/no-named-as-default-member': 'off', }, }, { diff --git a/package.json b/package.json index 903c64e..c05fb93 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "@eslint/eslintrc": "^2.1.4", "eslint": "^8.55.0", - "eslint-config-wzx": "^0.9.10", + "eslint-config-wzx": "^0.10.0", "eslint-plugin-vue": "^9.19.2" }, "peerDependencies": { diff --git a/src/config.js b/src/config.js index f5e91c0..b91ebe3 100644 --- a/src/config.js +++ b/src/config.js @@ -119,6 +119,20 @@ const config = [ { rules: { ...wzxCustomRules, + 'import/extensions': [ + 'error', + { + ignorePackages: true, + pattern: { + js: 'never', + ts: 'never', + tsx: 'never', + mts: 'never', + cts: 'never', + vue: 'never', + }, + }, + ], 'vue/multi-word-component-names': 'off', 'vue/no-multiple-template-root': vueConfig.includes('vue3') ? 'off'