Skip to content

Commit ea683a6

Browse files
committed
wip
1 parent 8fa2405 commit ea683a6

File tree

269 files changed

+17907
-7464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

269 files changed

+17907
-7464
lines changed

.github/workflows/autofix.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- name: 📦 Install dependencies
3333
run: pnpm install
3434

35+
- name: 🎨 Check for non-RTL CSS classes
36+
run: pnpm rtl:check
37+
3538
- name: 🌐 Compare translations
3639
run: pnpm i18n:check
3740

.github/workflows/ci.yml

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,14 @@ jobs:
3333

3434
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
3535
name: 🟧 Install pnpm
36-
# pnpm cache skipped deliberately as the project is not actually installed here
36+
with:
37+
cache: true
38+
39+
- name: 📦 Install dependencies (root only, no scripts)
40+
run: pnpm install --filter . --ignore-scripts
3741

3842
- name: 🔠 Lint project
39-
run: node scripts/lint.ts
43+
run: pnpm lint
4044

4145
types:
4246
name: 💪 Type check
@@ -113,11 +117,12 @@ jobs:
113117
- name: 🧪 Component tests
114118
run: pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
115119

116-
- name: ⬆︎ Upload test results to Codecov
117-
if: ${{ !cancelled() }}
118-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
120+
- name: ⬆︎ Upload coverage reports to Codecov
121+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
119122
with:
120-
token: ${{ secrets.CODECOV_TOKEN }}
123+
report_type: test_results
124+
env:
125+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
121126

122127
- name: ⬆︎ Upload coverage reports to Codecov
123128
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
@@ -146,7 +151,9 @@ jobs:
146151
run: pnpm install
147152

148153
- name: 🏗️ Build project
149-
run: pnpm build:playwright
154+
run: pnpm build:test
155+
env:
156+
VALIDATE_HTML: true
150157

151158
- name: 🖥️ Test project (browser)
152159
run: pnpm test:browser:prebuilt
@@ -174,10 +181,10 @@ jobs:
174181
run: pnpm install
175182

176183
- name: 🏗️ Build project
177-
run: NODE_ENV=test pnpm build
184+
run: pnpm build:test
178185

179186
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
180-
run: ./scripts/lighthouse-a11y.sh
187+
run: pnpm test:a11y:prebuilt
181188
env:
182189
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
183190
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
@@ -206,3 +213,25 @@ jobs:
206213

