From 195dfa2d008d3582beea14b9ccd3f34c604f87d4 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 16 Jan 2016 15:17:05 +0300 Subject: [PATCH] Added linter config. --- .gitignore | 6 +++--- .jscs.json | 13 +++++++++++++ .jshintrc | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .jscs.json create mode 100644 .jshintrc diff --git a/.gitignore b/.gitignore index 55fcca7..e368599 100644 --- a/.gitignore +++ b/.gitignore @@ -6,9 +6,9 @@ *.bat # Grafana linter config -.jshintrc -.jscs.json -.jsfmtrc +# .jshintrc +# .jscs.json +# .jsfmtrc # Builded docs docs/site/ diff --git a/.jscs.json b/.jscs.json new file mode 100644 index 0000000..dcf694d --- /dev/null +++ b/.jscs.json @@ -0,0 +1,13 @@ +{ + "disallowImplicitTypeConversion": ["string"], + "disallowKeywords": ["with"], + "disallowMultipleLineBreaks": true, + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true, + "requireSpacesInFunctionExpression": { + "beforeOpeningCurlyBrace": true + }, + "disallowSpacesInsideArrayBrackets": true, + "disallowSpacesInsideParentheses": true, + "validateIndentation": 2 +} \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..9924799 --- /dev/null +++ b/.jshintrc @@ -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 + } +}