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

@silvermine/eslint-config

v3.2.0

Published

JS Code Standards for all SilverMine projects - eslint enforcement

Downloads

1,636

Readme

Silvermine ESLint Rules

NPM Version License Build Status Dependency Status Dev Dependency Status Conventional Commits

What?

Shareable ESLint configuration for all Silvermine projects.

Why?

Because we need it. Whitespace errors are evil. As are the other hundreds of types of errors this protects us from.

Running ESLint

It is recommended to run ESLint via a NPM script in package.json with the command eslint . for projects that use this configuration.

Example:

{
   "scripts": {
      "eslint": "eslint ."
   }
}

Other Configuration Files Available

In addition to the ESLint rules, this package provides configuration for the following:

  • EditorConfig
    • Provides a default set of editor configuration values to use in Silvermine projects
    • Usage: Symlink the .editorconfig file to the root of your project and use the appropriate extension for your editor.
    • ln -s ./node_modules/@silvermine/eslint-config/.editorconfig
  • commitlint
    • Provides linting for commit messages of Silvermine projects

    • Usage: Add a commitlint.config.js file to the root of the project with the following and then set up commitlint in the project:

      'use strict';
      
      module.exports = {
         extends: [ '@silvermine/eslint-config/commitlint' ],
      };

Notes on Semantic Versioning

See the notes we made in eslint-plugin-silvermine regarding our use of version numbers here. The same decisions made for that repo also apply to this repo, basically for the same reasons.

What version should I use?

When choosing which version of this config to use, consider the following:

  • v2.x.x is the newest branch of our config, which allows for ES2015+ features, as well as TypeScript linting. On new projects, we recommend using this branch of the config.
  • v1.x.x is the legacy version of our eslint config. This should primarily be used in legacy es5 projects and with node version < 8.10.0. It does not allow for many es2015+ features, such as spread/rest operators and arrow functions.
    • The v1.x.x branch is not recommended for use in new projects and will only be minimally updated with bug fixes to support legacy code.

Updating ESLint

Updating ESLint in this project requires multiple steps across both this project and @silvermine/eslint-plugin:

  1. Open a PR to update ESLint in @silvermine/eslint-plugin
    • Note: Linting in the @silvermine/eslint-plugin PR will likely fail because @silvermine/eslint-plugin's version of @silvermine/eslint-config is incompatible with the new version of ESLint. That's ok. We will fix it soon in a subsequent step.
  2. After the PR from step 1 is merged, update @silvermine/eslint-plugin in @silvermine/eslint-config using a git+https + git hash URL. The git hash should point to the commit in @silvermine/eslint-plugin where you updated ESLint.
  3. Update ESLint in @silvermine/eslint-config. Open a PR that contains this update and the @silvermine/eslint-plugin update from step 2.
    • Note: All of the linting and tests in this build should pass.
  4. Publish a new version of @silvermine/eslint-config to the NPM registry
  5. Update @silvermine/eslint-config in @silvermine/eslint-plugin to the version that was just published
    • Note: All of the linting and tests in this build should now pass.
  6. Publish a new version of @silvermine/eslint-plugin to the NPM registry
  7. Update @silvermine/eslint-plugin in @silvermine/eslint-config using the version that was just published

License

This software is released under the MIT license. See the license file for more details.