Skip to content

Commit c2e5d0d

Browse files
KleeUTJosh Goldberg
authored and
Josh Goldberg
committed
Addresses: #144 Script creates wrongly named file on Windows (#209)
* 🐛 #144 Ssets default output file to .eslintrc.js * 🚨 removes unused import * 💚 adds types for eslint-plugin-tslint so end-to-end tests pass * Reverted package* to master
1 parent c3fb72e commit c2e5d0d

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/cli/runCli.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,21 @@ describe("runCli", () => {
129129
expect(status).toBe(ResultStatus.Succeeded);
130130
expectEqualWrites(dependencies.logger.stdout.write, "✅ All is well! ✅");
131131
});
132+
133+
it("default output should be .eslintrc.js", async () => {
134+
let defaultConfig;
135+
const dependencies = createStubRunCliDependencies({
136+
convertConfig: parsedArgs => {
137+
defaultConfig = parsedArgs.config;
138+
return Promise.resolve({
139+
status: ResultStatus.Succeeded,
140+
});
141+
},
142+
});
143+
144+
const status = await runCli(dependencies, createStubArgv());
145+
146+
expect(status).toBe(ResultStatus.Succeeded);
147+
expect(defaultConfig).toEqual("./.eslintrc.js");
148+
});
132149
});

src/cli/runCli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const runCli = async (
2727
.option("-V --version", "output the package version");
2828

2929
const parsedArgv = {
30-
config: "./eslintrc.js",
30+
config: "./.eslintrc.js",
3131
...(command.parse(rawArgv) as Partial<TSLintToESLintSettings>),
3232
};
3333

0 commit comments

Comments
 (0)