Skip to content

chore: add basic Markdown linting config#73

Merged
gispada merged 2 commits intomainfrom
chore/markdown-linting-config
Jan 10, 2025
Merged

chore: add basic Markdown linting config#73
gispada merged 2 commits intomainfrom
chore/markdown-linting-config

Conversation

@cowuake
Copy link
Copy Markdown
Contributor

@cowuake cowuake commented Dec 8, 2024

Description

Add configuration for simplified handling of Markdown (and hence repository documentation) linting.

List of proposed changes

  • Add NPM dev dependency: markdownlint-cli2
  • Add markdownlint-cli2 basic configuration
  • Add NPM scripts to launch markdownlint-cli2 (for both linting and fixing)
  • Add DavidAnson.vscode-markdownlint to the list of VSCode recommended extensions (the extension is powered by the same linting engine behind markdownlint-cli2!)
  • Update VSCode settings to allow automatic linting/fixing of Markdown files on save when the DavidAnson.vscode-markdownlint extension is installed

How to test the changes

  1. After updating local NPM dependencies, just run npm run mdlint for a linting dry run or npm run mdlint:fix to apply linter's suggestions. Revert the changes before proceeding to step 2.
  2. After installing the above-mentioned VSCode extension, reach for a Markdown file affected by some non-conformity to the Markdown standard (e.g., the PULL_REQUEST_TEMPLATE.md file, missing a blank line at the beginning of the Modified packages section and including an exceeding blank line at the end), and save the file to observe the automatic changes.

Modified packages

  • flower-core
  • flower-react
  • flower-demo
  • flower-devtool

(The effects of applying the linter's suggestions have not been included in this pull request, so none of the packages have been effectively modified.)

@cowuake cowuake added the enhancement New feature or request label Dec 8, 2024
@cowuake cowuake requested a review from a team as a code owner December 8, 2024 15:44
@gispada
Copy link
Copy Markdown
Member

gispada commented Dec 9, 2024

Can we ignore changelog files? They are auto-generated, and markdownlint-cli2 is picking them adding unnecessary noise.

I also see a few node_modules (for instance packages/flower-devtool/node_modules/glob/README.md) paths when running npm run mdlint. Can you double check? Thanks.

@cowuake
Copy link
Copy Markdown
Contributor Author

cowuake commented Dec 9, 2024

@gispada, I've excluded changelog files and node_modules directories from the linting.
Let me know whether your consider useful or not, for this PR, to further reduce noise by suppressing reports for the MD013 rule, unless we want to set a different maximum number of lines (default: 80) right now with a further change on the configuration.

@cowuake cowuake force-pushed the chore/markdown-linting-config branch from 7ad70b6 to bd375ba Compare December 19, 2024 07:03
@gispada gispada merged commit 6be5a5f into main Jan 10, 2025
@gispada gispada deleted the chore/markdown-linting-config branch January 10, 2025 07:04
piraspierpaolo991 added a commit that referenced this pull request Apr 19, 2025
* fix: avoid validate hidden field (#67)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* feat: added remove value on hide element (#68)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* chore: derivated dirty from form values (#69)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* docs: improve English style in README.md (#72)

* chore: add basic Markdown linting config (#73)

* chore: add basic Markdown linting config

* fix: exclude changelogs and node_modules from md linting

---------

Co-authored-by: stackhousesrl <38560213+stackhousesrl@users.noreply.github.com>
Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>
Co-authored-by: Riccardo Mura <49900772+cowuake@users.noreply.github.com>
piraspierpaolo991 added a commit that referenced this pull request Apr 19, 2025
* fix: avoid validate hidden field (#67)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* feat: added remove value on hide element (#68)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* chore: derivated dirty from form values (#69)

Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>

* docs: improve English style in README.md (#72)

* chore: add basic Markdown linting config (#73)

* chore: add basic Markdown linting config

* fix: exclude changelogs and node_modules from md linting

---------

Co-authored-by: stackhousesrl <38560213+stackhousesrl@users.noreply.github.com>
Co-authored-by: Andrea Zucca <andrea.zucca@spindox.it>
Co-authored-by: Riccardo Mura <49900772+cowuake@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants