fixed jshint script
parent
afd3831b52
commit
8b98518b10
|
@ -2,10 +2,10 @@ var Ajv = require('ajv');
|
|||
var ajv = Ajv({allErrors: true});
|
||||
|
||||
var schema = {
|
||||
"properties": {
|
||||
"foo": { "type": "string" },
|
||||
"bar": { "type": "number", "maximum": 3 }
|
||||
}
|
||||
"properties": {
|
||||
"foo": { "type": "string" },
|
||||
"bar": { "type": "number", "maximum": 3 }
|
||||
}
|
||||
};
|
||||
|
||||
var validate = ajv.compile(schema);
|
||||
|
@ -14,7 +14,7 @@ test({"foo": "abc", "bar": 2});
|
|||
test({"foo": 2, "bar": 4});
|
||||
|
||||
function test(data) {
|
||||
var valid = validate(data);
|
||||
if (valid) console.log('Valid!');
|
||||
else console.log('Invalid: ' + ajv.errorsText(validate.errors));
|
||||
var valid = validate(data);
|
||||
if (valid) console.log('Valid!');
|
||||
else console.log('Invalid: ' + ajv.errorsText(validate.errors));
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
".tonic_example.js"
|
||||
],
|
||||
"scripts": {
|
||||
"jshint": "jshint lib/**/*.js --exclude lib/dotjs/**/*",
|
||||
"jshint": "jshint lib/*.js lib/**/*.js --exclude lib/dotjs/**/*",
|
||||
"test-spec": "mocha spec/*.spec.js -R spec",
|
||||
"test-fast": "AJV_FAST_TEST=true npm run test-spec",
|
||||
"test-debug": "mocha spec/*.spec.js --debug-brk -R spec",
|
||||
|
|
Loading…
Reference in New Issue