Skip to content

Commit e5ab9d2

Browse files
committed
Use cjs for lint staged
1 parent 5e704be commit e5ab9d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const script = `${process.argv0} '${require.resolve("../dist/bin.js")}'`;
22

3-
const config = {
3+
module.exports = {
44
[process.env.TS_SCRIPTS_FORMAT_GLOB]: `${script} format`,
55
};
6-
7-
export default config;

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export async function build(argv: string[], config: Config) {
194194
export async function preCommit(argv: string[], config: Config) {
195195
await run(
196196
await PATHS.lintStaged(),
197-
["--config", join(configDir, "lint-staged.mjs")],
197+
["--config", join(configDir, "lint-staged.cjs")],
198198
{
199199
name: "lint-staged",
200200
config,

0 commit comments

Comments
 (0)