Skip to content

Commit

Permalink
Fixed lint errors for xo
Browse files Browse the repository at this point in the history
  • Loading branch information
orangemug committed May 11, 2019
1 parent 6830bbf commit 73155d1
Show file tree
Hide file tree
Showing 8 changed files with 1,891 additions and 1,887 deletions.
26 changes: 12 additions & 14 deletions hooks/validate/mapbox-gl.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
const styleSpec = require("@mapbox/mapbox-gl-style-spec");
const styleSpec = require('@mapbox/mapbox-gl-style-spec');

module.exports = function (newDoc) {
const specVersion = `v${newDoc.version}`;
const spec = styleSpec[specVersion];

module.exports = function (newDoc, oldDoc) {
const specVersion = `v${newDoc.version}`;
const spec = styleSpec[specVersion];
if (!spec) {
return [
{
message: `No such spec version found for '${specVersion}'`
}
];
}

if (!spec) {
return [
{
message: `No such spec version found for '${specVersion}'`
}
];
}

return styleSpec.validate(newDoc, styleSpec[specVersion]);
return styleSpec.validate(newDoc, styleSpec[specVersion]);
};

Loading

0 comments on commit 73155d1

Please sign in to comment.