eslint-plugin-node
eslint-plugin-node copied to clipboard
Additional ESLint's rules for Node.js
Hello, I'm using TypeScript project which compiles to ES modules. Because of this imports should containt '.js' extension like: `import {config} from './config.js';` The problem is that actually there is...
Currently the way to determine whether a file is ignored, doesn't work ideally. NPM doesn't load `.gitignore` as a fallback - however, this plugin checks files against `.gitignore`, if `.npmignore`...
When `package.json` specifies `{engines: {node: "^12"}}`, the `no-missing-require` rule returns a false positive for `fs/promises` even though `fs/promises` isn't available until Node.js v14.
When checking for existence of an import, the new "exports" field is not checked. Example: If package `foo` has this `package.json`: ```json { "exports": { "./bar": "./src/bar.js" } } ```...
When importing an extension-less path, I'd like for `file-extension-in-import` to check if the path exists in the target package's exports map. If it exists, it should not error. eg. ```...
I would like to propose a rule which forbids all Node.js core modules, though which makes allowances for them under certain conditions. The purpose would be to ensure that one...
Hi, I have a common pattern of ignoring everything and unignoring only the files I want to be published in `.npmignore`: ``` * !/lib/**/* ``` This pattern fails to include...
This is the first time I've ever touched eslint rule stuff, but I feel pretty good about this change, and was able to maintain the 100% test coverage on this...
I have created a wrapper around process.env, and would like to enforce developers use the wrapper instead of directly using `process.env`. All this rule needs is to be able to...
It's currently listed as a style rule... https://github.com/mysticatea/eslint-plugin-node/blob/f45c6149be7235c0f7422d1179c25726afeecd83/lib/rules/file-extension-in-import.js#L39-L40 however real esm dose not correctly work without it. sources can't guess what you need. it can't scan the filesystem and automatically...