Skip to content

merrywhether/config

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@merrywhether/config

npm version Renovate dashboard Lint Status Version

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:

When the typescript option is selected, the following are added:

When the react option is selected, the following are added:

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.