Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: 📦 Install dependencies
run: pnpm install

- name: 🎨 Check for non-RTL/non-a11y CSS classes
run: pnpm lint:css

- name: 🌐 Compare translations
run: pnpm i18n:check

Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
run: pnpm install

- name: 🧪 Unit tests
run: pnpm test:unit run --coverage --reporter=junit --outputFile=test-report.junit.xml
run: pnpm test:unit run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml

- name: ⬆︎ Upload test results to Codecov
if: ${{ !cancelled() }}
Expand Down Expand Up @@ -115,13 +115,14 @@ jobs:
run: pnpm playwright install chromium-headless-shell

- name: 🧪 Component tests
run: pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
run: pnpm test:nuxt run --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml

- name: ⬆︎ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
- name: ⬆︎ Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: ⬆︎ Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
Expand Down Expand Up @@ -183,7 +184,7 @@ jobs:
run: pnpm build:test

- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
run: ./scripts/lighthouse-a11y.sh
run: pnpm test:a11y:prebuilt
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
Expand Down Expand Up @@ -234,3 +235,8 @@ jobs:

- name: 🌐 Check for missing or dynamic i18n keys
run: pnpm i18n:report

- name: 🌐 Check i18n schema is up to date
run: |
pnpm i18n:schema
git diff --exit-code i18n/schema.json
37 changes: 37 additions & 0 deletions .github/workflows/mirror-tangled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: mirror

on:
push:
branches:
- main
tags:
- '*'

permissions:
contents: read

jobs:
mirror:
name: 🕸️ Mirror to Tangled
if: ${{ github.repository == 'npmx-dev/npmx.dev' }}
runs-on: ubuntu-24.04-arm

steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0

- name: 🔑 Configure SSH
env:
TANGLED_SSH_KEY: ${{ secrets.TANGLED_SSH_KEY }}
run: |
mkdir -p ~/.ssh
echo "$TANGLED_SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -t ed25519 tangled.org >> ~/.ssh/known_hosts 2>/dev/null

- name: ⬆︎ Push to Tangled
run: |
git remote add tangled git@tangled.org:npmx.dev/npmx.dev
git push tangled main --force
git push tangled --tags --force
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ test-results/

# generated files
shared/types/lexicons
file-tree-sprite.svg

**/__screenshots__/**

# output
.vercel
12 changes: 8 additions & 4 deletions .lighthouserc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ module.exports = {
chromePath: findChrome(),
puppeteerScript: './lighthouse-setup.cjs',
settings: {
onlyCategories: ['accessibility'],
onlyCategories: process.env.LH_PERF ? ['performance'] : ['accessibility'],
skipAudits: ['valid-source-maps'],
},
},
assert: {
assertions: {
'categories:accessibility': ['error', { minScore: 1 }],
},
assertions: process.env.LH_PERF
? {
'cumulative-layout-shift': ['error', { maxNumericValue: 0 }],
}
: {
'categories:accessibility': ['error', { minScore: 1 }],
},
},
upload: {
target: 'temporary-public-storage',
Expand Down
2 changes: 1 addition & 1 deletion .nuxtrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
setups.@nuxt/test-utils="3.23.0"
setups.@nuxt/test-utils="4.0.0"
2 changes: 0 additions & 2 deletions .oxfmtignore

This file was deleted.

69 changes: 67 additions & 2 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/oxlint/configuration_schema.json",
"plugins": ["unicorn", "typescript", "oxc", "vue", "vitest"],
"jsPlugins": ["@e18e/eslint-plugin"],
"jsPlugins": ["@e18e/eslint-plugin", "eslint-plugin-regexp"],
"categories": {
"correctness": "error",
"suspicious": "warn",
Expand All @@ -17,7 +17,72 @@
"e18e/prefer-timer-args": "error",
"e18e/prefer-date-now": "error",
"e18e/prefer-regex-test": "error",
"e18e/prefer-array-some": "error"
"e18e/prefer-array-some": "error",
// RegExp - Possible Errors (most critical)
"regexp/no-contradiction-with-assertion": "error",
"regexp/no-dupe-disjunctions": "error",
"regexp/no-empty-alternative": "error",
"regexp/no-empty-capturing-group": "error",
"regexp/no-empty-character-class": "error",
"regexp/no-empty-group": "error",
"regexp/no-empty-lookarounds-assertion": "error",
"regexp/no-escape-backspace": "error",
"regexp/no-invalid-regexp": "error",
"regexp/no-lazy-ends": "error",
"regexp/no-misleading-capturing-group": "error",
"regexp/no-misleading-unicode-character": "error",
"regexp/no-missing-g-flag": "error",
"regexp/no-optional-assertion": "error",
"regexp/no-potentially-useless-backreference": "error",
"regexp/no-super-linear-backtracking": "error",
"regexp/no-useless-assertions": "error",
"regexp/no-useless-backreference": "error",
"regexp/no-useless-dollar-replacements": "error",
"regexp/strict": "error",
// RegExp - Best Practices
"regexp/confusing-quantifier": "warn",
"regexp/control-character-escape": "error",
"regexp/negation": "error",
"regexp/no-dupe-characters-character-class": "error",
"regexp/no-empty-string-literal": "error",
"regexp/no-extra-lookaround-assertions": "error",
"regexp/no-invisible-character": "error",
"regexp/no-legacy-features": "error",
"regexp/no-non-standard-flag": "error",
"regexp/no-obscure-range": "error",
"regexp/no-octal": "error",
"regexp/no-standalone-backslash": "error",
"regexp/no-trivially-nested-assertion": "error",
"regexp/no-trivially-nested-quantifier": "error",
"regexp/no-unused-capturing-group": "warn",
"regexp/no-useless-character-class": "error",
"regexp/no-useless-flag": "error",
"regexp/no-useless-lazy": "error",
"regexp/no-useless-quantifier": "error",
"regexp/no-useless-range": "error",
"regexp/no-useless-set-operand": "error",
"regexp/no-useless-string-literal": "error",
"regexp/no-useless-two-nums-quantifier": "error",
"regexp/no-zero-quantifier": "error",
"regexp/optimal-lookaround-quantifier": "warn",
"regexp/optimal-quantifier-concatenation": "error",
"regexp/prefer-predefined-assertion": "error",
"regexp/prefer-range": "error",
"regexp/prefer-set-operation": "error",
"regexp/simplify-set-operations": "error",
"regexp/use-ignore-case": "error",
// RegExp - Stylistic Issues (less critical, focused on consistency)
"regexp/match-any": "warn",
"regexp/no-useless-escape": "warn",
"regexp/no-useless-non-capturing-group": "warn",
"regexp/prefer-character-class": "warn",
"regexp/prefer-d": "warn",
"regexp/prefer-plus-quantifier": "warn",
"regexp/prefer-question-quantifier": "warn",
"regexp/prefer-star-quantifier": "warn",
"regexp/prefer-unicode-codepoint-escapes": "warn",
"regexp/prefer-w": "warn",
"regexp/sort-flags": "warn"
},
"overrides": [
{
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"i18n-ally.localesPaths": ["./i18n/locales"],
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"i18n-ally.keystyle": "nested",
"i18n-ally.localesPaths": ["./i18n/locales"],
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading
Loading