ESLint sharable config for strict linting
Switch branches/tags
greenkeeper-eslint-3.0.0 greenkeeper-eslint-3.0.1 greenkeeper-eslint-3.1.0 greenkeeper-eslint-3.1.1 greenkeeper-eslint-3.2.0 greenkeeper-eslint-3.2.1 greenkeeper-eslint-3.2.2 greenkeeper-eslint-3.3.0 greenkeeper-eslint-3.3.1 greenkeeper-eslint-3.4.0 greenkeeper-eslint-3.5.0 greenkeeper-eslint-3.6.0 greenkeeper-eslint-3.6.1 greenkeeper-eslint-3.7.0 greenkeeper-eslint-3.7.1 greenkeeper-eslint-3.9.0 greenkeeper-eslint-3.9.1 greenkeeper-eslint-plugin-filenames-1.0.0 greenkeeper-ghooks-1.2.2 greenkeeper/eslint-5.0.0 greenkeeper/eslint-5.0.1 greenkeeper/eslint-plugin-filenames-1.3.2 greenkeeper/ghooks-2.0.0 greenkeeper/ghooks-2.0.1 greenkeeper/ghooks-2.0.2 greenkeeper/ghooks-2.0.3 greenkeeper/ghooks-2.0.4 greenkeeper/semantic-release-6.3.2 greenkeeper/semantic-release-6.3.6 greenkeeper/semantic-release-7.0.1 greenkeeper/semantic-release-7.0.2 greenkeeper/semantic-release-8.0.0 greenkeeper/semantic-release-8.0.1 greenkeeper/semantic-release-8.0.3 greenkeeper/semantic-release-8.2.0 greenkeeper/semantic-release-11.0.2 greenkeeper/semantic-release-12.2.2 greenkeeper/semantic-release-12.2.4 greenkeeper/semantic-release-12.2.5 greenkeeper/semantic-release-12.4.0 greenkeeper/semantic-release-12.4.1 greenkeeper/semantic-release-15.0.0 greenkeeper/semantic-release-15.0.1 greenkeeper/semantic-release-15.0.2 greenkeeper/semantic-release-15.0.3 greenkeeper/semantic-release-15.1.2 greenkeeper/semantic-release-15.1.3 greenkeeper/semantic-release-15.1.4 greenkeeper/semantic-release-15.1.5 greenkeeper/semantic-release-15.1.6 greenkeeper/semantic-release-15.1.7 greenkeeper/semantic-release-15.1.8 greenkeeper/semantic-release-15.1.11 greenkeeper/semantic-release-15.3.0 greenkeeper/semantic-release-15.4.1 greenkeeper/semantic-release-15.4.2 greenkeeper/semantic-release-15.4.3 greenkeeper/semantic-release-15.4.4 greenkeeper/semantic-release-15.5.0 greenkeeper/semantic-release-15.5.1 greenkeeper/semantic-release-15.5.2 greenkeeper/semantic-release-15.5.3 greenkeeper/semantic-release-15.5.4 greenkeeper/semantic-release-15.5.5 greenkeeper/semantic-release-15.6.0 greenkeeper/semantic-release-15.6.1 greenkeeper/semantic-release-15.6.2 greenkeeper/semantic-release-15.6.3 greenkeeper/semantic-release-15.7.0 greenkeeper/semantic-release-15.7.1 greenkeeper/semantic-release-15.7.2 greenkeeper/semantic-release-15.8.0 greenkeeper/semantic-release-15.8.1 greenkeeper/semantic-release-15.9.1 greenkeeper/semantic-release-15.9.2 greenkeeper/semantic-release-15.9.3 greenkeeper/semantic-release-15.9.5 greenkeeper/semantic-release-15.9.6 greenkeeper/semantic-release-15.9.7 greenkeeper/semantic-release-15.9.8 greenkeeper/semantic-release-15.9.9 greenkeeper/semantic-release-15.9.11 greenkeeper/semantic-release-15.9.12 greenkeeper/semantic-release-15.9.13 greenkeeper/semantic-release-15.9.14 greenkeeper/semantic-release-15.9.15 greenkeeper/semantic-release-15.9.16 greenkeeper/semantic-release-15.9.17 greenkeeper/semantic-release-15.10.3 greenkeeper/semantic-release-15.10.4 greenkeeper/semantic-release-15.10.5 greenkeeper/semantic-release-15.10.6 greenkeeper/semantic-release-15.10.7 greenkeeper/semantic-release-15.10.8 greenkeeper/semantic-release-15.11.0 greenkeeper/semantic-release-15.12.0 greenkeeper/semantic-release-15.12.1 greenkeeper/semantic-release-15.12.2 greenkeeper/semantic-release-15.12.3 greenkeeper/semantic-release-15.12.4 greenkeeper/semantic-release-15.12.5 greenkeeper/validate-commit-msg-2.9.0 greenkeeper/validate-commit-msg-2.10.0 greenkeeper/validate-commit-msg-2.10.1 greenkeeper/validate-commit-msg-2.12.2 master
Nothing to show
Clone or download
Latest commit 53c385a Jan 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
rules
.editorconfig style: switch to 2 space indent Dec 14, 2015
.gitignore chore: enable semantic-release Dec 14, 2015
.travis.yml chore(travis): drop support for node 0.12 Oct 12, 2016
README.md
babel.js feat: add babel.js for eslint-plugin-babel Jun 22, 2016
browser.js style: switch to 2 space indent Dec 14, 2015
d3.js refactor: tweak d3 id-match rule to inherit all options Jun 1, 2016
es5.js style(es5): use single quotes Nov 9, 2017
es6.js feat: add all currently unused rules Feb 4, 2017
mocha.js
package.json feat: add rules from eslint 4.0.0 and upgrade eslint Jul 7, 2017
test.js v3.0.0 Aug 11, 2015

