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

@eddeee888/eslint-plugin

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eddeee888/eslint-plugin

An ESLint plugin with standard TypeScript and React config to be used in standalone repos or in Nx monorepos.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@eddeee888/eslint-plugin

This plugin contains extendable ESLint configs.

Installation

  1. Install the plugin and TypeScript config
yarn add -DE eslint @eddeee888/eslint-plugin @typescript-eslint/eslint-plugin @typescript-eslint/parser
  1. Install React plugins - only if you are planning to work with React files
yarn add -DE eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y

Usage

Normal repo

// .eslintrc.json
{
  "plugins": ["@eddeee888"],
  "parserOptions": {
    "project": ["tsconfig.json"]
  },
  "overrides": [
    {
      // 👇 Omit ".tsx" if you don't use React TypeScript
      "files": ["*.ts", "*.tsx"],
      "extends": ["plugin:@eddeee888/typescript"],
      "rules": {}
    },
    // 👇 Omit this block if you don't use React TypeScript
    {
      "files": ["*.tsx"],
      "extends": ["plugin:@eddeee888/react-typescript"],
      "rules": {}
    }
  ]
}

Nx monorepo

// Root .eslintrc.json
{
  // ... other options
  "overrides": [
    {
      "files": ["*.ts", "*.tsx"],
      "extends": [
        "plugin:@nx/typescript",
        // 👇 Add this line for TypeScript files
        "plugin:@eddeee888/typescript"
      ],
      "rules": {}
    },
    {
      "files": ["*.tsx"],
      "extends": [
        "plugin:@nx/react-typescript",
        // 👇 Add this line if you use React TypeScript
        "plugin:@eddeee888/react-typescript"
      ],
      "rules": {}
    }
  ]
}

// Project .eslintrc.json
{
  "extends": ["../../.eslintrc.json"],
  "ignorePatterns": ["!**/*"],
  "overrides": [
    // ... other config
    {
      "files": ["*.ts", "*.tsx"],
      // 👇 Add parserOptions.project that points to your project tsconfig.json file
      "parserOptions": {
        "project": ["pathto/project/tsconfig(.*)?.json"]
      },
      "rules": {}
    },
    {
      "files": ["*.js", "*.jsx"],
      "rules": {}
    }
  ],
  "env": {
    "jest": true
  }
}

// (Optional) Choose files to lint by using `project.json` 's `lintFilePatterns`
//
// Sometimes, the patterns set in a project's .eslintrc.json may not work correctly,
// especially when running Nx CLI: `nx lint <project>`
// In such case, try using `lintFilePatterns` in the project's `project.json`
{
  // ... other configs
  "targets": {
    "lint": {
      "executor": "@nx/eslint:lint",
      "outputs": ["{options.outputFile}"],
      "options": {
        "lintFilePatterns": ["{projectRoot}/app/**/*.tsx", "{projectRoot}/app/**/*.ts"]
      }
    },
  }
}

Keywords

FAQs

Package last updated on 19 Jan 2025

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