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'
Prettier uses cosmiconfig for configuration file support. This means you can configure Prettier via (in order of precedence): A "prettier" key in your package. json file.
For those trying to quickly change Prettier settings for VS Code. Here are the steps:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With