Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(rome_js_formatter): shothanded named import line break with default import #3826

Merged
merged 9 commits into from
Nov 23, 2022
Merged

fix(rome_js_formatter): shothanded named import line break with default import #3826

merged 9 commits into from
Nov 23, 2022

Conversation

unvalley
Copy link
Contributor

@unvalley unvalley commented Nov 22, 2022

Summary

A part of fix #3531 (comment: shothanded named import line break with default import) for prettier compatibility.

// input
import { a as b } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
import { c as d } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
export { e as f } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';


// before
import {
  a as b
} from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
import {
  c as d
} from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
export { e as f } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';


// after
import { a as b } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
import { c as d } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
export { e as f } from 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';

Test Plan

  • cargo test -p rome_js_formatter formatter

@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 716976f
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/637cde459436fb00081f54fa

@unvalley unvalley changed the title test: add long module named import snapshot test fix(rome_js_formatter): shorthanded named import line break Nov 22, 2022
@unvalley unvalley changed the title fix(rome_js_formatter): shorthanded named import line break fix(rome_js_formatter): shothanded named import line break with default import Nov 22, 2022
@unvalley unvalley marked this pull request as ready for review November 22, 2022 14:46
@MichaReiser MichaReiser added A-Formatter Area: formatter L-JavaScript Langauge: JavaScript labels Nov 23, 2022
@MichaReiser MichaReiser added this to the 11.0.0 milestone Nov 23, 2022
@MichaReiser
Copy link
Contributor

Thank you

@MichaReiser MichaReiser merged commit 49d429a into rome:main Nov 23, 2022
@unvalley unvalley deleted the fix/named-import-line-break branch November 23, 2022 08:16
jeysal added a commit to jeysal/rometools that referenced this pull request Nov 24, 2022
* upstream/main: (73 commits)
  fix(semantic_analyzers): style/noShoutyConstants does not recognize multiple uses of a constant. (rome#3789)
  feat(rome_js_analyze): useDefaultSwitchClauseLast (rome#3791)
  chore: run rustfmt and typo fix (rome#3840)
  feat(rome_js_analyze): use exhaustive deps support properties (rome#3581)
  website(docs): Fix text formatting (rome#3828)
  feat(rome_js_analyze): `noVoidTypeReturn` (rome#3806)
  feat(rome_cli): expose the `--verbose` flag to the CLI (rome#3812)
  fix(rome_diagnostics): allow diagnostic locations to be created without a resource (rome#3834)
  feat(rome_js_analyze): add noExtraNonNullAssertion rule (rome#3797)
  fix(rome_lsp): lsp friendly catch unwind (rome#3740)
  feat(rome_js_semantic): model improvements (rome#3825)
  feat(rome_json_parser): JSON Lexer (rome#3809)
  feat(rome_js_analyze): implement `noDistractingElements` (rome#3820)
  fix(rome_js_formatter): shothanded named import line break with default import (rome#3826)
  feat(rome_js_analyze): `noConstructorReturn` (rome#3805)
  feat(website): change enabledNurseryRules to All/Recommended select (rome#3810)
  feat(rome_js_analyze): noSetterReturn
  feat(rome_js_analyze): noConstructorReturn
  feat(rome_analyze): suppress rule via code actions (rome#3572)
  feat(rome_js_analyze): `noVar` (rome#3765)
  ...
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter L-JavaScript Langauge: JavaScript
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants