-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.status:awaiting responseIssues that require answers to questions from maintainers before action can be takenIssues that require answers to questions from maintainers before action can be taken
Description
Prettier 1.16.4
Playground link
# Options (if any):
{
"arrowParens": "avoid",
"bracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"parser": "babylon",
"printWidth": 80,
"proseWrap": "preserve",
"requirePragma": false,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"useTabs": false
}Input:
export const testComponent = {
template,
controller: class TestComponent {
constructor($ngRedux) {
'ngInject';
this.unsubscribe = $ngRedux.connect(this.mapState, {})(this);
}
mapState(state) {
return {
test: state.test,
};
}
}
}Output:
export const testComponent = {
template,
controller: class TestComponent {
constructor($ngRedux) {
'ngInject';
this.unsubscribe = $ngRedux.connect(this.mapState, {})(this);
}
mapState(state) {
return {
test: state.test,
};
}
}
}Expected behavior:
Using VS Code and using prettier-vscode extension 1.8.1 I get inconsistent results
sometimes this line:
this.unsubscribe = $ngRedux.connect(this.mapState, {})(this); is formatted exactly like that
sometimes it is formatted like this instead:
this.unsubscribe = $ngRedux.connect(
this.mapState,
{}
)(this);
The lines always has the same width and same indentation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.status:awaiting responseIssues that require answers to questions from maintainers before action can be takenIssues that require answers to questions from maintainers before action can be taken