Skip to content

Commit 348e118

Browse files
committed
Fix test and lint.
1 parent 1cdd7a1 commit 348e118

File tree

4 files changed

+27
-1473
lines changed

4 files changed

+27
-1473
lines changed

.eslintrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
"node": true
55
},
66
"parserOptions": {
7-
"ecmaVersion": "latest"
7+
"ecmaVersion": "latest",
8+
"sourceType": "module"
89
},
10+
"parser": "@typescript-eslint/parser",
11+
"plugins": ["@typescript-eslint"],
912
"extends": [
10-
"plugin:prettier/recommended",
11-
"plugin:jsonc/recommended-with-json",
12-
"plugin:mdx/recommended",
13-
"plugin:yml/recommended"
13+
"eslint:recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:prettier/recommended"
1416
]
1517
}

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"build:r": "r -f cjs,es2020",
4141
"build:ts": "tsc -b",
4242
"lint": "run-p 'lint:*'",
43-
"lint:es": "eslint src --cache -f friendly",
43+
"lint:es": "eslint src/**",
4444
"lint:tsc": "tsc --noEmit",
4545
"test": "run-p 'test:*'",
4646
"test:multipleEslintrcs": "eslint --ext ts,tsx tests/multipleEslintrcs",
@@ -87,10 +87,7 @@
8787
"eslint-config-prettier": "^9",
8888
"eslint-import-resolver-typescript": "link:.",
8989
"eslint-plugin-import": "npm:eslint-plugin-i@^2.29.1",
90-
"eslint-plugin-jsonc": "^2.16.0",
91-
"eslint-plugin-mdx": "^3.1.5",
9290
"eslint-plugin-prettier": "^4",
93-
"eslint-plugin-yml": "^1.14.0",
9491
"json5": "^2.2.3",
9592
"npm-run-all2": "^5.0.2",
9693
"prettier": "^2.8.8",

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ function isBuiltin(moduleName: string) {
131131
* @param file the importing file's full path; i.e. '/usr/local/bin/file.js'
132132
* @param options
133133
*/
134-
// eslint-disable-next-line sonarjs/cognitive-complexity
135134
export function resolve(
136135
source: string,
137136
file: string,
@@ -267,7 +266,6 @@ const isModule = (modulePath?: string | undefined): modulePath is string => {
267266
* @param {boolean} retry should retry on failed to resolve
268267
* @returns The mapped path of the module or undefined
269268
*/
270-
// eslint-disable-next-line sonarjs/cognitive-complexity
271269
function getMappedPath(
272270
source: string,
273271
file: string,

0 commit comments

Comments
 (0)