Skip to content

Commit 53f864b

Browse files
committed
chore: move root config files to .config/
Cascaded from socket-wheelhouse. Moves the root config files into .config/ (with leading dot dropped from the names since they're already collected): .oxlintrc.json → .config/oxlintrc.json .oxfmtrc.json → .config/oxfmtrc.json lockstep.json → .config/lockstep.json (if present) lockstep.schema.json → .config/lockstep.schema.json (if present) tsconfig.json → .config/tsconfig.json tsconfig.dts.json → .config/tsconfig.dts.json (if present) tsconfig.test.json → .config/tsconfig.test.json (if present) Internal updates: * .config/tsconfig.json paths re-rooted (../src etc.) * .config/oxlintrc.json jsPlugins → './oxlint-plugin/index.js' * tools that auto-discover tsconfig.json now pass -p .config/tsconfig.json * lint / format / lockstep scripts pass -c / -p flags pointing at the new paths * package.json scripts (format, type, lockstep) updated to reference .config/ paths * CI workflows: lockstep.json refs updated to .config/lockstep.json
1 parent f8eeabb commit 53f864b

11 files changed

Lines changed: 46 additions & 32 deletions
File renamed without changes.
File renamed without changes.

.oxlintrc.json renamed to .config/oxlintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
33
"plugins": ["typescript", "unicorn", "import"],
4-
"jsPlugins": ["./.config/oxlint-plugin/index.js"],
4+
"jsPlugins": ["./oxlint-plugin/index.js"],
55
"categories": {
66
"correctness": "error",
77
"suspicious": "error"

.config/tsconfig.dts.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
"outDir": "../dist",
1010
"rootDir": "../src",
1111
"sourceMap": false,
12-
"types": ["node"],
12+
"types": [
13+
"node"
14+
],
1315
"verbatimModuleSyntax": false
1416
},
15-
"include": ["../src/**/*.ts"]
17+
"include": [
18+
"../src/**/*.ts"
19+
]
1620
}

.config/tsconfig.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": "./tsconfig.base.json",
3+
"compilerOptions": {
4+
"declarationMap": false,
5+
"module": "commonjs",
6+
"moduleResolution": "bundler",
7+
"noEmit": false,
8+
"noEmitOnError": false,
9+
"outDir": "../dist",
10+
"rootDir": "../src",
11+
"skipLibCheck": true,
12+
"sourceMap": false,
13+
"types": [
14+
"node"
15+
],
16+
"verbatimModuleSyntax": false
17+
},
18+
"include": [
19+
"../src/**/*.ts"
20+
],
21+
"exclude": [
22+
"../.cache",
23+
"../coverage",
24+
"../dist",
25+
"../node_modules",
26+
"../test"
27+
]
28+
}

scripts/ai-lint-fix.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async function runLintJson(
142142
'exec',
143143
'oxlint',
144144
'--format=json',
145-
'--config=.oxlintrc.json',
145+
'--config=.config/oxlintrc.json',
146146
...passthrough.filter(a => a !== '--all'),
147147
]
148148
if (!passthrough.includes('--all') && !passthrough.includes('--staged')) {
@@ -382,7 +382,7 @@ async function main(): Promise<void> {
382382
if (process.env['SKIP_AI_FIX'] === '1') {
383383
return
384384
}
385-
if (!existsSync('.oxlintrc.json')) {
385+
if (!existsSync('.config/oxlintrc.json')) {
386386
return
387387
}
388388

scripts/lint.mts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ const CONFIG_PATTERNS = [
8383
'.config/**',
8484
'scripts/utils/**',
8585
'pnpm-lock.yaml',
86-
'tsconfig*.json',
87-
'.oxlintrc.json',
88-
'.oxfmtrc.json',
86+
87+
88+
8989
]
9090

9191
/**
@@ -185,7 +185,7 @@ export async function runLintOnAll(
185185
'exec',
186186
'oxfmt',
187187
'--config',
188-
'.oxfmtrc.json',
188+
189189
...(fix ? ['--write'] : ['--check']),
190190
'.',
191191
],
@@ -196,7 +196,7 @@ export async function runLintOnAll(
196196
'exec',
197197
'oxlint',
198198
'--config',
199-
'.oxlintrc.json',
199+
200200
'--tsconfig',
201201
'.config/tsconfig.check.json',
202202
'--import-plugin',
@@ -262,7 +262,7 @@ export async function runLintOnFiles(
262262
'exec',
263263
'oxfmt',
264264
'--config',
265-
'.oxfmtrc.json',
265+
266266
// Don't error when every staged file lands in oxfmt's
267267
// ignorePatterns (e.g. only `.claude/**` files staged). The
268268
// tool exits 0 with "No files found" instead of throwing.
@@ -278,7 +278,7 @@ export async function runLintOnFiles(
278278
'exec',
279279
'oxlint',
280280
'--config',
281-
'.oxlintrc.json',
281+
282282
'--tsconfig',
283283
'.config/tsconfig.check.json',
284284
'--import-plugin',

scripts/lockstep-emit-schema.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const logger = getDefaultLogger()
2121

2222
const __dirname = path.dirname(fileURLToPath(import.meta.url))
2323
const rootDir = path.resolve(__dirname, '..')
24-
const outPath = path.join(rootDir, 'lockstep.schema.json')
24+
const outPath = path.join(rootDir, '.config', 'lockstep.schema.json')
2525

2626
// TypeBox schemas carry JSON Schema shape directly, plus a Symbol-keyed
2727
// [Kind] marker that JSON.stringify drops. Spreading the schema first

scripts/lockstep.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ export function emitHuman(reports: Report[], summaries: AreaSummary[]): number {
942942
}
943943

944944
function main(): void {
945-
const rootManifestPath = path.join(rootDir, 'lockstep.json')
945+
const rootManifestPath = path.join(rootDir, '.config', 'lockstep.json')
946946
const { areas, merged } = loadManifestTree(rootManifestPath)
947947

948948
const rowsWithArea: Array<{ row: Row; area: string }> = []

0 commit comments

Comments
 (0)