Skip to content

Instantly share code, notes, and snippets.

@GerkinDev
Created August 22, 2017 19:46
Show Gist options
  • Save GerkinDev/5467718cd33d0bd1df715767c18f9ef4 to your computer and use it in GitHub Desktop.
Save GerkinDev/5467718cd33d0bd1df715767c18f9ef4 to your computer and use it in GitHub Desktop.
General ESlint config file
{
"env": {
"es6": true,
"browser": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "script"
},
"globals": {
},
"rules": {
"no-console": 0,
"strict": ["error", "global"],
"indent": ["error","tab",{"SwitchCase": 1}],
"linebreak-style": ["error","unix"],
"quotes": ["error","single"],
"semi": ["error","always"],
"valid-jsdoc": ["error"],
"comma-dangle": ["error","always-multiline"],
"comma-spacing": ["error", { "before": false, "after": true }],
"camelcase": ["error", { "properties": "never" }],
"comma-style": ["error","last"],
"func-names": ["error", "always"],
"func-name-matching": ["error", "always"],
"keyword-spacing": ["error", { "before": true, "after": true }],
"new-parens": "error",
"object-curly-newline": ["error", {
"minProperties": 1
}],
"space-in-parens": ["error", "always", {"exceptions": ["{}", "[]", "()", "empty"]}],
"space-before-function-paren": ["error", "never"],
"key-spacing": ["error", { "align": "value" }],
"object-property-newline": ["error"],
"array-bracket-spacing": ["error", "always", { "objectsInArrays": false, "arraysInArrays": false }],
"eqeqeq": ["error", "smart"],
"yoda": ["error", "always", { "onlyEquality": true }],
"block-spacing": "error",
"brace-style": ["error", "1tbs"],
"eol-last": ["error", "always"],
"no-lonely-if": "error",
"curly": "error",
"space-before-blocks": "error",
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": false
}
}],
"prefer-template": "error",
"no-useless-concat": "error",
"template-curly-spacing": ["error", "always"],
"space-infix-ops": "error",
"space-unary-ops": [ 2, {
"words": true,
"nonwords": false
}],
"one-var": ["error", "never"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment