build: Replace jsonlint with eslint's JSON parsing
Change-Id: I75601793639653bcf46af13e259cafba80b81af4
This commit is contained in:
parent
194ae126b2
commit
2926c08ada
3 changed files with 8 additions and 55 deletions
23
Gruntfile.js
23
Gruntfile.js
|
@ -1,28 +1,22 @@
|
|||
/* eslint-env node */
|
||||
/* eslint-env node, es6 */
|
||||
|
||||
module.exports = function ( grunt ) {
|
||||
var conf = grunt.file.readJSON( 'skin.json' );
|
||||
|
||||
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
||||
grunt.loadNpmTasks( 'grunt-eslint' );
|
||||
grunt.loadNpmTasks( 'grunt-jsonlint' );
|
||||
grunt.loadNpmTasks( 'grunt-stylelint' );
|
||||
grunt.loadNpmTasks( 'grunt-svgmin' );
|
||||
|
||||
grunt.initConfig( {
|
||||
eslint: {
|
||||
options: {
|
||||
extensions: [ '.js', '.json' ],
|
||||
cache: true
|
||||
},
|
||||
all: [
|
||||
'*.js',
|
||||
'**/*.js',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
},
|
||||
jsonlint: {
|
||||
all: [
|
||||
'*.json',
|
||||
'**/*.json',
|
||||
'*.{js,json}',
|
||||
'**/*.{js,json}',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
|
@ -33,8 +27,7 @@ module.exports = function ( grunt ) {
|
|||
syntax: 'less'
|
||||
},
|
||||
all: [
|
||||
'*.{le,c}ss',
|
||||
'**/*.{le,c}ss',
|
||||
'**/*.{css,less}',
|
||||
'!node_modules/**',
|
||||
'!vendor/**'
|
||||
]
|
||||
|
@ -78,6 +71,6 @@ module.exports = function ( grunt ) {
|
|||
} );
|
||||
|
||||
grunt.registerTask( 'minify', 'svgmin' );
|
||||
grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 'stylelint' ] );
|
||||
grunt.registerTask( 'test', [ 'eslint', 'banana', 'stylelint' ] );
|
||||
grunt.registerTask( 'default', [ 'minify', 'test' ] );
|
||||
};
|
||||
|
|
39
package-lock.json
generated
39
package-lock.json
generated
|
@ -334,30 +334,6 @@
|
|||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@prantlf/jsonlint": {
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@prantlf/jsonlint/-/jsonlint-6.2.1.tgz",
|
||||
"integrity": "sha512-/qPFlMyAYpebu+xS7W9XUlpBrpWyHq9ElslIxfOpfKOxWy+p++gicvxtn7f4GJQ3ikyM738/IIDf6Ngl9ta18w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ajv": "6.10.0",
|
||||
"commander": "2.20.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": {
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
|
||||
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@stylelint/postcss-css-in-js": {
|
||||
"version": "0.37.1",
|
||||
"resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.1.tgz",
|
||||
|
@ -721,12 +697,6 @@
|
|||
"integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=",
|
||||
"dev": true
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
|
||||
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
|
@ -1621,15 +1591,6 @@
|
|||
"eslint": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"grunt-jsonlint": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/grunt-jsonlint/-/grunt-jsonlint-2.0.0.tgz",
|
||||
"integrity": "sha512-bCodmPAoHxujSST/Pn5FdR6K1QytaZhlYW3dyU5Ut27h1usDBPnoBLWb7EoPE2EmW1UgQTrSNu/qP9tUMBSrZg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@prantlf/jsonlint": "6.2.1"
|
||||
}
|
||||
},
|
||||
"grunt-known-options": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz",
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
"grunt": "1.1.0",
|
||||
"grunt-banana-checker": "0.9.0",
|
||||
"grunt-eslint": "22.0.0",
|
||||
"grunt-jsonlint": "2.0.0",
|
||||
"grunt-stylelint": "0.15.0",
|
||||
"grunt-svgmin": "6.0.0",
|
||||
"stylelint-config-wikimedia": "0.10.1"
|
||||
|
|
Loading…
Reference in a new issue