0.1.0 • Published 8 years ago
wml-coding-std v0.1.0
wml-coding-std
A module for keeping consistent JS coding standards at WML
Installation
First install the package:
npm i wml-coding-stdThen setup appropriate .eslintrc file(s) in your project. The eslint-config-walmart package has several options available.
You'll also want to extend eslint-config-prettier and eslint-plugin-react after extending eslint-config-walmart (all included in this package) to make it Prettier-compatible:
{
"extends": [
"walmart",
"prettier",
"prettier/react"
]
}Rationale
Given that we are rapidly adopting prettier to do pure style formatting, we need a new approach to keeping a consistent coding standard. The solution proposed is to create a new module wml-coding-std, that does this:
- includes eslint, eslint-config-walmart, prettier eslint config overrides
- includes prettier
- includes npm postinstall scripts to:
- setup npm tasks for prettier
- setup git hooks for prettier
- includes a task that user can invoke manually to format all
js,jsxcode under all directories except the usual suspects likenode_modules,dist,coverage
0.1.0
8 years ago