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-zeal

v2.1.0

Published

ESLint sharable configuration matching Zeal's style guide

Downloads

1,687

Readme

eslint-config-zeal

npm version CircleCI License Greenkeeper badge

A shareable ESLint config for Zeal's coding style.

Zeal's JavaScript coding style is still evolving as we do more projects, but this represents our current thinking.

Install

To make use of this configuration, install eslint, babel-eslint, eslint-plugin-import, eslint-plugin-import-order-alphabetical and this package as development dependencies of your project:

npm install eslint babel-eslint eslint-plugin-import eslint-plugin-import-order-alphabetical eslint-config-zeal --save-dev

These packages are marked as peer dependencies, so you will get a warning if they're not installed.

Usage

Add this to your .eslintrc file:

{
  "extends": "zeal"
}

Note: ESLint assumes the eslint-config- prefix, so we can omit it.

You can override settings from the configuration(s) by adding them directly to your .eslintrc file.

We have added some additional optional configurations that you can add on top of the base zeal config:

  • zeal/ramda: Adds rules for Ramda.js development. You'll need to install eslint-plugin-ramda to use this configuration.
  • zeal/react: Adds rules for React development. You'll need to install eslint-plugin-react, eslint-plugin-react-hooks, and eslint-plugin-jsx-a11y to use this configuration.
  • zeal/react-native: Adds rules for React Native development. You'll need to install eslint-plugin-react-native to use this configuration.
  • zeal/mocha: Overrides rules for use with Mocha. We recommend creating a separate .eslintrc file in the directory containing your tests and extending this config there.
  • zeal/chai: Overrides rules for use with Chai. We recommend creating a separate .eslintrc file in the directory containing your tests and extending this config there.
  • zeal/jest: Adds and overrides rules for use with Jest. You'll have to install eslint-plugin-jest to use this configuration. We recommend creating a separate .estlintrc file in the directory containing your tests and extending this config there.

You can extend multiple configurations using an array:

{
  "extends": ["zeal", "zeal/react"]
}

See the ESLint configuration documentation for more information on configuring ESLint.

Usage with Ramda

If you're using Ramda.js in your project, make sure you have eslint-plugin-ramda installed as well:

npm install eslint-plugin-ramda --save-dev

Then, in your .eslintrc file, extend both the zeal and zeal/ramda configurations:

{
  "extends": ["zeal", "zeal/ramda"]
}

Usage With React

If you're using this package in a React project, make sure you have eslint-plugin-react, eslint-plugin-react-hooks and eslint-plugin-jsx-a11y installed as well:

npm install eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y --save-dev

Then, in your .eslintrc file, extend both the zeal and zeal/react configurations:

{
  "extends": ["zeal", "zeal/react"]
}

Usage with React Native

If you're using this package in a React Native project, make sure you have both eslint-plugin-react and eslint-plugin-react-native installed as well:

npm install eslint-plugin-react eslint-plugin-react-native --save-dev

Then, in your .eslintrc file, extend the zeal, zeal/react, and zeal/react-native configurations:

{
  "extends": ["zeal", "zeal/react", "zeal/react-native"]
}

Usage With Webpack

This configuration uses eslint-plugin-import. If your project uses Webpack, you'll need to add eslint-import-resolver-webpack:

npm install eslint-import-resolver-webpack

You'll also need to add the following to your .eslintrc:

"settings": {
  "import/resolver": "webpack"
}

or, if your webpack config file is not in the default location:

"settings": {
  "import/resolver": {
    "webpack": { "config": "path/to/webpack.config.js" }
  }
}

Usage With Prettier

To use this configuration with prettier, use eslint-config-prettier to override any conflicting rules:

npm install eslint-config-prettier --save-dev

Then, in your .eslintrc file, extend the prettier (and prettier/react) configurations after any zeal configurations. For example:

{
  "extends": ["zeal", "zeal/react", "prettier", "prettier/react"]
}

That way, the prettier configurations will override any zeal configurations that would otherwise conflict with prettier's formatting.

Supported Versions

This plugin contains all of the rules available in:

License

Authored by the Engineering Team of Coding ZEAL

Copyright (c) 2016 - 2019 Zeal, LLC. Licensed under the MIT license.