Skip to content

Instantly share code, notes, and snippets.

@antico5
Created June 1, 2018 18:56
Show Gist options
  • Save antico5/2df220cef4e7784ffac675f668d6ff2a to your computer and use it in GitHub Desktop.
Save antico5/2df220cef4e7784ffac675f668d6ff2a to your computer and use it in GitHub Desktop.
js linting

package.json

{
  "name": "project",
  "version": "1.0.0",
  "private": true,
  "scripts": {
    "prettier": "prettier app/**/*.js --write",
    "lint": "eslint app/**/*.js",
    "lint:fix": "npm run prettier && npm run lint -- --fix"
  },
  "devDependencies": {
    "eslint": "^4.19.1",
    "eslint-config-standard": "^11.0.0",
    "eslint-plugin-import": "^2.12.0",
    "eslint-plugin-node": "^6.0.1",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-standard": "^3.1.0",
    "prettier": "^1.13.4"
  }
}

.eslintrc

extends: standard
rules:
  no-undef: off
  no-unused-vars: off
  eqeqeq: off
  no-multi-str: off
  space-before-function-paren: off

.prettierrc.yaml

printWidth: 100
semi: false
trailingComma: none
singleQuote: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment