Skip to content

Instantly share code, notes, and snippets.

@mkhizeryounas
Created December 24, 2019 19:26
Show Gist options
  • Save mkhizeryounas/f5e822aaa9d9db2c1a1afd4c00d55466 to your computer and use it in GitHub Desktop.
Save mkhizeryounas/f5e822aaa9d9db2c1a1afd4c00d55466 to your computer and use it in GitHub Desktop.
ES lint file according to google's javascript standerd
{
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 8
},
"globals": {
"Promise": true
},
"rules": {
"callback-return": [
"error",
["done", "proceed", "next", "onwards", "callback", "cb"]
],
"camelcase": ["warn", { "properties": "always" }],
"comma-style": ["warn", "last"],
"curly": ["error"],
"eqeqeq": ["error", "always"],
"eol-last": ["warn"],
"handle-callback-err": ["error"],
"indent": [
"warn",
2,
{
"SwitchCase": 1,
"MemberExpression": "off",
"FunctionDeclaration": { "body": 1, "parameters": "off" },
"FunctionExpression": { "body": 1, "parameters": "off" },
"CallExpression": { "arguments": "off" },
"ArrayExpression": 1,
"ObjectExpression": 1,
"ignoredNodes": ["ConditionalExpression"]
}
],
"linebreak-style": ["error", "unix"],
"no-dupe-keys": ["error"],
"no-duplicate-case": ["error"],
"no-extra-semi": ["warn"],
"no-labels": ["error"],
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-redeclare": ["warn"],
"no-return-assign": ["error", "always"],
"no-sequences": ["error"],
"no-trailing-spaces": ["warn"],
"no-undef": ["error"],
"no-unexpected-multiline": ["warn"],
"no-unreachable": ["warn"],
"no-unused-vars": [
"warn",
{
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^unused($|[A-Z].*$)",
"argsIgnorePattern": "^unused($|[A-Z].*$)",
"varsIgnorePattern": "^unused($|[A-Z].*$)"
}
],
"no-use-before-define": ["error", { "functions": false }],
"one-var": ["warn", "never"],
"quotes": [
"warn",
"single",
{ "avoidEscape": false, "allowTemplateLiterals": true }
],
"semi": ["error", "always"],
"semi-spacing": ["warn", { "before": false, "after": true }],
"semi-style": ["warn", "last"]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment