Skip to content

Instantly share code, notes, and snippets.

@velopert
Last active August 31, 2018 01:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velopert/48d544e6e51370fdb5925a75c6499dfc to your computer and use it in GitHub Desktop.
Save velopert/48d544e6e51370fdb5925a75c6499dfc to your computer and use it in GitHub Desktop.
using prettier with eslint

모듈 설치

yarn add eslint eslint-config-airbnb eslint-config-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react

.eslintrc

{
  "extends": ["airbnb", "prettier"],
  "rules": {
    "react/jsx-filename-extension": 0,
    "react/prefer-stateless-function": 0,
    "react/jsx-one-expression-per-line": 0
  },
  "env": {
    "browser": true,
    "node": true
  }
}

.prettierrc.js

module.exports = {
  printWidth: 100,
  singleQuote: true,
  useTabs: false, // Indent lines with tabs instead of spaces.
  printWidth: 80, // Specify the length of line that the printer will wrap on.
  tabWidth: 2, // Specify the number of spaces per indentation-level.
  trailingComma: 'es5'
};

registerServiceWorker.js 맨 위 한줄 추가

/* eslint-disable */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment