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

eslint-plugin-turbo

Package Overview
Dependencies
Maintainers
2
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-turbo

ESLint plugin for Turborepo

  • 2.3.1-canary.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
661K
decreased by-15.99%
Maintainers
2
Weekly downloads
 
Created
Source

eslint-plugin-turbo

Easy ESLint configuration for Turborepo

Installation

  1. You'll first need to install ESLint:
npm install eslint --save-dev
  1. Next, install eslint-plugin-turbo:
npm install eslint-plugin-turbo --save-dev

Usage (Legacy eslintrc*)

Add turbo to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["turbo"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "turbo/no-undeclared-env-vars": "error"
  }
}

Example (Legacy eslintrc*)

{
  "plugins": ["turbo"],
  "rules": {
    "turbo/no-undeclared-env-vars": [
      "error",
      {
        "allowList": ["^ENV_[A-Z]+$"]
      }
    ]
  }
}

Usage (Flat Config eslint.config.js)

In ESLint v8, both the legacy system and the new flat config system are supported. In ESLint v9, only the new system will be supported. See the official ESLint docs.

import turbo from "eslint-plugin-turbo";

export default [turbo.configs["flat/recommended"]];

Otherwise, you may configure the rules you want to use under the rules section.

import turbo from "eslint-plugin-turbo";

export default [
  {
    plugins: {
      turbo,
    },
    rules: {
      "turbo/no-undeclared-env-vars": "error",
    },
  },
];

Example (Flat Config eslint.config.js)

import turbo from "eslint-plugin-turbo";

export default [
  {
    plugins: {
      turbo,
    },
    rules: {
      "turbo/no-undeclared-env-vars": [
        "error",
        {
          allowList: ["^ENV_[A-Z]+$"],
        },
      ],
    },
  },
];

Keywords

FAQs

Package last updated on 15 Nov 2024

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