]> source.dussan.org Git - jquery.git/commitdiff
Build: Don't lint every file in dist/ (#3245)
authorMichał Gołębiowski <m.goleb@gmail.com>
Mon, 25 Jul 2016 23:22:53 +0000 (01:22 +0200)
committerOleg Gaidarenko <markelog@gmail.com>
Mon, 25 Jul 2016 23:22:53 +0000 (03:22 +0400)
Currently the "all" target for the eslint task includes way more than
the "dev" & "dist" targets combined and those 2 tasks are the one run in
`npm test`.

Gruntfile.js

index 7af3ac98aebc4afce9eb8a6b997f49e9d97b0298..8cc4c91c0bb96400bf191e3ebde61986d114649c 100644 (file)
@@ -113,7 +113,6 @@ module.exports = function( grunt ) {
                                // See https://github.com/sindresorhus/grunt-eslint/issues/119
                                quiet: true
                        },
-                       all: ".",
                        dist: "dist/jquery.js",
                        dev: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
                },
@@ -197,7 +196,8 @@ module.exports = function( grunt ) {
 
        grunt.registerTask( "lint", [
                "jsonlint",
-               runIfNewNode( "eslint:all" )
+               runIfNewNode( "eslint:dev" ),
+               runIfNewNode( "eslint:dist" )
        ] );
 
        grunt.registerTask( "test_fast", [ runIfNewNode( "node_smoke_tests" ) ] );
@@ -225,6 +225,7 @@ module.exports = function( grunt ) {
 
        grunt.registerTask( "precommit_lint", [
                "newer:jsonlint",
-               runIfNewNode( "newer:eslint:all" )
+               runIfNewNode( "newer:eslint:dev" ),
+               runIfNewNode( "newer:eslint:dist" )
        ] );
 };