Comments (12)
I'm having the same issues as the OP. There's actually a couple of different scenarios:
Combinations of:
[email protected]
[email protected]
@typescript-eslint/[email protected]
or
[email protected]
[email protected]
@typescript-eslint/[email protected]
Results in eslint parsing errors.
Rolling back to 16.3.0 resolves my issue.
from prettier-standard.
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.
@HoraceShmorace this library doesn't seem to be maintained anymore
from prettier-standard.
I guess you forgot ;
?
from prettier-standard.
I'm having this issue as well, with static modifiers and whatnot:
from prettier-standard.
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.
it works in my case, what's your typescript and prettier-standard version in package.json? how do you run it?
from prettier-standard.
You are correct. I figured out that my issue was with eslint. static
's can't be private.
from prettier-standard.
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.
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.
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.
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)
- Issue with the parser argument HOT 3
- Extra semi-colon added before destructuring assignment HOT 3
- not catching no-implicit-any HOT 22
- lint by default HOT 8
- Can't resolve typescript type HOT 1
- ternary expression formatting raises an error in standard HOT 2
- Included packages? HOT 2
- there is a format question in typescript file HOT 1
- Allow overriding `parser` option in `.eslintrc`
- Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0 HOT 2
- Feature Request: loglevel output control
- Stuck saving with 'Format On Save' enabled HOT 1
- Error: You must provide patterns to match outside of git repository HOT 2
- is it possible upgrade to eslint 7?
- How do I send a custom CLI option to eslint?
- Dependency deprecation warning in Node 16+
- Security Vulnerabilities after including prettier standard
- Where I have to put .prettierrc for customization?
- This project is abandoned HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-standard.