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

feat: add 'import/no-extraneous-dependencies' rule #17

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ module.exports = {
'require-yield': WARNING, // eslint:recommended

'import/no-duplicates': [ERROR, {considerQueryString: true}],
'import/no-extraneous-dependencies': [ERROR, {includeTypes: true}],
},
overrides: [
{
Expand Down
7 changes: 7 additions & 0 deletions test/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable import/order */

// eslint-disable-next-line import/no-duplicates
import {test} from './file';
Expand All @@ -7,5 +8,11 @@ import {test2} from './file';
import type {test4 as Test4} from './file';
// eslint-disable-next-line import/no-duplicates
import {test3} from './file.js';

import {test4} from './file.js?mod2';
import {test5} from './file?mod';

// eslint-disable-next-line import/no-extraneous-dependencies
import {parse} from 'json5';
// eslint-disable-next-line import/no-extraneous-dependencies
import type {stringify} from 'json5';