Install one of the provided packages depending on the kind of application you are developing:
# Default with ES6
npm i eslint-config-godaddy --save-dev
# OR (ES6 with React rules)
npm i eslint-config-godaddy-react --save-dev
# OR (legacy ES5 with React rules)
npm i eslint-config-godaddy-es5 --save-dev
# OR (ES6 with TypeScript rules)
npm i eslint-config-godaddy-typescript --save-dev
# OR (ES6 with React and TypeScript rules)
npm i eslint-config-godaddy-react-typescript --save-dev
# OR (ES6 with Flow rules)
npm i eslint-config-godaddy-flow --save-dev
# OR (ES6 with React and Flow rules)
npm i eslint-config-godaddy-react-flow --save-dev
Usage
There are two ways to use this styleguide depending on your own tooling preference: directly using pre-included binaries or running eslint yourself with a custom .eslintrc config.
1. Use the pre-included binaries
These use exactly the configuration defined in the individual eslint-config-godaddy* package with auto-fix enabled automatically.
This section is a place for additional best practices that may be useful but are not strictly enforced by this styleguide. Have something to add here? Great! Submit a PR.
For a first time setup make sure to run from the root of the monorepo
npm install
From there the bootstrap script will setup the packages and hoist the node_modules
Publishing
If you are lucky enough to get to publish a new version of a package you are in luck. This monorepo is setup to independently publish packages based on changes commited. Just make sure to run:
npm run publish
This runs lerna publish under the hood and will run you through a cli driven experience to help you determine the next version. To learn more about it see lerna publish
I disagree with a specific rule
Great. We'd love to talk about it. Fork this repository and submit a pull-request.
请发表评论