init workspace

Signed-off-by: Magic <magicoflolis@tuta.io>
This commit is contained in:
Magic 2025-05-24 13:26:54 -07:00
parent feba65e8a9
commit 1800cafee7
No known key found for this signature in database
GPG key ID: 96EF8864366F6092
14 changed files with 1390 additions and 0 deletions

42
eslint.config.js Normal file
View file

@ -0,0 +1,42 @@
// @ts-check
import globals from "globals";
import eslint from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import tseslint from "typescript-eslint";
export default tseslint.config([
eslint.configs.recommended,
tseslint.configs.recommended,
eslintConfigPrettier,
{
rules: {
"no-undef": "off",
"no-var": "error",
"no-useless-escape": "off",
"prefer-const": ["error", { destructuring: "all" }],
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
quotes: ["error", "double", { avoidEscape: true, allowTemplateLiterals: false }],
"space-before-blocks": ["error", "always"]
}
},
{
files: ["context.js", "input.js", "library.js", "output.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "script",
globals: globals.es2024
}
},
{
files: ["tools/*.js", "utils/**/*.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.es2024,
...globals.node
}
}
}
]);