-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat(spec): eslint with custom rules APIC-387 #304
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
Isn't Have you also tried the custom rules solution of our current tooling? It seems to require less setup https://redocly.com/docs/cli/resources/custom-rules/ |
|
28bd2d4
to
0d4375d
Compare
.github/workflows/check.yml
Outdated
@@ -66,6 +66,9 @@ jobs: | |||
- name: Test scripts | |||
run: yarn scripts:test | |||
|
|||
- name: Test custom eslint plugin | |||
run: yarn workspace eslint test |
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.
should this be yarn workspace eslint-plugin-automation-custom test
?
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.
yep I forgot to change it, thanks !
if ( | ||
typeof value.value !== 'string' || | ||
value.value.trim().endsWith('.') || | ||
!value.value.trim().includes(' ') |
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.
what does it mean?
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've added a comment for clarity
@@ -747,7 +747,7 @@ components: | |||
type: integer | |||
description: >- | |||
The number of hits selected and sorted by the relevant sort | |||
algorithm | |||
algorithm. |
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.
cool to see it's working correctly with multi-line description
algolia/api-clients-automation#304 Co-authored-by: Pierre Millot <[email protected]>
algolia/api-clients-automation#304 Co-authored-by: Pierre Millot <[email protected]>
algolia/api-clients-automation#304 Co-authored-by: Pierre Millot <[email protected]>
🧭 What and Why
🎟 JIRA Ticket: APIC-387
Create custom package for eslint rules, only for yaml for now but can work with other parsers too.
You need to run
yarn build:eslint
to make it work, I don't know how to include it in theyarn install
process.Changes included:
description-dot
rule to check for dot at the end of descriptions.🧪 Test
yarn workspace eslint test