Skip to content

Commit d2446e1

Browse files
authored
Upgrade packages, migrate ESLint version (#42)
1 parent 29d0ca3 commit d2446e1

File tree

4 files changed

+486
-371
lines changed

4 files changed

+486
-371
lines changed

.eslintrc.json renamed to eslint.config.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
{
1+
import {FlatCompat} from "@eslint/eslintrc";
2+
import js from "@eslint/js";
3+
4+
const config = {
25
"env": {
36
"commonjs": true,
47
"es6": true,
5-
"node": true
8+
"node": true,
69
},
710
"ignorePatterns": ["docs/", "site/"],
811
"extends": "eslint:recommended",
912
"globals": {
1013
"Atomics": "readonly",
11-
"SharedArrayBuffer": "readonly"
14+
"SharedArrayBuffer": "readonly",
1215
},
1316
"parserOptions": {
1417
"ecmaVersion": 2020,
15-
"sourceType": "module"
18+
"sourceType": "module",
1619
},
1720
"rules": {
1821
"no-empty": ["error", {"allowEmptyCatch": true}],
22+
"no-unused-vars": ["error", {"caughtErrors": "none"}],
23+
"prefer-const": "error",
1924

2025
"block-scoped-var": "error",
2126
"consistent-return": "error",
@@ -59,7 +64,7 @@
5964
"semi-spacing": "error",
6065
"semi-style": "error",
6166
"space-before-function-paren": ["error", {
62-
"anonymous": "always", "named": "never", "asyncArrow": "always"
67+
"anonymous": "always", "named": "never", "asyncArrow": "always",
6368
}],
6469
"space-infix-ops": "error",
6570
"space-unary-ops": "error",
@@ -81,6 +86,9 @@
8186
"rest-spread-spacing": "error",
8287
"sort-imports": "error",
8388
"template-curly-spacing": "error",
84-
"yield-star-spacing": "error"
85-
}
86-
}
89+
"yield-star-spacing": "error",
90+
},
91+
};
92+
93+
const compat = new FlatCompat({recommendedConfig: js.configs.recommended});
94+
export default compat.config(config);

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async function installCrystalForLinux({crystal, shards, arch = getArch(), path})
125125
const filePatterns = {"x86_64": /-linux-x86_64\.tar\.gz$/, "x86": /-linux-i686\.tar\.gz$/};
126126
checkArch(arch, Object.keys(filePatterns));
127127

128-
let packages = "libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" ");
128+
const packages = "libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" ");
129129
if (crystal === Latest || crystal === Nightly || cmpTags(crystal, "1.8") >= 0) {
130130
packages.push("libpcre2-dev");
131131
}
@@ -319,7 +319,7 @@ async function getLatestTag({repo, prefix}) {
319319
}
320320
}
321321
if (tags.length === 0) {
322-
let error = `The repository "${repo.owner}/${repo.repo}" has no releases matching "${prefix}.*"`;
322+
const error = `The repository "${repo.owner}/${repo.repo}" has no releases matching "${prefix}.*"`;
323323
throw error;
324324
}
325325
tags.sort(cmpTags);

0 commit comments

Comments
 (0)