Browse Source

增加ESlint
Signed-off-by: Caner <40012261+Canees@users.noreply.github.com>

Caner 3 years ago
parent
commit
07906c1043
5 changed files with 12 additions and 5 deletions
  1. 3 1
      .eslintignore
  2. 2 1
      .eslintrc.js
  3. 3 1
      src/pages/index/App.vue
  4. 3 1
      src/pages/pageB/App.vue
  5. 1 1
      vite.config.js

+ 3 - 1
.eslintignore

@@ -1,2 +1,4 @@
 # 排除eslint检查文件
 # 排除eslint检查文件
-utils
+utils
+/dist
+/public

+ 2 - 1
.eslintrc.js

@@ -44,6 +44,7 @@ module.exports = {
     'vue/require-explicit-emits': 0,
     'vue/require-explicit-emits': 0,
     'vue/no-v-html': 0,
     'vue/no-v-html': 0,
     'vue/order-in-components': 0,
     'vue/order-in-components': 0,
-    'no-unused-vars': 1
+    'no-unused-vars': 1,
+    'vue/no-reserved-component-names': 0
   }
   }
 }
 }

+ 3 - 1
src/pages/index/App.vue

@@ -1,5 +1,7 @@
 <template>
 <template>
-  <router-view />
+  <div id="app">
+    <router-view />
+  </div>
 </template>
 </template>
 
 
 <style>
 <style>

+ 3 - 1
src/pages/pageB/App.vue

@@ -1,5 +1,7 @@
 <template>
 <template>
-  <router-view />
+  <div id="app">
+    <router-view />
+  </div>
 </template>
 </template>
 
 
 <style>
 <style>

+ 1 - 1
vite.config.js

@@ -40,7 +40,7 @@ export default ({ mode }) => defineConfig({
       '@': path.resolve(__dirname, './src')
       '@': path.resolve(__dirname, './src')
     }
     }
   },
   },
-  plugins: [ createVuePlugin(), viteCompression({ disable: true }), eslint({ fix: true, exclude: [ 'utils', 'assets' ] }) ],
+  plugins: [ createVuePlugin(), viteCompression({ disable: true }), eslint({ fix: true }) ],
   server: {
   server: {
     host: 'localhost',
     host: 'localhost',
     port: 6547,
     port: 6547,