1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Merge pull request #12853 from twbs/jscs

Switch to JSCS
This commit is contained in:
XhmikosR 2014-03-05 08:42:50 +02:00
commit d7dc8a7bd3
6 changed files with 39 additions and 37 deletions

View file

@ -65,16 +65,19 @@ module.exports = function (grunt) {
config: 'js/.jscsrc'
},
grunt: {
src: ['Gruntfile.js', 'grunt/*.js']
options: {
'requireParenthesesAroundIIFE': true
},
src: '<%= jshint.grunt.src %>'
},
src: {
src: 'js/*.js'
src: '<%= jshint.src.src %>'
},
test: {
src: 'js/tests/unit/*.js'
src: '<%= jshint.test.src %>'
},
assets: {
src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
src: '<%= jshint.assets.src %>'
}
},

View file

@ -1,15 +1,10 @@
{
"camelcase": true,
"curly": true,
"curly" : true,
"eqeqeq": true,
"immed": true,
"indent": 2,
"newcap": true,
"noarg": true,
"node": true,
"noarg" : true,
"node" : true,
"nonbsp": true,
"quotmark": "single",
"strict": true,
"trailing": true,
"undef": true
"undef" : true
}

View file

@ -1,15 +1,22 @@
{
"disallowEmptyBlocks": true,
"disallowKeywords": ["with"],
"requireLeftStickedOperators": [","],
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowMixedSpacesAndTabs": true,
"disallowMultipleLineStrings": true,
"disallowRightStickedOperators": ["?", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
"disallowTrailingWhitespace": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"requireLeftStickedOperators": [","],
"requireLineFeedAtFileEnd": true,
"requireRightStickedOperators": ["!"],
"requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"],
"requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
"requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true },
"validateLineBreaks": "LF"
"validateIndentation": 2,
"validateLineBreaks": "LF",
"validateQuoteMarks": "'"
}

View file

@ -7,8 +7,6 @@
"eqeqeq" : false,
"eqnull" : true,
"expr" : true,
"indent" : 2,
"laxbreak" : true,
"quotmark" : "single",
"validthis": true
}

View file

@ -273,8 +273,7 @@ $(function () {
test('should show tooltip with delegate selector on click', function () {
var div = $('<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>')
var tooltip = div.appendTo('#qunit-fixture')
.tooltip({ selector: 'a[rel=tooltip]',
trigger: 'click' })
.tooltip({ selector: 'a[rel=tooltip]', trigger: 'click' })
div.find('a').trigger('click')
ok($('.tooltip').is('.fade.in'), 'tooltip is faded in')
})