ui_migration lint(fix): changes fixed with lint ecmaversion & es2021
This commit is contained in:
parent
0741e3cf7e
commit
ce19ea3fc0
52 changed files with 242 additions and 193 deletions
|
|
@ -2,25 +2,20 @@ module.exports = {
|
|||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
es2021: true, // ✅ Updated for modern JS
|
||||
es2021: true,
|
||||
},
|
||||
parser: "vue-eslint-parser",
|
||||
parserOptions: {
|
||||
parser: "@babel/eslint-parser",
|
||||
requireConfigFile: false,
|
||||
ecmaVersion: 2021, // ✅ Updated
|
||||
ecmaVersion: 2021,
|
||||
sourceType: "module",
|
||||
},
|
||||
extends: [
|
||||
"plugin:vue/vue3-recommended", // ✅ Changed from vue/recommended to vue3-recommended
|
||||
"eslint:recommended",
|
||||
"@vue/prettier"
|
||||
],
|
||||
extends: ["plugin:vue/vue3-recommended", "eslint:recommended", "@vue/prettier"],
|
||||
rules: {
|
||||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||
|
||||
// ✅ Vue 3 migration warnings - detect deprecated patterns
|
||||
|
||||
"vue/no-deprecated-slot-attribute": "warn",
|
||||
"vue/no-deprecated-v-on-native-modifier": "warn",
|
||||
"vue/no-deprecated-dollar-listeners-api": "warn",
|
||||
|
|
@ -37,15 +32,13 @@ module.exports = {
|
|||
"vue/no-deprecated-v-is": "warn",
|
||||
"vue/no-lifecycle-after-await": "warn",
|
||||
"vue/no-watch-after-await": "warn",
|
||||
|
||||
// ✅ Vue 3 best practices
|
||||
"vue/require-explicit-emits": "warn", // Require emits declaration
|
||||
"vue/multi-word-component-names": "warn", // Component naming
|
||||
"vue/no-v-for-template-key-on-child": "error", // Key placement
|
||||
"vue/no-v-model-argument": "off", // Allow v-model arguments (Vue 3 feature)
|
||||
|
||||
// ✅ Relaxed for migration period (can be stricter later)
|
||||
|
||||
"vue/require-explicit-emits": "warn", // Require emits declaration
|
||||
"vue/multi-word-component-names": "warn", // Component naming
|
||||
"vue/no-v-for-template-key-on-child": "error", // Key placement
|
||||
"vue/no-v-model-argument": "error", // Allow v-model arguments (Vue 3 feature)
|
||||
|
||||
"vue/no-unused-components": "warn",
|
||||
"vue/no-unused-vars": "warn",
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue