prettier settings for vscode
up vote
2
down vote
favorite
I recently switched to a new computer, and am having difficulty with a prettier setting. (I think it's prettier, could be eslint).
This gif illustrates what's happening:
http://g.recordit.co/H871hfT9Sv.gif
Anyone know what this setting is called? I would prefer all imports to be on a single line unless the length extends the printWidth
setting.
Here are my relevant User Settings from VS Code:
{
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}
Thanks !
Edit:
Visual depiction so you don't need to watch the gif.
Expected:
import React from 'react'
import { Dimensions, StyleSheet, View } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import { isIphoneX } from 'react-native-iphone-x-helper'
Behavior: (unwanted)
import React from 'react'
import {
Dimensions,
StyleSheet,
View
} from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import {
isIphoneX
} from 'react-native-iphone-x-helper'
visual-studio-code eslint vscode-settings prettier
add a comment |
up vote
2
down vote
favorite
I recently switched to a new computer, and am having difficulty with a prettier setting. (I think it's prettier, could be eslint).
This gif illustrates what's happening:
http://g.recordit.co/H871hfT9Sv.gif
Anyone know what this setting is called? I would prefer all imports to be on a single line unless the length extends the printWidth
setting.
Here are my relevant User Settings from VS Code:
{
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}
Thanks !
Edit:
Visual depiction so you don't need to watch the gif.
Expected:
import React from 'react'
import { Dimensions, StyleSheet, View } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import { isIphoneX } from 'react-native-iphone-x-helper'
Behavior: (unwanted)
import React from 'react'
import {
Dimensions,
StyleSheet,
View
} from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import {
isIphoneX
} from 'react-native-iphone-x-helper'
visual-studio-code eslint vscode-settings prettier
1
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I recently switched to a new computer, and am having difficulty with a prettier setting. (I think it's prettier, could be eslint).
This gif illustrates what's happening:
http://g.recordit.co/H871hfT9Sv.gif
Anyone know what this setting is called? I would prefer all imports to be on a single line unless the length extends the printWidth
setting.
Here are my relevant User Settings from VS Code:
{
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}
Thanks !
Edit:
Visual depiction so you don't need to watch the gif.
Expected:
import React from 'react'
import { Dimensions, StyleSheet, View } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import { isIphoneX } from 'react-native-iphone-x-helper'
Behavior: (unwanted)
import React from 'react'
import {
Dimensions,
StyleSheet,
View
} from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import {
isIphoneX
} from 'react-native-iphone-x-helper'
visual-studio-code eslint vscode-settings prettier
I recently switched to a new computer, and am having difficulty with a prettier setting. (I think it's prettier, could be eslint).
This gif illustrates what's happening:
http://g.recordit.co/H871hfT9Sv.gif
Anyone know what this setting is called? I would prefer all imports to be on a single line unless the length extends the printWidth
setting.
Here are my relevant User Settings from VS Code:
{
"prettier.printWidth": 100,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "all"
}
Thanks !
Edit:
Visual depiction so you don't need to watch the gif.
Expected:
import React from 'react'
import { Dimensions, StyleSheet, View } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import { isIphoneX } from 'react-native-iphone-x-helper'
Behavior: (unwanted)
import React from 'react'
import {
Dimensions,
StyleSheet,
View
} from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import {
isIphoneX
} from 'react-native-iphone-x-helper'
visual-studio-code eslint vscode-settings prettier
visual-studio-code eslint vscode-settings prettier
edited Jun 21 at 18:30
asked Jun 21 at 18:22
pingo
5141421
5141421
1
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41
add a comment |
1
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41
1
1
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
- Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus)
- Settings window should open. Above (Top) there is a search. Type "Prettier"
- You should see the available Prettier settings. You can modify them :)
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
add a comment |
up vote
-3
down vote
Plugins like Prettier
and Beautify
doesn't provide you with very much control over the styling.
They are good to make code consistent in an easy way :)
I prefer eslint plugin instead.
Then you can define your own eslint.json
rules.
(or do as everybody else and use airbnb's linting rules).
Then you can use settings like "eslint.autoFixOnSave": true
. Then your code will format accordingly to your rules on save :)
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
- Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus)
- Settings window should open. Above (Top) there is a search. Type "Prettier"
- You should see the available Prettier settings. You can modify them :)
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
add a comment |
up vote
1
down vote
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
- Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus)
- Settings window should open. Above (Top) there is a search. Type "Prettier"
- You should see the available Prettier settings. You can modify them :)
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
add a comment |
up vote
1
down vote
up vote
1
down vote
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
- Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus)
- Settings window should open. Above (Top) there is a search. Type "Prettier"
- You should see the available Prettier settings. You can modify them :)
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
- Go to FILE -> PREFERENCES -> SETTINGS. (VS Code Menus)
- Settings window should open. Above (Top) there is a search. Type "Prettier"
- You should see the available Prettier settings. You can modify them :)
answered Nov 21 at 19:12
Stephane
9331223
9331223
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
add a comment |
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
1
1
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
Exactly what i was looking for, thank you!
– Stark
Nov 28 at 7:35
add a comment |
up vote
-3
down vote
Plugins like Prettier
and Beautify
doesn't provide you with very much control over the styling.
They are good to make code consistent in an easy way :)
I prefer eslint plugin instead.
Then you can define your own eslint.json
rules.
(or do as everybody else and use airbnb's linting rules).
Then you can use settings like "eslint.autoFixOnSave": true
. Then your code will format accordingly to your rules on save :)
add a comment |
up vote
-3
down vote
Plugins like Prettier
and Beautify
doesn't provide you with very much control over the styling.
They are good to make code consistent in an easy way :)
I prefer eslint plugin instead.
Then you can define your own eslint.json
rules.
(or do as everybody else and use airbnb's linting rules).
Then you can use settings like "eslint.autoFixOnSave": true
. Then your code will format accordingly to your rules on save :)
add a comment |
up vote
-3
down vote
up vote
-3
down vote
Plugins like Prettier
and Beautify
doesn't provide you with very much control over the styling.
They are good to make code consistent in an easy way :)
I prefer eslint plugin instead.
Then you can define your own eslint.json
rules.
(or do as everybody else and use airbnb's linting rules).
Then you can use settings like "eslint.autoFixOnSave": true
. Then your code will format accordingly to your rules on save :)
Plugins like Prettier
and Beautify
doesn't provide you with very much control over the styling.
They are good to make code consistent in an easy way :)
I prefer eslint plugin instead.
Then you can define your own eslint.json
rules.
(or do as everybody else and use airbnb's linting rules).
Then you can use settings like "eslint.autoFixOnSave": true
. Then your code will format accordingly to your rules on save :)
answered Jun 21 at 18:52
Jakob Göran Thomasson
21618
21618
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50975264%2fprettier-settings-for-vscode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Nvm. Had something to do with the "Beautify" extension. marketplace.visualstudio.com/…
– pingo
Jun 21 at 18:41