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

@another_works/namelint

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@another_works/namelint

namelint is a tool that creates rules for code and file naming conventions and automatically detects them. The mission of this tool is to free you from the hassle of checking naming conventions in code reviews.

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
38
increased by58.33%
Maintainers
4
Weekly downloads
 
Created
Source

namelint

namelint is a tool that creates rules for code and file naming conventions and automatically detects them. The mission of this tool is to free you from the hassle of checking naming conventions in code reviews.

Installation and Usage

$ npm install namelint --save-dev

Place a file named namelint.json in the root folder

$ touch namelint.json
$ ./node_modules/.bin/namelint

Configuration

{
    "rules": [
        {
            "dir": "src/consts",
            "test": [
                {
                  "type": "namespace",
                  "regex": ".+Consts$"
                },
                {
                    "type": "filename",
                    "regex": ".+Consts.ts$"
                },
                {
                    "type": "filenameInCode"
                }
            ]
        }
    ]
}
  • "dir" is target directory
  • "test" is Inspection Items
  • "type" is filename or classname or namespace or functionname or filenameInCode
  • "regex" is regular expression text

Type

filename

Check if the filename matches the regex.

classname

Check if the classname matches the regex.

namespace

Check if the namespace matches the regex.

functionname

Check if the functionname matches the regex.

filenameInCode

Whether the file name is used in the code or not case-insensitive

FAQs

Package last updated on 27 Jan 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