mysticatea / eslint-plugin-node

Additional ESLint's rules for Node.js
MIT License
958 stars 167 forks source link

fix: support typecasted requires #297

Closed G-Rath closed 1 year ago

G-Rath commented 2 years ago

This fixes a false positive when typecasting a global require in typescript, like so:

const wcwidth = require('wcwidth') as (str: string) => number;

Happy to add tests if you're happy having @typescript-eslint/parser as a dev dependency :)