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

@build-chores/eslint-config-lint

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@build-chores/eslint-config-lint

Linting JS projects is complicated.

  • 0.9.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@build-chores/eslint-config-lint

Linting JS projects is complicated.

Synopsis

License: GPL v3 npm version Build Status

Lint your JavaScript code. This config is based on Airbnb's base lint configuration and includes support for Prettier, the Flow type checker and promises.

Usage

Install the @build-chores/eslint-config-lint package into your project:

yarn install --dev @build-chores/eslint-config-lint

Create a .eslintrc file containing the following snippet. See the example .eslintrc for a template.

{
  "extends": ["@build-chores/lint"]
}

To use flow as well place a .flowconfig and .flowcoverage configuration file. See the example flowconfig and the example .flowcoverage for templates.

Note that even if flow isn't use an empty .flowconfig file has to be created.

This package installs flow-typed to install flow type definitions. To make it work in this setup the flow-libdefs wrapper script is provided. It takes the same arguments as flow-typed.

The following command installs type definitions for your dependencies.

yarn flow-libdefs install

Edit your package.json to include the following scripts. See the example package.json for a template.

{
  "scripts": {
    "fix": "yarn lint --fix",
    "flow:coverage": "yarn flow-coverage-report --config ./.flowcoverage",
    "flow:gen": "gen-flow-files --out-dir dist src",
    "flow:libdefs": "yarn flow-libdefs update",
    "lint": "eslint src/**/*.js**"
  }
}

Types are checked during the regular linting. If you want to run Flow separated, you can call the flow command directly with yarn flow.

See the rules file for details of the ESLint configuration.

You are ready to lint your JavaScript code.

Contribute

Check out our contributing.md to get started.

License

FAQs

Package last updated on 26 Feb 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

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