Skip to content
Merged
2 changes: 1 addition & 1 deletion doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ exports = { hello: false }; // Not exported, only available in the module
When the `module.exports` property is being completely replaced by a new
object, it is common to also reassign `exports`:

<!-- eslint-disable func-name-matching -->
<!-- eslint-disable node-core/func-name-matching -->

```js
module.exports = exports = function Constructor() {
Expand Down
4 changes: 1 addition & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,6 @@ export default [
'dot-notation': 'error',
'eqeqeq': ['error', 'smart'],

// TODO: make this rule consider primordials
'func-name-matching': ['error', { considerPropertyDescriptor: true }],

'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'no-constant-condition': ['error', { checkLoops: false }],
'no-constructor-return': 'error',
Expand Down Expand Up @@ -343,6 +340,7 @@ export default [
'node-core/no-duplicate-requires': 'error',
'node-core/prefer-proto': 'error',
'node-core/prefer-optional-chaining': 'error',
'node-core/func-name-matching': ['error', { considerPropertyDescriptor: true }],
},
},
// #endregion
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ function nextHookFactory(current, meta, { validateArgs, validateOutput }) {
if (next) {
nextNextHook = nextHookFactory(next, meta, { validateArgs, validateOutput });
} else {
// eslint-disable-next-line func-name-matching
// eslint-disable-next-line node-core/func-name-matching
nextNextHook = function chainAdvancedTooFar() {
throw new ERR_INTERNAL_ASSERTION(
`ESM custom loader '${hookName}' advanced beyond the end of the chain.`,
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/translators.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function loadCJSModule(module, source, url, filename, isMain) {

const cascadedLoader = require('internal/modules/esm/loader').getOrInitializeCascadedLoader();
const __dirname = dirname(filename);
// eslint-disable-next-line func-name-matching,func-style
// eslint-disable-next-line node-core/func-name-matching,func-style
const requireFn = function require(specifier) {
let importAttributes = kEmptyObject;
if (!StringPrototypeStartsWith(specifier, 'node:') && !BuiltinModule.normalizeRequirableId(specifier)) {
Expand Down
Loading