vue中eslint導(dǎo)致的報(bào)錯(cuò)問(wèn)題及解決
報(bào)錯(cuò)信息
[plugin:vite-plugin-eslint] C:\git_project\xxxxxxxxx\src\views\station\info\InfoForm.vue
54:29 error Delete `?` prettier/prettier? 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
解決方案
修改.eslintrc.js
文件
// @ts-check const { defineConfig } = require('eslint-define-config') module.exports = defineConfig({ root: true, env: { browser: true, node: true, es6: true }, parser: 'vue-eslint-parser', parserOptions: { parser: '@typescript-eslint/parser', ecmaVersion: 2020, sourceType: 'module', jsxPragma: 'React', ecmaFeatures: { jsx: true } }, extends: [ 'plugin:vue/vue3-recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:prettier/recommended', './.eslintrc-auto-import.json' ], rules: { 'prettier/prettier': 'off', "no-irregular-whitespace": "off", 'vue/script-setup-uses-vars': 'error', 'vue/no-reserved-component-names': 'off', ....... '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-unused-vars': 'off', // 'no-unused-vars': 'error', "no-unused-vars": 'off', 'space-before-function-paren': 'off', ....... 'vue/multi-word-component-names': 'off' } })
總結(jié)
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
- Vue3配置路由ERROR in [eslint]報(bào)錯(cuò)問(wèn)題及解決
- vue?eslint報(bào)錯(cuò)error?"Component?name?"*****"?should?always?be?multi-word"解決
- vue?eslint報(bào)錯(cuò):Component?name?“xxxxx“?should?always?be?multi-word.eslintvue的4種解決方案
- vue-cli創(chuàng)建項(xiàng)目時(shí)由esLint校驗(yàn)導(dǎo)致報(bào)錯(cuò)或警告的問(wèn)題及解決
- vue關(guān)于eslint空格縮進(jìn)等的報(bào)錯(cuò)問(wèn)題及解決
- vue?cli2?和?cli3去掉eslint檢查器報(bào)錯(cuò)的解決
- vue項(xiàng)目下,如何用命令直接修復(fù)ESLint報(bào)錯(cuò)
相關(guān)文章
vue template當(dāng)中style背景設(shè)置不編譯問(wèn)題
這篇文章主要介紹了vue template當(dāng)中style背景設(shè)置不編譯問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-04-04使用vue3-print-nb實(shí)現(xiàn)打印pdf分頁(yè)代碼示例
這篇文章主要介紹了使用vue3-print-nb實(shí)現(xiàn)打印pdf分頁(yè)的相關(guān)資料,這種方法不僅適用于Vue3項(xiàng)目,也可以在其他前端框架中實(shí)現(xiàn)類似的打印分頁(yè)功能,需要的朋友可以參考下2024-10-10VUE 無(wú)限層級(jí)樹形數(shù)據(jù)結(jié)構(gòu)顯示的實(shí)現(xiàn)
在做項(xiàng)目中,會(huì)遇到一些樹形的數(shù)據(jù)結(jié)構(gòu),常用在左側(cè)菜單導(dǎo)航,本文就介紹一下如何實(shí)現(xiàn),感興趣的可以了解一下2021-07-07關(guān)于Vue實(shí)現(xiàn)組件信息的緩存問(wèn)題
這篇文章主要介紹了關(guān)于Vue實(shí)現(xiàn)組件信息的緩存問(wèn)題的相關(guān)資料,需要的朋友可以參考下2017-08-08Vue超出文本框顯示省略號(hào)鼠標(biāo)滑入顯示全部的實(shí)現(xiàn)方法
在Vue項(xiàng)目中經(jīng)常需要處理文本內(nèi)容過(guò)長(zhǎng)的情況,這篇文章主要給大家介紹了關(guān)于Vue超出文本框顯示省略號(hào)鼠標(biāo)滑入顯示全部的實(shí)現(xiàn)方法,文中通過(guò)代碼介紹的非常詳細(xì),需要的朋友可以參考下2023-10-10vue 表單驗(yàn)證按鈕事件交由父組件觸發(fā)的方法
這篇文章主要介紹了vue 表單驗(yàn)證按鈕事件交由父組件觸發(fā)的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-12-12vue實(shí)現(xiàn)數(shù)字翻頁(yè)動(dòng)畫
這篇文章主要為大家詳細(xì)介紹了vue實(shí)現(xiàn)數(shù)字翻頁(yè)動(dòng)畫,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-08-08