README.md

eslint-config-strict

ESLint sharable config for strict linting.

Rules

Every rule is documented, justified, and has examples within the rules folder. If you feel like a rule is wrong, take a read of this file, or refer others to it!

Installation

Install this config package and ESLint:

$ npm install --save-dev eslint-config-strict

If you're using npm < v3 you'll also need to install all of the dependencies of this project:

$ npm install --save-dev eslint eslint-plugin-filenames

If you use React, also have a look at the eslint-config-strict-react plugin.

Usage

This set of configs is meant to be extended on a per-project basis as necessary using ESLint's shareable configs feature.

To start, you probably want to use pick either strict/es6 or strict/es5 (note: strict can be used as an alias for strict/es6). You can then layer additional rulesets on top using eslint, the additive rules are:

This package includes the following configurations:

  • strict/mocha (adds env.mocha true, assert, expect, must and should are added as globals, and func-names, padded-blocks and max-nested-callbacks rules are explicitly turned off)
  • strict/browser (simply sets env.browser to true)
  • strict/d3 (relaxes strict identifier rules, allowing for identifiers like d3, d, dx, dy)
  • strict/babel (for use with the eslint-plugin-babel plugin)

How to use

Simply define your .eslintrc (or add a eslintConfig object to package.json) like so:

{
  "extends": ["strict"]
}

Add any additional plugins you want, for example:

{
  "extends": ["strict", "strict/browser"]
}

Also, you can define a test/.eslintrc to override the projects main one:

{
  "extends": ["strict", "strict/browser", "strict/mocha"]
}

If your project is a front-end project and you're not transpiling ES6 code, you might have an .eslintrc that looks like this:

{
  "extends": ["strict/es5", "strict/browser"]
}

Feel free to define additional globals or rules, or override them as you see fit:

{
  "extends": ["strict"],

  "globals": {
    "blarg": true
  },

  "rules": {
      "eol-last": 0
  }
}

For more details about how shareable configs work, see the ESLint documentation.