re-add workflow that was accidentally removed
This commit is contained in:
parent
db7a1b7ef4
commit
efa7be4956
1 changed files with 56 additions and 0 deletions
56
.forgejo/workflows/lint.yml
Normal file
56
.forgejo/workflows/lint.yml
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint-debian:
|
||||
runs-on: debian-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Linters
|
||||
run: npm install -g htmlhint stylelint stylelint-config-standard eslint
|
||||
- name: HTML
|
||||
run: htmlhint "**/*.html" --ignore "assets/**"
|
||||
- name: CSS
|
||||
run: |
|
||||
echo '{
|
||||
"extends": "stylelint-config-standard",
|
||||
"rules": {
|
||||
"no-duplicate-selectors": null,
|
||||
"no-descending-specificity": null,
|
||||
"declaration-block-no-shorthand-property-overrides": null,
|
||||
"font-family-no-duplicate-names": null,
|
||||
"selector-class-pattern": null,
|
||||
"selector-id-pattern": null,
|
||||
"keyframes-name-pattern": null,
|
||||
"declaration-block-single-line-max-declarations": null,
|
||||
"property-no-unknown": null,
|
||||
"declaration-property-value-no-unknown": null
|
||||
}
|
||||
}' > .stylelintrc.json
|
||||
stylelint "**/*.css" --allow-empty-input --fix || stylelint "**/*.css" --allow-empty-input
|
||||
- name: JS
|
||||
run: |
|
||||
echo "export default [
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
window: 'readonly',
|
||||
document: 'readonly',
|
||||
navigator: 'readonly',
|
||||
location: 'readonly',
|
||||
history: 'readonly',
|
||||
localStorage: 'readonly',
|
||||
fetch: 'readonly'
|
||||
}
|
||||
},
|
||||
rules: {
|
||||
'semi': ['error', 'always'],
|
||||
'no-console': 'off'
|
||||
}
|
||||
}
|
||||
];" > eslint.config.mjs
|
||||
npx eslint . --fix || npx eslint .
|
||||
Loading…
Reference in a new issue