Skip to content

Commit

Permalink
Added some development quality of life improvements (#87)
Browse files Browse the repository at this point in the history
+ added a json schema of ruleset files for better error detection /
intellisense.
+ added a ts-config file so that js files are validated for types
+ added an extensions.json config that recommends the official spectral
plugin as well as the red hat yaml plugin
+ added settings.json that configures automatic IDE linting of the
root.openapi.yml file as well as registering the json schema to ruleset
files
  • Loading branch information
EthanHonzikSPS authored Jul 17, 2024
1 parent c74f887 commit 0995d49
Show file tree
Hide file tree
Showing 4 changed files with 456 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"stoplight.spectral",
"redhat.vscode-yaml"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"spectral.rulesetFile": "rulesets/src/.spectral.yml",
"spectral.validateFiles": [
"*.openapi.yml"
],
"yaml.schemas": {
"spectralRulesetSchema.json": "*.ruleset.yml"
}
}
18 changes: 18 additions & 0 deletions rulesets/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"outDir": "./dist",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ESNext",
"noImplicitAny": false,
"checkJs": true,
"allowJs": true,
},
"include": [
"test/**/*"
],
"exclude": [
"./node_modules",
"./dist",
]
}
Loading

0 comments on commit 0995d49

Please sign in to comment.