Skip to content

Latest commit

 

History

History
51 lines (47 loc) · 1019 Bytes

File metadata and controls

51 lines (47 loc) · 1019 Bytes

Tutorial

Setup ES Linter for JavaScript

My configuration for the ES Linter plugin for JavaScript and JSX.

Create a file called .eslintrc.js in the root directory. Add the following contents:

module.exports = {
    "env": {
        "node": true,
        "es6": true,
        "browser": true,
        "jasmine": true
    },
    "extends": [
      "eslint:recommended"
    ],
    "plugins": [
      "jasmine"
    ],
    "parserOptions": {
        "sourceType": "module",
        "ecmaFeatures": {
          "jsx": true
        }
    },
    "rules": {
        "indent": [
            "error",
            2,
            {"SwitchCase": 1}
        ],
        "linebreak-style": [
            "error",
            "unix"
        ],
        "quotes": [
            "error",
            "single"
        ],
        "semi": [
            "error",
            "always"
        ],
        "no-console":0,
        "no-unused-vars": ["error", {"argsIgnorePattern": "^_"}]
    }
};