question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding right parenthesis when not needed

See original GitHub issue

Summary

When running gts fix on this code, it adds extra ) and breaks the code.

Before gts fix

  const signingKey = new RsKmsSigningKey("entitlement-signing-key", RsKmsKeyType.Rsa2048)
    .WithDescription("The key used by the Entitlements service to sign entitlement tokens.");

  const domainsTable = new RsDynamoDbTable("entmnt-domains", "id")
    .WithProvisionedBilling(2, 1);

After gts fix

  const signingKey = new RsKmsSigningKey('entitlement-signing-key', RsKmsKeyType.Rsa2048)
  ).WithDescription(
    'The key used by the Entitlements service to sign entitlement tokens.'
  );

  const domainsTable = new RsDynamoDbTable('entmnt-domains', 'id')
  ).WithProvisionedBilling(2, 1);

output

$ yarn fix

yarn run v1.22.19
$ gts fix
version: 16

~/index.ts
  44:2  error  Parsing error: Declaration or statement expected

✖ 1 problems (1 error)

Error: Command failed with exit code 1: node ./node_modules/eslint/bin/eslint --fix **/*.ts **/*.js **/*.tsx **/*.jsx --no-error-on-unmatched-pattern
    at makeError (/~/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/~/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async run (/~/node_modules/gts/build/src/cli.js:123:17) {
  shortMessage: 'Command failed with exit code 1: node ./node_modules/eslint/bin/eslint --fix **/*.ts **/*.js **/*.tsx **/*.jsx --no-error-on-unmatched-pattern',
  command: 'node ./node_modules/eslint/bin/eslint --fix **/*.ts **/*.js **/*.tsx **/*.jsx --no-error-on-unmatched-pattern',
  escapedCommand: 'node "./node_modules/eslint/bin/eslint" --fix "**/*.ts" "**/*.js" "**/*.tsx" "**/*.jsx" --no-error-on-unmatched-pattern',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

$ 

package.json

{
  "name": "entitlements-service",
  "devDependencies": {
    "@types/jest": "^27.4.1",
    "@types/node": "^17.0.23",
    "gts": "^3.1.0",
    "jest": "^27.5.1",
    "ts-jest": "^27.1.4",
    "typescript": "4.4.4"
  },
  "scripts": {
    "lint": "gts lint",
    "clean": "gts clean",
    "compile": "tsc",
    "fix": "gts fix",
    "test": "jest"
  }
}

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
sofislcommented, Jun 21, 2022

Thanks for adding @judblackburn. I can reproduce the issue, will dig into it.

0reactions
WildSunLovecommented, Oct 31, 2022

Ah the actual problem created in this one is because we are using != somewhere and when it changes it to !== it changes the functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ORA-00907: missing right parenthesis - Stack Overflow
You are trying to create cyclic foreign keys between LIBRARY_T and FORMATS . You could do this by creating the constraints in separate...
Read more >
ORA-00907: missing right parenthesis Solution - Database Star
ORA-00907 Cause. When working with Oracle SQL, all left parenthesis (the “(” character) must be paired with a right parenthesis character ...
Read more >
ORA-00907: missing right parenthesis tips - Burleson Consulting
Cause: A left parenthesis has been entered without a closing right parenthesis, or extra information was contained in the parentheses. All parentheses must...
Read more >
ORA-00907: missing right parenthesis - Yawin Tutor
Oracle could not recognise the end of the items list if the right parenthesis was missing. All left parenthesis in Oracle SQL must...
Read more >
ORA-00907 error missing right parenthesis in CREATE TABLE
Oracle's INT data type does not support specifying precision. – mustaccio. Oct 2, 2021 at 14:55. Add a comment ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found