npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

godaddy-style

v5.0.0

Published

The approach to JavaScript at GoDaddy. We think it's pretty decent.

Downloads

105

Readme

godaddy-style

Official GoDaddy JavaScript styleguide. It includes eslint packages for three use-cases and can be used as a standard in any new project.

There are many useful features:

  • Standard. No configuration. – Stop worrying about style and focus on your work.
  • Modern – Uses modern linting tools like eslint.
  • Auto-fix – Auto-fix is enabled by-default through in 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!

Installation

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 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.

{
  "scripts": {
    "lint": "eslint-godaddy files/ you/ want-to/ lint/"
  }
}
2. Define your local .eslintrc and run eslint yourself:
module.exports = {
  extends: 'godaddy',
  rules: {
    //
    // Put any rules you wish to override here.
    //
  }
}

The --fix option in eslint is only available as a CLI option. Auto-fix will NOT be enabled unless you run eslint --fix in your package.json.

{
  "scripts": {
    "lint": "eslint --fix files/ you/ want-to/ lint/"
  }
}

Additional Suggestions for Best Practices

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.

React

FAQ

How do I override a specific rule ?

1. Add a .eslintrc file at the root of your project:
{
  "extends": "godaddy",
  "rules": {
    // Disable the 'max-params' rule
    "max-params": 0
  }
}
2. Add a param to specify the path of your own .eslintrc file in your package.json:
{
  "scripts": {
    "eslint": "eslint-godaddy -c .eslintrc lib/ test/",
  }
}

How do I contribute?

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.

I disagree with a specific rule

Great. We'd love to talk about it. Fork this repository and submit a pull-request.

Help! It's not working for me!

No problem. Reach out to us by opening an issue

Roadmap

  • Add more specific style guidance around React.
  • Consider other rules in an eslint only implementation:
    • computed-property-spacing
    • generator-star-spacing
    • semi-spacing
    • block-spacing
  • Continue to modularize the eslint rules.
  • Translate configuration files into more verbose written documentation.
  • Add support for IDE formats (IntelliJ, Webstorm, Atom, Eclipse, Sublime, etc...)
  • Never stop improving.