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

eslint-plugin-consistent-file-and-folder-names

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-consistent-file-and-folder-names

ESLint plugin to enforce consistent file and folder names

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

eslint-plugin-consistent-file-and-folder-names

ESLint plugin to enforce consistent file and folder names

Installation

Make sure you have ESLint installed

npm i -D eslint

Next, you can install eslint-plugin-consistent-file-and-folder-names

npm i -D eslint-plugin-consistent-file-and-folder-names

Usage

Add eslint-plugin-consistent-file-and-folder-names to the plugins section of your ESLint config file without the eslint-plugin- prefix

{
  "plugins": ["consistent-file-and-folder-names"]
}

Then you have to extend the rules section to configure the this plugin based on your requirements

{
  "plugins": ["consistent-file-and-folder-names"],
  "rules": {
    "consistent-file-and-folder-names/file-names": [
      "error",
      {
        "path-to-folder": "CAMEL_CASE",
        "path-to-another-folder/nested-folder": "^[a-zA-Z0-9]+$"
      }
    ],
    "consistent-file-and-folder-names/folder-names": [
      "error",
      {
        "path_to_folder": "SNAKE_CASE",
        "path-to-another-folder/nested-folder": "KEBAB_CASE"
      }
    ]
  }
}

Supported naming conventions

You can set up one of the following naming conventions or any valid regular expression

NameExample
CAMEL_CASEhelloWorld
PASCAL_CASEHelloWorld
SNAKE_CASEhello_world
KEBAB_CASEhello-world
SCREAMING_SNAKE_CASEHELLO_WORLD
FLAT_CASEhelloworld

Keywords

FAQs

Package last updated on 22 Jun 2022

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