Socket
Book a DemoInstallSign in
Socket

@strapi/eslint-config

Package Overview
Dependencies
Maintainers
8
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@strapi/eslint-config

Strapi eslint configurations

0.2.1
latest
Source
npmnpm
Version published
Weekly downloads
1.1K
-24.93%
Maintainers
8
Weekly downloads
 
Created
Source

eslint-config-strapi

⚠️ WORK-IN-PROGRESS ⚠️

This package provides Strapi's .eslintrc as an extensible shared config.

Usage

This package is meant for internal use only. The configurations are subject to change at any given point.

You can install this package using it's GitHub repository:

yarn add --dev @strapi/eslint-config

We export four ESLint configurations for your usage. Choose the version you need and look at the usage instructions.

eslint-config-strapi/back

This configuration is aimed as a base.

  • Install the correct versions of each package:
yarn add --dev eslint@^8.10.0 \
               eslint-config-airbnb-base@^15.0.0 \
               eslint-config-prettier@^8.5.0 \
               eslint-plugin-import@^2.25.4
  • Add "extends": "strapi" to your .eslintrc

eslint-config-strapi/back

This configuration is aimed for backend usage.

  • Install the correct versions of each package:
yarn add --dev eslint@^8.10.0 \
               eslint-config-airbnb-base@^15.0.0 \
               eslint-config-prettier@^8.5.0 \
               eslint-plugin-import@^2.25.4 \
               eslint-plugin-node@^11.1.0
  • Add "extends": "strapi/back" to your .eslintrc

eslint-config-strapi/front

This configuration is aimed for frontend usage as it adds React specific rules.

  • Install the correct versions of each package:
yarn add --dev babel-eslint@10.0.0 \
               eslint@^8.10.0 \
               eslint-config-airbnb@^19.0.4 \
               eslint-config-prettier@^8.5.0 \
               eslint-plugin-import@^2.25.4 \
               eslint-plugin-jsx-a11y@^6.5.1 \
               eslint-plugin-node@^11.1.0 \
               eslint-plugin-react@^7.29.3 \
               eslint-plugin-react-hooks@^4.3.0
  • Add "extends": "strapi/front" to your .eslintrc

eslint-config-strapi/typescript

This configuration is aimed for backend usage with TypeScript.

  • Install the correct versions of each package:
yarn add --dev @typescript-eslint/eslint-plugin@^5.14.0 \
               @typescript-eslint/parser@^5.14.0 \
               eslint@^8.10.0 \
               eslint-config-airbnb-base@^15.0.0 \
               eslint-config-airbnb-typescript@^16.1.1 \
               eslint-config-prettier@^8.5.0 \
               eslint-plugin-import@^2.25.4 \
               eslint-plugin-node@^11.1.0 \
               typescript@^4.6.2
  • Add "extends": "strapi/typescript" to your .eslintrc

FAQs

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

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.