@merrywhether/config
Common config files for @merrywhether projects
Usage
Installation:
yarn add -D @merrywhether/config
Use this is via invoking its executable from the root of your app (or the directory where you want the config files created):
yarn mw-config
This will generate your config files for you, with support for the following options with corresponding effects:
option | alias | default set | Δ eslintrc | Δ prettier.config | Δ tsconfig |
---|---|---|---|---|---|
eslint | e | ||||
prettier | p | ||||
react | r | ||||
renovate | |||||
solid | |||||
styled | |||||
typescript | t |
The defaults are controlled by the --default
/-d
flag.
Configuration Details
ESLint
The base ESLint configuration includes the following plugins/configs:
eslint
(recommended++)import
prettier
(recommended)sort-destructure-keys
sort-keys-fix
When the typescript
option is selected, the following are added:
@typescript-eslint
(recommended++, including type-aware)typescript-sort-keys
(recommended)
When the react
option is selected, the following are added:
react
(recommended++, jsx-runtime)react-hooks
(recommended++)
When the solid
option is selected, the following are added:
Prettier
Uses the default Prettier settings with the following changes:
singleQuote: true
(because this is JS!😛 )trailingComma: all
(embrace the future)proseWrap: always
(wrapping Markdown).
Typescript
The base configuration has all of the strictest settings enabled and targets
esnext
.
When the styled
option is selected,
typescript-styled-plugin
is added.
When the solid
option is selected, the jsxImportSource
is appropriately
updated.