简体   繁体   English

ESLint/Prettier/Airbnb:我会为每个项目重新设置它们吗?

[英]ESLint/Prettier/Airbnb : Do I set them up again for each project?

Beginner question - I have just finished setting up Eslint/prettier/airbnb by watching an online tutorial but what I don't understand is that when I start a new project, will I need to repeat the same processes* again?初学者问题 - 我刚刚通过观看在线教程完成了 Eslint/prettier/airbnb 的设置,但我不明白的是,当我开始一个新项目时,我是否需要再次重复相同的过程*? I wish there was a way to integrate it to VSCode so it starts automatically when I ran the code for any project.我希望有一种方法可以将它集成到 VSCode 中,以便在我为任何项目运行代码时它会自动启动。

*below is what I meant by processes: *以下是我所说的流程:

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
npx install-peerdeps --dev eslint-config-airbnb

You could create a template project to avoid having to do that, or you could just copy package.json to you new project, edit it a bit and run npm install您可以创建一个模板项目以避免这样做,或者您可以将package.json复制到您的新项目中,稍微编辑一下并运行npm install

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM