Skip to content

Commit

Permalink
style: install linter for markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
esoubiran-aneo committed May 6, 2023
1 parent 2df21ee commit e01a48d
Show file tree
Hide file tree
Showing 13 changed files with 260 additions and 49 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/validate-docs-generation.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Validate Docs Generation

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: "ci-${{ github.ref }}"
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -33,3 +36,37 @@ jobs:

- name: Static HTML export with Nuxt
run: nr generate

lint-markdown:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- run: npm i -g pnpm @antfu/ni

- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- run: nci

- run: nr lint:md

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- run: npm i -g pnpm @antfu/ni

- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- run: nci

- run: nr lint
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist
sw.*
.env
.output
.eslintcache
18 changes: 18 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Default state for all rules
default: true
# Disable max line length
MD013: false
# Disable space after hash on atx style heading
MD018: false
# Allow duplicated heading for different sections
MD024:
allow_different_nesting: true
siblings_only: true
# Allow multiple top-level headings
MD025: false
# Allow inline HTML
MD033: false
# Allow non blank lines around list
MD032: false
MD046:
style: fenced
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules

content/0.index.md
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ArmoniK Community
# ArmoniK Community

All our ways of working and our good practices.

Expand Down
3 changes: 1 addition & 2 deletions content/1.introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ Feel free to ask if there is something you don't understand. The whole ArmoniK t

In addition to processes and **for each language** you could find in ArmoniK, we created a **contribution guide**.

- [Typescript](./2.contribution-guides/1.typescript.md)
- [TypeScript](./2.contribution-guides/1.typescript.md)

Feel free to ask if there is something you don't understand. The whole ArmoniK team would be delighted to answer you.


## Before starting your journey

<!-- Here, we need to talk about signing the CLA and why it's important. -->
Expand Down
2 changes: 1 addition & 1 deletion content/2.sign-cla.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ navigation.icon: lucide:file-signature
---

<!-- In the file, you explain how the cla can be signed. -->
*Work in progress*
Work in progress...
6 changes: 3 additions & 3 deletions content/2.working-processes/1.discuss-first.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Discuss First !
# Discuss First

Create a new issue and talk to us about it before attempting to create a feature pull request.
It will help maintainers in comprehending your requirements and ensuring that you take steps that are appropriate for ArmoniK's future.
It will help maintainers in comprehending your requirements and ensuring that you take steps that are appropriate for ArmoniK's future.

If you have an idea or want to discuss an issue with the community, you can alternatively create a discussion in our [Discussions Channel](https://github.com/aneoconsulting/ArmoniK/discussions).
If you have an idea or want to discuss an issue with the community, you can alternatively create a discussion in our [Discussions Channel](https://github.com/aneoconsulting/ArmoniK/discussions).
5 changes: 3 additions & 2 deletions content/2.working-processes/2.submission-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A minimal reproduction scenario allows us to quickly confirm a bug, isolate it a

Unfortunately, we are not able to investigate or fix bugs without a minimal reproduction sample, so if we don't hear back from you, we will close the issue since it is missing information to be reproduced. The issue can be reopened if the user can provide more information after the issue was closed.

Helping us to easily reproduce an issue also helps you. Our developers will be able to more easily pinpoint the problem and provide a correction. As a result, the process of resolving issues is accelerated.
Helping us to easily reproduce an issue also helps you. Our developers will be able to more easily pinpoint the problem and provide a correction. As a result, the process of resolving issues is accelerated.

You can file new issues by selecting from our [new issues templates](https://github.com/aneoconsulting/ArmoniK/issues/new/choose) and filling it.

Expand Down Expand Up @@ -45,6 +45,7 @@ The following coding rules must be respected:
If your PR fixes or resolves an existing issue, please link in the desciption of your PR. You can either put the issue number or the complete link to the issue if the fix is not in the same repository as the issue. You will have to replace the 123 by the issue number you fix.

Example:

```markdown
fix #123
fix https://github.com/aneoconsulting/ArmoniK/issues/123
Expand All @@ -60,4 +61,4 @@ We should particularly take attention to:
- Documentation
- Tests
- Maintainability
- Performances
- Performances
2 changes: 1 addition & 1 deletion content/2.working-processes/3.release-processes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Our release process in the repositories is as follow:
2. The CI/CD will check that the tag is valid. If the tag is not valid, the CI/CD will fail.
3. The CI/CD will run and produce the artifacts with the given tag.

Note: Some repositories may have a slightly different way of producing releases; therefore, refer to the documentation in the repositories to ensure that you follow the right steps. If the process is still not clear to you, do not hesitate to contact us.
Note: Some repositories may have a slightly different way of producing releases; therefore, refer to the documentation in the repositories to ensure that you follow the right steps. If the process is still not clear to you, do not hesitate to contact us.
2 changes: 1 addition & 1 deletion content/3.contribution-guides/1.typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ After bumpping, we remove lock file, we install them, runing build and test to v
### Releasing

Please refer to [release processes](../2.working-processes/3.release-processes.md) in our working processes.

> This guide is heavily inpired by the contribute from [@antfu](https://github.com/antfu/).
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "armonik-community",
"version": "0.1.0",
"private": true,
"scripts": {
"prepare": "nuxt prepare",
"postinstall": "nuxi prepare",
"dev": "nuxi dev",
"build": "nuxi build",
"generate": "nuxi generate",
"preview": "nuxi preview",
"lint": "eslint ."
"lint": "eslint --cache .",
"lint:fix": "eslint --cache --fix .",
"lint:md": "markdownlint . && case-police ./**/*.md",
"lint:md:fix": "markdownlint . --fix && case-police --fix ./**/*.md"
},
"dependencies": {
"@aneoconsultingfr/armonik-docs-theme": "^0.6.0",
Expand All @@ -16,5 +20,9 @@
"nuxt": "^3.3.1",
"rollup": "3.18.0"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"devDependencies": {
"case-police": "^0.6.0",
"markdownlint-cli": "^0.34.0"
}
}
Loading

0 comments on commit e01a48d

Please sign in to comment.