Thief of Wealth
Published 2019. 10. 4. 14:58
ESlint 설정 개발/Web Programming

1. remove if you installed eslint globally $ npm uninstall eslint -g 2. install eslint extension on vscode https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint 3. install 3 packages manually, not by command on eslint installed globally, $ yarn add eslint-config-airbnb-base eslint eslint-plugin-import 4. make .eslintrc.js file and copy paste codes below

module.exports = {
    env: {
      browser: true,
      es6: true,
      node: true
    },
    extends: ["airbnb-base","prettier"],
    globals: {
      Atomics: "readonly",
      SharedArrayBuffer: "readonly"
    },
    parserOptions: {
      ecmaVersion: 2018,
      sourceType: "module"
    },
    rules: {
        "no-console": "off"
    }
  };

5. install eslint-config-prettier $yarn add eslint-config-prettier 6. go to .eslintrc.js file and change "extends" from "airbnb-base", to ["airbnb-base", "prettier"], 7. go to app.js and try save by ctrl+s then you will see red lines if eslint activates succesfully

'개발 > Web Programming' 카테고리의 다른 글

JavaScript 초를 00:00:00으로 바꾸는 템플릿  (0) 2019.10.17
Chromium원정대  (0) 2019.10.08
BEM이란? (What is BEM)  (0) 2019.10.03
Pug 쓸때 TIP  (0) 2019.10.02
FontAwesome 무로 CDN 링크 !  (0) 2019.10.02
profile on loading

Loading...