7b831d5bc4
- Installe vitest@4 + @vitest/coverage-v8 (40 tests, 0 échec) - lib/__tests__/format.test.js : 14 tests (formatKonstitisyon, formatDate, hasRestrictedChar) - lib/__tests__/version-utils.test.js : 17 tests (filterVersions par texte/auteur/date, getFilterStats) - lib/__tests__/rate-limit.test.js : 9 tests avec fake timers (limite, reset, retryAfter, keys indépendantes) - vitest.config.mjs : environnement node, imports explicites (pas de globals) - package.json : scripts test / test:watch / test:coverage + override XO pour les fichiers de test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70 lines
1.6 KiB
JSON
70 lines
1.6 KiB
JSON
{
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "xo",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage"
|
|
},
|
|
"dependencies": {
|
|
"@directus/sdk": "^20.3.0",
|
|
"@emotion/cache": "^11.14.0",
|
|
"@emotion/react": "^11.14.0",
|
|
"@emotion/styled": "^11.14.1",
|
|
"@fontsource/roboto": "^5.2.9",
|
|
"@mui/icons-material": "^7.3.6",
|
|
"@mui/lab": "^7.0.1-beta.20",
|
|
"@mui/material": "^7.3.6",
|
|
"@mui/material-nextjs": "^7.3.6",
|
|
"@uiw/react-md-editor": "^4.0.11",
|
|
"date-fns": "^4.1.0",
|
|
"html2canvas": "^1.4.1",
|
|
"jspdf": "^4.0.0",
|
|
"marked": "^17.0.1",
|
|
"next": "^16.1.0",
|
|
"next-auth": "^5.0.0-beta.30",
|
|
"react": "^19.2.3",
|
|
"react-dom": "^19.2.3",
|
|
"react-virtuoso": "^4.18.1",
|
|
"use-debounce": "^10.0.5"
|
|
},
|
|
"devDependencies": {
|
|
"@vitest/coverage-v8": "^4.1.4",
|
|
"eslint-config-xo-nextjs": "^6.0.0",
|
|
"vitest": "^4.1.4",
|
|
"xo": "^0.58.0"
|
|
},
|
|
"xo": {
|
|
"extends": "xo-nextjs",
|
|
"semicolon": false,
|
|
"space": 2,
|
|
"envs": [
|
|
"browser",
|
|
"es2020"
|
|
],
|
|
"rules": {
|
|
"react/function-component-definition": [
|
|
"error",
|
|
{
|
|
"namedComponents": "function-declaration"
|
|
}
|
|
],
|
|
"n/prefer-global/process": "off",
|
|
"comma-dangle": "off",
|
|
"unicorn/prevent-abbreviations": "off"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": "lib/__tests__/**/*.js",
|
|
"envs": ["node", "es2020"],
|
|
"rules": {
|
|
"camelcase": ["error", {"properties": "never"}],
|
|
"capitalized-comments": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|