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

@edenspiekermann/eslint-config

v1.5.0

Published

A shareable eslint config for ESPI projects

Downloads

18

Readme

Edenspiekermann ESLINT Configuration

This repository contains the ESLINT configuration for projects at EdenSpiekermann.

Installation

$ npm i -D @edenspiekermann/eslint-config

Usage

Add some ESLint config to your package.json:

{
    "name": "my-javascript-project",
    "eslintConfig": {
        "extends": ["@edenspiekermann/eslint-config"]
    }
}

Or to .eslintrc.json:

{
    "extends": ["@edenspiekermann/eslint-config"]
}

Depending on how you automate your JS linting you may wish to add a lint task to the scripts block in your package.json If this is your preferred setup simply add the following task.

{
    "scripts": {
        "lint": "eslint --fix path/to/your/javascript/**/*.js"
    }
}

You can now use this task by running npm run lint.

Core rules

Using "extends": ["@edenspiekermann/eslint-config"] is a short hand for "extends": ["@edenspiekermann/eslint-config/rules/core"]. The core rules use extend the airbnb-base configuration. It contains all rulesets for a frameworkless / vanilla js validation. On top of that its possible to extend these rules with some more specific configurations (see the following).

Prettier rules

Add this configuration if you want to use eslint with prettier. For more details read the section Integrating with Prettier.

{
  "extends": [
    "@edenspiekermann/eslint-config",
    "@edenspiekermann/eslint-config/rules/prettier"
  ]
}

React

Use "@edenspiekermann/eslint-config/rules/react" and "@edenspiekermann/eslint-config/rules/react-proptypes" configurations if you want to use eslint with react. "@edenspiekermann/eslint-config/rules/react" is mostly a proxy configuration for airbnb configuration. It disables the proptype validation. If you want to re-enable them, you should also add the "@edenspiekermann/eslint-config/rules/react-proptypes" rules.

{
  "extends": [
    "@edenspiekermann/eslint-config",
    "@edenspiekermann/eslint-config/rules/react",
    "@edenspiekermann/eslint-config/rules/react-proptypes",
  ]
}

Jest

Enable "@edenspiekermann/eslint-config/rules/jest" when using jest in your project. It uses the jest/recommended and jest/style rules.

{
  "extends": [
    "@edenspiekermann/eslint-config",
    "@edenspiekermann/eslint-config/rules/jest"
  ]
}

Typescript

To add typescript support for eslint extend the configuration with "@edenspiekermann/eslint-config/rules/typescript". This enabled typescript validation for *.ts files. When using typescript with react, you can also add "@edenspiekermann/eslint-config/rules/typescript-react" which adds jsx support for *.tsx files.

Integrating with Prettier

The config here is actually simply a proxy for Airbnb, prettier and prettier react configurations with a few custom overrides built in. One way you can have this code formatted on save though is through an ESLint integration in your code editor. We use the ESLint plugin for VSCode and this is configured to run on save. The code is then formatted and any errors highlighted in the editor window.

Installing the ESLint extension in VSCode

  • In VSCode you can select View > Extensions or shift + cmd + x to view the extensions sidebar and search the marketplace for the extension. Install and restart VSCode.

  • Next, select ESLint in the list of extensions and you will see the options that must be configured to enable format on save.

  • select Code > preferences > settings or cmd + , to adjust the ESLint configuration settings listed in the extension's README to format your code on save.

For other editors the instructions are basically the same, install the linting tool, sublime-linter for sublime or linter-eslint for Atom for example, and configure your settings to run and format on save.

Contributing

When contributing to this repository, please first check the Github issue to see if this has already been raised or assigned. If not feel free to create an issue.

Pull Request Process

If you wish to submit a pull request please follow these simple steps:

  1. Please add some information in the Pull Request description about the proposed changes listing what files are changed and a few lines about why.
  2. Increase the version number in the package.json following the SemVer versioning scheme
  3. Following testing and approval from the ESPI development team we will merge the PR, create a release and publish it to NPM

Helpful Links