mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Lint the minified jQuery file as well
While we have absolutely no style-related expectations to our minified file, we do care that it's valid ES 5.1. This is now verified. Also, update grunt-eslint as a newer ESLint version is required to be able to use "extends" inside of the "overrides" section. Fixes gh-3075 Closes gh-4594 Ref gh-4598
This commit is contained in:
parent
46c284b12b
commit
37df5cdf4e
@ -3,6 +3,7 @@ node_modules
|
||||
*.min.js
|
||||
dist/**
|
||||
!dist/jquery.js
|
||||
!dist/jquery.min.js
|
||||
test/data/jquery-1.9.1.js
|
||||
test/data/badcall.js
|
||||
test/data/badjson.js
|
||||
|
@ -107,7 +107,7 @@ module.exports = function( grunt ) {
|
||||
// We have to explicitly declare "src" property otherwise "newer"
|
||||
// task wouldn't work properly :/
|
||||
dist: {
|
||||
src: "dist/jquery.js"
|
||||
src: [ "dist/jquery.js", "dist/jquery.min.js" ]
|
||||
},
|
||||
dev: {
|
||||
src: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
|
||||
|
10
dist/.eslintrc.json
vendored
10
dist/.eslintrc.json
vendored
@ -1,6 +1,14 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 5,
|
||||
"sourceType": "script"
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "jquery.js",
|
||||
"extends": "../.eslintrc-browser.json",
|
||||
|
||||
"rules": {
|
||||
@ -20,4 +28,6 @@
|
||||
"semi-spacing": "off",
|
||||
"brace-style": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
"grunt-compare-size": "0.4.2",
|
||||
"grunt-contrib-uglify": "3.4.0",
|
||||
"grunt-contrib-watch": "1.1.0",
|
||||
"grunt-eslint": "21.0.0",
|
||||
"grunt-eslint": "22.0.0",
|
||||
"grunt-git-authors": "3.2.0",
|
||||
"grunt-jsonlint": "1.1.0",
|
||||
"grunt-karma": "3.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user