From 4c9a91ea42b2e6d249820a4f6291f595df8d9236 Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Wed, 29 Nov 2017 15:03:18 -0800 Subject: [PATCH] fix examples --- Readme.md | 1 + examples/basic-validation.js | 3 +-- examples/composing-structs.js | 3 +-- examples/custom-errors.js | 3 +-- examples/custom-types.js | 3 +-- examples/default-values.js | 3 +-- examples/throwing-errors.js | 3 +-- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Readme.md b/Readme.md index b911ad71..f41fc554 100644 --- a/Readme.md +++ b/Readme.md @@ -153,6 +153,7 @@ Superstruct's API is very flexible, allowing it to be used for a variety of use - [Default Values](./examples/default-values.js) - [Composing Structs](./examples/composing-structs.js) - [Throwing Errors](./examples/throwing-errors.js) +- [Returning Errors](./examples/returning-errors.js) - [Custom Errors](./examples/custom-errors.js) diff --git a/examples/basic-validation.js b/examples/basic-validation.js index 15498418..5c225727 100644 --- a/examples/basic-validation.js +++ b/examples/basic-validation.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import struct from '..' +import { struct } from 'superstruct' // Define a struct to validate with. const User = struct({ diff --git a/examples/composing-structs.js b/examples/composing-structs.js index cd7528a9..8428eb54 100644 --- a/examples/composing-structs.js +++ b/examples/composing-structs.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import struct from '..' +import { struct } from 'superstruct' // Define a `user` struct. const User = struct({ diff --git a/examples/custom-errors.js b/examples/custom-errors.js index 3dc4a6a9..ec7cdca1 100644 --- a/examples/custom-errors.js +++ b/examples/custom-errors.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import struct from '..' +import { struct } from 'superstruct' // Define a struct to validate with. const User = struct({ diff --git a/examples/custom-types.js b/examples/custom-types.js index dd706e62..2f382a90 100644 --- a/examples/custom-types.js +++ b/examples/custom-types.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import { superstruct } from '..' +import { superstruct } from 'superstruct' import isEmail from 'is-email' import isUuid from 'is-uuid' import isUrl from 'is-url' diff --git a/examples/default-values.js b/examples/default-values.js index e1c0e3f5..0d9b52c4 100644 --- a/examples/default-values.js +++ b/examples/default-values.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import struct from '..' +import { struct } from 'superstruct' // Define an auto-incrementing unique id. let uid = 1 diff --git a/examples/throwing-errors.js b/examples/throwing-errors.js index 0d3062bf..455fdf67 100644 --- a/examples/throwing-errors.js +++ b/examples/throwing-errors.js @@ -1,6 +1,5 @@ -/* eslint-disable no-console */ -import struct from '..' +import { struct } from 'superstruct' // Define a struct to validate with. const User = struct({