Support new js proposals: optional-chaining & pipeline-operator
See original GitHub issueDescription
NOTE:
- Check the list of open issues before filing a new issue.
- Please update the expect output section to match how you would prefer the code to look.
Input
The code looked like this before beautification:
'test' |> console.log;
let a = {};
a?.b?.c?.d;
Current Output
The code actually looked like this after beautification:
'test' | > console.log;
let a = {};
a ? .b ? .c ? .d;
Expected Output
The code should have looked like this after beautification:
/*Adjust the code to look how you prefer the output to be.*/
'test' |> console.log;
let a = {};
a?.b?.c?.d;
Environment
Browser User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Language Selected: JavaScript
Settings
Example:
{
"indent_size": "4",
"indent_char": " ",
"max_preserve_newlines": "5",
"preserve_newlines": true,
"keep_array_indentation": false,
"break_chained_methods": false,
"indent_scripts": "normal",
"brace_style": "collapse",
"space_before_conditional": true,
"unescape_strings": false,
"jslint_happy": false,
"end_with_newline": false,
"wrap_line_length": "0",
"indent_inner_html": false,
"comma_first": false,
"e4x": false
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
babel/plugin-proposal-optional-chaining
NOTE**: This plugin is included in `@babel/preset-env`, in [ES2020](https://github.com/tc39/proposals/blob/master/finished-proposals.md)
Read more >JavaScript Proposal: Optional Chaining | by Denny Scott
Optional chaining isn't the flashiest new proposal, but it represents a significant quality of life improvement for Javascript developers.
Read more >How to use the @babel/plugin-proposal-pipeline ... - Snyk
To help you get started, we've selected a few @babel/plugin-proposal-pipeline-operator examples, based on popular ways it is used in public projects.
Read more >ESNext: JavaScript “Optional Chaining Operator” - Bram.us
UPDATE: The proposed operator got renamed from “Null Propagation Operator” to “Optional Chaining Operator”. This post has been updated to ...
Read more >Ben Lesh on Twitter: "IMO, the #JavaScript pipeline operator is ...
Optional chaining is cute sugar to help you type less. Pipeline creates all new ways to create declarative, functional code that's very readable ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bitwiseman Looks like proposal-optional-chaining has made it to stage 2!
@theblang Yes, each item should be filed as separate issue that can be tracked to completion.