-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/marie/plat 419 create policy validator cli #966
base: develop
Are you sure you want to change the base?
Feature/marie/plat 419 create policy validator cli #966
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits to get you started with. Looking good tho.
"license": "Apache-2.0", | ||
"author": "Marie Maxham", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You planning to add the /bin
folder in this PR or is that subsequent?
"@mds-core/mds-policy-service": "workspace:0.11.26", | ||
"@mds-core/mds-types": "workspace:0.9.2", | ||
"@mds-core/mds-utils": "workspace:0.5.0", | ||
"ajv": "8.10.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an advanced version of ajv
compared to what we're currently using elsewhere in this repo.
* limitations under the License. | ||
*/ | ||
|
||
import { PolicyDomainCreateModel, validatePolicyDomainModel } from '@mds-core/mds-policy-service' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need to get your ESLint/Prettier working correctly. This check failure should have been automatically fixed.
function plural(n: number, s: string): string { | ||
return '' + n + ' ' + (n === 1 ? s.replace(/ies$/, 'y').replace(/s$/, '') : s) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a very similar function already in @mds-core/mds-utils
... pluralize(n, 'policy', 'policies')
is how it would be used.
π Purpose
Create a policy validation CLI for doing schema validation and semantic linting
π Resolves:
π¦ Impacts:
packages/mds-policy-linter
β PR Checklist