207214
- name: 🧹 Check for unused production code
208215
run: pnpm knip --production
216+
217+
i18n:
218+
name: 🌐 i18n validation
219+
runs-on: ubuntu-24.04-arm
220+
221+
steps:
222+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
223+
224+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
225+
with:
226+
node-version: lts/*
227+
228+
- uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
229+
name: 🟧 Install pnpm
230+
with:
231+
cache: true
232+
233+
- name: 📦 Install dependencies (root only, no scripts)
234+
run: pnpm install --filter . --ignore-scripts
235+
236+
- name: 🌐 Check for missing or dynamic i18n keys
237+
run: pnpm i18n:report

.github/workflows/welcome.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: welcome
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- closed
7+
8+
permissions: {}
9+
10+
jobs:
11+
welcome:
12+
permissions:
13+
pull-requests: write # to comment on PRs
14+
if: github.repository == 'npmx-dev/npmx.dev' && github.event.pull_request.merged == true
15+
runs-on: ubuntu-slim
16+
name: 🎉 Welcome new contributor
17+
steps:
18+
- name: 🎉 Welcome new contributor
19+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
20+
with:
21+
script: |
22+
const pr = context.payload.pull_request;
23+
const author = pr.user.login;
24+
25+
// Check if this is the author's first merged PR
26+
const { data: prs } = await github.rest.search.issuesAndPullRequests({
27+
q: `repo:${context.repo.owner}/${context.repo.repo} type:pr is:merged author:${author}`,
28+
});
29+
30+
// If the only merged PR is this one, it's their first contribution
31+
if (prs.total_count !== 1) {
32+
console.log(`@${author} already has ${prs.total_count} merged PRs — skipping welcome comment.`);
33+
return;
34+
}
35+
36+
const emojis = ['🎉', '🥳', '🎊', '🚀', '⭐', '💫', '✨', '💪', '👏', '🙌', '🤩', '💥'];
37+
const emoji = emojis[Math.floor(Math.random() * emojis.length)];
38+
39+
const body = [
40+
`Thanks for your first contribution, @${author}! ${emoji}`,
41+
'',
42+
`We'd love to welcome you to the npmx community. Come and say hi on [Discord](https://chat.npmx.dev)! And once you've joined, visit [npmx.wamellow.com](https://npmx.wamellow.com/) to claim the **contributor** role.`,
43+
].join('\n');
44+
45+
await github.rest.issues.createComment({
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
issue_number: pr.number,
49+
body,
50+
});
51+
52+
console.log(`Welcomed new contributor @${author} on PR #${pr.number}`);

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,8 @@ test-results/
4040

4141
# generated files
4242
shared/types/lexicons
43+
44+
**/__screenshots__/**
45+
46+
# output
47+
.vercel

.nuxtrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
setups.@nuxt/test-utils="3.23.0"
1+
setups.@nuxt/test-utils="4.0.0"

.oxlintrc.json

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
33
"plugins": ["unicorn", "typescript", "oxc", "vue", "vitest"],
4+
"jsPlugins": ["@e18e/eslint-plugin", "eslint-plugin-regexp"],
45
"categories": {
56
"correctness": "error",
67
"suspicious": "warn",
@@ -11,8 +12,92 @@
1112
"no-await-in-loop": "off",
1213
"unicorn/no-array-sort": "off",
1314
"no-restricted-globals": "error",
14-
"typescript/consistent-type-imports": "error"
15+
"typescript/consistent-type-imports": "error",
16+
"e18e/prefer-array-from-map": "error",
17+
"e18e/prefer-timer-args": "error",
18+
"e18e/prefer-date-now": "error",
19+
"e18e/prefer-regex-test": "error",
20+
"e18e/prefer-array-some": "error",
21+
// RegExp - Possible Errors (most critical)
22+
"regexp/no-contradiction-with-assertion": "error",
23+
"regexp/no-dupe-disjunctions": "error",
24+
"regexp/no-empty-alternative": "error",
25+
"regexp/no-empty-capturing-group": "error",
26+
"regexp/no-empty-character-class": "error",
27+
"regexp/no-empty-group": "error",
28+
"regexp/no-empty-lookarounds-assertion": "error",
29+
"regexp/no-escape-backspace": "error",
30+
"regexp/no-invalid-regexp": "error",
31+
"regexp/no-lazy-ends": "error",
32+
"regexp/no-misleading-capturing-group": "error",
33+
"regexp/no-misleading-unicode-character": "error",
34+
"regexp/no-missing-g-flag": "error",
35+
"regexp/no-optional-assertion": "error",
36+
"regexp/no-potentially-useless-backreference": "error",
37+
"regexp/no-super-linear-backtracking": "error",
38+
"regexp/no-useless-assertions": "error",
39+
"regexp/no-useless-backreference": "error",
40+
"regexp/no-useless-dollar-replacements": "error",
41+
"regexp/strict": "error",
42+
// RegExp - Best Practices
43+
"regexp/confusing-quantifier": "warn",
44+
"regexp/control-character-escape": "error",
45+
"regexp/negation": "error",
46+
"regexp/no-dupe-characters-character-class": "error",
47+
"regexp/no-empty-string-literal": "error",
48+
"regexp/no-extra-lookaround-assertions": "error",
49+
"regexp/no-invisible-character": "error",
50+
"regexp/no-legacy-features": "error",
51+
"regexp/no-non-standard-flag": "error",
52+
"regexp/no-obscure-range": "error",
53+
"regexp/no-octal": "error",
54+
"regexp/no-standalone-backslash": "error",
55+
"regexp/no-trivially-nested-assertion": "error",
56+
"regexp/no-trivially-nested-quantifier": "error",
57+
"regexp/no-unused-capturing-group": "warn",
58+
"regexp/no-useless-character-class": "error",
59+
"regexp/no-useless-flag": "error",
60+
"regexp/no-useless-lazy": "error",
61+
"regexp/no-useless-quantifier": "error",
62+
"regexp/no-useless-range": "error",
63+
"regexp/no-useless-set-operand": "error",
64+
"regexp/no-useless-string-literal": "error",
65+
"regexp/no-useless-two-nums-quantifier": "error",
66+
"regexp/no-zero-quantifier": "error",
67+
"regexp/optimal-lookaround-quantifier": "warn",
68+
"regexp/optimal-quantifier-concatenation": "error",
69+
"regexp/prefer-predefined-assertion": "error",
70+
"regexp/prefer-range": "error",
71+
"regexp/prefer-set-operation": "error",
72+
"regexp/simplify-set-operations": "error",
73+
"regexp/use-ignore-case": "error",
74+
// RegExp - Stylistic Issues (less critical, focused on consistency)
75+
"regexp/match-any": "warn",
76+
"regexp/no-useless-escape": "warn",
77+
"regexp/no-useless-non-capturing-group": "warn",
78+
"regexp/prefer-character-class": "warn",
79+
"regexp/prefer-d": "warn",
80+
"regexp/prefer-plus-quantifier": "warn",
81+
"regexp/prefer-question-quantifier": "warn",
82+
"regexp/prefer-star-quantifier": "warn",
83+
"regexp/prefer-unicode-codepoint-escapes": "warn",
84+
"regexp/prefer-w": "warn",
85+
"regexp/sort-flags": "warn"
1586
},
87+
"overrides": [
88+
{
89+
"files": [
90+
"server/**/*",
91+
"cli/**/*",
92+
"scripts/**/*",
93+
"modules/**/*",
94+
"app/components/OgImage/*"
95+
],
96+
"rules": {
97+
"no-console": "off"
98+
}
99+
}
100+
],
16101
"ignorePatterns": [
17102
".output/**",
18103
".data/**",

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"editor.formatOnSave": true,
4+
"i18n-ally.keystyle": "nested",
25
"i18n-ally.localesPaths": ["./i18n/locales"],
3-
"i18n-ally.keystyle": "nested"
6+
"typescript.tsdk": "node_modules/typescript/lib"
47
}

0 commit comments

Comments
 (0)