Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nickserv/create-prettierrc

Create a Prettier config based on the formatting of existing JavaScript code
https://github.com/nickserv/create-prettierrc

javascript jsx prettier

Last synced: 23 days ago
JSON representation

Create a Prettier config based on the formatting of existing JavaScript code

Awesome Lists containing this project

README

        

# create-prettierrc

Create a Prettier config based on the formatting of existing JavaScript code

## Usage

```js
import createPrettierrc from "create-prettierrc";

createPrettierrc('console.log("Hello, world!")');
```

```json
{
"endOfLine": "lf",
"jsxSingleQuote": false,
"requirePragma": false,
"semi": true,
"singleQuote": false
}
```

## Limitations

Currently supports a limited number of Prettier config options using only JavaScript and JSX (React) syntax