daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Dec 6th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSTALL ESLINT
  2.  
  3. 1.
  4.  
  5. npm i -D prettier eslint-config-prettier eslint-plugin-prettier
  6.  
  7.  
  8. 2. додати файт .eslintrc  з цим кодом   :
  9.  
  10. {
  11.   "extends": ["react-app", "prettier"],
  12.   "plugins": ["prettier"],
  13.   "rules": {
  14.     "prettier/prettier": "error"
  15.   }
  16. }
  17.  
  18.  
  19. 3. додати в  package.json в об'єкт "scripts" це
  20.  
  21.    "format": "eslint --fix src/**/*.js"
  22.  
  23.  
  24. 4. Vscode settings.json якщо у вас ще його немає
  25.  
  26.  
  27.  "javascript.format.enable": false,
  28.  "editor.formatOnType": true,
  29.  "editor.formatOnSave": true,
  30.  "editor.formatOnPaste": true,
  31.  "eslint.autoFixOnSave": true,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top