New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

5

lib/rules/path-case.js

@@ -70,5 +70,6 @@ const _ = require('lodash');

create(context) {
const filenameWithExt = context.getFilename();
const projectRoot = process.cwd();
const fullPathWithExt = context.getFilename();
const filenameWithExt = _.replace(fullPathWithExt, projectRoot, '');
const extension = path.extname(filenameWithExt);
// const filename = path.basename(filenameWithExt, extension);
const caseValue = _.get(context, 'options[0].case');

@@ -75,0 +76,0 @@ const ignoreParts = _.get(context, 'options[0].ignoreParts');

2

package.json
{
"name": "eslint-plugin-nada",
"version": "1.1.0",
"version": "1.1.1",
"description": "enforces folder and file names to match desired case style",

@@ -5,0 +5,0 @@ "keywords": [

@@ -46,6 +46,8 @@ # eslint-plugin-nada

First param is the severity level as per eslint standards, where: 0 = off, 1 = warn, 2 = error
```json
{
"rules": {
"nada/path-case": [{"case": "kebabCase"}]
"nada/path-case": [2, {"case": "kebabCase"}]
}

@@ -52,0 +54,0 @@ }

@@ -12,2 +12,4 @@ /**

process.cwd = () => '/systemRoot/myProjectFolder';
ruleTester.run('path-case', rule, {

@@ -35,2 +37,7 @@ valid: [

},
{
filename: '/systemRoot/myProjectFolder/src/code/my-file-name-2.js',
code: '//systemRoot/myProjectFolder/src/code/my-file-name-2\.js // rule: kebabCase', // eslint-disable-line
options: [{ case: 'kebabCase' }],
},
],

@@ -37,0 +44,0 @@

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