Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/shared-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Shared quality configuration

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
configuration:
runs-on: ubuntu-latest
env:
POLICY_REF: c63c2e8c2ba7e11502934a52ad2ce3734e804cdc
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 22
- run: npm ci --ignore-scripts
- name: Install the exact shared audit provider
run: |
git init --quiet "$RUNNER_TEMP/quality-policy"
git -C "$RUNNER_TEMP/quality-policy" remote add origin https://github.com/cordisx/cordisxmono.git
git -C "$RUNNER_TEMP/quality-policy" fetch --depth=1 origin "$POLICY_REF"
git -C "$RUNNER_TEMP/quality-policy" checkout --quiet --detach FETCH_HEAD
test "$(git -C "$RUNNER_TEMP/quality-policy" rev-parse HEAD)" = "$POLICY_REF"
npm --prefix "$RUNNER_TEMP/quality-policy" ci --ignore-scripts
- name: Check effective configuration and tracked file coverage
run: >-
node "$RUNNER_TEMP/quality-policy/scripts/check-quality.mjs"
--repo "$GITHUB_WORKSPACE" --profile next
--policy-root "$RUNNER_TEMP/quality-policy" --policy-ref "$POLICY_REF"
--json > "$RUNNER_TEMP/quality-consumption.json"
- name: Enforce full-source lint
run: npm run --silent lint:source -- --format json --output-file "$RUNNER_TEMP/source-lint.json"
- uses: actions/upload-artifact@v4
if: always()
with:
name: quality-results
path: |
${{ runner.temp }}/quality-consumption.json
${{ runner.temp }}/source-lint.json
if-no-files-found: warn
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@
- Choose validation from the affected component's `package.json`. For a
documentation-only change, check the diff and local links; report those
checks separately from build, runtime, or live-app verification.

## Shared quality configuration

The local dprint and ESLint entry points consume an exact formal
[Mono quality configuration](https://github.com/cordisx/cordisxmono/blob/c63c2e8c2ba7e11502934a52ad2ce3734e804cdc/.agents/docs/quality-tooling.md).
The Shared quality configuration CI job checks the installed configuration and
tracked-file coverage; inspect its report for excluded paths.
`npm run lint:source` runs the full source policy as a blocking CI step.
Configuration coverage and full-source lint are separate checks.
Update the dependency, lock, formatter reference and CI provider SHA together.
24 changes: 6 additions & 18 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
{
"indentWidth": 2,
"newLineKind": "lf",
"typescript": {
"quoteStyle": "preferSingle",
"jsx.quoteStyle": "preferDouble",
"semiColons": "always",
"module.sortImportDeclarations": "maintain",
"module.sortExportDeclarations": "maintain"
},
"markdown": {
"textWrap": "maintain"
},
"includes": [
"**/*.{ts,tsx,js,jsx,mjs,cjs,json,md}"
"**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,json,md}"
],
"excludes": [
"**/node_modules/**",
Expand All @@ -32,9 +20,9 @@
"plugin/src/assets/portraits/generated.ts",
"drizzle/meta/*.json"
],
"plugins": [
"npm:@dprint/typescript@0.96.1",
"npm:@dprint/json@0.23.0",
"npm:@dprint/markdown@0.23.3"
]
"extends": "https://raw.githubusercontent.com/cordisx/cordisxmono/c63c2e8c2ba7e11502934a52ad2ce3734e804cdc/tooling/quality/dprint/code.json",
"typescript": {
"jsx.quoteStyle": "preferDouble",
"semiColons": "always"
}
}
20 changes: 19 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
import { defineConfig, globalIgnores } from 'eslint/config';
import sourcePolicy from '@cordisx/eslint-config';
import nextVitals from 'eslint-config-next/core-web-vitals';
import nextTs from 'eslint-config-next/typescript';

const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
globalIgnores(['.next/**', 'out/**', 'build/**', 'next-env.d.ts']),
// Build outputs and the same verified generated artifacts excluded by dprint.
globalIgnores([
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'**/coverage/**',
'**/.cache/**',
'.next/**',
'.vinext/**',
'out/**',
'.wrangler/**',
'outputs/**',
'work/**',
'next-env.d.ts',
'plugin/src/assets/identity/generated.ts',
'plugin/src/assets/portraits/generated.ts',
]),
{ files: ['**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'], extends: [sourcePolicy] },
]);

export default eslintConfig;
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"start": "vinext start",
"lint": "eslint . --ignore-pattern dist --ignore-pattern .next",
"format": "dprint fmt",
"format:check": "dprint check"
"format:check": "dprint check",
"lint:source": "eslint ."
},
"dependencies": {
"drizzle-orm": "^0.45.2",
Expand All @@ -39,7 +40,8 @@
"vinext": "1.0.0-beta.3",
"vite": "8.0.13",
"wrangler": "4.92.0",
"dprint": "0.57.1"
"dprint": "0.57.1",
"@cordisx/eslint-config": "github:cordisx/cordisxmono#c63c2e8c2ba7e11502934a52ad2ce3734e804cdc"
},
"type": "module"
}
Loading