+7
-2
lines changedFilter options
+7
-2
lines changed Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@
4
4
* the ESM loader or the CJS loader.
5
5
*/
6
6
7
-
// eslint-disable-next-line node-core/require-common-first
8
7
import { buildType } from '../../common/index.mjs';
9
8
import assert from 'node:assert';
10
9
import { createRequire } from 'node:module';
Original file line number Diff line number Diff line change
@@ -20,6 +20,12 @@ new RuleTester({
20
20
code: 'require("common")\n' +
21
21
'require("assert")'
22
22
},
23
+
{
24
+
code: 'import "../../../../common/index.mjs";',
25
+
languageOptions: {
26
+
sourceType: 'module',
27
+
},
28
+
},
23
29
],
24
30
invalid: [
25
31
{
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ module.exports = {
22
22
* @returns {string} module name
23
23
*/
24
24
function getModuleName(str) {
25
-
if (str === '../common/index.mjs') {
25
+
if (str.startsWith('../') && str.endsWith('/common/index.mjs')) {
26
26
return 'common';
27
27
}
28
28
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4