Socket
Book a DemoInstallSign in
Socket

eslint-config-ns

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-ns

eslint config ready to be used in multiple projects

5.0.0
latest
Source
npmnpm
Version published
Weekly downloads
622
8.93%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-ns

npm version GitHub license

eslint-config-ns lints your JavaScript projects with ease, and is mainly based on the popular JavaScript code style from Airbnb with further customizations derived on my own experience.

Contents

Background Story

In August 2018, I published an article with the title "How to create your own shared esLint, prettier and stylelint configuration" on Medium. One of the results of the article, is this shareable eslint-config (and one for stylelint).

Features

The config is built upon Airbnb's ESLint rules with additional rules and optimizations (see assumptions).

Installation

Install the package with

npm install eslint-config-ns --save-dev

# or
yarn add eslint-config-ns -D

eslint-config-ns requires you to take care of it's peerDependencies. Install the correct version of each peerDependencies package, which are listed with the following command:

npm info "eslint-config-ns@latest" peerDependencies

If using npm 5+, use this shortcut:

npx install-peerdeps --dev eslint-config-ns

# or
yarn add eslint-config-ns -D --peer

Usage

Now add eslint-config-ns to either your package.json:

{
  "eslintConfig": {
    "extends": "eslint-config-ns"
  }
}

to your .eslintrc:

{
  "extends": "eslint-config-ns"
}

or .eslintrc.js:

module.exports = {
  extends: 'eslint-config-ns',
}

Prettier Config

This is how you can use or extend the eslint-config-ns prettier config in your app:

// prettier.config.js
module.exports = require('eslint-config-ns/prettier.config')

Assumptions

eslint-config-ns comes with some fundamental assumptions:

  • React and/or Node.js environment
  • Browser and/or Node.js environment
  • Jest as the selected test-suite
  • it uses the @babel/eslint-parser parser

Even though I made some assumptions, you can easily overwrite, extend and unset rules and any other setting in your custom eslint config.

LICENSE

MIT

Maintainers


Stefan Natter

Keywords

eslint

FAQs

Package last updated on 07 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.