I am trying to lint my react project with typescript template. I want to use the airbnb style guide, but when the ran the comm npx eslint --init
I only get the standard option and the xo option. Is there a reason for this?
As stated in the ESLint documentation , assuming you have a package.json
file, you can install and configure ESLint with:
npm init @eslint/config
Then, in the configuration, you should select To check syntax, find problems, and enforce code style
option as an answer to How would you like to use ESLint?
. For the styling question, you can choose Use a popular style guide
and Airbnb
options, respectively.
Note: I also tried with npx eslint --init
command, and see the Airbnb
option.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.