This is based on my work experience, there are still many good rules waiting for me to discover
I want to be able to use this pkg to manage most of my personal mini-projects 🐵 🐵 🐵
-
It is recommended that you install eslint in your local project beforehand
npm install eslint --save-dev
-
And then install config setting pkg, after success you will see that in
package.json
devDependenciesnpx install-peerdeps --dev eslint-config-lybd
-
Create a
.eslintrc
file and add the following content{ "extends": [ "lybd" ] }
For React projects, use
lybd/react
instead of justlybd
.{ "extends": [ "lybd/react" ] }
For Next.js projects, use
lybd/next
instead of justlybd
.{ "extends": [ "lybd/next" ] }
- You will need to delete all existing
.prettierrc
files, otherwise there may be a conflict
.eslintrc.js
is contain rule aboutjavaScript
andtypeScript
vue.js
is addvue 3
rule based on.eslintrc.js
(Still in experimental phase)react.js
is addreact
rule based on.eslintrc.js
next.js
is addnext.js
rule based onreact.js