From 4657a5f525572bc97f9ba2640fe4de8efe127f89 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 12 Nov 2019 17:01:15 -0500 Subject: [PATCH] Fix lint on Windows (#89) --- .github/workflows/workflow.yml | 2 -- package.json | 6 +++--- src/constants.ts | 19 +++++++++---------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index a3b8f39..971b0f5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -32,11 +32,9 @@ jobs: - run: npm ci - name: Prettier Format Check - if: matrix.os == 'ubuntu-latest' run: npm run format-check - name: ESLint Check - if: matrix.os == 'ubuntu-latest' run: npm run lint - name: Build & Test diff --git a/package.json b/package.json index f165b86..5bece1c 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "scripts": { "build": "tsc", "test": "tsc --noEmit && jest --coverage", - "lint": "eslint '**/*.ts' --cache", - "format": "prettier --write '**/*.ts'", - "format-check": "prettier --check '**/*.ts'", + "lint": "eslint **/*.ts --cache", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", "release": "ncc build -o dist/restore src/restore.ts && ncc build -o dist/save src/save.ts && git add -f dist/" }, "repository": { diff --git a/src/constants.ts b/src/constants.ts index e77e97d..100b878 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,15 +1,14 @@ -/* eslint-disable @typescript-eslint/no-namespace */ -export namespace Inputs { - export const Key = "key"; - export const Path = "path"; - export const RestoreKeys = "restore-keys"; +export enum Inputs { + Key = "key", + Path = "path", + RestoreKeys = "restore-keys" } -export namespace Outputs { - export const CacheHit = "cache-hit"; +export enum Outputs { + CacheHit = "cache-hit" } -export namespace State { - export const CacheKey = "CACHE_KEY"; - export const CacheResult = "CACHE_RESULT"; +export enum State { + CacheKey = "CACHE_KEY", + CacheResult = "CACHE_RESULT" }