Feature/marie/plat 419 create policy validator cli#966
Feature/marie/plat 419 create policy validator cli#966
Conversation
|
mdurling
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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