Skip to content

Commit

Permalink
ci(whatislove-dev): escape github expressions in articles wd-579 (#580)
Browse files Browse the repository at this point in the history
* ci(whatislove-dev): create w3c validator ignore file wd-579

* ci(whatislove-dev): escape github expressions in articles wd-579
  • Loading branch information
what1s1ove authored Jun 8, 2024
1 parent 9d7dafa commit 8a7fa41
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/whatislove-dev/.w3c-validator
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/When the “srcset” attribute has any image candidate string with a width descriptor, the “sizes” attribute must also be specified./
2 changes: 1 addition & 1 deletion apps/whatislove-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start:server": "json-server --watch src/database.json --port 3001",
"build:clean": "rm -rf build",
"build": "npm run build:clean && npx @11ty/eleventy",
"ci:lint:markup": "w3c-html-validator \"build\" '--ignore=/“sizes” attribute must also be specified/'",
"ci:lint:markup": "w3c-html-validator \"build\" --ignore-config=.w3c-validator",
"ci:lint:html": "npx @linthtml/linthtml \"build/**/*.html\"",
"ci:lint:bem": "bemlint \"build/**/*.html\" --errors",
"ci:lint:css": "stylelint \"src/**/*.css\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs: # list of things to do
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${ { env.NODE_VERSION } }
- name: Code Checkout
uses: actions/checkout@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Now, we need to add additional steps that include checking for updated/new rules
uses: tj-actions/changed-files@v42

- name: Lint JS with Enhanced Rules
run: npx eslint --config eslint.enhanced.config.js ${{ steps.changed-files.outputs.added_files }}
run: npx eslint --config eslint.enhanced.config.js ${ { steps.changed-files.outputs.added_files } }
```
We need to add two additional steps. The first one is to retrieve all new files, and the second one is to run the enhanced config only on the new files. In this example the third-party GitHub Action called [changed-files](https://github.com/tj-actions/changed-files) is used to obtain the new files. In the [GitHub Marketplace for Actions](https://github.com/marketplace?type=actions), there is a considerable number of similar actions with similar functionality. You can choose the one that suits you best, as the functionality is more or less the same for all of them.
Expand Down

0 comments on commit 8a7fa41

Please sign in to comment.