Comments (6)
Caused because swc started incorrectly setting the text range for BindingIdent
to not include the type annotation. I'll do a quick fix and then try to fix this in swc.
from dprint-plugin-typescript.
A bisect pointed to #630; maybe something in deno_ast?
from dprint-plugin-typescript.
Not sure how we haven't got a report about this in Deno. It might be something that's only triggered with certain config. I'll take a look tomorrow.
from dprint-plugin-typescript.
Opened swc-project/swc#9290
Temporarily patched this in our wrapper: dprint/dprint-swc-ext#62 (we had to introduce a wrapper around swc's spans because the first index was shifted from 0 to 1 in order to make 0 a magic number)
from dprint-plugin-typescript.
Thank you once again!
from dprint-plugin-typescript.
I opened #652 to catch this sooner in the future.
from dprint-plugin-typescript.
Related Issues (20)
- bracePosition: nextLine does not work when passing objects as arguments
- Allow multi-line, multi-argument function calls to maintain formatting
- Duplicate imports do not have a consistent ordering HOT 1
- Break interfaces/types onto multiple lines
- Wrapping of arrow functions in the second argument of functions
- `semiColons` should be spelled `semicolons` because it's a single word. HOT 3
- Allow brackets to be put on the same link as case statement (and potentially allow "break" to be on the same link as the closing bracket)
- Alphabetical ordering of interfaces, classes, properties and methods
- Option to disable the removing of trailing spaces
- dprint moves `else` to the wrong `if` HOT 1
- Incorrect indentation of inner expression in template literal
- Don't trailing generic comma when format tsx file when `trailingComma: never` HOT 3
- cannot format associated files
- Support for Formatting Vue and Svelte Code with `dprint_plugin_typescript::format_text`
- Array of objects is not formatted nicely HOT 1
- Missing space for `export default function doX()` with `spaceBeforeParentheses` HOT 4
- styled-components support
- Add debug assertions for node and trivia ranges
- importDeclaration.spaceSurroundingNamedImports not working HOT 5
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 dprint-plugin-typescript.