Added linter config.

This commit is contained in:
Alexander Zobnin
2016-01-16 15:17:05 +03:00
parent 07835dcc83
commit 195dfa2d00
3 changed files with 52 additions and 3 deletions

6
.gitignore vendored
View File

@@ -6,9 +6,9 @@
*.bat *.bat
# Grafana linter config # Grafana linter config
.jshintrc # .jshintrc
.jscs.json # .jscs.json
.jsfmtrc # .jsfmtrc
# Builded docs # Builded docs
docs/site/ docs/site/

13
.jscs.json Normal file
View File

@@ -0,0 +1,13 @@
{
"disallowImplicitTypeConversion": ["string"],
"disallowKeywords": ["with"],
"disallowMultipleLineBreaks": true,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingWhitespace": true,
"requireSpacesInFunctionExpression": {
"beforeOpeningCurlyBrace": true
},
"disallowSpacesInsideArrayBrackets": true,
"disallowSpacesInsideParentheses": true,
"validateIndentation": 2
}

36
.jshintrc Normal file
View File

@@ -0,0 +1,36 @@
{
"browser": true,
"bitwise":false,
"curly": true,
"eqnull": true,
"globalstrict": true,
"devel": true,
"eqeqeq": true,
"forin": false,
"immed": true,
"supernew": true,
"expr": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"undef": true,
"boss": true,
"trailing": true,
"laxbreak": true,
"laxcomma": true,
"sub": true,
"unused": true,
"maxdepth": 6,
"maxlen": 140,
"globals": {
"System": true,
"define": true,
"require": true,
"Chromath": false,
"setImmediate": true
}
}