Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gruntfile.js7
-rw-r--r--grunt/.jshintrc13
-rw-r--r--js/.jscsrc11
-rw-r--r--js/.jshintrc12
-rw-r--r--js/tests/unit/.jshintrc5
-rw-r--r--js/tests/unit/phantom.js1
6 files changed, 28 insertions, 21 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 641fa2badb..c669725ea4 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -53,6 +53,9 @@ module.exports = function (grunt) {
src: 'js/*.js'
},
test: {
+ options: {
+ jshintrc: 'js/tests/unit/.jshintrc'
+ },
src: 'js/tests/unit/*.js'
},
assets: {
@@ -65,10 +68,6 @@ module.exports = function (grunt) {
config: 'js/.jscsrc'
},
grunt: {
- options: {
- requireCamelCaseOrUpperCaseIdentifiers: null,
- requireParenthesesAroundIIFE: true
- },
src: '<%= jshint.grunt.src %>'
},
src: {
diff --git a/grunt/.jshintrc b/grunt/.jshintrc
index d9dce889b1..78df94b9bc 100644
--- a/grunt/.jshintrc
+++ b/grunt/.jshintrc
@@ -1,11 +1,6 @@
{
- "curly" : true,
- "eqeqeq": true,
- "newcap": true,
- "noarg" : true,
- "node" : true,
- "nonbsp": true,
- "strict": true,
- "undef" : true,
- "unused": true
+ "extends" : "../js/.jshintrc",
+ "browser" : false,
+ "es3" : false,
+ "node" : true
}
diff --git a/js/.jscsrc b/js/.jscsrc
index 6725ce89d6..fb6cd10c23 100644
--- a/js/.jscsrc
+++ b/js/.jscsrc
@@ -1,16 +1,22 @@
{
"disallowEmptyBlocks": true,
"disallowKeywords": ["with"],
- "disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
+ "disallowLeftStickedOperators": ["?", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
+ "disallowMultipleVarDecl": true,
"disallowQuotedKeysInObjects": "allButReserved",
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
+ "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
+ "disallowSpacesInsideArrayBrackets": true,
+ "disallowSpacesInsideParentheses": true,
+ "disallowTrailingComma": true,
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireCapitalizedConstructors": true,
+ "requireCommaBeforeLineBreak": true,
"requireDotNotation": true,
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true,
@@ -18,10 +24,11 @@
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="],
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true },
"requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
+ "requireSpacesInsideObjectBrackets": "allButNested",
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'"
diff --git a/js/.jshintrc b/js/.jshintrc
index c6104dc931..a59e1d00a1 100644
--- a/js/.jshintrc
+++ b/js/.jshintrc
@@ -1,13 +1,15 @@
{
"asi" : true,
- "boss" : true,
"browser" : true,
- "debug" : true,
- "devel" : true,
"eqeqeq" : false,
"eqnull" : true,
+ "es3" : true,
"expr" : true,
+ "jquery" : true,
+ "latedef" : true,
"laxbreak" : true,
- "unused" : true,
- "validthis": true
+ "nonbsp" : true,
+ "strict" : true,
+ "undef" : true,
+ "unused" : true
}
diff --git a/js/tests/unit/.jshintrc b/js/tests/unit/.jshintrc
new file mode 100644
index 0000000000..682a49af1e
--- /dev/null
+++ b/js/tests/unit/.jshintrc
@@ -0,0 +1,5 @@
+{
+ "extends" : "../../.jshintrc",
+ "devel" : true,
+ "qunit" : true
+}
diff --git a/js/tests/unit/phantom.js b/js/tests/unit/phantom.js
index cd184c2f4c..b5f0c67a67 100644
--- a/js/tests/unit/phantom.js
+++ b/js/tests/unit/phantom.js
@@ -6,7 +6,6 @@
* Licensed under the MIT license.
*/
-/*global QUnit:true, alert:true*/
(function () {
'use strict';