Skip to content

Commit

Permalink
fix: Fix ESLint schema (#3272)
Browse files Browse the repository at this point in the history
Remove references from schema because ESLint does not support them.

fixes: #3269
  • Loading branch information
Jason3S committed Jul 23, 2022
1 parent a9704d4 commit 05bb8ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/cspell-eslint-plugin/package.json
Expand Up @@ -35,7 +35,7 @@
"scripts": {
"build": "npm run build-schema && npm run build-rollup",
"build-rollup": "rollup --config rollup.config.ts --configPlugin typescript",
"build-schema": "ts-json-schema-generator --no-top-ref --path src/options.ts --type Options -o ./src/_auto_generated_/options.schema.json",
"build-schema": "ts-json-schema-generator --no-top-ref --expose none --path src/options.ts --type Options -o ./src/_auto_generated_/options.schema.json",
"watch": "npm run build-rollup -- --watch",
"clean": "rimraf dist coverage .tsbuildinfo",
"clean-build": "npm run clean && npm run build",
Expand Down
@@ -1,30 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"CustomWordListFile": {
"additionalProperties": false,
"properties": {
"addWords": {
"description": "**Experimental**: Provide a fix option to add words to the file.\n\nNote: this does not yet work perfectly.",
"type": "boolean"
},
"path": {
"$ref": "#/definitions/CustomWordListFilePath",
"description": "Path to word list file. File format: 1 word per line"
}
},
"required": [
"path",
"addWords"
],
"type": "object"
},
"CustomWordListFilePath": {
"description": "Specify a path to a custom word list file",
"type": "string"
}
},
"definitions": {},
"properties": {
"checkComments": {
"default": true,
Expand All @@ -49,10 +26,26 @@
"customWordListFile": {
"anyOf": [
{
"$ref": "#/definitions/CustomWordListFilePath"
"description": "Specify a path to a custom word list file",
"type": "string"
},
{
"$ref": "#/definitions/CustomWordListFile"
"additionalProperties": false,
"properties": {
"addWords": {
"description": "**Experimental**: Provide a fix option to add words to the file.\n\nNote: this does not yet work perfectly.",
"type": "boolean"
},
"path": {
"description": "Path to word list file. File format: 1 word per line",
"type": "string"
}
},
"required": [
"path",
"addWords"
],
"type": "object"
}
],
"description": "Specify a path to a custom word list file"
Expand Down

0 comments on commit 05bb8ed

Please sign in to comment.