Skip to content

Commit

Permalink
Fix code style issues with ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Aug 11, 2024
1 parent fbe26df commit 84b1b85
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions lib/src/functions/ghat.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -98,32 +98,32 @@ 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
run: ${
managerName === 'yarn'
? 'yarn'
: managerName === 'npm'
? 'npm'
: 'pnpm'
? 'npm'
: 'pnpm'
} test:ci
`,
file: '.github/workflows/test.yml'
Expand Down
8 changes: 6 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 84b1b85

Please sign in to comment.