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
16 changes: 16 additions & 0 deletions .configs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"useTabs": true,
"tabWidth": 2,
"printWidth": 140,
"trailingComma": "none",
"quoteProps": "preserve",
"bracketSpacing": true,
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "preserve"
}
}
]
}
102 changes: 102 additions & 0 deletions .configs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/**
* @fileoverview ESLint flat configuration for @cldmv/vitest-runner.
* @module vitest-runner/.configs/eslint.config
*
* @description
* Mirrors the CLDMV @cldmv/slothlet lint setup: `@eslint/js` recommended for
* JS/MJS/CJS sources (with the `_` / `___` unused-binding escape hatch), plus
* the JSON and Markdown language plugins. (slothlet's CSS plugin is omitted β€”
* this repo has no CSS.) Run via `npm run lint`.
*/

import js from "@eslint/js";
import globals from "globals";
import json from "@eslint/json";
import markdown from "@eslint/markdown";
import { defineConfig } from "eslint/config";

export default defineConfig([
// Global ignores β€” applies to all configurations
{
ignores: [
"tmp/**",
"trash/**",
"node_modules/**",
"dist/**",
"build/**",
".git/**",
".configs/**",
".vscode/**",
"coverage/**",
"types/**",
// Untracked local copy of the original monolithic runner β€” kept for reference, not maintained.
"reference/**",
".vitest-coverage-tmp/**",
".vitest-coverage-blobs/**",
"*.min.js",
"*.min.css",
"**/package-lock.json",
// Copy file patterns
"*copy/",
"*copy (*)/",
"*copy */",
"*copy.*",
"*copy (*).*",
"*copy *.*",
// Additional copy patterns for nested directories
"**/*copy/",
"**/*copy (*)/",
"**/*copy */",
"**/*copy.*",
"**/*copy (*).*",
"**/*copy *.*"
]
},
{
files: ["**/*.{js,mjs,cjs}"],
plugins: { js },
extends: ["js/recommended"],
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^(_|___.*)$",
caughtErrorsIgnorePattern: "^(_|___.*)$",
destructuredArrayIgnorePattern: "^(_|___.*)$",
varsIgnorePattern: "^(_|___.*)$"
}
]
}
},
{ files: ["**/*.cjs"], languageOptions: { sourceType: "commonjs" } },
{ files: ["**/*.{js,mjs,cjs}"], languageOptions: { globals: { ...globals.node, ...globals.browser } } },
{
files: ["tests/**/*.{js,mjs,cjs}"],
languageOptions: {
globals: {
beforeAll: true,
afterAll: true,
beforeEach: true,
afterEach: true,
describe: true,
it: true,
expect: true,
test: true,
vi: true
}
}
},
{ files: ["**/*.json"], plugins: { json }, language: "json/json", extends: ["json/recommended"] },
{ files: ["**/*.jsonc"], plugins: { json }, language: "json/jsonc", extends: ["json/recommended"] },
{ files: ["**/*.json5"], plugins: { json }, language: "json/json5", extends: ["json/recommended"] },
{
files: ["**/*.md"],
plugins: { markdown },
language: "markdown/gfm",
extends: ["markdown/recommended"],
rules: {
// GitHub alerts like [!NOTE] / [!WARNING] are valid GFM but trip the label-ref check.
"markdown/no-missing-label-refs": "off"
}
}
]);
Loading
Loading