Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[first] doesn't recognize "import = require" imports in TypeScript #1957

Closed
abacabadabacaba opened this issue Dec 1, 2020 · 0 comments · Fixed by #1963
Closed

[first] doesn't recognize "import = require" imports in TypeScript #1957

abacabadabacaba opened this issue Dec 1, 2020 · 0 comments · Fixed by #1963

Comments

@abacabadabacaba
Copy link

abacabadabacaba commented Dec 1, 2020

Configuration:

module.exports = {
  parser: '@typescript-eslint/parser',
  plugins: ['@typescript-eslint', 'import'],
  rules: {
    'import/first': 'error'
  }
}

Code

import foo from 'foo'
import bar = require('bar')
import baz from 'baz'

Expected result

No errors.

Actual result

3:1  error  Import in body of module; reorder to top  import/first
@abacabadabacaba abacabadabacaba changed the title [first] doesn' [first] doesn't recognize "import = require" imports in TypeScript Dec 1, 2020
@ljharb ljharb closed this as completed in 196d655 Jan 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants