GithubHelp home page GithubHelp logo

Comments (12)

ahuggins-nhs avatar ahuggins-nhs commented on June 16, 2024 2

I'm having the same issues as the OP. There's actually a couple of different scenarios:

Combinations of:

or

Results in eslint parsing errors.

Rolling back to 16.3.0 resolves my issue.

from prettier-standard.

ofbeaton avatar ofbeaton commented on June 16, 2024 1

Came here because of the same types of problems.

  15:3  error  Parsing error: Unexpected token
  13 | export interface testConnInfo {
  14 |   db?: Connection
> 15 |   redis?: Redis.Redis
     |   ^
  16 | }

or

  191:25  error  Parsing error: Unexpected token, expected ","

  189 |     })
  190 |
> 191 |     expect(response.data!.users!).toHaveLength(4)
      |                         ^
  192 |
  193 |     // TODO: verify the 4 users we want to see
  194 |   })

or

  47:27  error  Parsing error: Unexpected token, expected ";"

  45 |   beforeAll(async () => {
  46 |     connInfo = await testConnOpen()
> 47 |     redis = connInfo.redis!
     |                           ^
  48 |     userRepository = getRepository(User)
  49 |   })
  50 |

problems occur with 16.4.1, 16.4.0 (how come neither of these are tagged in github master repo?)

All of them go away when you revert to 16.3.0 the last repo tagged version.

from prettier-standard.

einSelbst avatar einSelbst commented on June 16, 2024 1

@HoraceShmorace this library doesn't seem to be maintained anymore

from prettier-standard.

sheerun avatar sheerun commented on June 16, 2024

I guess you forgot ;?

from prettier-standard.

jdtzmn avatar jdtzmn commented on June 16, 2024

I'm having this issue as well, with static modifiers and whatnot:

Screen Shot 2020-08-06 at 8 30 20 AM

from prettier-standard.

jdtzmn avatar jdtzmn commented on June 16, 2024

Is this package expected to work with TypeScript or not?

I assumed it was because it includes @typescript-eslint/parser, but then in the ignoring files section it has the example of ignoring **/*.ts, so now I'm not sure.

from prettier-standard.

sheerun avatar sheerun commented on June 16, 2024

it works in my case, what's your typescript and prettier-standard version in package.json? how do you run it?

from prettier-standard.

jdtzmn avatar jdtzmn commented on June 16, 2024

You are correct. I figured out that my issue was with eslint. static's can't be private.

from prettier-standard.

RogWilco avatar RogWilco commented on June 16, 2024

Encountered the same problem today, and can also confirm rolling back to 16.3.0 seems to resolve it. In my case it seems to be choking on this:

export type ThrowableType = new () => Error

Which results in:

  5:33  error  Parsing error: Unexpected token, expected ";"

  3 |  * used when specifying which type of error will be caught.
  4 |  */
> 5 | export type ThrowableType = new () => Error
    |                                 ^
  6 | 
  7 | /**
  8 |  * A function containing the code to be executed as part of a try block

✖ 1 problem (1 error, 0 warnings)

This behavior can be observed in the public repo I'm working in here (running yarn lint will reproduce the issue).

from prettier-standard.

einSelbst avatar einSelbst commented on June 16, 2024

When setting parserOptions.project for typescript in the eslint config I also have the problem that prettier-standard seem to have issues picking up the config.

Error: Error while loading rule '@typescript-eslint/await-thenable': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /Users/einselbst/Workspace/einselbst/feehikel/src/pages/_app.tsx

Rolling back to 16.3.0 does also fix this issue.

from prettier-standard.

spaceoi avatar spaceoi commented on June 16, 2024

Came here because of the same types of problems.

  15:3  error  Parsing error: Unexpected token
  13 | export interface testConnInfo {
  14 |   db?: Connection
> 15 |   redis?: Redis.Redis
     |   ^
  16 | }

or

  191:25  error  Parsing error: Unexpected token, expected ","

  189 |     })
  190 |
> 191 |     expect(response.data!.users!).toHaveLength(4)
      |                         ^
  192 |
  193 |     // TODO: verify the 4 users we want to see
  194 |   })

or

  47:27  error  Parsing error: Unexpected token, expected ";"

  45 |   beforeAll(async () => {
  46 |     connInfo = await testConnOpen()
> 47 |     redis = connInfo.redis!
     |                           ^
  48 |     userRepository = getRepository(User)
  49 |   })
  50 |

problems occur with 16.4.1, 16.4.0 (how come neither of these are tagged in github master repo?)

All of them go away when you revert to 16.3.0 the last repo tagged version.

solved the optional chaining problem by replacing dependency "prettierx"(0.11 in package) to newest version(currently 0.17). You can try if it could solve other problems.

from prettier-standard.

HoraceShmorace avatar HoraceShmorace commented on June 16, 2024

This is pretty old and I'm running into the same problem. Rolling back to 16.3.0 definitely fixed the issue for me.

from prettier-standard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.