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

eslint-plugin-filenames

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-filenames

Eslint rule for consistent filenames.

  • 1.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
413K
increased by6.69%
Maintainers
1
Weekly downloads
 
Created

What is eslint-plugin-filenames?

The eslint-plugin-filenames package is an ESLint plugin that enforces consistent naming conventions for file names. It helps maintain a uniform codebase by ensuring that file names follow specified patterns.

What are eslint-plugin-filenames's main functionalities?

Enforce kebab-case file names

This rule enforces that all file names must be in kebab-case (lowercase letters separated by hyphens).

module.exports = {
  "plugins": ["filenames"],
  "rules": {
    "filenames/match-regex": ["error", "^[a-z-]+$", true]
  }
};

Enforce PascalCase file names

This rule enforces that all file names must be in PascalCase (each word starts with an uppercase letter and no separators).

module.exports = {
  "plugins": ["filenames"],
  "rules": {
    "filenames/match-regex": ["error", "^[A-Z][a-zA-Z]+$", true]
  }
};

Enforce specific file name for main module

This rule enforces that the file name must match the name of the default export in the file, using camelCase.

module.exports = {
  "plugins": ["filenames"],
  "rules": {
    "filenames/match-exported": ["error", "camel"]
  }
};

Other packages similar to eslint-plugin-filenames

Keywords

FAQs

Package last updated on 13 Jun 2018

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