Skip to content

Commit 8b2fa78

Browse files
committedFeb 20, 2021
Re-enable import/extensions
1 parent 51ee377 commit 8b2fa78

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed
 

‎config/plugins.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -186,20 +186,18 @@ module.exports = {
186186
'promise/prefer-await-to-then': 'error',
187187
'import/default': 'error',
188188
'import/export': 'error',
189-
190-
// Disabled as we use `node/file-extension-in-import` instead as it has an auto-fix.
191-
// 'import/extensions': [
192-
// 'error',
193-
// 'always',
194-
// {
195-
// ignorePackages: true,
196-
// // TypeScript doesn't yet support using extensions and fails with error TS2691.
197-
// pattern: {
198-
// ts: 'never',
199-
// tsx: 'never'
200-
// }
201-
// }
202-
// ],
189+
'import/extensions': [
190+
'error',
191+
'always',
192+
{
193+
ignorePackages: true,
194+
// TypeScript doesn't yet support using extensions and fails with error TS2691.
195+
pattern: {
196+
ts: 'never',
197+
tsx: 'never'
198+
}
199+
}
200+
],
203201

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

285283
'node/no-unpublished-bin': 'error',
284+
285+
// We have this enabled in addition to `import/extensions` as this one has an auto-fix.
286286
'node/file-extension-in-import': [
287287
'error',
288288
'always',

0 commit comments

Comments
 (0)