🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

eslint-config-nau

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-nau

Nau Studio base JS ESLint config, derived from eslint-config-airbnb-base

latest
Source
npmnpm
Version
14.0.0
Version published
Maintainers
2
Created
Source

eslint-config-nau

npm version

This package provides Nau's base JS .eslintrc.js as an extensible shared config.

Usage

We export below ESLint configuration for your usage.

eslint-config-nau

Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint and eslint-plugin-import.

  • Install the correct versions of each package, which are listed by the command:
npm info "eslint-config-nau@latest" peerDependencies

Linux/OSX users can simply run

(
  export PKG=eslint-config-nau;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)

Which produces and runs a command like:

  npm install --save-dev eslint-config-nau eslint@^#.#.# eslint-plugin-import@^#.#.#
  • Add "extends": "nau" to your .eslintrc.js

Improving this config

Consider adding test cases if you're making complicated rules changes, like anything involving regexes. Perhaps in a distant future, we could use literate programming to structure our README as test cases for our .eslintrc?

You can run tests with npm test.

You can make sure this module lints with itself using npm run lint.

Keywords

eslint

FAQs

Package last updated on 22 May 2019

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