Skip to content

Commit 5436b4e

Browse files
committed
Move configuration files to .config/ directory
Consolidate tool configurations into .config/ for better organization: Files moved: - .oxlintrc.json → .config/oxlintrc.json - biome.json → .config/biome.json - eslint.config.mjs → .config/eslint.config.mjs - knip.json → .config/knip.json - taze.config.mts → .config/taze.config.mts - vitest.config.mts → .config/vitest.config.mts Updates: - package.json: Update all script references to use .config/ paths - eslint.config.mjs: Fix path resolution for moved location - scripts/taze.mjs: Add config path parameter - tsconfig.json: Include .config/*.mts files for type checking
1 parent aa99209 commit 5436b4e

File tree

9 files changed

+18
-18
lines changed

9 files changed

+18
-18
lines changed
File renamed without changes.

eslint.config.mjs renamed to .config/eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ const require = createRequire(import.meta.url)
2424

2525
const { flatConfigs: origImportXFlatConfigs } = importXPlugin
2626

27-
const rootPath = __dirname
27+
const rootPath = path.dirname(__dirname)
2828
const rootTsConfigPath = path.join(rootPath, 'tsconfig.json')
2929

3030
const nodeGlobalsConfig = Object.fromEntries(
3131
Object.entries(globals.node).map(([k]) => [k, 'readonly']),
3232
)
3333

34-
const biomeConfigPath = path.join(rootPath, 'biome.json')
34+
const biomeConfigPath = path.join(__dirname, 'biome.json')
3535
const biomeConfig = require(biomeConfigPath)
3636
const biomeIgnores = {
3737
name: `Imported biome.json ignore patterns`,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"publish:sea:github": "node scripts/publish-sea.mjs --skip-npm",
4545
"publish:sea:npm": "node scripts/publish-sea.mjs --skip-github",
4646
"check": "pnpm run check:lint && pnpm run check:tsc",
47-
"check:lint": "eslint --report-unused-disable-directives .",
47+
"check:lint": "eslint --config .config/eslint.config.mjs --report-unused-disable-directives .",
4848
"check:tsc": "tsgo --noEmit",
4949
"check-ci": "pnpm run check:lint",
5050
"lint-ci": "pnpm run check:lint",
@@ -60,29 +60,29 @@
6060
"clean:dist:types": "del-cli 'dist/types'",
6161
"clean:node_modules": "del-cli '**/node_modules'",
6262
"fix": "pnpm run lint:fix",
63-
"knip:dependencies": "knip --dependencies",
64-
"knip:exports": "knip --include exports,duplicates",
65-
"lint": "oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
63+
"knip:dependencies": "knip --config .config/knip.json --dependencies",
64+
"knip:exports": "knip --config .config/knip.json --include exports,duplicates",
65+
"lint": "oxlint -c=.config/oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json .",
6666
"lint:dist:fix": "run-s -c lint:dist:fix:*",
67-
"lint:dist:fix:oxlint": "dotenvx -q run -f .env.dist -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --silent --fix ./dist | dev-null",
68-
"lint:dist:fix:biome": "dotenvx -q run -f .env.dist -- biome format --log-level=none --fix ./dist | dev-null",
67+
"lint:dist:fix:oxlint": "dotenvx -q run -f .env.dist -- oxlint -c=.config/oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --silent --fix ./dist | dev-null",
68+
"lint:dist:fix:biome": "dotenvx -q run -f .env.dist -- biome format --config-path=.config/biome.json --log-level=none --fix ./dist | dev-null",
6969
"lint:external:fix": "run-s -c lint:external:fix:*",
70-
"lint:external:fix:oxlint": "dotenvx -q run -f .env.external -- oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --silent --fix ./external | dev-null",
71-
"lint:external:fix:biome": "dotenvx -q run -f .env.external -- biome format --log-level=none --fix ./external | dev-null",
70+
"lint:external:fix:oxlint": "dotenvx -q run -f .env.external -- oxlint -c=.config/oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --silent --fix ./external | dev-null",
71+
"lint:external:fix:biome": "dotenvx -q run -f .env.external -- biome format --config-path=.config/biome.json --log-level=none --fix ./external | dev-null",
7272
"lint:fix": "run-s -c lint:fix:*",
73-
"lint:fix:oxlint": "oxlint -c=.oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --quiet --fix . | dev-null",
74-
"lint:fix:biome": "biome format --log-level=none --fix . | dev-null",
75-
"lint:fix:eslint": "eslint --report-unused-disable-directives --fix .",
73+
"lint:fix:oxlint": "oxlint -c=.config/oxlintrc.json --ignore-path=.oxlintignore --tsconfig=tsconfig.json --quiet --fix . | dev-null",
74+
"lint:fix:biome": "biome format --config-path=.config/biome.json --log-level=none --fix . | dev-null",
75+
"lint:fix:eslint": "eslint --config .config/eslint.config.mjs --report-unused-disable-directives --fix .",
7676
"lint-staged": "lint-staged",
7777
"precommit": "lint-staged",
7878
"prepare": "husky",
7979
"pretest:unit": "dotenvx -q run -f .env.test -- pnpm run build",
8080
"bs": "pnpm run build:dist:src; pnpm exec socket --",
8181
"s": "pnpm exec socket --",
8282
"test": "run-s check test:*",
83-
"test:unit": "dotenvx -q run -f .env.test -- vitest run",
84-
"test:unit:update": "dotenvx -q run -f .env.test -- vitest run --update",
85-
"test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
83+
"test:unit": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts",
84+
"test:unit:update": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts --update",
85+
"test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --config .config/vitest.config.mts --coverage",
8686
"test:validate": "node scripts/validate-tests.mjs",
8787
"test:wrapper": "node scripts/test-wrapper.mjs",
8888
"test-ci": "run-s test:*",

scripts/taze.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void (async () => {
2222
// Run with command line arguments.
2323
const args = process.argv.slice(2)
2424

25-
const tazePromise = spawn('pnpm', ['taze', ...args], {
25+
const tazePromise = spawn('pnpm', ['taze', '-c', '.config/taze.config.mts', ...args], {
2626
stdio: 'pipe',
2727
cwd: process.cwd(),
2828
})

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"extends": "./.config/tsconfig.base.json",
3-
"include": ["src/**/*.mts", "test/**/*.mts", "*.config.mts"],
3+
"include": ["src/**/*.mts", "test/**/*.mts", "*.config.mts", ".config/*.mts"],
44
"exclude": ["src/**/*.test.mts"]
55
}

0 commit comments

Comments
 (0)