1.0.2 • Published 4 years ago

eslint-config-amply v1.0.2

Weekly downloads
2
License
GPL-2.0+
Repository
-
Last release
4 years ago

Amply ESLint Config

Brings order to chaos.

This is a set of coding best practices that can be adopted across any of our frontend projects. It is based heavily on the config created by 10up which in turn is based on the Airbnb JavaScript style guide. Where possible additional standards like React recommended rules and WordPress coding standards are also included.

But on top of all of that, we can also implement our own standards and rules as we choose.

This linter is meant to be a tool to help you while you code, but it is just that - a tool. It does not take the place of your judgment or your expertise. If the linter doesn't like something you're doing, let's discuss it and change the linting rules if necessary. YOU ARE STILL RESPONSIBLE FOR YOUR OWN CODE.

Setting up the config

To use this in your project, you'll need to do the following:

  1. Add this library as a development dependency with npm -i D eslint-config-amply
  2. Install necessary peer dependencies by running npx install-peerdeps --dev eslint-config-amply
  3. Add the following top-level object to your package.json file:
  "eslintConfig": {
    "extends": [
      "eslint-config-amply"
    ]
  }

(Note: For specific versions of this linter, you can add /typescript, /wordpress, /react, etc. to the end of that extends property.)

What to do with this linter

  • Help catch inconsistencies in your code before committing.
  • Keep formatting consistent across all our projects.
  • Find places where best practices could be better followed.
  • Add it to older projects and little-by-little over time (and through separate maintenance commits/branches) clean up existing codebases.

What NOT to do with this linter

  • Add it to a project, tell it to "fix all", commit all the changes, and deploy.
  • Rely on it to tell you if your code works or not.
  • Let it have the final decision when you disagree.

Release History

  • 1.0.0
    • Initial version