Socket
Book a DemoInstallSign in
Socket

@code-shaper/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-shaper/eslint-config

Code Shaper ESLint configuration

2.0.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

eslint-config

This package publishes 4 shared ESLint configurations:

  • @code-shaper/eslint-config: Default configuration pointing to @code-shaper/eslint-config-lenient
  • @code-shaper/eslint-config-lenient: A lenient configuration for code bases that don't follow very opinionated coding conventions
  • @code-shaper/eslint-config-strict: A strict configuration for code bases that follow very opinionated coding conventions
  • @code-shaper/eslint-config/strict-react: The strict configuration + additional rules for React.

Installation

npm install -D @code-shaper/eslint-config

Then modify your .eslintrc.js to extend one of the above configurations, e.g.

module.exports = {
  root: true,
  env: { node: true },
  extends: ['@code-shaper/eslint-config/strict-react'],
};

Add the following dependencies to your package.json:

{
  "dependencies": {
    "@typescript-eslint/eslint-plugin": "^8.*",
    "eslint": "^8.*",
    "eslint-config-prettier": "^9.*",
    "eslint-import-resolver-typescript": "^3.*",
    "eslint-plugin-eslint-comments": "^3.*",
    "eslint-plugin-import": "^2.*",
    "eslint-plugin-jest": "^28.*",
    "eslint-plugin-jest-dom": "^5.*",
    "eslint-plugin-jsx-a11y": "^6.*",
    "eslint-plugin-only-error": "^1.*",
    "eslint-plugin-promise": "^7.*",
    "eslint-plugin-react": "^7.*",
    "eslint-plugin-react-hooks": "^4.*",
    "eslint-plugin-regexp": "^2.*",
    "eslint-plugin-testing-library": "^6.*"
  }
}

Note: If you are using eslint-config-next version 14, you may have to downgrade @typescript-eslint/eslint-plugin to version 7. eslint-config-next does not support @typescript-eslint/eslint-plugin version 8 yet.

Plugins

This config pulls in the following eslint rules/plugins. In addition to these plugins, there are a few customizations that have been made to select individual rules. These customizations and rules are clearly marked in the source code.

eslint

Applies the following rules to all JavaScript and TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-typescript

Applies the following rules to all Typescript files:

  • all recommended rules
  • all recommended-requiring-type-checking rules
  • all strict rules
  • all automatically fixable rules

eslint-plugin-import

Applies the following rules to all JavaScript and TypeScript files:

  • all recommended rules
  • all typescript rules (only applied to TypeScript files)
  • all react rules (only applied to TypeScript files)
  • all automatically fixable rules

eslint-plugin-promise

Applies the following rules to all JavaScript and TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-regexp

Applies the following rules to all JavaScript and TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-eslint-comments

Applies the following rules to all JavaScript and TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-jsx-a11y

Applies the following rules to all TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-react

Applies the following rules to all TypeScript files:

  • all recommended rules
  • all jsx-runtime rules
  • all automatically fixable rules

eslint-plugin-react-hooks

Applies the following rules to all TypeScript files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-jest

Applies the following rules to all JavaScript and TypeScript test files:

  • all recommended rules
  • all style rules
  • all automatically fixable rules

eslint-plugin-jest-dom

Applies the following rules to all JavaScript and TypeScript test files:

  • all recommended rules
  • all automatically fixable rules

eslint-plugin-testing-library

Applies the following rules to all JavaScript and TypeScript test files:

  • all react rules
  • all automatically fixable rules

eslint-config-prettier

Applies the eslint-config-prettier plugin to disable all rules that would be covered by or would conflict with prettier. It is recommended to run prettier separately, after running eslint.

eslint-plugin-only-error

Applies the only-error plugin to treat all lint warnings as errors.

FAQs

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.