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

eslint-plugin-nada

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-nada

enforces folder and file names to match desired case style

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
103
increased by7.29%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-nada

Enforces full path, folder and file names to match desired case style

  • Quick example:
// Errors for rule: kebabCase
myFileFolder/my-file-name.js // file path

// Ok for rule: kebabCase
my-file-folder/my-file-name.js // file path

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-nada:

$ npm install eslint-plugin-nada --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-nada globally.

Usage

Add nada to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": [
    "nada"
  ]
}

Then configure the rules you want to use under the rules section.

First param is the severity level as per eslint standards, where: 0 = off, 1 = warn, 2 = error

{
  "rules": {
    "nada/path-case": [2, {"case": "kebabCase"}]
  }
}

Supported Rules

path-case

Enforces full path, folder and file names to match desired case style.

Options
  • case: Supported case options are: kebabCase, camelCase and snakeCase.

Example:

{
  "rules": {
    "nada/path-case": [{"case": "kebabCase"}]
  }
}
  • ignoreParts: Array of strings to be ignored. Useful if you use file names like my-file.spec.js or my-file.test.js.

Example:

{
  "rules": {
    "nada/path-case": [
      {
        "case": "kebabCase",
        "ignoreParts": [".test", ".spec"]},
    ]
  }
}

Contributing

Roadmap

  • auto fix by renaming the file path to match desired rule
  • maybe Typescript

Keywords

FAQs

Package last updated on 14 May 2019

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