Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-kswedberg

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-kswedberg

A shareable eslint config

  • 2.2.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
98
increased by276.92%
Maintainers
1
Weekly downloads
 
Created
Source

eslint config

Usage

Run the following from the project's root:

npm install eslint-config-kswedberg --save-dev

Then, add the config to the project's .eslintrc.js file.

For linting with es6 features enabled:

module.exports = {
  'extends': 'kswedberg'
};

If you want react (as well as es6) features enabled:

module.exports = {
  'extends': 'kswedberg/react'
};

Note that you'll need to have eslint-plugin-react installed.

If you don't want es6 or react features:

module.exports = {
  'extends': 'kswedberg/es5'
};

* Note: eslint supports a few different formats for the ...rc file, including JavaScript, JSON, and YAML. You may use any format that eslint supports.

Disabling rules per file or line

I always forget how to do this, so I'm writing it down as a reminder to me. See more at Configuring ESLint

  • Start disabling all rules for a file: /* eslint-disable */
  • Enable rules later in same file: /* eslint-enable */
  • Disable specific rules: /* eslint-disable no-alert, no-console */
  • Disable all rules for current line (comment to the right): // eslint-disable-line
  • Disable specific rules for current line: // eslint-disable-line no-alert, quotes, semi
  • Disable all rules for next line: // eslint-disable-next-line
  • Disable specific rules for next line: // eslint-disable-next-line no-alert, quotes, semi

Keywords

FAQs

Package last updated on 07 May 2018

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc