Vue + Eslint Configuration Save Automatic Formatting Code

1. Add a VSCode terminal to the .esLintrc.js

  // Add a custom rule 'prettier / prettier': [// eslint calibration unsuccessful After, Error or 2 error, WARN or 1 warning, OFF or 0 ⽆ ⽆ ⽆ 'Error', {SingleQuote: true, semi: false, // End Whether to add a semicolon PrintWidth: 160 // The longest character per line }]  
2. Open the VS Code File “Preference” Set “expands” eslint “

vue+ESLint 配置保存 自动格式化代码

// eslint formatted string “editor.codeactions”: {“Source.fixall.eslint”: true}, vue+ESLint 配置保存 自动格式化代码 vue+ESLint 配置保存 自动格式化代码

  WARNING DELETE (PRETTIER) "Error Delete ⏎ prettier / prettier" in .Vue files  

In the Vuejs project, running as follows:

NPM Run Lint – –FIX

If still don’t work, it is necessary to add vue.config.js

// vue.config.js

// Old Data: @Import “~@/assets/scss/variables.scss”; // New prependdata: @Import ~@/assets/scss/variables.scss;

vue+ESLint 配置保存 自动格式化代码

Module.Exports = {ChainWebPack: config => {config.module .Rule (‘eslint “) .TAP (‘ eslint-loader ‘) .tap (options => {options}}}}}}}}}}}}}}}

ERROR FAILED TO Compile with 1 Errors 1:06 : 43 error in ./src/App.vue?vue&type=style&index=0&lang=scss&Module build failed (from ./node_modules/sass-loader/dist/cjs.js):ValidationError:. Invalid options object Sass Loader has been initialized using An OPTIONS Object this does not match The API Schema. – Options Has An Unknown Property ‘PrependData’. Thase Properties Arevalid: object {implementation ?, sassOptions ?, prependData ?, sourceMap ?, webpackImporter?} at validate (E: \ VUE \ ElementUI \ myProject \ vue-manage \ node_modules \ schema-utils \ dist \ validate.js: 85: 11 AT Object.Loader (E: \ Vue \ Elementui \ MyProject \ Vue-Management \ Node_Modules \ Sass-loader \ Dist \ Index.js: 36: 28) @ ./node_modules/vue-style-loader??ref – 8-oneof-1-0! ./ Node_Modules / CSS-loader / dist / cjs.js ?? REF – 8-OneOF-1-1! ./ Node_Modules / Vue-loader / lib / loadingers / stoppostloader.js! ./node_modules/postcss-loader/src??ref —8-oneof 1-2!./node_modules/sass-loader/dist/cjs.js??ref–8-oneof 1-3 !./ Node_modules / cache-loader / dist / cjs.js ?? ref – 0-0! ./ node_modules / vue-loader / lib ?? vue-loader-options! ./ src / app.vue? Vue & Type = style & index = 0 & lang = SCSS & 4: 14-416 14: 3-18: 5 15: 22-424 @ ./src/app.vue?vue&type=style&Index=0&lang=scsS & @ ./src/app.vue @ ./src/main.js @ Multi (WebPack) -dev-server / client? http://192.168.3.30: 3333 / sockjs-node (webpack) / hot / dev- Server.js ./src/main.js

 CSS LAODER did not install   
NPM Install Sass-Loader –SAVE-Devnpm Install Node-Sass – Save-Devnpm Install Css-Loader Style-Loader –save-Dev
  Summary  
This article is hereby here to this article about the Vue + Eslint Configuration Save Automatic Format Code, more related Vue Configuration Save Automatic Formatting Content Please search for Tumi Cloud Previous Articles or continue to browse the following related articles I hope everyone will support TUMI clouds in the future!

© Copyright Notice
THE END
Just support it if you like
like0
share
comment Grab the couch

Please log in to comment