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

@studiometa/eslint-config

v4.1.0

Published

ESLint Configuration

Downloads

643

Readme

Studio Meta ESLint Configurations

NPM Version Dependency Status devDependency Status

Set of ESLint configurations for multiple usages.

Installation

Install the package with NPM:

npm install --save-dev eslint prettier @studiometa/eslint-config

Usage

To use the basic configuration, you just have to install this package and reference it in your ESLint configuration file:

module.exports = {
  extends: '@studiometa/eslint-config',
};

If you have a legacy project with ES5 code, you can use the legacy configuration:

module.exports = {
  extends: '@studiometa/eslint-config/src/legacy',
};

Rules documentation

Find below some documentation on the rules this configuration extends. Some are best practices, some are more opinionated choices.

eslint:recommended

These rules report common problems we can encounter in JavaScript. The full list can be found in the ESLint documentation.

eslint-config-airbnb-base

People at Airbnb have written a detailed documentation of their JavaScript style guide and have published ESLint configurations to enforce it.

Custom rules configurations

Below are some rules specific to this configuration.

Best practices

Some rules considered as best practices.

| Rule | Configuration | |------------------------------------------------------------------------------|--------------------------------| | curly | ['error', 'all'] | | dot-notation | 'warn' | | eqeqeq | ['warn', 'always'] | | no-alert | 'error' | | no-empty-function | 'error' | | no-eval | 'error' | | no-implicit-coercion | ['error', { allow: ['!!'] }] | | no-implicit-globals | 'error' | | no-multi-spaces | 'warn' | | no-param-reassign | ['warn', { props: false }] | | no-useless-concat | 'warn' | | no-useless-return | 'warn' | | strict | ['error', 'function'] | | vars-on-top | 'error' | | wrap-iife | ['error', 'any'] | | yoda | ['error', 'never'] |

Possible errors

These rules help developpers avoir some possible errors.

| Rule | Configuration | |------------------------------------------------------------|-----------------------------------------------------------| | no-console | process.env.NODE_ENV !== 'production' ? 'off' : 'error' | | no-debugger | process.env.NODE_ENV !== 'production' ? 'off' : 'error' |

Stylistic issues

ES6

| Rule | Configuration | |----------------------------------------------------------------------------------|-------------------------------------------| | arrow-spacing | ['warn', { before: true, after: true }] | | no-var | 'error' | | object-shorthand | 'error' | | prefer-const | 'error' | | prefer-template | 'error' | | rest-spread-spacing | ['warn', 'never'] | | template-curly-spacing | ['warn', 'never']

Overrides

Overrides are used to define specific configuration for sets of limited file globs.

Build files

Used for: webpack.config.js, gulpfile.js, nuxt.config.js, webpack.mix.js

| Rule | Configuration | |-|-| | global-require | off |

Prettier

Used for: *.js

The plugin:prettier/recommended plugin turns off all ESLint stylistic rules that might conflict with Prettier. You can find out more on the project's repository. |

Vue

Used for: *.vue

For all *.vue files, we use the official ESLint plugin created by Vue.js. The following rules are also specified: