Last active
September 24, 2025 16:21
-
-
Save telamon/ff2536aa4f5d174e910c9294b56f2c49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "./node_modules/oxlint/configuration_schema.json", | |
| "plugins": [ | |
| "import", | |
| "promise" | |
| ], | |
| "categories": { | |
| "correctness": "off" | |
| }, | |
| "env": { | |
| "builtin": true | |
| }, | |
| "rules": { | |
| "no-var": "warn", | |
| "array-callback-return": [ | |
| "error", | |
| { | |
| "allowImplicit": false, | |
| "checkForEach": false | |
| } | |
| ], | |
| "curly": [ "off", "multi-line" ], | |
| "default-case-last": "error", | |
| "eqeqeq": [ | |
| "error", | |
| "always", | |
| { | |
| "null": "ignore" | |
| } | |
| ], | |
| "new-cap": [ | |
| "error", | |
| { | |
| "newIsCap": true, | |
| "capIsNew": false, | |
| "properties": true | |
| } | |
| ], | |
| "no-array-constructor": "error", | |
| "no-async-promise-executor": "error", | |
| "no-caller": "error", | |
| "no-case-declarations": "error", | |
| "no-class-assign": "error", | |
| "no-compare-neg-zero": "error", | |
| "no-cond-assign": "error", | |
| "no-const-assign": "error", | |
| "no-constant-condition": [ | |
| "error", | |
| { | |
| "checkLoops": false | |
| } | |
| ], | |
| "no-control-regex": "error", | |
| "no-debugger": "error", | |
| "no-delete-var": "error", | |
| "no-dupe-class-members": "error", | |
| "no-dupe-keys": "error", | |
| "no-duplicate-case": "error", | |
| "no-useless-backreference": "error", | |
| "no-empty": [ | |
| "error", | |
| { | |
| "allowEmptyCatch": true | |
| } | |
| ], | |
| "no-empty-character-class": "error", | |
| "no-empty-pattern": "error", | |
| "no-eval": "error", | |
| "no-ex-assign": "error", | |
| "no-extend-native": "error", | |
| "no-extra-bind": "error", | |
| "no-extra-boolean-cast": "error", | |
| "no-fallthrough": "error", | |
| "no-func-assign": "error", | |
| "no-global-assign": "error", | |
| "no-import-assign": "error", | |
| "no-invalid-regexp": "error", | |
| "no-irregular-whitespace": "error", | |
| "no-iterator": "error", | |
| "no-labels": [ | |
| "error", | |
| { | |
| "allowLoop": false, | |
| "allowSwitch": false | |
| } | |
| ], | |
| "no-lone-blocks": "error", | |
| "no-loss-of-precision": "error", | |
| "no-prototype-builtins": "error", | |
| "no-useless-catch": "error", | |
| "no-multi-str": "error", | |
| "no-new": "error", | |
| "no-new-func": "error", | |
| "no-new-wrappers": "error", | |
| "no-obj-calls": "error", | |
| "no-proto": "error", | |
| "no-redeclare": [ | |
| "error", | |
| { | |
| "builtinGlobals": false | |
| } | |
| ], | |
| "no-regex-spaces": "error", | |
| "no-return-assign": [ | |
| "error", | |
| "except-parens" | |
| ], | |
| "no-self-assign": [ | |
| "error", | |
| { | |
| "props": true | |
| } | |
| ], | |
| "no-self-compare": "error", | |
| "no-shadow-restricted-names": "error", | |
| "no-sparse-arrays": "error", | |
| "no-template-curly-in-string": "error", | |
| "no-this-before-super": "error", | |
| "no-throw-literal": "error", | |
| "no-unexpected-multiline": "error", | |
| "no-unneeded-ternary": [ | |
| "error", | |
| { | |
| "defaultAssignment": false | |
| } | |
| ], | |
| "no-unsafe-finally": "error", | |
| "no-unsafe-negation": "error", | |
| "no-unused-expressions": [ | |
| "error", | |
| { | |
| "allowShortCircuit": true, | |
| "allowTernary": true, | |
| "allowTaggedTemplates": true | |
| } | |
| ], | |
| "no-unused-vars": [ | |
| "error", | |
| { | |
| "args": "none", | |
| "caughtErrors": "none", | |
| "ignoreRestSiblings": true, | |
| "vars": "all" | |
| } | |
| ], | |
| "no-useless-call": "error", | |
| "no-useless-computed-key": "error", | |
| "no-useless-constructor": "error", | |
| "no-useless-escape": "error", | |
| "no-useless-rename": "error", | |
| "no-void": "error", | |
| "no-with": "error", | |
| "prefer-promise-reject-errors": "error", | |
| "symbol-description": "error", | |
| "unicode-bom": [ | |
| "error", | |
| "never" | |
| ], | |
| "use-isnan": [ | |
| "error", | |
| { | |
| "enforceForSwitchCase": true, | |
| "enforceForIndexOf": true | |
| } | |
| ], | |
| "valid-typeof": [ | |
| "error", | |
| { | |
| "requireStringLiterals": true | |
| } | |
| ], | |
| "yoda": [ | |
| "error", | |
| "never" | |
| ], | |
| "import/first": "error", | |
| "import/no-absolute-path": [ | |
| "error", | |
| { | |
| "esmodule": true, | |
| "commonjs": true, | |
| "amd": false | |
| } | |
| ], | |
| "import/no-duplicates": "error", | |
| "import/no-named-default": "error", | |
| "import/no-webpack-loader-syntax": "error", | |
| "promise/param-names": "error" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/sh -x | |
| set -eu | |
| version="v1.16.0" | |
| unverified="$(mktemp -d)" | |
| verify_checksum() { | |
| ( cd $unverified \ | |
| && sha256sum --check --ignore-missing <<'EOF' | |
| f0fadc049d50de0341bbbcfb74e8873d1a27078e34ba589105608c32a11371e2 oxlint-darwin-arm64 | |
| 738a120860ec81de62c9cda05b061a547a1336aa22d1b3c63be7d41c9db40de1 oxlint-darwin-x64 | |
| 8856e45c746348904b75faa41ec77f083075acf2b6dd197814d54337a658669c oxlint-linux-arm64-gnu | |
| 29a732bd5738afe36c79c4779ea8eb4b682d5a839e6f6198b6a8bf323af57770 oxlint-linux-arm64-musl | |
| 78d8639c24795b8c1c50fa11e6169d99561b62f72e22ff5e006b25d89ed5a8c4 oxlint-linux-x64-gnu | |
| 945895188399f3e5a2b50629bd17f6f48d508b172d3e59b56c7e0ebbd2c57174 oxlint-linux-x64-musl | |
| ce76fb85212b6c4f5484f87d38db231556efe825bbb3f2a6ec3d9a344fb8bb06 oxlint-win32-arm64.exe | |
| 00369c639770a08393c49564722175070e94046516843a0d35402638ca76180b oxlint-win32-x64.exe | |
| EOF | |
| ) | |
| } | |
| base="https://github.com/oxc-project/oxc/releases/download/oxlint_" | |
| variants='darwin-arm64 darwin-x64 linux-x64-gnu linux-x64-musl linux-arm64-gnu linux-arm64-musl win32-arm64.exe win32-x64.exe' | |
| fetch_release(){ | |
| for variant in $variants; do | |
| curl -Ls -o "${unverified}/oxlint-${variant}" "${base}${version}/oxlint-${variant}" | |
| done | |
| } | |
| bin='bin' | |
| post_install() { | |
| mkdir -p $bin | |
| for variant in $variants; do | |
| mv "${unverified}/oxlint-${variant}" "${bin}/oxlint-${variant}" | |
| chmod +x "${bin}/oxlint-${variant}" | |
| done | |
| rm -r $unverified && echo "vendor complete" || exit 1 | |
| } | |
| abort() { | |
| rm -rf $unverified | |
| } | |
| ( fetch_release \ | |
| && verify_checksum \ | |
| && post_install ) \ | |
| && exit 0 \ | |
| || abort | |
| echo "vendor failed" | |
| exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment