New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-wework

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-wework

ESLint config for WeWork projects

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-config-wework

Libraries.io for GitHub NPM version NPM downloads MIT License

Shared ESLint configuration for WeWork projects

Introduction

ESLint config for WeWork projects. This is an extension of eslint-config-airbnb and also provides react, imports, lodash, mocha, and node presets.

Usage

Install:

npm install eslint-config-wework --save

If you're using npm < v3 you'll need to install each of this packages peerDependencies explicitly.

npm install eslint-config-airbnb eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y --save

Note: make sure the versions of the above packages that are installed satisfy this package's peerDependencies, otherwise you might see inconsistent behavior.

Configure:

First, touch .eslintrc if you don't already have one.

Then update it to look like the following:

{
  "root": true,
  "extends": [
    "wework"
  ],
  "rules": {
    # Override preset rules here
  },
}

React:

To enable React-specific rules, extend wework/react:

{
  "root": true,
  "extends": [
    "wework",
    "wework/react"
  ],
  "rules": {
    # Override preset rules here
  },
}

Imports:

To enable linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names, extend wework/imports:

{
  "root": true,
  "extends": [
    "wework",
    "wework/react",
    "wework/imports"
  ],
  "rules": {
    # Override preset rules here
  },
}

Lodash:

To enable React-specific rules, extend wework/lodash:

{
  "root": true,
  "extends": [
    "wework",
    "wework/lodash"
  ],
  "rules": {
    # Override preset rules here
  },
}

Mocha:

To enable linting of Mocha/Chai/Sinon tests add a eslintrc file to your test folder:

{
  "extends": [
    "wework/mocha",
  ],
  "rules": {
    # Override preset rules here
  },
}

Node:

For Node specific config, including identification of security hotspots, add a eslintrc file to your node src folder:

{
  "extends": [
    "wework/node",
  ],
  "rules": {
    # Override preset rules here
  },
}

Note: the security plugin is slow, finds a lot of false positives which need triage by a human, and isn't geared towards client-side. Use sparingly! See https://github.com/nodesecurity/eslint-plugin-security for more info.

Development

  1. Checkout this repo
  2. Make changes in a feature branch and open a PR to master

The purpose of this package is to define and enforce code style in JavaScript code. With that in mind please be mindful when proposing changes, explain your reasoning and consider other users.

npm scripts

TargetBehavior
npm run lint(Run as a git pre-commit hook) Lint the config with itself
npm run security-scan(Run as a git pre-push hook) Checks npm dependencies for security vulnerabilities
npm run release <version>Generates a changelog, updates package version, tags and pushes via np. This should only be run on an up-to-date master by a maintainer of this package.

Version can be a semver level: `patch

npm run will list all npm scripts

Keywords

FAQs

Package last updated on 10 Aug 2017

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