current position:Home>In Vue project, solve the problem of verification conflict when eslint and prettier are used at the same time
In Vue project, solve the problem of verification conflict when eslint and prettier are used at the same time
2022-05-15 02:07:45【Wooden house x】
vue Solved in the project eslint And prettier Verification conflict when using at the same time
1. Demand background
- Recently, there are code verification tools in the project eslint Based on that, I added prettier, The reason is also to restrict the development team to unify the code style , The original intention is good , However, in the actual use process, there is a verification conflict between the two code verification tools .
Solution
In fact, the root of the conflict is that both of them are involved in verifying the code format , However, the verification rules of the two are not necessarily the same , This is the root of the conflict .
The idea of solution is to let eslint Focus on the verification of code quality problems , Other code style issues make prettier To deal with it, we can solve the conflict , The specific treatment is as follows :
// 1. install eslint-config-prettier plug-in unit ( The function is to turn off (disable) All and Prettier Conflicting ESLint Configuration of ): npm install --save --dev eslint-config-prettier // 2. install eslint-plugin-prettier plug-in unit ( Role is to prettier Of rules Add to as a plug-in ESLint Inside , And it can make prettier The verification rules of are based on eslint Throw out , Make the code prompt more
copyright notice
author[Wooden house x],Please bring the original link to reprint, thank you.
https://en.qdmana.com/2022/132/202205120527037216.html
The sidebar is recommended
- Educoder web programming foundation autumn 2021 - HTML5 - text control class label
- Educoder web programming foundation autumn 2021 - HTML5 document header tags and attributes
- Educoder web programming foundation autumn 2021 - HTML5 - text control class label
- Educoder web programming foundation autumn 2021 - overview of web front end development
- Vue data broker
- HTML5 notes - new specifications and new elements
- Lunch break train & problem thinking: on multidimensional array statistics of the number of elements
- Children's Painting Tutorial | children's interesting art lesson "firecrackers say goodbye to the old year and fireworks greet the new year"
- LeetCode 713. Subarray with product less than k
- JavaScript programming training Day6
guess what you like
Vue realizes two-level linkage
Tengine uses brotli to turn on tls1 3 and optimize HTTPS access speed
C + +: remove the specified element from the array
C + +: main elements
Learn about nginx and tomact
IC workplace Theory -- feelings of senior brother of digital ic front-end design after 4 months of employment (Part I)
Vue Chapter 3 scaffolding's most complete render function, props, mixin mixing, plug-ins, browser local storage, component customization events_ Binding, unbinding, global event bus, message subscription and publishing, nexttick, Vue transition and animat
Vue Chapter 5 vuex creates and introduces the use of store, getters and four map methods
***************2、 JS + Vue js***************
A detailed explanation of HTTP protocol + classic interview questions
Random recommended
- Vue Chapter 4 Ajax in Vue: cross domain problems and slot slots
- Online nginx does not support the bug record of error reporting in delete request
- Okhttp sets the public parameters and puts the JSON object into the @ body to request the configuration of the public parameters
- Fluent ignores authentication of HTTPS and WSS certificates
- Browser loading HTML page evokes the most complete strategy of APP in mobile phone
- HTTP status code 304 and Etag details
- Using angularjs for fuzzy dynamic search drop-down box content
- Seamless connection to Macao, Hengqin Island, which is beautiful beyond the sky, is on fire again
- JQuery framework
- Vue mouse down and move event
- A simple Vue answer demo, single choice and multiple choice
- Front end interview question: if the cell in the table is red, click it to turn into white; if it is white, click it to turn into red, and what is not clicked is white
- Vue packaging folding panel plus animation effect
- If the front-end does real-time data acquisition?
- Ant vue3 table sorted by time
- Vue local refresh iframe
- Vue instruction authority
- Vue iframe refresh remains on the original page
- Vue realizes Gaode map API mask, positioning and weather
- Comparison and implementation of bidirectional data binding between react and Vue
- React error report record
- Analysis of react life cycle function
- react demo1 TodoList
- Summary of the differences between state and props in react
- Difference between controlled components and uncontrolled components in react
- Node. JS use get Stream download file
- How does JavaScript copy arrays instead of references
- JavaScript calculates the number of days, hours, minutes and seconds between days
- JQuery get page address parameters
- JavaScript create Download
- node. JS traversal directory
- Tips for using JavaScript string split (how to keep the delimiter)
- Common CSS notes
- JavaScript usage Get the address of the regular function
- New generation node JS web development framework koa zero foundation entry learning notes
- JavaScript notes
- asp. Net core method for modifying HTML without rerun
- Summary of compatibility processing of H5 + Vue cli project in Safari browser
- Summary of amap scheme of Gaode map used in vue3 + TS project
- Summary of filter scheme used in JS code in Vue