Skip to content

Commit

Permalink
chore: disable node/no-missing-require eslint rule enforced by TS
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jul 13, 2023
1 parent 4b35486 commit 463418f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ module.exports = {
],
'sort-imports': ['error', { ignoreDeclarationSort: true }],
'require-unicode-regexp': 'error',
// TS covers this
// TS covers these 2
'node/no-missing-import': 'off',
'node/no-missing-require': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'node/no-unsupported-features/es-builtins': 'error',
'import/no-commonjs': 'error',
Expand Down
4 changes: 2 additions & 2 deletions src/rules/__tests__/unbound-method.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const requireRule = (throwWhenRequiring: boolean) => {

TSESLintPluginRef.throwWhenRequiring = throwWhenRequiring;

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

Expand Down Expand Up @@ -158,7 +158,7 @@ describe('error handling', () => {

jest.resetModules();

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

0 comments on commit 463418f

Please sign in to comment.