DEV Community

sasakihir
sasakihir

Posted on

ESLint setting

day2

PS C:\Projects\weblog> .\node_modules\.bin\eslint --init
√ How would you like to use ESLint? · style       
√ What type of modules does your project use? · none
√ Which framework does your project use? · none
√ Does your project use TypeScript? · No / Yes
√ Where does your code run? · browser, node
√ How would you like to define a style for your project? · guide
√ Which style guide do you want to follow? · standard
√ What format do you want your config file to be in? · JavaScript
Checking peerDependencies of eslint-config-standard@latest
The config that you've selected requires the following dependencies:

eslint-config-standard@latest eslint@^7.12.1 eslint-plugin-import@^2.22.1 eslint-plugin-node@^11.1.0 eslint-plugin-promise@^4.2.1
√ Would you like to install them now with npm? · No / Yes
Installing eslint-config-standard@latest, eslint@^7.12.1, eslint-plugin-import@^2.22.1, eslint-plugin-node@^11.1.0, eslint-plugin-promise@^4.2.1
npm WARN weblog@1.0.0 No description
npm WARN weblog@1.0.0 No repository field.

+ eslint@7.14.0
+ eslint-plugin-import@2.22.1
+ eslint-plugin-node@11.1.0
+ eslint-config-standard@16.0.2
+ eslint-plugin-promise@4.2.1
added 71 packages from 47 contributors, updated 1 package and audited 183 packages in 27.729s

22 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Successfully created .eslintrc.js file in C:\Projects\weblog
PS C:\Projects\weblog> 
Enter fullscreen mode Exit fullscreen mode

.eslintrc.js was created as below.

module.exports = {
  env: {
    browser: true,
    es2021: true,
    node: true
  },
  extends: [
    'standard'
  ],
  parserOptions: {
    ecmaVersion: 12
  },
  rules: {
  }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)