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
29 changes: 29 additions & 0 deletions .configs/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"useTabs": true,
"tabWidth": 2,
"printWidth": 140,
"trailingComma": "none",
"quoteProps": "preserve",
"bracketSpacing": true,
"overrides": [
{
"files": "*.xml",
"options": {
"printWidth": 300
}
},
{
"files": "*.md",
"options": {
"proseWrap": "preserve"
}
},
{
"files": "*.jsonv",
"options": {
"parser": "jsonv"
}
}
],
"plugins": ["@cldmv/prettier-plugin-jsonv"]
}
92 changes: 92 additions & 0 deletions .configs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import js from "@eslint/js";
import globals from "globals";
import json from "@eslint/json";
import jsonvPlugin from "@cldmv/eslint-plugin-jsonv";
import markdown from "@eslint/markdown";
import css from "@eslint/css";
import { defineConfig } from "eslint/config";

export default defineConfig([
{
ignores: [
"tmp/**",
"trash/**",
"node_modules/**",
"dist/**",
"build/**",
".git/**",
".configs/**",
".vscode/**",
"coverage/**",
// generated MDN feature data
"src/data/**",
// intentional-error scan fixture
"tests/testfile.js",
"*.min.js",
"*.min.css",
"**/package-lock.json",
// Copy file patterns
"*copy/",
"*copy (*)/",
"*copy */",
"*copy.*",
"*copy (*).*",
"*copy *.*",
"**/*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: ["**/*.js"], languageOptions: { sourceType: "commonjs" } },
{ files: ["**/*.{js,mjs,cjs}"], languageOptions: { globals: { ...globals.node, ...globals.browser } } },
{
files: ["tests/**/*.test.vitest.mjs"],
languageOptions: {
globals: {
beforeAll: true,
beforeEach: true,
afterAll: 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: ["**/*.jsonv"], plugins: { jsonv: jsonvPlugin }, language: "jsonv/jsonv", ...jsonvPlugin.configs.recommended },
{
files: ["**/*.md"],
plugins: { markdown },
language: "markdown/gfm",
extends: ["markdown/recommended"],
rules: {
// GitHub alerts like [!NOTE]/[!WARNING] are valid but trip this rule.
"markdown/no-missing-label-refs": "off"
}
},
{ files: ["**/*.css"], plugins: { css }, language: "css/css", extends: ["css/recommended"] }
]);
19 changes: 19 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Dependencies + generated/build output (not hand-authored)
node_modules/
dist/
build/
coverage/
tmp/
trash/
package-lock.json
*.min.js
*.min.css
# generated MDN feature data
src/data/
# intentional-error scan fixture
tests/testfile.js

# YAML β€” CI workflows are deliberately 4-space indented; prettier (tabWidth 2,
# and YAML disallows tabs) would reindent every file 4->2 for no real gain.
*.yml
*.yaml
15 changes: 0 additions & 15 deletions .prettierrc

This file was deleted.

45 changes: 0 additions & 45 deletions eslint.config.mjs

This file was deleted.

Loading
Loading