Skip to content

Commit 85a3c05

Browse files
committed
Update dev dependencies
Includes updating ESLint and fixing the lint errors it found.
1 parent d6cd9a7 commit 85a3c05

8 files changed

+390
-408
lines changed

.eslintignore

-2
This file was deleted.

.eslintrc.json

-7
This file was deleted.

eslint.config.mjs

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import domenicConfig from "@domenic/eslint-config";
2+
import globals from "globals";
3+
export default [
4+
{
5+
ignores: [
6+
"lib/mappingTable.json",
7+
"lib/regexes.js"
8+
]
9+
},
10+
{
11+
files: ["**/*.js"],
12+
languageOptions: {
13+
sourceType: "commonjs",
14+
globals: globals.node
15+
}
16+
},
17+
...domenicConfig,
18+
{
19+
files: ["scripts/**.js"],
20+
rules: {
21+
"no-console": "off"
22+
}
23+
}
24+
];

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function isBidiDomain(labels) {
199199
if (label.startsWith("xn--")) {
200200
try {
201201
return punycode.decode(label.substring(4));
202-
} catch (err) {
202+
} catch {
203203
return "";
204204
}
205205
}
@@ -284,7 +284,7 @@ function toASCII(domainName, {
284284
if (containsNonASCII(l)) {
285285
try {
286286
return `xn--${punycode.encode(l)}`;
287-
} catch (e) {
287+
} catch {
288288
result.error = true;
289289
}
290290
}

lib/statusMapping.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ module.exports.STATUS_MAPPING = {
44
mapped: 1,
55
valid: 2,
66
disallowed: 3,
7+
// eslint-disable-next-line camelcase
78
disallowed_STD3_valid: 4,
9+
// eslint-disable-next-line camelcase
810
disallowed_STD3_mapped: 5,
911
deviation: 6,
1012
ignored: 7

0 commit comments

Comments
 (0)