Skip to content

Commit

Permalink
Merge pull request #67 from tyearke/meta/js-style
Browse files Browse the repository at this point in the history
Updated style guide for JavaScript
  • Loading branch information
tyearke authored Mar 31, 2017
2 parents c7f46fd + 50d90ba commit ad4c70d
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 43 deletions.
99 changes: 57 additions & 42 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,81 @@
{
"env": {},
"extends": "airbnb-base/legacy",
"env": {
"browser": false,
"node": false
},
"globals": {},
"extends": "eslint:recommended",
"rules": {
"curly": 2,
"guard-for-in": 2,
"no-extend-native": 2,
"block-scoped-var": 1,
"no-use-before-define": 2,
"no-caller": 2,
"no-sequences": 2,
"no-new": 2,
"no-extra-parens": 1,
"dot-notation": [
1,
"curly": [
"error",
"all"
],
"brace-style": [
"error",
"1tbs",
{
"allowPattern": "^[a-z]+(_[a-z]+)+$"
"allowSingleLine": false
}
],
"no-implicit-coercion": [
2,
"error",
{
"boolean": true,
"number": true,
"string": false
}
],
"no-multi-spaces": 2,
"key-spacing": [
2,
"consistent-this": [
"warn",
"self"
],
"indent": [
"error",
4,
{
"beforeColon": false,
"afterColon": true
"SwitchCase": 1,
"VariableDeclarator": 1,
"outerIIFEBody": 1,
"FunctionDeclaration": {
"parameters": 1,
"body": 1
},
"FunctionExpression": {
"parameters": 1,
"body": 1
}
}
],
"comma-spacing": [
2,
"func-names": "off",
"vars-on-top": "off",
"new-cap": [
"error",
{
"before": false,
"after": true
"newIsCap": true,
"newIsCapExceptions": [],
"capIsNew": false,
"capIsNewExceptions": [
"Immutable.Map",
"Immutable.Set",
"Immutable.List"
],
"properties": false
}
],
"semi-spacing": [
2,
"max-len": [
"error",
512,
4,
{
"before": false,
"after": true
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}
],
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"eol-last": 2,
"semi": 2,
"space-infix-ops": 2,
"consistent-this": [
1,
"self"
],
"linebreak-style": [
2,
"unix"
],
"keyword-spacing": 1
"no-continue": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off"
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "An open framework for collecting and analyzing HPC metrics.",
"dependencies": {},
"devDependencies": {
"eslint": "^3.8.1"
"eslint": "^3.16.1",
"eslint-config-airbnb-base": "^11.1.0",
"eslint-plugin-import": "^2.2.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit ad4c70d

Please sign in to comment.