npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-config-adjunct

v4.13.0

Published

A reasonable collection of plugins to use alongside your main esLint configuration

Downloads

18,583

Readme

eslint-config-adjunct

A reasonable collection of 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, standard or eslint:recommended. It provides a range of useful plugins that are often too time-consuming to setup and provides an easy way to install just the plugins you need, based on your project's dependencies.

Install

To install this config, run the following command.

npm install eslint-config-adjunct --save-dev

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 the following. For more advanced use cases see the example configurations for TypeScript and Vue.

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

You can now include html, json and markdown in the list of files passed to eslint to lint any JavaScript contained.

{
  "scripts": {
    "eslint": "eslint --color --ext .html,.js,.json,.jsx,.md *.* src",
    "eslint:fix": "npm run eslint -- --fix"
  }
}

Install Dependencies

After you have configured eslint to include this package, the first time you run eslint it will output the npm command to install the dependencies required for your project. Cut'n'paste this command into the console, and you are then ready to start linting.

Plugins

Code Quality

These two plugins provide a range of code quality rules:

Langauges

The following plugins expand esLint to work with json files, and lint JavaScript contiained in HTML and MarkDown:

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

Library Plugins

These plugins will be loaded in based on your project dependencies in package.json. If a supported library is part of your project then it's related esLint plugins will be loaded. The following packages are supported:

Practices

The following esLint plugins enforce good coding practices:

Prettier

If prettier is installed, any rules that may conflict with Prettier will be disabled. The plugin should read you Prettier config from your project's root.

The prettier configs for different eslint plugins are also automatically included based on which eslint plugins have been installed into your project.

Security

These plugins add code security rules to esLint:

Test Libraries

Test plugins are loaded based on which testing tools you have listed in devDependencies of package.json. The following test plugins are supported:

For test files a few rules are turned off, to better to support normal unit test code styles.

Rules

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

Switch-Case

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

// Good

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

  case 2:
  case 3:
    somethingElse()
    break

  default:
    defaultThing()
}

Disabled rules

The following rules are disabled due to them being considered unduly restrictive or unhelpful.

  • jest/no-disabled-tests
  • react-redux/prefer-separate-component-file
  • redux-saga/no-unhandled-errors
  • lodash/prefer over native rules
  • lodash-fp/use-fp
  • unicorn/no-array-for-each
  • unicorn/no-fn-reference-in-iterator
  • unicorn/no-array-for-each
  • unicorn/no-reduce
  • unicorn/no-null
  • unicorn/prefer-number-properties
  • unicorn/prefer-optional-catch-binding
  • unicorn/prevent-abbreviations

The following rules are disabled due to clashing with other plugins

  • array-func/prefer-array-from
  • import/order
  • sort-imports

License

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