EnergySage Front End Rule Set


Keywords
energysage, style guide, lint, eslint, prettier, stylelint, es6, vue
License
MIT
Install
npm install eslint-config-energysage@1.2.1

Documentation

eslint-config-energysage

An ESLint/Prettier/Stylelint Shareable Config For EnergySage Projects

This package provides EnergySage's base ESLint, Prettier & Stylelint rule bases.

Usage

  1. Install the correct versions of each peer package, which are listed by the command:
npm info "eslint-config-energysage@latest" peerDependencies

And they can be installed using this command:

npx install-peerdeps --dev eslint-config-energysage
  1. Install the latest version of our package
npm install --dev eslint-config-energysage@latest
  1. Update/Create your .eslintrc.js file, ensure there are no duplicate plugin/config entries
    module.exports = {
        extends: ['eslint-config-energysage'],
        rules: {
            // Disable/Enable any custom rules for your project
        },
    };
  1. Update your package.json file, ensure there is no .prettierrc file
    "prettier": "eslint-config-energysage/prettier",
    "scripts": {}
  1. Update/Create your stylelint.config.js file, ensure there are no duplicate plugin/config entries
    module.exports = {
        extends: ['eslint-config-energysage/stylelint'],
        rules: {
            // Disable/Enable any custom rules for your project
        },
    };

Improving this config

Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Look to the CHANGELOG.md to see when rules were updated.

You can make sure this module lints with itself using npm run lint.