Skip to content

Commit 4cee1ca

Browse files
authored
build(deps-dev): replace standard with neostandard (#15)
1 parent d74bbc0 commit 4cee1ca

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict'
2+
3+
module.exports = require('neostandard')({
4+
ignores: require('neostandard').resolveIgnoresFromGitignore(),
5+
ts: true
6+
})

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"type": "commonjs",
77
"types": "types/index.d.ts",
88
"scripts": {
9-
"lint": "standard",
10-
"lint:fix": "standard --fix",
9+
"lint": "eslint",
10+
"lint:fix": "eslint --fix",
1111
"test:unit": "c8 --100 node --test",
1212
"test:typescript": "tsd",
1313
"test": "npm run lint && npm run test:unit && npm run test:typescript"
@@ -39,12 +39,7 @@
3939
"devDependencies": {
4040
"@fastify/pre-commit": "^2.1.0",
4141
"c8": "^9.1.0",
42-
"standard": "^17.1.0",
42+
"neostandard": "^0.11.9",
4343
"tsd": "^0.31.0"
44-
},
45-
"standard": {
46-
"ignore": [
47-
"types/*"
48-
]
4944
}
5045
}

types/index.d.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44
* @constructor
55
*/
66
declare class RefResolver {
7-
87
/**
98
* @param {object} opts - Options for the resolver.
109
* @param {boolean} opts.allowEqualDuplicates - Whether to allow schemas with equal ids to be added to the resolver.
1110
*/
12-
constructor(opts?: { allowEqualDuplicates?: boolean });
11+
constructor (opts?: { allowEqualDuplicates?: boolean })
1312

1413
/**
1514
* Adds the given schema to the resolver.
1615
* @param {any} schema - The schema to be added.
1716
* @param {string} schemaId - The default schema id of the schema to be added.
1817
*/
19-
addSchema(schema: any, schemaId?: string): void;
18+
addSchema (schema: any, schemaId?: string): void
2019

2120
/**
2221
* Returns the schema by the given schema id and jsonPointer.
@@ -25,34 +24,34 @@ declare class RefResolver {
2524
* @param {string} jsonPointer - The jsonPointer of the schema to be returned.
2625
* @returns {any | null} The schema by the given schema id and jsonPointer.
2726
*/
28-
getSchema(schemaId: string, jsonPointer?: string): any | null;
27+
getSchema (schemaId: string, jsonPointer?: string): any | null
2928

3029
/**
3130
* Returns true if the schema by the given schema id is added to the resolver.
3231
* @param {string} schemaId - The schema id of the schema to be checked.
3332
* @returns {boolean} True if the schema by the given schema id is added to the resolver.
3433
*/
35-
hasSchema(schemaId: string): boolean;
34+
hasSchema (schemaId: string): boolean
3635

3736
/**
3837
* Returns the schema references of the schema by the given schema id.
3938
* @param {string} schemaId - The schema id of the schema whose references are to be returned.
4039
* @returns {Array<{ schemaId: string; jsonPointer: string }>} The schema references of the schema by the given schema id.
4140
*/
42-
getSchemaRefs(schemaId: string): { schemaId: string; jsonPointer: string }[];
41+
getSchemaRefs (schemaId: string): { schemaId: string; jsonPointer: string }[]
4342

4443
/**
4544
* Returns all the schema dependencies of the schema by the given schema id.
4645
* @param {string} schemaId - The schema id of the schema whose dependencies are to be returned.
4746
* @returns {object} The schema dependencies of the schema by the given schema id.
4847
*/
49-
getSchemaDependencies(schemaId: string): { [key: string]: any };
48+
getSchemaDependencies (schemaId: string): { [key: string]: any }
5049

5150
/**
5251
* Dereferences the schema by the given schema id.
5352
* @param {string} schemaId - The schema id of the schema to be dereferenced.
5453
*/
55-
derefSchema(schemaId: string): void;
54+
derefSchema (schemaId: string): void
5655

5756
/**
5857
* Returns the dereferenced schema by the given schema id and jsonPointer.
@@ -62,7 +61,7 @@ declare class RefResolver {
6261
* @param {string} jsonPointer - The jsonPointer of the schema to be returned.
6362
* @returns {any | null} The dereferenced schema by the given schema id and jsonPointer.
6463
*/
65-
getDerefSchema(schemaId: string, jsonPointer?: string): any | null;
64+
getDerefSchema (schemaId: string, jsonPointer?: string): any | null
6665
}
6766

68-
export { RefResolver };
67+
export { RefResolver }

0 commit comments

Comments
 (0)