You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

eslint-plugin-react-naming-convention

Package Overview
Dependencies
Maintainers
1
Versions
1417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-naming-convention

ESLint React's ESLint plugin for naming convention related rules.

1.5.21-next.6
Source
npmnpm
Version published
Weekly downloads
315K
2.83%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-react-naming-convention

Naming convention rules.

[!TIP] This plugin is already included in @eslint-react/eslint-plugin. You don't need to install it separately if you are using @eslint-react/eslint-plugin.

Install

# npm
npm install --save-dev eslint-plugin-react-naming-convention

Setup

Add the plugin to your eslint.config.js:

// @ts-check

import js from "@eslint/js";
import reactNamingConvention from "eslint-plugin-react-naming-convention";

export default [
  js.configs.recommended,
  {
    files: ["**/*.{ts,tsx}"],
    plugins: [
      "react-naming-convention": reactNamingConvention,
      rules: {
        // react-naming-convention recommended rules
        "naming-convention/filename-extension": ["warn", "as-needed"],
        "naming-convention/use-state": "warn",
      }
    ],
  },
];

Rules

RuleDescription💼💭
naming-convention/component-nameEnforces naming conventions for components.📖
naming-convention/filenameEnforces naming convention for JSX files.📖
naming-convention/filename-extensionEnforces consistent use of the JSX file extension.📖
naming-convention/use-stateEnforces destructuring and symmetric naming of useState hook value and setter variables.📖

FAQs

Package last updated on 03 Jul 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.