Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit ce8b725

Browse files
committed
feat: disallow import '.'
1 parent ff01722 commit ce8b725

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/configs/base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ export const config: Linter.Config = {
245245
'for..in loops iterate over the entire prototype chain, which is virtually never what you want.\n ' +
246246
'Use Object.{keys,values,entries}, and iterate over the resulting array with a for..of loop.',
247247
},
248+
{
249+
selector: "ImportDeclaration[source.value='.']",
250+
message: 'Import from sibling file instead of referencing self',
251+
},
248252
],
249253
'no-trailing-spaces': [
250254
'warn',

0 commit comments

Comments
 (0)