File tree 12 files changed +2022
-2186
lines changed
12 files changed +2022
-2186
lines changed Original file line number Diff line number Diff line change
1
+ _
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ . " $( dirname " $0 " ) /_/husky.sh"
3
+
4
+ npx --no-install commitlint --edit $1
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ . " $( dirname " $0 " ) /_/husky.sh"
3
+
4
+ npx lint-staged
Original file line number Diff line number Diff line change 1
1
export default ValidationError ;
2
2
export type JSONSchema6 = import ( 'json-schema' ) . JSONSchema6 ;
3
3
export type JSONSchema7 = import ( 'json-schema' ) . JSONSchema7 ;
4
- export type Schema =
5
- | ( import ( 'json-schema' ) . JSONSchema4 & import ( './validate' ) . Extend )
6
- | ( import ( 'json-schema' ) . JSONSchema6 & import ( './validate' ) . Extend )
7
- | ( import ( 'json-schema' ) . JSONSchema7 & import ( './validate' ) . Extend ) ;
8
- export type ValidationErrorConfiguration = {
9
- name ?: string | undefined ;
10
- baseDataPath ?: string | undefined ;
11
- postFormatter ?: import ( './validate' ) . PostFormatter | undefined ;
12
- } ;
13
- export type PostFormatter = (
14
- formattedError : string ,
15
- error : import ( './validate' ) . SchemaUtilErrorObject
16
- ) => string;
17
- export type SchemaUtilErrorObject = import ( 'ajv' ) . ErrorObject & {
18
- children ?: import ( 'ajv' ) . ErrorObject [ ] | undefined ;
19
- } ;
4
+ export type Schema = import ( './validate' ) . Schema ;
5
+ export type ValidationErrorConfiguration =
6
+ import ( './validate' ) . ValidationErrorConfiguration ;
7
+ export type PostFormatter = import ( './validate' ) . PostFormatter ;
8
+ export type SchemaUtilErrorObject = import ( './validate' ) . SchemaUtilErrorObject ;
20
9
declare class ValidationError extends Error {
21
10
/**
22
11
* @param {Array<SchemaUtilErrorObject> } errors
Original file line number Diff line number Diff line change 1
1
export default addAbsolutePathKeyword ;
2
2
export type Ajv = import ( 'ajv' ) . Ajv ;
3
3
export type ValidateFunction = import ( 'ajv' ) . ValidateFunction ;
4
- export type SchemaUtilErrorObject = import ( 'ajv' ) . ErrorObject & {
5
- children ?: import ( 'ajv' ) . ErrorObject [ ] | undefined ;
6
- } ;
4
+ export type SchemaUtilErrorObject = import ( '../validate' ) . SchemaUtilErrorObject ;
7
5
/**
8
6
*
9
7
* @param {Ajv } ajv
Original file line number Diff line number Diff line change 1
1
export function stringHints ( schema : Schema , logic : boolean ) : string [ ] ;
2
2
export function numberHints ( schema : Schema , logic : boolean ) : string [ ] ;
3
- export type Schema =
4
- | ( import ( 'json-schema' ) . JSONSchema4 & import ( '../validate' ) . Extend )
5
- | ( import ( 'json-schema' ) . JSONSchema6 & import ( '../validate' ) . Extend )
6
- | ( import ( 'json-schema' ) . JSONSchema7 & import ( '../validate' ) . Extend ) ;
3
+ export type Schema = import ( '../validate' ) . Schema ;
Original file line number Diff line number Diff line change 1
1
export type JSONSchema4 = import ( 'json-schema' ) . JSONSchema4 ;
2
2
export type JSONSchema6 = import ( 'json-schema' ) . JSONSchema6 ;
3
3
export type JSONSchema7 = import ( 'json-schema' ) . JSONSchema7 ;
4
- export type ErrorObject = Ajv . ErrorObject ;
4
+ export type ErrorObject = import ( 'ajv' ) . ErrorObject ;
5
5
export type Extend = {
6
6
formatMinimum ?: number | undefined ;
7
7
formatMaximum ?: number | undefined ;
8
8
formatExclusiveMinimum ?: boolean | undefined ;
9
9
formatExclusiveMaximum ?: boolean | undefined ;
10
10
} ;
11
- export type Schema =
12
- | ( import ( 'json-schema' ) . JSONSchema4 & Extend )
13
- | ( import ( 'json-schema' ) . JSONSchema6 & Extend )
14
- | ( import ( 'json-schema' ) . JSONSchema7 & Extend ) ;
15
- export type SchemaUtilErrorObject = Ajv . ErrorObject & {
16
- children ?: Ajv . ErrorObject [ ] | undefined ;
11
+ export type Schema = ( JSONSchema4 | JSONSchema6 | JSONSchema7 ) & Extend ;
12
+ export type SchemaUtilErrorObject = ErrorObject & {
13
+ children ?: Array < ErrorObject > ;
17
14
} ;
18
15
export type PostFormatter = (
19
16
formattedError : string ,
@@ -36,5 +33,4 @@ export function validate(
36
33
configuration ?: ValidationErrorConfiguration | undefined
37
34
) : void ;
38
35
import ValidationError from './ValidationError' ;
39
- import Ajv = require( 'ajv' ) ;
40
36
export { ValidationError } ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments