-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added remark-cli and pnpm lock file resolution logic #48
base: main
Are you sure you want to change the base?
Conversation
|
A temporary update to test new linting github actions
Hi @s-sajid-ali , added remark linting packages, and it's configs making use of "remarkConfig": {
"plugins": [
"remark-preset-lint-recommended",
"remark-mdx",
["remark-lint-list-item-indent", false]
]
}, Running the linting check with Made changes to the This will enable a consistent use of our remark packages & configs for linting checks across development both locally and on github actions or anywhere else. Please let me know if you have any questions.
|
@@ -22,14 +22,11 @@ jobs: | |||
steps: | |||
- uses: actions/checkout@v4 | |||
|
|||
- name: Install pnpm | |||
uses: pnpm/action-setup@v4 | |||
- name: Install pixi |
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.
Can we just use https://github.com/marketplace/actions/setup-pixi ?
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.
Either of them works, we can use any. Please let me know.
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.
Let's use the action provided by the pixi devs. Fewer things for us to maintain later.
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.
Sounds good !
"plugins": [ | ||
"remark-preset-lint-recommended", | ||
"remark-mdx", | ||
["remark-lint-list-item-indent", false] |
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.
Let's keep remark-lint-list-item-indent
. We've been following it for newer files lately and it's better to have one consistent standard on list item indentation than mix multiple styles.
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.
Sure, We could configure remark to check for newly changed files only with our lint.yaml actions file.
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.
remark supports auto-formatting options as described here https://github.com/remarkjs/remark-lint?tab=readme-ov-file#example-check-and-format-markdown-on-the-cli
We can use --output
option to automatically format markdown files based on indents and escape characters for uniformity like :
"format": "remark . --output --frail"
Running pnpm format
will format all the markdown files for us.
@@ -27,6 +35,11 @@ | |||
"@docusaurus/module-type-aliases": "^3.7.0", | |||
"@docusaurus/tsconfig": "^3.7.0", | |||
"@docusaurus/types": "^3.7.0", | |||
"remark-cli": "^12.0.1", |
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.
Is there a way to keep this consistent with the version our action uses?
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.
Yes. We can use --save-exact
option with pnpm add
as specified here https://pnpm.io/cli/add#--save-exact--e . For example remove :
pnpm remove remark-cli remark-mdx remark-preset-lint-recommended
and then re-add with --save-exact
:
pnpm add --save-dev --save-exact remark-cli remark-mdx remark-preset-lint-recommended
This will add fixed packages to packages.json
like :
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.7.0",
"@docusaurus/tsconfig": "^3.7.0",
"@docusaurus/types": "^3.7.0",
"remark-cli": "12.0.1",
"remark-mdx": "3.1.0",
"remark-preset-lint-recommended": "7.0.1",
"typescript": "~5.7.3"
},
Hi, added the following with this branch: