Skip to content

Commit

Permalink
Upgrade packages, migrate ESLint version (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed May 21, 2024
1 parent 29d0ca3 commit d2446e1
Show file tree
Hide file tree
Showing 4 changed files with 486 additions and 371 deletions.
24 changes: 16 additions & 8 deletions .eslintrc.json → eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
{
import {FlatCompat} from "@eslint/eslintrc";
import js from "@eslint/js";

const config = {
"env": {
"commonjs": true,
"es6": true,
"node": true
"node": true,
},
"ignorePatterns": ["docs/", "site/"],
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
"SharedArrayBuffer": "readonly",
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
"sourceType": "module",
},
"rules": {
"no-empty": ["error", {"allowEmptyCatch": true}],
"no-unused-vars": ["error", {"caughtErrors": "none"}],
"prefer-const": "error",

"block-scoped-var": "error",
"consistent-return": "error",
Expand Down Expand Up @@ -59,7 +64,7 @@
"semi-spacing": "error",
"semi-style": "error",
"space-before-function-paren": ["error", {
"anonymous": "always", "named": "never", "asyncArrow": "always"
"anonymous": "always", "named": "never", "asyncArrow": "always",
}],
"space-infix-ops": "error",
"space-unary-ops": "error",
Expand All @@ -81,6 +86,9 @@
"rest-spread-spacing": "error",
"sort-imports": "error",
"template-curly-spacing": "error",
"yield-star-spacing": "error"
}
}
"yield-star-spacing": "error",
},
};

const compat = new FlatCompat({recommendedConfig: js.configs.recommended});
export default compat.config(config);
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async function installCrystalForLinux({crystal, shards, arch = getArch(), path})
const filePatterns = {"x86_64": /-linux-x86_64\.tar\.gz$/, "x86": /-linux-i686\.tar\.gz$/};
checkArch(arch, Object.keys(filePatterns));

let packages = "libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" ");
const packages = "libevent-dev libgmp-dev libpcre3-dev libssl-dev libxml2-dev libyaml-dev".split(" ");
if (crystal === Latest || crystal === Nightly || cmpTags(crystal, "1.8") >= 0) {
packages.push("libpcre2-dev");
}
Expand Down Expand Up @@ -319,7 +319,7 @@ async function getLatestTag({repo, prefix}) {
}
}
if (tags.length === 0) {
let error = `The repository "${repo.owner}/${repo.repo}" has no releases matching "${prefix}.*"`;
const error = `The repository "${repo.owner}/${repo.repo}" has no releases matching "${prefix}.*"`;
throw error;
}
tags.sort(cmpTags);
Expand Down
Loading

0 comments on commit d2446e1

Please sign in to comment.