From: alexlamsl Date: Tue, 15 Mar 2016 13:29:54 +0000 (+0800) Subject: remove jscs & jshint from grunt test X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=717e631871113a5bd44c30bf1ee229d0f8b9129d;p=html-minifier.git remove jscs & jshint from grunt test --- diff --git a/.jscsrc b/.jscsrc deleted file mode 100644 index a7ce4ee..0000000 --- a/.jscsrc +++ /dev/null @@ -1,40 +0,0 @@ -{ - "requireCurlyBraces": ["if", "else", "for", "while", "do", "switch", "try", "catch"], - "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], - "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], - "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], - "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, - //"requireOperatorBeforeLineBreak": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], - "requireSpacesInConditionalExpression": true, - - "requireCapitalizedConstructors": true, - "requireCommaBeforeLineBreak": true, - "requireDotNotation": true, - "requireKeywordsOnNewLine": ["else", "catch"], - "requireLineFeedAtFileEnd": true, - "requireParenthesesAroundIIFE": true, - "requireSpacesInsideObjectBrackets": "all", - - "disallowEmptyBlocks": true, - "disallowQuotedKeysInObjects": "allButReserved", - "disallowSpaceAfterObjectKeys": true, - - //"disallowSpaceBeforeBinaryOperators": [","], - "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], - "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], - - "disallowKeywords": ["with"], - "disallowMixedSpacesAndTabs": true, - //"disallowMultipleLineBreaks": true, - "disallowMultipleLineStrings": true, - //"disallowMultipleVarDecl": true, - "disallowSpacesInCallExpression": true, - "disallowTrailingWhitespace": true, - - "validateIndentation": 2, - "validateLineBreaks": "LF", - "validateParameterSeparator": ", ", - "validateQuoteMarks": "'", - - "safeContextKeyword": "_this" -} diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 1f7a91f..0000000 --- a/.jshintrc +++ /dev/null @@ -1,13 +0,0 @@ -{ - "browser": true, - "eqeqeq": true, - "eqnull": true, - "es3": true, - "expr": true, - "laxbreak": true, - "loopfunc": true, - "node": true, - "strict": true, - "undef": true, - "unused": true -} diff --git a/Gruntfile.js b/Gruntfile.js index b367780..7729eea 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -31,48 +31,6 @@ module.exports = function(grunt) { } }, - jshint: { - options: { - jshintrc: '.jshintrc' - }, - grunt: { - src: 'Gruntfile.js' - }, - src: { - src: ['cli.js', 'src/**/*.js'] - }, - tests: { - src: ['tests/*.js', 'test.js'] - }, - web: { - src: 'assets/master.js' - }, - other: { - src: ['backtest.js', 'benchmark.js'] - } - }, - - jscs: { - options: { - config: '.jscsrc' - }, - grunt: { - src: '<%= jshint.grunt.src %>' - }, - src: { - src: '<%= jshint.src.src %>' - }, - tests: { - src: '<%= jshint.tests.src %>' - }, - web: { - src: '<%= jshint.web.src %>' - }, - other: { - src: '<%= jshint.other.src %>' - } - }, - exec: { 'clean-css': { command: 'npm run assets/clean-css' @@ -140,8 +98,6 @@ module.exports = function(grunt) { grunt.registerTask('test', [ 'dist', 'eslint', - 'jshint', - 'jscs', 'exec:test' ]); diff --git a/assets/master.js b/assets/master.js index e1bf8d0..084f198 100644 --- a/assets/master.js +++ b/assets/master.js @@ -105,8 +105,6 @@ })(); -/* jshint ignore:start */ - var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1128111-22']); _gaq.push(['_trackPageview']); @@ -118,5 +116,3 @@ _gaq.push(['_trackPageview']); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; document.getElementsByTagName('head')[0].appendChild(ga); })(); - -/* jshint ignore:end */ diff --git a/backtest.js b/backtest.js index 3042086..3603ae9 100644 --- a/backtest.js +++ b/backtest.js @@ -197,7 +197,6 @@ else { throw err; } else { - /* global JSON: true */ minify(hash, JSON.parse(data)); } }); diff --git a/benchmark.js b/benchmark.js index e3d6530..0b5310b 100644 --- a/benchmark.js +++ b/benchmark.js @@ -260,7 +260,6 @@ run(fileNames.map(function (fileName) { res.on('data', function (chunk) { response += chunk; }).on('end', function () { - /* global JSON: true */ response = JSON.parse(response); var info = infos.compressor; if (response.success) { diff --git a/cli.js b/cli.js index b809d80..dfee2df 100755 --- a/cli.js +++ b/cli.js @@ -25,8 +25,6 @@ * */ -/* globals JSON:true */ - 'use strict'; var cli = require('cli'); diff --git a/package.json b/package.json index 39c0530..cf09339 100644 --- a/package.json +++ b/package.json @@ -57,12 +57,10 @@ "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-contrib-concat": "1.0.x", - "grunt-contrib-jshint": "1.0.x", "grunt-contrib-qunit": "1.0.x", "grunt-contrib-uglify": "1.0.x", "grunt-eslint": "18.0.x", "grunt-exec": "0.4.x", - "grunt-jscs": "2.8.x", "load-grunt-tasks": "3.4.x", "lzma": "2.3.x", "minimize": "1.8.x", diff --git a/tests/lint.js b/tests/lint.js index 3a7356b..622c95a 100644 --- a/tests/lint.js +++ b/tests/lint.js @@ -1,5 +1,3 @@ -/* jshint qunit:true */ - (function(global) { 'use strict'; diff --git a/tests/minifier.js b/tests/minifier.js index 5a06b8a..9519c03 100644 --- a/tests/minifier.js +++ b/tests/minifier.js @@ -1,5 +1,3 @@ -/* jshint qunit:true */ - (function(global) { 'use strict';