eslint-plugin-node
eslint-plugin-node copied to clipboard
Additional ESLint's rules for Node.js
Since Node.js 15 the recommended way to use the `fs` API is via promises, see https://nodejs.org/api/fs.html#fs_promises_api. ```js // Using ESM Module syntax: import * as fs from 'fs/promises'; // Using...
Example use cases: https://github.com/sindresorhus/ky-universal/blob/master/index.js#L28-L30, https://github.com/sindresorhus/electron-reloader/blob/master/readme.md#usage
`prefer-global/url` requires using global `URL` as opposed to `const {URL} = require('url');`, however global URL was introduced in Node v10 while in 7.0 and 6.13 it's only available in `url`...
Regarding `node/no-unsupported-features/*`, you might want to track a specific Babel version to avoid flagging items which will be transpiled by Babel. However, I believe https://github.com/amilajack/eslint-plugin-compat/issues/174 , if implemented, might help...
I want to restrict people from doing `import foo = require('foo')` at my TS project, but currently neither `node/no-restricted-import` nor `node/no-restricted-require` block it.
It is difficult to override rules causing errors in `.mjs` (and presumably `.cjs`) files in projects, due to the use of `overrides` in the `recommended` config having a high specificity:...
`engines` from package.json isn't read by the `no-unsupported-features` rules when using yarn workspaces. If I set the `engines` field in the root package.json file (in the same directory that eslintrc...
Hi, Might you create configs (for both module and script) that are specific to a (minimum) Node version, e.g., that Node 14 sets `ecmaVersion` to 2020, Node 12 to 2019,...
Hi, I added `onlyRelativePath` option as discussed in [eslint-plugin-node/#100](https://github.com/mysticatea/eslint-plugin-node/issues/100) It's my first PR, so please let me know if I missed anything. 😊
https://stackoverflow.com/questions/10860244/how-to-make-node-js-require-absolute-instead-of-relative shows a way of using symlinks to require modules using paths that are relative to node_modules rather than to the current file, which leads to much fewer changes when...