Socket
Socket
Sign inDemoInstall

eslint-config-nrk

Package Overview
Dependencies
138
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-nrk

Shared eslint config for NRK


Version published
Weekly downloads
13
increased by550%
Maintainers
1
Install size
27.5 kB
Created
Weekly downloads
 

Readme

Source

eslint-config-nrk

An open/shared JavaScript (ES2015) coding standard configuration for NRK.no. Uses eslint 2.x. For 1.x configuration, see the 1.x branch.

Installation

Execute these commands in the root of your project:

npm install --save-dev eslint
npm install --save-dev eslint-config-nrk

Usage with React

If you are using React, you also need to install eslint-plugin-react within your project:

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

If you use the *.jsx extension, tell eslint explicitly to lint those files as well:

eslint . --ext=.js,.jsx

Configuration

eslint is configured by adding an .eslintrc.json file to the root of your project:

{
  "extends": [
    "nrk"
  ]
}

For React-support, you also need to add the react extension:

{
  "extends": [
    "nrk",
    "nrk/rules/react"
  ]
}

For JSX-support, add the jsx extension separately:

{
  "extends": [
    "nrk",
    "nrk/rules/jsx",
    "nrk/rules/react"
  ]
}

See the ESlint config docs for more information.

Keywords

FAQs

Last updated on 23 Feb 2016

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc