1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-12-16 01:10:30 +02:00

Fix PowerShell support and svglint script not being executed (#10733)

This commit is contained in:
Álvaro Mondéjar Rubio 2024-03-29 17:06:38 +01:00 committed by GitHub
parent 601e6ffc9d
commit 1d68b61570
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 4 deletions

View File

@ -45,7 +45,9 @@ jobs:
- name: Install dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Run linter
run: npm run lint --icons='${{ steps.changes.outputs.icons_files }}'
run: |
sed -i 's/icons\/\*\.svg/$npm_config_icons/' package.json
npm run lint --icons='${{ steps.changes.outputs.icons_files }}'
env:
# Authorise GitHub API requests for editorconfig-checker
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
.npmrc
View File

@ -1,5 +1,5 @@
package-lock=false
save-exact=true
# Icons to lint with SVGLint (see `npm run svglint`)
# Icons to lint with SVGLint on CI (see `lint` step on verify.yml workflow)
icons=icons/*.svg

View File

@ -115,7 +115,7 @@
"prettierlint": "prettier --cache --check --ignore-unknown \"**/*.!(js|jsx|mjs|cjs|ts|tsx|mts|cts|svg)\"",
"jslint": "xo",
"jsonlint": "./scripts/lint/jsonlint.js",
"svglint": "svglint --ci $npm_config_icons --config svglint.config.mjs",
"svglint": "svglint --ci --config svglint.config.mjs icons/*.svg",
"wslint": "editorconfig-checker",
"prepare": "husky",
"prepublishOnly": "npm run build",

View File

@ -180,7 +180,7 @@ const ignoreIcon = (linterName, path, $) => {
iconIgnored[linterName][path] = iconName;
};
export const config = {
const config = {
rules: {
elm: {
svg: 1,
@ -1023,3 +1023,5 @@ export const config = {
],
},
};
export default config;