Skip to content

Commit

Permalink
Disable the import/named rule for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 5, 2019
1 parent 03daca9 commit ee145cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ module.exports = {
// TODO: Enable again when I target only ESM
// 'import/first': 'error',

'import/named': 'error',
// Disabled as it doesn't work with TypeScript
// This issue and some others: https://github.com/benmosher/eslint-plugin-import/issues/1341
// 'import/named': 'error',

'import/namespace': [
'error',
{
Expand Down

2 comments on commit ee145cb

@fregante
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import-js/eslint-import-resolver-typescript#20 (comment)

Also, shouldn't this stay as a warning? I think import/named is still useful, especially for non-typescript users. Perhaps it should be undone in xo-config-typescript instead?

@sindresorhus
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, shouldn't this stay as a warning?

Warnings are mostly useless. They just create noise on non-actionable stuff and disappears in the CI.

I think import/named is still useful, especially for non-typescript users. Perhaps it should be undone in xo-config-typescript instead?

It's not possible to disable rules in a shareable config without depending on it. So then I would have to force xo-config-typescript users to install the import plugin, which would be weird.

On a side-note, I'm trying to use less import rules as I have years of annoyance of them being super-buggy and the project is not very actively maintained.

Please sign in to comment.