Skip to content

Commit

Permalink
Disable some problematic import rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jun 15, 2019
1 parent b73b11b commit f069a21
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ module.exports = {
json: 'always'
}
],
'import/first': 'error',

// Disabled as it causes problems with TypeScript when you use mixed ESM and CommonJS
// TODO: Enable again when I target only ESM
// 'import/first': 'error',

'import/named': 'error',
'import/namespace': [
'error',
Expand All @@ -71,7 +75,10 @@ module.exports = {
// 'import/no-cycle': 'error'

'import/no-useless-path-segments': 'error',
'import/newline-after-import': 'error',

// Disabled as it doesn't work with TypeScript
// 'import/newline-after-import': 'error',

'import/no-amd': 'error',
'import/no-duplicates': 'error',

Expand All @@ -88,12 +95,15 @@ module.exports = {
'import/no-mutable-exports': 'error',
'import/no-named-as-default-member': 'error',
'import/no-named-as-default': 'error',
'import/no-unresolved': [
'error',
{
commonjs: true
}
],

// Disabled because it's buggy and it also doesn't work with TypeScript
// 'import/no-unresolved': [
// 'error',
// {
// commonjs: true
// }
// ],

'import/order': 'error',
'import/no-unassigned-import': [
'error',
Expand Down

0 comments on commit f069a21

Please sign in to comment.