aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorBardi Harborow <[email protected]>2016-12-31 16:09:26 +1100
committerBardi Harborow <[email protected]>2016-12-31 16:49:15 +1100
commita8100e1f0113c82fea78d1d87e62ceba630fd18b (patch)
tree588459191b7708530b5741ae4cb43b46c2259883 /js
parente4e0154e3a6f127e902be868fbec68e7b2cb8e61 (diff)
downloadbootstrap-a8100e1f0113c82fea78d1d87e62ceba630fd18b.tar.xz
bootstrap-a8100e1f0113c82fea78d1d87e62ceba630fd18b.zip
Extend ESLint to cover all JS files and drop JSCS.
Diffstat (limited to 'js')
-rw-r--r--js/.jscsrc42
-rw-r--r--js/tests/.eslintrc.json7
2 files changed, 7 insertions, 42 deletions
diff --git a/js/.jscsrc b/js/.jscsrc
deleted file mode 100644
index 7a720ee76..000000000
--- a/js/.jscsrc
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "disallowEmptyBlocks": true,
- "disallowKeywords": ["with"],
- "disallowMixedSpacesAndTabs": true,
- "disallowMultipleLineStrings": true,
- "disallowMultipleVarDecl": true,
- "disallowQuotedKeysInObjects": "allButReserved",
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "disallowSpaceBeforeBinaryOperators": [","],
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "disallowSpacesInsideArrayBrackets": true,
- "disallowSpacesInsideParentheses": true,
- "disallowTrailingComma": true,
- "disallowTrailingWhitespace": true,
- "requireCamelCaseOrUpperCaseIdentifiers": true,
- "requireCapitalizedConstructors": true,
- "requireCommaBeforeLineBreak": true,
- "requireDollarBeforejQueryAssignment": true,
- "requireDotNotation": true,
- "requireLineFeedAtFileEnd": true,
- "requirePaddingNewLinesAfterUseStrict": true,
- "requirePaddingNewLinesBeforeExport": true,
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
- "requireSpaceAfterLineComment": true,
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
- "requireSpaceBetweenArguments": true,
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true, "allExcept": ["shorthand"] },
- "requireSpacesInConditionalExpression": true,
- "requireSpacesInForStatement": true,
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "requireSpacesInsideObjectBrackets": "allButNested",
- "validateAlignedFunctionParameters": true,
- "validateIndentation": 2,
- "validateLineBreaks": "LF",
- "validateNewlineAfterArrayElements": true,
- "validateQuoteMarks": "'"
-}
diff --git a/js/tests/.eslintrc.json b/js/tests/.eslintrc.json
index 7ae9cf966..889ea203d 100644
--- a/js/tests/.eslintrc.json
+++ b/js/tests/.eslintrc.json
@@ -10,6 +10,7 @@
"ecmaVersion": 5,
"sourceType": "script"
},
+ "extends": "../.eslintrc.json",
"rules": {
// Best Practices
"consistent-return": "off",
@@ -23,12 +24,18 @@
// Strict Mode
"strict": "off",
+ // NodeJS and CommonJS
+ "global-require": "off",
+ "no-process-env": "off",
+ "no-process-exit": "off",
+
// Stylistic Issues
"brace-style": "off",
"func-style": "off",
"max-statements-per-line": "off",
"object-curly-newline": "off",
"object-property-newline": "off",
+ "spaced-comment": "off",
// ECMAScript 6
"no-var": "off",