Skip to content

Commit

Permalink
fix: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tjsilver committed Jan 8, 2024
1 parent e0d01d0 commit 2899297
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30303,7 +30303,9 @@ exports.shouldMergePullRequest = void 0;
const core_1 = __nccwpck_require__(2186);
const shouldMergePullRequest = ({ pullRequest, config, }) => {
(0, core_1.info)('Checking pull request is valid');
if (!pullRequest.user ||
if (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- keeping code as it was before upgrading eslint
!pullRequest.user ||
pullRequest.user.login !== config.pullRequestAuthor) {
(0, core_1.info)(`Pull request is not authored by ${config.pullRequestAuthor}, ignoring.`);
return false;
Expand Down Expand Up @@ -30449,7 +30451,6 @@ const parseAdditionalChanges = (additionalChanges) => {
}
let json;
try {
// eslint-disable-next-line prefer-const -- this is setting the value above so I don't know what eslint is complaining about
json = JSON.parse(additionalChanges);
}
catch (err) {
Expand Down
1 change: 1 addition & 0 deletions src/actions/should-merge-pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const shouldMergePullRequest = ({
info('Checking pull request is valid');

if (
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- keeping code as it was before upgrading eslint
!pullRequest.user ||
pullRequest.user.login !== config.pullRequestAuthor
) {
Expand Down
1 change: 0 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const parseAdditionalChanges = (additionalChanges: string): FileChanges => {

let json;
try {
// eslint-disable-next-line prefer-const -- this is setting the value above so I don't know what eslint is complaining about
json = JSON.parse(additionalChanges) as FileChanges;
} catch (err) {
throw new Error('Invalid JSON provided for additional-changes input');
Expand Down

0 comments on commit 2899297

Please sign in to comment.