File tree Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change
1
+ import { defineConfig } from "./dist/index.mjs" ;
2
+
3
+ export default defineConfig ( {
4
+ commands : {
5
+ gituser : {
6
+ ruleEmail : "^[a-zA-Z0-9._%+-]+@(gmail)\\.(com)$" ,
7
+ } ,
8
+ fix : {
9
+ paths : [ "./src" , "./scripts" ] ,
10
+ } ,
11
+ format : {
12
+ paths : [ "./src" , "./scripts" ] ,
13
+ } ,
14
+ impsort : {
15
+ paths : [ "./src" , "./scripts" ] ,
16
+ } ,
17
+ } ,
18
+ } ) ;
Original file line number Diff line number Diff line change @@ -272,11 +272,4 @@ export const commands = [
272
272
} ,
273
273
] ;
274
274
275
- export const DEFAULT_CONFIG_FILES = [
276
- "codeg.config.js" ,
277
- "codeg.config.mjs" ,
278
- "codeg.config.ts" ,
279
- "codeg.config.mts" ,
280
- "codeg.config.cjs" ,
281
- "codeg.config.cts" ,
282
- ] ;
275
+ export const DEFAULT_CONFIG_FILES = [ "codeg.config.js" , "codeg.config.mjs" ] ;
Original file line number Diff line number Diff line change 1
1
import fs from "node:fs" ;
2
2
import path from "node:path" ;
3
3
import process from "node:process" ;
4
+ import { pathToFileURL } from "node:url" ;
4
5
5
6
import boxen from "boxen" ;
6
7
import { CAC } from "cac" ;
@@ -212,7 +213,7 @@ export const getEveryFilesBySuffixes = async (
212
213
"--diff-filter=d" ,
213
214
"--cached" ,
214
215
] ) ;
215
- files = result ?. split ( "\n" ) . map ( ( path ) => `${ cwd } /${ path } ` ) || [ ] ;
216
+ files = result ?. split ( "\n" ) . map ( ( path : string ) => `${ cwd } /${ path } ` ) || [ ] ;
216
217
} else {
217
218
files = getEveryFiles ( paths . map ( ( path ) => `${ cwd } /${ path } ` ) ) ;
218
219
}
@@ -378,6 +379,5 @@ export async function loadConfigModule(): Promise<
378
379
}
379
380
380
381
if ( ! resolvedPath ) return ;
381
-
382
- return ( await import ( resolvedPath ) ) . default ;
382
+ return ( await import ( pathToFileURL ( resolvedPath ) . href ) ) . default ;
383
383
}
You can’t perform that action at this time.
0 commit comments