wml-coding-std
v0.1.0
Published
A module for keeping consistent JS coding standards at WML
Downloads
8
Readme
wml-coding-std
A module for keeping consistent JS coding standards at WML
Installation
First install the package:
npm i wml-coding-std
Then 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,jsx
code under all directories except the usual suspects likenode_modules
,dist
,coverage