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 🙏

© 2025 – Pkg Stats / Ryan Hefner

neutrino-preset-prettier-eslint

v0.0.7

Published

Neutrino preset to use Prettier with ESLint in a friendly way

Readme

Neutrino preset to use Prettier with ESLint in a friendly way

neutrino-preset-prettier-eslint is a Neutrino preset to use Prettier in a way it doesn't conflict with ESLint.

Features

  • Almost zero configuration to start making your code prettier 💅
  • Turns off all ESLint rules that are unnecessary or might conflict with prettier (using eslint-config-prettier)
  • Runs Prettier as an ESLint rule, allowing keep the consistency across the team and format validation on CI (using eslint-plugin-prettier)
  • Format the code from command line like npm run format (using prettier-eslint)

ESLint preset

This preset supports integration with ESLint through the use of any preset based on neutrino-middleware-eslint, as for example neutrino-preset-airbnb-base.

Just follow the Neutrino's documentation instructions for the chosen preset and after that, the instructions bellow.

Requirements

  • Node.js v6.9+
  • NPM or Yarn client
  • Neutrino v5
  • Neutrino ESLint preset based on neutrino-middleware-eslint

Installation

neutrino-preset-prettier-eslint can be installed via the Yarn or NPM clients.

Inside your project, make sure neutrino, and neutrino-preset-prettier-eslint are development dependencies.

As mentioned above you will need an ESLint preset of your choice.

You will also be using another Neutrino preset for building your application source code.

Yarn

❯ yarn add --dev neutrino-preset-prettier-eslint

NPM

❯ npm install --save-dev neutrino-preset-prettier-eslint

Quickstart

We recommend setup Neutrino with neutrino.use in your package.json.

Be aware that the order of the presets are important.

For example, if you are using neutrino-preset-airbnb-base and neutrino-preset-web:

{
  "neutrino": {
    "use": [
      "neutrino-preset-airbnb-base",
      "neutrino-preset-prettier-eslint",
      "neutrino-preset-web"
    ]
  }
}

Then, create the format and lint scripts in your package.json scripts section:

"scripts": {
  "start": "neutrino start",
  "build": "neutrino build",
  "lint": "eslint \"src/**/*.js\"",
  "format": "prettier-eslint --write \"src/**/*.js\""
}

Now you can format all your JS code inside src folder with:

Yarn

ps: yarn users will also need to install prettier-eslint-cli to use the format CLI:

❯ yarn add --dev prettier-eslint-cli
❯ yarn run format

NPM

❯ npm run format

You can also lint your code. It will use Prettier for format rules, and ESLint for any other rules that you have configured:

Yarn

❯ yarn run lint

NPM

❯ npm run lint

This can be very useful to ensure, on a Continuous Integration environment, that the code is consistent with prettier format.

Editor integration

You don't need to use the command line during your development process. Prettier and ESLint have great support on most popular editors.

Atom integration

Prettier for Atom is the official package to integrate Prettier on Atom. Make sure you enable prettier-eslint support on the package settings and you must be good to go.

Sometimes it would be necessary to restart the editor after changing settings, so if something is not working as expected, maybe this would solve the issue.

During my setup I came across an issue with Atom and neutrino-preset-airbnb-base that was breaking the integration with Atom.

I had to do an ugly workaround to make it work. In simple terms, you will probably need to install this fork of nodejs-depd on your project:

https://github.com/fnmunhoz/nodejs-depd

Yarn

❯ yarn add --dev github:fnmunhoz/nodejs-depd

NPM

❯ npm install --save-dev github:fnmunhoz/nodejs-depd

The fork just removes an eval call, and I believe it will not break anything. I will try to solve this in a more elegant way in the near future.

Contributing

This is still a work in progress. It simplifies my setup and I hope it simplifies others people setup as well.

I would love to receive contributions, feel free to open a Pull Request or create an Issue.

Any feedback is welcome ♥️.