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

@jarrodldavis/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jarrodldavis/eslint-config

Shareable ESLint config for Prettier and TypeScript

  • 0.1.0-pre
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@jarrodldavis/eslint-config

Shareable ESLint config for Prettier and TypeScript

Install

yarn add --dev @jarrodldavis/eslint-config

Since this is an ESLint Shareable Config, ESLint must be installed directly into your package if it isn't already:

yarn add --dev eslint

TypeScript is also required for linting TypeScript source (.ts) and declaration (.d.ts) files:

yarn add --dev typescript

Peer Dependencies

ESLint requires configs, plugins, and parsers referenced in configs to be sibling modules of ESLint (i.e. they must be in exactly the same node_modules directory).

This package specifies additional ESLint dependencies as both direct dependencies and peer dependencies. If you are using Yarn or npm (since v3), these dependencies should be automatically hoisted into your package's top-level node_modules directory.

If they are not, you will need to install these additional dependencies directly:

yarn add --dev prettier eslint-config-prettier eslint-plugin-prettier
yarn add --dev typescript-eslint-parser eslint-plugin-typescript

Usage

In your ESLint config, extend from this config:

{
  "root": true,
  "extends": ["@jarrodldavis"]
}

If you want to override any rule configurations, you can specify your own rule settings as normal:

{
  "root": true,
  "extends": ["@jarrodldavis"],
  "rules": {
    "no-console": "off"
  }
}

For TypeScript source and declaration files, you'll need to use glob overrides:

{
  "root": true,
  "extends": ["@jarrodldavis"],
  "rules": {
    "no-console": "off"
  },
  "overrides": [
    {
      "files": "*.ts",
      "rules": {
        "typescript/class-name-casing": "off"
      }
    },
    {
      "files": "*.d.ts",
      "rules": {
        "typescript/interface-name-prefix": "warn"
      }
    }
  ]
}

FAQs

Package last updated on 18 Mar 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