New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@toptal/davinci-dir-lint

Package Overview
Dependencies
Maintainers
1
Versions
949
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toptal/davinci-dir-lint

Lint the folder structure and naming

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
1.8K
-9.93%
Maintainers
1
Weekly downloads
 
Created
Source

@toptal/davinci-dir-lint

Linter for folder structure and naming.

Usage

Use it by installing yarn add @toptal/davinci-syntax in your project.

davinci-syntax lint dir .

Configuration

The package comes with the default configuration:

{
  "namespaces/*/*": "regex:^(apps|libs)$",
  "namespaces": "kebab-case",
  "apps": "kebab-case",
  "libs": "kebab-case",
  "hosts": "kebab-case"
}

Which means:

  • "namespaces/*/*": "regex:^(apps|libs)$"

    ✅ Valid:

    namespaces
    |
    └─── billing
         |
         └─── apps
         |
         └─── libs
    

    ❌ Invalid:

    namespaces
    |
    └─── billing
         |
         └─── utils
         |
         └─── core
    
  • "namespaces": "kebab-case"

    ✅ Valid:

    namespaces
    |
    └───billing-product
    

    ❌ Invalid:

    namespaces
    |
    └───billingProduct
    

Right now it's possible to change the default configuration only by contribution to Davinci.

Rules

Regexp

Regexp validation for folder names.

Example:

{
  "namespaces": "regex:^(apps|libs)$"
}

kebab-case

Validates that folder names are in kebab-case.

Example:

{
  "apps": "kebab-case"
}

Keywords

dir

FAQs

Package last updated on 18 Jan 2023

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