Skip to content

Commit 463418f

Browse files
committed
chore: disable node/no-missing-require eslint rule enforced by TS
1 parent 4b35486 commit 463418f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ module.exports = {
5454
],
5555
'sort-imports': ['error', { ignoreDeclarationSort: true }],
5656
'require-unicode-regexp': 'error',
57-
// TS covers this
57+
// TS covers these 2
5858
'node/no-missing-import': 'off',
59+
'node/no-missing-require': 'off',
5960
'node/no-unsupported-features/es-syntax': 'off',
6061
'node/no-unsupported-features/es-builtins': 'error',
6162
'import/no-commonjs': 'error',

src/rules/__tests__/unbound-method.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const requireRule = (throwWhenRequiring: boolean) => {
126126

127127
TSESLintPluginRef.throwWhenRequiring = throwWhenRequiring;
128128

129-
// eslint-disable-next-line @typescript-eslint/no-require-imports,node/no-missing-require
129+
// eslint-disable-next-line @typescript-eslint/no-require-imports
130130
return require('../unbound-method').default;
131131
};
132132

@@ -158,7 +158,7 @@ describe('error handling', () => {
158158

159159
jest.resetModules();
160160

161-
// eslint-disable-next-line @typescript-eslint/no-require-imports,node/no-missing-require
161+
// eslint-disable-next-line @typescript-eslint/no-require-imports
162162
expect(() => require('../unbound-method').default).toThrow(/oh noes!/iu);
163163
});
164164
});

0 commit comments

Comments
 (0)