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.

Ng update forces double quotemark

See original GitHub issue

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Probably, I used ng update several times already and this never happened

Description

After running ng update to update from 7.3 to 8.0.0-rc.5 I get a big amount of tslint errors because it used double quotes (") on the modified imports. IE:

-import { MatDialogModule } from '@angular/material';
+import { MatDialogModule } from "@angular/material/dialog";

All the changed imports are from material, so I can’t say if it’s only an issue with material

🔬 Minimal Reproduction

run ng update --next in any angular project using material

🌍 Your Environment


Angular CLI: 7.3.9
Node: 10.13.0
OS: darwin x64
Angular: 8.0.0-rc.5
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.13.1
@angular-devkit/build-angular     0.13.1
@angular-devkit/build-optimizer   0.13.1
@angular-devkit/build-webpack     0.13.1
@angular-devkit/core              7.3.1
@angular-devkit/schematics        7.3.9
@angular/cdk                      8.0.0-rc.2
@angular/cli                      7.3.9
@angular/http                     7.2.15
@angular/material                 8.0.0-rc.2
@ngtools/webpack                  7.3.1
@schematics/angular               7.3.9
@schematics/update                0.13.9
rxjs                              6.5.2
typescript                        3.4.5
webpack                           4.29.0
    

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
devversioncommented, May 28, 2019

Yeah. Linking to the related Material issue as well: https://github.com/angular/components/issues/16035#issuecomment-493176528

2reactions
clydincommented, May 28, 2019

I’m actually thinking a post-generate/add/update schematic hook may be the ultimate solution with the hook passing a list of the modified/created files. Similar to a lint-staged/husky setup for git. This would allow the project to use whatever formatter desired (e.g., tslint, eslint, prettier, etc.).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change the default double quote marks to single quote ...
In my Mac WebStorm 2017.1.1, its in: Preferences -> Editor -> Code style -> Typescript (orJavascript...) -> Punctuation tab -> use single (dropdown)...
Read more >
Why can't LaTeX smartly match the double quote? - TeX
The standard logic for inserting smart quotes in place of dumb quotes is as follows: If there is a space character before the...
Read more >
quotemark - Rule
Config. Five arguments may be optionally provided: "single" enforces single quotes. "double" enforces double quotes. "backtick" enforces backticks.
Read more >
“Double Quotes” vs 'Single Quotes' vs `Backticks` in JavaScript
In JavaScript, single quotes ('') and double quotes (“”) are used to create string literals. Most developers use single or double quotes as ......
Read more >
When Single (') and Double (“) Quotes are not Enough
Quotes, Macro variable resolution, Apostrophe, Single quotes, Double ... If we do so, the quote mark will be interpreted as the start of...
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