Skip to content

An extension for vscode that enforces consistent naming conventions for your files and folders. 一个 vscode 扩展插件,用于统一文件及文件夹的命名规范

License

Notifications You must be signed in to change notification settings

abgox/filename-lint

Repository files navigation

✨ filename-lint ✨

license code size code size created download


English | 简体中文 | Github | Gitee

logo

An extension for Visual Studio Code that enforces consistent naming conventions for your files and folders.

Getting Started

  1. Install filename-lint.

  2. Add the following configuration to settings.json file.

    "filename-lint.enabled": true

Extension Settings

  • "filename-lint.enabled"
  • "filename-lint.namingPattern"
  • "filename-lint.excludePatterns"
  • "filename-lint.includePatterns"

Extension Commands

  • filename-lint.check-manually

Release Notes

Why Create It?

  • Windows-Specific Git Behavior:

    • After git init or git clone on Windows, git automatically sets core.ignorecase = true in its configuration, making filenames case-insensitive.

    • It will cause git to be unable to track changes in the case of file names (e.g. File.txt => file.txt), which may result in different file names between the remote and local repository.

    • Note: Global settings won’t override it.

      • Running git config --global core.ignorecase false has no effect.
      • Need manually configure git config core.ignorecase false after each git init or git clone .
  • Proactive Solution:

    • It might be a good idea to enforce lowercase names for files and folders to avoid this issue.

    • It's also default behavior of filename-lint when enabled.

      "filename-lint.enabled": true
    • When enabled, a warning is given if a file or folder name appears in uppercase letters.

    • Customization: It can be customized by Extension Settings.

About

An extension for vscode that enforces consistent naming conventions for your files and folders. 一个 vscode 扩展插件,用于统一文件及文件夹的命名规范

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published