Home

Awesome

Supermind Linting Standards

Configurable ESLint wrapper around eslint-config-supermind.

Install superlint as a devDependency:

yarn add superlint --dev

Add superlint to your package scripts:

{
  "scripts": {
    "lint": "superlint"
  }
}

Optionally pass a glob to superlint to only lint those files:

{
  "scripts": {
    "lint": "superlint source/**/*.js"
  }
}

For extra points run superlint before your tests:

{
  "scripts": {
    "test": "superlint && node tests.js"
  }
}

Configuration

Add a superlint field to package.json:

{
  "superlint": {
    "ignore": "build",
    "use": [
      "flowtype",
      "inferno"
    ],
    "plugins": [
      "mocha"
    ],
    "rules": {
      "semi": [ "error", "always" ]
    }
  }
}

You can ignore files and folders using a glob or an array of globs.

To add more linting goodness for Inferno, React or Flowtype, pass an array of strings to the use field. Options are:

These options map to the rulesets from eslint-config-supermind.

Fields that can be set on the superlint object are as follows: