Skip to content

Commit

Permalink
Feature better linting (#59)
Browse files Browse the repository at this point in the history
* Rename Markdownlint config. file

* Rename YAMLLint config. file

* Tweak package.json

name
description
version
license
main
devDependencies
scripts

* Move some Markdownlint and YAMLLint to .github Actions

* Accept results of `npm run dist`

* Act on CI results: improve YAML
  • Loading branch information
paulo-ferraz-oliveira authored Jul 22, 2024
1 parent 07160e6 commit 4e7fe8a
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 1,095 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: Lint
workflow_dispatch: {}

jobs:
build:
lint:
name: Lint

runs-on: ubuntu-22.04
Expand All @@ -24,13 +24,27 @@ jobs:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Create dist
run: |
npm install
npm run dist
- name: Lint Dockerfile
run: docker run --rm -i hadolint/hadolint:${{ env.hadolint-version }} < Dockerfile

- name: Check if build left artifacts
run: git diff --exit-code
# uses .markdownlint.yml for configuration
- name: markdownlint
uses: DavidAnson/[email protected]
with:
globs: |
.github/**/*.md
*.md
- name: yamllint
uses: ibiqlik/[email protected]
with:
file_or_dir: |
.github/**/*.yml
.*.yml
strict: true
config_file: .yamllint.yml

- name: actionlint
uses: reviewdog/action-actionlint@4f8f9963ca57a41e5fd5b538dd79dbfbd3e0b38a # v1.54.0
env:
SHELLCHECK_OPTS: -o all
File renamed without changes.
2 changes: 2 additions & 0 deletions .yaml-lint.yml → .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ extends: default
rules:
line-length:
max: 100
comments:
min-spaces-from-content: 1
14 changes: 8 additions & 6 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = [{
rules: {
"no-trailing-spaces": "error",
camelcase: "error"
}
}];
module.exports = [
{
rules: {
'no-trailing-spaces': 'error',
camelcase: 'error',
},
},
]
Loading

0 comments on commit 4e7fe8a

Please sign in to comment.