Skip to content

Commit 62b3bcc

Browse files
committed
fix: fix aliasForSubpaths naming
1 parent 9f3fc26 commit 62b3bcc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/index.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ const tests = {
2727
},
2828
aliasForSubpaths: {
2929
code: "import '@/foo'",
30-
filename: 'sub/index.ts',
3130
files: { 'foo.ts': '' },
32-
options: { alias: { '@': '.' }, aliasForSubpaths: false },
31+
options: { alias: { '@': '.' }, aliasForSubpaths: true },
3332
},
3433
babelrc: {
3534
code: "import '../foo'",

src/rules/prefer-alias.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default {
108108
if (
109109
!isParentImport(importWithoutAlias) &&
110110
hasAlias &&
111-
!options.allowSubpathWithAlias
111+
!options.aliasForSubpaths
112112
) {
113113
return context.report({
114114
fix: fixer =>

0 commit comments

Comments
 (0)