From 84b1b85cd5db487474261a1c09242787318a7176 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Sun, 11 Aug 2024 05:21:06 +0000 Subject: [PATCH] Fix code style issues with ESLint --- lib/index.js | 2 +- lib/src/functions/ghat.js | 28 ++++++++++++++-------------- test/index.test.js | 8 ++++++-- 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/lib/index.js b/lib/index.js index e76dda9..932b1a2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -96,7 +96,7 @@ module.exports = async () => { } ], { - onCancel: (error) => { + onCancel: error => { if (!['local', 'test'].includes(process.env.NODE_ENV)) { console.error('TPG process cancelled') console.error(error) diff --git a/lib/src/functions/ghat.js b/lib/src/functions/ghat.js index 08f74e8..cd223df 100644 --- a/lib/src/functions/ghat.js +++ b/lib/src/functions/ghat.js @@ -43,23 +43,23 @@ jobs: managerName === 'yarn' ? 'yarn install --frozen-lockfile' : managerName === 'npm' - ? 'npm ci' - : 'pnpm i --frozen-lockfile' + ? 'npm ci' + : 'pnpm i --frozen-lockfile' } - name: Revert changes into the ${ managerName === 'yarn' ? 'yarn.lock' : managerName === 'npm' - ? 'package-lock.json' - : 'pnpm-lock.yaml' + ? 'package-lock.json' + : 'pnpm-lock.yaml' } file run: git checkout -- ${ managerName === 'yarn' ? 'yarn.lock' : managerName === 'npm' - ? 'package-lock.json' - : 'pnpm-lock.yaml' + ? 'package-lock.json' + : 'pnpm-lock.yaml' } - name: Run linters @@ -98,23 +98,23 @@ jobs: managerName === 'yarn' ? 'yarn install --frozen-lockfile' : managerName === 'npm' - ? 'npm ci' - : 'pnpm i --frozen-lockfile' + ? 'npm ci' + : 'pnpm i --frozen-lockfile' } - name: Revert changes into the ${ managerName === 'yarn' ? 'yarn.lock' : managerName === 'npm' - ? 'package-lock.json' - : 'pnpm-lock.yaml' + ? 'package-lock.json' + : 'pnpm-lock.yaml' } file run: git checkout -- ${ managerName === 'yarn' ? 'yarn.lock' : managerName === 'npm' - ? 'package-lock.json' - : 'pnpm-lock.yaml' + ? 'package-lock.json' + : 'pnpm-lock.yaml' } - name: Run test @@ -122,8 +122,8 @@ jobs: managerName === 'yarn' ? 'yarn' : managerName === 'npm' - ? 'npm' - : 'pnpm' + ? 'npm' + : 'pnpm' } test:ci `, file: '.github/workflows/test.yml' diff --git a/test/index.test.js b/test/index.test.js index 17bff6b..f173a47 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -64,10 +64,14 @@ describe('Testing TPG', () => { expect(existsSync(join(__dirname, '../example/.gitignore'))).toBe(true) expect(existsSync(join(__dirname, '../example/CHANGELOG.md'))).toBe(true) expect(existsSync(join(__dirname, '../example/Dockerfile'))).toBe(true) - expect(existsSync(join(__dirname, '../example/jest.config.ts'))).toBe(true) + expect(existsSync(join(__dirname, '../example/jest.config.ts'))).toBe( + true + ) expect(existsSync(join(__dirname, '../example/LICENSE'))).toBe(true) expect(existsSync(join(__dirname, '../example/package.json'))).toBe(true) - expect(existsSync(join(__dirname, '../example/pnpm-lock.yaml'))).toBe(true) + expect(existsSync(join(__dirname, '../example/pnpm-lock.yaml'))).toBe( + true + ) expect(existsSync(join(__dirname, '../example/README.md'))).toBe(true) expect(existsSync(join(__dirname, '../example/tsconfig.base.json'))).toBe( true