eslint-plugin-node
eslint-plugin-node copied to clipboard
allow regex and wildcards for `allowModules` and other issues
it seems that the option allowModules accepts the typical module names only. it should accept wildcards and regex
- [ ] allow wildcards and regex
- [ ] add .ts to the default tryExtensions array
- [ ] tryExtensions also should accept wildcards and regex
- [ ] respect tsconfig.compilerOptions.path by default
"node/no-extraneous-import": [
"error",
{
allowModules: [
"@jest/globals",
"@jest/*",
/^@jest/,
],
tryExtensions: [".js", ".ts", ".json", ".node"],
},
],
eslint-plugin-n is the maintained version of this module.
We switched to it in eg. eslint-config-standard / standard and it is maintained by me and other members of the official ESLint community organization.
Try that module out and if it isn't fixed there, then open a new issue in that project.