Skip to content

Commit

Permalink
fixup! fixup! Remove empty line after import
Browse files Browse the repository at this point in the history
  • Loading branch information
ertrzyiks committed Apr 15, 2021
1 parent 3f75b3e commit d2a7722
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/src/rules/no-duplicates.js
Expand Up @@ -411,3 +411,30 @@ ruleTester.run('no-duplicates', rule, {
],
});

context('TypeScript', function() {
getNonDefaultParsers()
.filter((parser) => parser !== require.resolve('typescript-eslint-parser'))
.forEach((parser) => {
const parserConfig = {
parser: parser,
settings: {
'import/parsers': { [parser]: ['.ts'] },
'import/resolver': { 'eslint-import-resolver-typescript': true },
},
};

ruleTester.run('no-duplicates', rule, {
valid: [
// #1667: ignore duplicate if is a typescript type import
test(
{
code: "import type { x } from './foo'; import y from './foo'",
parser,
},
parserConfig,
),
],
invalid: [],
});
});
});

0 comments on commit d2a7722

Please sign in to comment.