Repository: import-js/eslint-plugin-import (js)

Issue:
Set @/whatever import path as not scoped package
Actually imports like these are matching **scopedRegExp** in **isScope** function. In the example below is not a scoped package, is only an alias to **src** folder

```js
import UnitDevice from '@/components/UnitDevice'
```

So my proposal is to change from

```js
const scopedRegExp = /^@[^/]*\/?[^/]+/
```

to this:

```js
const scopedRegExp = /^@[^/]+\/?[^/]+/
```

which i have tested

Pull request description:
[Fix] `extensions`/`importType`: fix isScoped treating @/abc as scoped module
Closes #2145 

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a6ddbb80..53cc7824 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,8 @@ This change log adheres to standards from [Keep a CHANGELOG](http://keepachangel
 - [`no-duplicates`]: ensure autofix avoids excessive newlines ([#2028], thanks [@ertrzyiks])
 - [`extensions`]: avoid crashing on partially typed import/export statements ([#2118], thanks [@ljharb])
 - [`no-extraneous-dependencies`]: add ESM intermediate package.json support] ([#2121], thanks [@paztis])
- - Use `context.getPhysicalFilename()` when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney])
+- Use `context.getPhysicalFilename()` when available (ESLint 7.28+) ([#2160], thanks [@pmcelhaney])
+- [`extensions`]/`importType`: fix isScoped treating @/abc as scoped module ([#2146], thanks [@rperello])
 
 ### Changed
 - [Docs] `extensions`: removed incorrect cases ([#2138], thanks [@wenfangdu])
@@ -814,6 +815,7 @@ for info on changes for earlier releases.
 [#2160]: https://github.com/benmosher/eslint-plugin-import/pull/2160
 [#2158]: https://github.com/benmosher/eslint-plugin-import/pull/2158
 [#2156]: https://github.com/benmosher/eslint-plugin-import/pull/2156
+[#2146]: https://github.com/benmosher/eslint-plugin-import/pull/2146
 [#2138]: https://github.com/benmosher/eslint-plugin-import/pull/2138
 [#2121]: https://github.com/benmosher/eslint-plugin-import/pull/2121
 [#2099]: https://github.com/benmosher/eslint-plugin-import/pull/2099
@@ -1391,6 +1393,7 @@ for info on changes for earlier releases.
 [@richardxia]: https://github.com/richardxia
 [@robertrossmann]: https://github.com/robertrossmann
 [@rosswarren]: https://github.com/rosswarren
+[@rperello]: https://github.com/rperello
 [@rsolomon]: https://github.com/rsolomon
 [@s-h-a-d-o-w]: https://github.com/s-h-a-d-o-w
 [@saschanaz]: https://github.com/saschanaz
diff --git a/src/core/importType.js b/src/core/importType.js
index ecea976f..8457c785 100644
--- a/src/core/importType.js
+++ b/src/core/importType.js
@@ -64,7 +64,7 @@ function isModuleMain(name) {
   return name && moduleMainRegExp.test(name);
 }
 
-const scopedRegExp = /^@[^/]*\/?[^/]+/;
+const scopedRegExp = /^@[^/]+\/?[^/]+/;
 export function isScoped(name) {
   return name && scopedRegExp.test(name);
 }


Test patch:
diff --git a/tests/src/core/importType.js b/tests/src/core/importType.js
index 371a3d73..3a500021 100644
--- a/tests/src/core/importType.js
+++ b/tests/src/core/importType.js
@@ -1,7 +1,7 @@
 import { expect } from 'chai';
 import * as path from 'path';
 
-import importType, { isExternalModule, isScopedModule } from 'core/importType';
+import importType, { isExternalModule, isScopedModule, isScoped } from 'core/importType';
 
 import { testContext, testFilePath } from '../utils';
 
@@ -241,6 +241,15 @@ describe('importType(name)', function () {
 
   it('correctly identifies scoped modules with `isScopedModule`', () => {
     expect(isScopedModule('@/abc')).to.equal(false);
+    expect(isScopedModule('@/abc/def')).to.equal(false);
     expect(isScopedModule('@a/abc')).to.equal(true);
+    expect(isScopedModule('@a/abc/def')).to.equal(true);
+  });
+
+  it('correctly identifies scoped modules with `isScoped`', () => {
+    expect(isScoped('@/abc')).to.equal(false);
+    expect(isScoped('@/abc/def')).to.equal(false);
+    expect(isScoped('@a/abc')).to.equal(true);
+    expect(isScoped('@a/abc/def')).to.equal(true);
   });
 });
diff --git a/tests/src/rules/extensions.js b/tests/src/rules/extensions.js
index 4070c6a6..01343345 100644
--- a/tests/src/rules/extensions.js
+++ b/tests/src/rules/extensions.js
@@ -349,6 +349,11 @@ ruleTester.run('extensions', rule, {
           line: 4,
           column: 31,
         },
+        {
+          message: 'Missing file extension for "@/configs/chart"',
+          line: 7,
+          column: 27,
+        },
       ],
     }),
 
@@ -369,6 +374,11 @@ ruleTester.run('extensions', rule, {
           line: 4,
           column: 31,
         },
+        {
+          message: 'Missing file extension for "@/configs/chart"',
+          line: 7,
+          column: 27,
+        },
       ],
     }),