dishad / onelasthero

0 stars 1 forks source link

Add ESLint to project #1

Closed dishad closed 7 years ago

dishad commented 7 years ago

We have to lint this project boys

devDependencies: {
...
"eslint": "3.19.0",
...
}

After rooseveltConfig:

"eslintConfig": {
    "env": {
      "browser": true,
      "node": true,
      "mocha": true
    },
    "rules": {
      "eqeqeq": 2,
      "curly": 2,
      "semi": 2,
      "strict": [
        2,
        "never"
      ],
      "quotes": [
        2,
        "single"
      ],
      "no-trailing-spaces": [
        "error",
        {
          "skipBlankLines": false
        }
      ],
      "camelcase": [
        2,
        {
          "properties": "always"
        }
      ],
      "comma-spacing": [
        2,
        {
          "before": false,
          "after": true
        }
      ],
      "indent": [
        2,
        2,
        {
          "VariableDeclarator": 2,
          "SwitchCase": 1
        }
      ],
      "handle-callback-err": 0,
      "no-use-before-define": [
        2,
        "nofunc"
      ],
      "no-unused-vars": [
        2,
        {
          "vars": "all",
          "args": "none"
        }
      ],
      "no-console": 0,
      "no-mixed-requires": 0,
      "one-var": [
        2,
        "always"
      ],
      "dot-notation": 0,
      "no-path-concat": 0,
      "no-alert": 0,
      "brace-style": [
        2,
        "stroustrup"
      ],
      "keyword-spacing": [
        "error",
        {
          "before": true,
          "after": true
        }
      ],
      "space-before-blocks": [
        "error"
      ],
      "eol-last": [
        "error",
        "always"
      ]
    },
    "globals": {
      "onelasthero": true
    }
  },
dishad commented 7 years ago
"scripts": {
    "start": "npm run prod",
    "prod": "supervisor -k -e js,json,less,html -i statics/.build/,.git/,public/,node_modules/ -- app.js -prod",
    "dev": "supervisor -k -e js,json,less,html -i statics/.build/,.git/,public/,node_modules/ -- app.js -dev",
    "eslint": "./node_modules/.bin/eslint .",
    "test": "jshint app.js"
  }