Skip to content

Commit

Permalink
Re-enable import/extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Feb 20, 2021
1 parent 51ee377 commit 8b2fa78
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions config/plugins.js
Expand Up @@ -186,20 +186,18 @@ module.exports = {
'promise/prefer-await-to-then': 'error',
'import/default': 'error',
'import/export': 'error',

// Disabled as we use `node/file-extension-in-import` instead as it has an auto-fix.
// 'import/extensions': [
// 'error',
// 'always',
// {
// ignorePackages: true,
// // TypeScript doesn't yet support using extensions and fails with error TS2691.
// pattern: {
// ts: 'never',
// tsx: 'never'
// }
// }
// ],
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
// TypeScript doesn't yet support using extensions and fails with error TS2691.
pattern: {
ts: 'never',
tsx: 'never'
}
}
],

// Disabled as it causes problems with TypeScript when you use mixed ESM and CommonJS.
// TODO: Enable again when I target only ESM.
Expand Down Expand Up @@ -283,6 +281,8 @@ module.exports = {
// 'node/no-missing-require': 'error',

'node/no-unpublished-bin': 'error',

// We have this enabled in addition to `import/extensions` as this one has an auto-fix.
'node/file-extension-in-import': [
'error',
'always',
Expand Down

0 comments on commit 8b2fa78

Please sign in to comment.