Package Exports
- neutrino-preset-prettier
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (neutrino-preset-prettier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Neutrino Prettier Preset
Easy to use neutrino preset that will apply Prettier to all code being compiled.
Prettier is an opinionated JavaScript formatter inspired by refmt with advanced support for language features from ES2017, JSX, and Flow. It removes all original styling and ensures that all outputted JavaScript conforms to a consistent style.
Installation
With yarn:
$ yarn add neutrino-preset-prettier -D
Or npm:
$ npm i neutrino-preset-prettier -D
Next, add to your package.json
{
"config": {
"presets": [
"neutrino-preset-react",
"neutrino-preset-prettier"
]
},
"scripts": {
"start": "neutrino start"
}
}
Options
Here are the default settings:
{
printWidth: 80,
tabWidth: 2,
singleQuote: true,
trailingComma: false,
bracketSpacing: true,
parser: 'babylon',
encoding: 'utf-8',
extensions: [ '.js', '.jsx' ]
}
Options are found on neutrino.custom.prettier