eslint-plugin-node
eslint-plugin-node copied to clipboard
Node/CommonJS require calls variable naming
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 😅