Skip to content

Commit cf99522

Browse files
chore: add yaml linter (#285)
* add yaml linter, fix markdown linter, fix lint errors * cleanup * add missing dependencies reported by knip * group order, add comment * replace legacy setting * revert fixes for other issues * sort yaml keys alphabetically * update eslintignore, fix lint issues with json files * Standardized newlines in .yml files --------- Co-authored-by: Josh Goldberg <[email protected]>
1 parent 61176d0 commit cf99522

24 files changed

+203
-140
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
!.*
12
coverage
23
lib
4+
node_modules
5+
pnpm-lock.yaml

.eslintrc.cjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,27 @@ module.exports = {
4848
"@typescript-eslint/no-unsafe-call": "off",
4949
},
5050
},
51+
{
52+
files: ["**/*.{yml,yaml}"],
53+
parser: "yaml-eslint-parser",
54+
extends: ["plugin:yml/base", "plugin:yml/prettier"],
55+
rules: {
56+
"yml/sort-keys": [
57+
"error",
58+
{
59+
order: { type: "asc" },
60+
pathPattern: "^.*$",
61+
},
62+
],
63+
"yml/sort-sequence-values": [
64+
"error",
65+
{
66+
order: { type: "asc" },
67+
pathPattern: "^.*$",
68+
},
69+
],
70+
},
71+
},
5172
],
5273
parser: "@typescript-eslint/parser",
5374
plugins: [

.github/ISSUE_TEMPLATE/01-bug.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
name: "🐛 Report a Bug"
2-
description: "Report a bug trying to run the code."
3-
title: "🐛 Bug: <short description of the bug>"
4-
labels:
5-
- "type: bug"
61
body:
72
- attributes:
83
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
@@ -28,6 +23,11 @@ body:
2823
validations:
2924
required: true
3025
- attributes:
31-
label: Additional Info
3226
description: Any additional info you'd like to provide.
27+
label: Additional Info
3328
type: textarea
29+
description: "Report a bug trying to run the code."
30+
labels:
31+
- "type: bug"
32+
name: "🐛 Report a Bug"
33+
title: "🐛 Bug: <short description of the bug>"

.github/ISSUE_TEMPLATE/02-documentation.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
name: "📝 Documentation"
2-
description: "Report a typo or missing area of documentation"
3-
title: "📝 Documentation: <short description of the request>"
4-
labels:
5-
- "area: documentation"
61
body:
72
- attributes:
83
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
@@ -20,6 +15,11 @@ body:
2015
validations:
2116
required: true
2217
- attributes:
23-
label: Additional Info
2418
description: Any additional info you'd like to provide.
19+
label: Additional Info
2520
type: textarea
21+
description: "Report a typo or missing area of documentation"
22+
labels:
23+
- "area: documentation"
24+
name: "📝 Documentation"
25+
title: "📝 Documentation: <short description of the request>"

.github/ISSUE_TEMPLATE/03-feature.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
name: "🚀 Request a Feature"
2-
description: "Request that a new feature be added or an existing feature improved"
3-
title: "🚀 Feature: <short description of the feature>"
4-
labels:
5-
- "type: feature"
61
body:
72
- attributes:
83
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
@@ -22,6 +17,11 @@ body:
2217
validations:
2318
required: true
2419
- attributes:
25-
label: Additional Info
2620
description: Any additional info you'd like to provide.
21+
label: Additional Info
2722
type: textarea
23+
description: "Request that a new feature be added or an existing feature improved"
24+
labels:
25+
- "type: feature"
26+
name: "🚀 Request a Feature"
27+
title: "🚀 Feature: <short description of the feature>"

.github/ISSUE_TEMPLATE/04-tooling.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
name: "🛠 Tooling"
2-
description: "Report a bug or request an enhancement in repository tooling"
3-
title: "🛠 Tooling: <short description of the change>"
4-
labels:
5-
- "area: tooling"
61
body:
72
- attributes:
83
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
@@ -22,6 +17,11 @@ body:
2217
validations:
2318
required: true
2419
- attributes:
25-
label: Additional Info
2620
description: Any additional info you'd like to provide.
21+
label: Additional Info
2722
type: textarea
23+
description: "Report a bug or request an enhancement in repository tooling"
24+
labels:
25+
- "area: tooling"
26+
name: "🛠 Tooling"
27+
title: "🛠 Tooling: <short description of the change>"

.github/actions/prepare/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Prepare
21
description: Prepares the repo for a typical CI job
32

3+
name: Prepare
44
runs:
5-
using: "composite"
65
steps:
76
- uses: pnpm/action-setup@v2
87
- uses: actions/setup-node@v3
98
with:
10-
node-version: "18"
119
cache: "pnpm"
10+
node-version: "18"
1211
- run: pnpm install --frozen-lockfile
1312
shell: bash
13+
using: "composite"

.github/workflows/build.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: Build
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
91
jobs:
102
build:
113
runs-on: ubuntu-latest
124
steps:
135
- uses: actions/checkout@v3
146
- uses: ./.github/actions/prepare
157
- run: pnpm build
8+
9+
name: Build
10+
11+
on:
12+
pull_request:
13+
14+
push:
15+
branches:
16+
- main

.github/workflows/compliance.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
name: Compliance
2-
3-
on:
4-
pull_request:
5-
branches:
6-
- main
7-
types:
8-
- edited
9-
- opened
10-
- reopened
11-
- synchronize
12-
131
jobs:
142
compliance:
153
runs-on: ubuntu-latest
@@ -22,3 +10,15 @@ jobs:
2210
renovate
2311
renovate[bot]
2412
ignore-team-members: false
13+
14+
name: Compliance
15+
16+
on:
17+
pull_request:
18+
branches:
19+
- main
20+
types:
21+
- edited
22+
- opened
23+
- reopened
24+
- synchronize

.github/workflows/knip.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: Lint Knip
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
91
jobs:
102
knip:
113
runs-on: ubuntu-latest
124
steps:
135
- uses: actions/checkout@v3
146
- uses: ./.github/actions/prepare
157
- run: pnpm lint:knip
8+
9+
name: Lint Knip
10+
11+
on:
12+
pull_request:
13+
14+
push:
15+
branches:
16+
- main

0 commit comments

Comments
 (0)