Skip to content

Commit 3d8a0c6

Browse files
committed
Update linter configs and enable CSS linting
Consolidate and tighten linting configuration: remove .eslintignore and .stylelintignore and move patterns into .eslintrc.json (ignorePatterns) and stylelint.config.mjs (ignoreFiles). Enable/enforce CSS linting in the super-linter workflow (add npm ci, set CSS_FILE_NAME, skip dependabot runs). Bump stylelint in package.json to 17.5.0. Add "svg" dictionary to cspell and enable additional htmlhint rules (button-type, frame-title, main-require, tag-no-obsolete).
1 parent 22af75d commit 3d8a0c6

10 files changed

Lines changed: 60 additions & 194 deletions

File tree

.cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"version": "0.2",
3+
"dictionaries": ["svg"],
34
"words": [
45
"clangd",
56
"CODEOWNERS",

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
"extends": [
1313
"prettier"
1414
],
15+
"ignorePatterns": [
16+
"*.min.js",
17+
"*.html",
18+
"*.json",
19+
"build/*",
20+
"node_modules/*",
21+
"public/*",
22+
"resources/*"
23+
],
1524
"rules": {
1625
"curly": 0,
1726
"no-invalid-this": 0,

.github/workflows/spellcheck.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: "Check spelling"
23
on:
34
pull_request:

.github/workflows/super-linter.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
statuses: write # for github/super-linter/slim to mark status of each linter run
2020
name: Lint Code Base
2121
runs-on: ubuntu-latest
22+
if: ${{ github.actor != 'dependabot[bot]' }}
2223

2324
steps:
2425
- name: Checkout Code
@@ -27,9 +28,13 @@ jobs:
2728
fetch-depth: 0
2829
persist-credentials: false
2930

31+
- name: Install npm dependencies
32+
run: npm ci
33+
3034
- name: Lint Code Base
3135
uses: super-linter/super-linter/slim@61abc07d755095a68f4987d1c2c3d1d64408f1f9 # v8.5.0
3236
env:
37+
CSS_FILE_NAME: "stylelint.config.mjs"
3338
DEFAULT_BRANCH: main
3439
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3540
LINTER_RULES_PATH: /
@@ -40,7 +45,6 @@ jobs:
4045
VALIDATE_BIOME_FORMAT: false
4146
VALIDATE_BIOME_LINT: false
4247
VALIDATE_CHECKOV: false
43-
VALIDATE_CSS: false
4448
VALIDATE_EDITORCONFIG: false
4549
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
4650
VALIDATE_HTML: false

.htmlhintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
"attr-unsafe-chars": true,
66
"attr-value-double-quotes": false,
77
"attr-value-not-empty": false,
8+
"button-type-require": true,
89
"doctype-first": false,
910
"doctype-html5": true,
11+
"frame-title-require": true,
1012
"head-script-disabled": false,
1113
"href-abs-or-rel": false,
1214
"html-lang-require": true,
@@ -15,9 +17,11 @@
1517
"id-unique": false,
1618
"inline-script-disabled": false,
1719
"inline-style-disabled": false,
20+
"main-require": true,
1821
"spec-char-escape": false,
1922
"src-not-empty": true,
2023
"style-disabled": false,
24+
"tag-no-obsolete": true,
2125
"tag-pair": false,
2226
"tag-self-close": false,
2327
"tagname-lowercase": true,

.stylelintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)