eslint packages for three use-cases and can be used as a standard in any new project.
There are many useful features:
eslint. Many rules will fix themselves!
This styleguide is used by dozens of product teams at GoDaddy. Have a question or comment? Open an issue!
Install one of the provided packages depending on the kind of application you are developing:
# Default with ES6npm 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
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
These use exactly the configuration defined in the individual
eslint-config-godaddy* package with auto-fix enabled automatically.
"scripts":"lint": "eslint-godaddy files/ you/ want-to/ lint/"
moduleexports =extends: 'godaddy'rules://// Put any rules you wish to override here.//
--fix option in
eslint is only available as a CLI option. Auto-fix will NOT be enabled unless you run
eslint --fix in your
"scripts":"lint": "eslint --fix files/ you/ want-to/ lint/"
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.
"extends": "godaddy""rules":// Disable the 'max-params' rule"max-params": 0
"scripts":"eslint": "eslint-godaddy -c .eslintrc lib/ test/"
Fork this repository and submit a pull request.
Proposed modifications to the style guide should modify the files in
/dotfiles before running
npm run build when submitting a pull request. This repository utilizes the fashion-show module to generate the
/dist files to be checked in.
Great. We'd love to talk about it. Fork this repository and submit a pull-request.
No problem. Reach out to us by opening an issue