Incorrect definition for @typescript-eslint/consistent-type-assertions
Closed this issue · 1 comments
Tatsh commented
Area with issue?
JSON Schema
✔️ Expected Behavior
Should not error when giving options at .eslintConfig.rules[].@typescript-eslint/consistent-type-assertions
.
This is to track merging the fix for fox-projects/jsonschema-extractor#4
I am happy to make a PR at https://github.com/fox-projects/jsonschema-extractor but it looks like this file is auto-generated and I would not want the change to be reverted next time.
❌ Actual Behavior
This errors:
Schema validation errors were encountered.
package.json::$.eslintConfig.rules.@typescript-eslint/consistent-type-assertions: ['warn', {'assertionStyle': 'as', 'objectLiteralTypeAssertions': 'never'}] is not valid under any of the given schemas
Underlying errors caused this.
Best Match:
$.eslintConfig.rules.@typescript-eslint/consistent-type-assertions: ['warn', {'assertionStyle': 'as', 'objectLiteralTypeAssertions': 'never'}] is not of type 'integer'
Best Deep Match:
$.eslintConfig.rules.@typescript-eslint/consistent-type-assertions[1]: Additional properties are not allowed ('assertionStyle', 'objectLiteralTypeAssertions' were unexpected)
2 other errors were produced. Use '--verbose' to see all errors.
YAML or JSON file that does not work.
package.json
:
"eslintConfig": {
"rules":
"@typescript-eslint/consistent-type-assertions": [
"warn",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "never"
}
]
}
IDE or code editor.
None
Are you making a PR for this?
Yes, I will create a PR.
hyperupcall commented
Thanks for raising this - there have been a few merges in this repository that have caused the two files to go out of sync. I'll fix this later (for the general case), but for now, I'll update this single property in a PR.