Skip to content

Commit 8a2eb91

Browse files
committed
chore: update lint rules to allow importing stdlib package type definitions
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c1e2833 commit 8a2eb91

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

etc/eslint/rules/typescript.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ rules[ 'import/no-deprecated' ] = 'error';
13661366
* @name import/no-extraneous-dependencies
13671367
* @memberof rules
13681368
* @type {string}
1369-
* @default 'error'
1369+
* @default 'off'
13701370
* @see [import/no-extraneous-dependencies]{@link https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md}
13711371
*
13721372
* @example
@@ -1376,22 +1376,28 @@ rules[ 'import/no-deprecated' ] = 'error';
13761376
* // Bad...
13771377
* import foo from 'some-extranous-module';
13781378
*/
1379-
rules[ 'import/no-extraneous-dependencies' ] = 'error';
1379+
rules[ 'import/no-extraneous-dependencies' ] = 'off'; // NOTE: disabled to allow imports of `@stdlib/*` type declarations
13801380

13811381
/**
13821382
* Prevents importing the submodules of other modules.
13831383
*
13841384
* @name import/no-internal-modules
13851385
* @memberof rules
13861386
* @type {string}
1387-
* @default 'error'
1387+
* @default 'off'
13881388
* @see [import/no-internal-modules]{@link https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md}
13891389
*
13901390
* @example
13911391
* // Bad...
13921392
* import something from 'module/some/internal/path';
13931393
*/
1394-
rules[ 'import/no-internal-modules' ] = 'error';
1394+
rules[ 'import/no-internal-modules' ] = [
1395+
'error', {
1396+
'allow': [
1397+
'@stdlib/**'
1398+
]
1399+
}
1400+
];
13951401

13961402
/**
13971403
* Forbids import statements that import nothing.

0 commit comments

Comments
 (0)