JSPM

  • Created
  • Published
  • Downloads 4147
  • Score
    100M100P100Q126967F
  • License MIT

A midly opinionated collection of the best lesser known esLint plugins that every project should include

Package Exports

  • eslint-config-adjunct

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-config-adjunct) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

eslint-config-adjunct

Greenkeeper badge

A mildly opinionated collection of the best lesser known esLint plugins to use alongside your main eslint configuration.

This config is designed to be used alongside any of the major esLint configs, such as airbnb or standard. It provides a range of extra rules to enhance the linting of your code.

Install

To run this config you will need to install it along with it's peerDependancies.

npx install-peerdeps --dev eslint-config-adjunct

If you have problems with the above command, then you will need to run install-peerdeps locally.

npm install -g install-peerdeps
install-peerdeps --dev eslint-config-adjunct

Configure

Extend your .eslintrc, with adjunct, which should be the last item in the extends array. For example if your using eslint-config-airbnb as your main rule set, your .eslintrc should look like this:

{
  "extends": ["airbnb", "adjunct"]
}

You can now include html and markdown in the list of files passed to esLint to have any contained JavaScript linted.

Plugins

This configuration contains the following esLint plugins.

Rules

In the most part the default rules are used for the plugins listed above, with the following exceptions.

Markdown

When linting code snippets in Markdown files, a few rules relating to globals and unused vars are disabled.

Switch-Case

Adds thes fallthrough: 'never' option to the the newlint-between-switch-case rule.

// Good

switch (foo) {
  case: 1
    something()
    break

  case: 2
  case: 3
    somethingElse()

  default:
    anotherThing()
}

License

Copyright © 2019 David J. Bradshaw. Licensed under the MIT License.