eslint-plugin-node icon indicating copy to clipboard operation
eslint-plugin-node copied to clipboard

Node/CommonJS require calls variable naming

Open lamuertepeluda opened this issue 4 years ago • 0 comments

Hi there,

I was wondering if this plugin (or any other) includes a rule for this use case, that is enforcing lowercase/camelCase naming for variables derived from default require calls, e.g.

const fs = require('fs') ✅
const path = require('path') ✅
const { SomeThing } = require('@some-module') ✅
const Fs = require('fs') ❌
const Path = require('path') ❌

Is this possible or should I write a custom rule for this? I have some ex-Java devs that keep using this unusual PascalCase convention, which is different from the rest of the code style 😅

lamuertepeluda avatar Jun 07 '21 08:06 lamuertepeluda