npm init
npm i -D eslint
npx eslint --init
? How would you like to use ESLint? To check syntax, find problems, and enforce code style
? What type of modules does your project use? JavaScript modules (import/export)
? Which framework does your project use? None of these
? Where does your code run? (Press <space> to select, <a> to toggle all, <i> to invert selection)Browser
? How would you like to define a style for your project? Use a popular style guide
? Which style guide do you want to follow? Airbnb (https://github.com/airbnb/javascript)
? What format do you want your config file to be in? JSON
Checking peerDependencies of eslint-config-airbnb-base@latest
The config that you've selected requires the following dependencies:
eslint-config-airbnb-base@latest eslint@^4.19.1 || ^5.3.0 eslint-plugin-import@^2.14.0
? Would you like to install them now with npm? Yes
Installing eslint-config-airbnb-base@latest, eslint@^4.19.1 || ^5.3.0, eslint-plugin-import@^2.14.0
npm WARN kicks-stocks@1.0.0 No repository field.
+ eslint-plugin-import@2.16.0
+ eslint-config-airbnb-base@13.1.0
+ eslint@5.15.1
added 53 packages from 37 contributors, updated 1 package and audited 274 packages in 6.151s
found 0 vulnerabilities
Successfully created .eslintrc.json file in /Users/<プロジェクトディレクトリ>