Skip to content

Commit 96bf888

Browse files
committedJul 18, 2020
ESLint fixes
1 parent d96a2cb commit 96bf888

File tree

7 files changed

+7
-11
lines changed

7 files changed

+7
-11
lines changed
 

‎src/action/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ async function main(): Promise<void> {
2424
// Puglish to NPM
2525
let results = await npmPublish(options);
2626

27-
// tslint:disable: no-console
2827
if (results.type === "none") {
2928
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
3029
}
@@ -62,5 +61,5 @@ function debugHandler(message: string, data?: object) {
6261
debug(message);
6362
}
6463

65-
// tslint:disable-next-line: no-floating-promises
64+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
6665
main();

‎src/cli/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tslint:disable: no-console
21
import { join } from "path";
32
import { npmPublish } from "../npm-publish";
43
import { readManifest } from "../read-manifest";
@@ -35,7 +34,6 @@ export async function main(args: string[]): Promise<void> {
3534
let results = await npmPublish(options);
3635

3736
if (!options.quiet) {
38-
// tslint:disable: no-console
3937
if (results.type === "none") {
4038
console.log(`\n📦 ${results.package} v${results.version} is already published to NPM`);
4139
}

‎src/cli/parse-args.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tslint:disable: no-console
21
import * as commandLineArgs from "command-line-args";
32
import { Options } from "../options";
43
import { ExitCode } from "./exit-code";

‎src/index.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tslint:disable: no-default-export
21
import { npmPublish } from "./npm-publish";
32

43
// Exprot the external type definitions as named exports
@@ -11,5 +10,5 @@ export default npmPublish;
1110

1211
// CommonJS default export hack
1312
if (typeof module === "object" && typeof module.exports === "object") {
14-
module.exports = Object.assign(module.exports.default, module.exports); // tslint:disable-line: no-unsafe-any
13+
module.exports = Object.assign(module.exports.default, module.exports);
1514
}

‎src/npm-config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ function updateConfig(config: string, { registry, debug }: NormalizedOptions): s
5151
*/
5252
async function getNpmConfigPath({ debug }: NormalizedOptions): Promise<string> {
5353
try {
54-
debug(`Running command: npm config get userconfig`);
54+
debug("Running command: npm config get userconfig");
5555

5656
let process = await ezSpawn.async("npm", "config", "get", "userconfig");
5757
return process.stdout.trim();
5858
}
5959
catch (error) {
60-
throw ono(error, `Unable to determine the NPM config file path.`);
60+
throw ono(error, "Unable to determine the NPM config file path.");
6161
}
6262
}
6363

@@ -76,7 +76,7 @@ async function readNpmConfig(configPath: string, { debug }: NormalizedOptions):
7676
}
7777
catch (error) {
7878
if ((error as NodeJS.ErrnoException).code === "ENOENT") {
79-
debug(`OLD NPM CONFIG: <none>`);
79+
debug("OLD NPM CONFIG: <none>");
8080
return "";
8181
}
8282

‎src/npm.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function getNpmEnvironment(options: NormalizedOptions): NodeJS.ProcessEnv | unde
7878
let needsToken = Boolean(options.token && process.env.INPUT_TOKEN !== options.token);
7979

8080
if (needsToken) {
81+
// eslint-disable-next-line @typescript-eslint/naming-convention
8182
return { ...process.env, INPUT_TOKEN: options.token };
8283
}
8384
}

‎src/read-manifest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function readManifest(path: string, debug?: Debug): Promise<Manifes
3232
let { name, version } = JSON.parse(json) as Record<string, unknown>;
3333

3434
if (typeof name !== "string" || name.trim().length === 0) {
35-
throw new TypeError(`Invalid package name`);
35+
throw new TypeError("Invalid package name");
3636
}
3737

3838
let manifest: Manifest = {

0 commit comments

Comments
 (0)
Failed to load comments.