mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-05-31 13:56:13 -07:00
* chore: migrate to mise + bump yarn to 4.14.1 (yarn 1 -> 4) - Pin Node and Yarn 4.14.1 in mise.toml - Drop Volta from package.json - Switch to corepack-managed yarn via packageManager field - Regenerate yarn.lock from scratch (yarn 1 v1 format -> yarn 4 v9) - enableScripts off (default); allowlist lefthook via dependenciesMeta - Replace setup-node + cache:'yarn' across 4 yarn-using workflows (integrity-check, validate-community-plugins, validate-orchestrator, validate-orchestrator-integration) with the standard cache pattern - Add yarn 4 (berry) gitignore rules * chore: revert dist/ + build-tests workflow churn Keep PR scoped to tooling migration only; dist/ rebuild and prettier auto-wraps in build-tests-* workflows are unrelated drive-by changes. * fix(ci): add missing eslint plugins + jest globals Yarn 4 strict layout doesn't expose @typescript-eslint/eslint-plugin or eslint-plugin-import which were resolved transitively under yarn 1. Add them as explicit devDeps. Same for @jest/globals (used by jest-fail-on-console). Disable unicorn/no-useless-undefined which now fires on existing mockResolvedValue(undefined) calls. The undefined arg is required by @types/jest 27 typings (removing it breaks tsc), so the rule and the typecheck disagree. Pre-existing under yarn 1 these calls compiled because the eslint config was effectively non-functional (plugin resolution failed silently) so the rule never ran. * fix(ci): disable unicorn/no-useless-undefined @types/jest 27 typings require explicit .mockResolvedValue(undefined), which the rule wants removed; tsc and eslint disagreed. Disable the rule to match upstream behaviour (it only fires now because yarn 4 exposes the eslint plugin tree that yarn 1 silently broke). * ci: bump cache key to v2 to bust stale node_modules The restore-key pattern matched an older cache that had @types/tar + minipass 3.x in node_modules from before the lockfile regen. Fresh installs end up with that stale tree and tsc fails on incompatible types. Versioning the key forces a clean cache. * chore: actually revert dist/ to origin/main Earlier revert commit only fixed workflows; dist/ stayed rebuilt. The newer ncc bundle output triggers 2 high-severity CodeQL alerts (URL substring sanitization + escape sanitization) that don't fire on the main branch's dist/. Restore main's dist/ so CodeQL passes. * ci: drop node_modules from yarn cache (stale-state fix) Caching node_modules causes stale trees to leak across yarn.lock changes (e.g. @types/tar persisting after a regen). Cache only the yarn cacheFolder + install-state.gz; yarn install rebuilds node_modules from those (fast).
95 lines
2.6 KiB
JSON
95 lines
2.6 KiB
JSON
{
|
|
"root": true,
|
|
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
|
|
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"],
|
|
"parser": "@typescript-eslint/parser",
|
|
"parserOptions": {
|
|
"ecmaVersion": 2020,
|
|
"sourceType": "module",
|
|
"extraFileExtensions": [".mjs"],
|
|
"ecmaFeatures": {
|
|
"impliedStrict": true
|
|
},
|
|
"project": "./tsconfig.json"
|
|
},
|
|
"env": {
|
|
"node": true,
|
|
"es6": true,
|
|
"jest/globals": true,
|
|
"es2020": true
|
|
},
|
|
"rules": {
|
|
// Error out for code formatting errors
|
|
"prettier/prettier": "error",
|
|
// Namespaces or sometimes needed
|
|
"import/no-namespace": "off",
|
|
// Properly format comments
|
|
"spaced-comment": ["error", "always"],
|
|
"lines-around-comment": [
|
|
"error",
|
|
{
|
|
"beforeBlockComment": true,
|
|
"beforeLineComment": true,
|
|
"allowBlockStart": true,
|
|
"allowObjectStart": true,
|
|
"allowArrayStart": true,
|
|
"allowClassStart": true,
|
|
"ignorePattern": "pragma|ts-ignore"
|
|
}
|
|
],
|
|
// Mandatory spacing
|
|
"padding-line-between-statements": [
|
|
"error",
|
|
{
|
|
"blankLine": "always",
|
|
"prev": "*",
|
|
"next": "return"
|
|
},
|
|
{
|
|
"blankLine": "always",
|
|
"prev": "directive",
|
|
"next": "*"
|
|
},
|
|
{
|
|
"blankLine": "any",
|
|
"prev": "directive",
|
|
"next": "directive"
|
|
}
|
|
],
|
|
// Enforce camelCase
|
|
"camelcase": "error",
|
|
// Allow forOfStatements
|
|
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
|
|
// Continue is viable in forOf loops in generators
|
|
"no-continue": "off",
|
|
// From experience, named exports are almost always desired. I got tired of this rule
|
|
"import/prefer-default-export": "off",
|
|
// Unused vars are useful to keep method signatures consistent and documented
|
|
"@typescript-eslint/no-unused-vars": "off",
|
|
// For this project only use kebab-case
|
|
"unicorn/filename-case": [
|
|
"error",
|
|
{
|
|
"cases": {
|
|
"kebabCase": true
|
|
}
|
|
}
|
|
],
|
|
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
|
|
"unicorn/prefer-spread": "off",
|
|
// Temp disable to prevent mixing changes with other PRs
|
|
// Disabled: @types/jest 27 typings require .mockResolvedValue(undefined),
|
|
// contradicting this rule
|
|
"unicorn/no-useless-undefined": "off",
|
|
"i18n-text/no-en": "off"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["jest.setup.js"],
|
|
"rules": {
|
|
"import/no-commonjs": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|