feat(portal-shell): clean widget design tokens and fix lint:tokens (P1-6)

516 mechanical replacements across 25 widget files:
- spacing xs/sm/md/lg/xl to numeric 1/2/3/4/6
- text-heading-3 to text-lg font-semibold
- bg-danger to bg-destructive
- border border dedup

Fix .eslintrc.tokens.js to use typescript-eslint parser (was importing
uninstalled @typescript-eslint/parser). lint:tokens now passes.
This commit is contained in:
SpecialX
2026-07-22 15:07:38 +08:00
parent 9358372657
commit a28a6bd6ea
27 changed files with 388 additions and 384 deletions

View File

@@ -2,16 +2,17 @@
* ESLint Design Tokens 配置独立运行eslint -c .eslintrc.tokens.js src
*
* 与 eslint.config.js 中的 design-tokens 规则等价,保留以对齐 teacher-portal 习惯。
* 使用 typescript-eslint 包的 parser与 eslint.config.js 一致)。
* 关联project_rules §3.10
*/
import tsParser from "@typescript-eslint/parser";
import tseslint from "typescript-eslint";
/** @type {import('eslint').Linter.Config[]} */
export default [
export default tseslint.config(
{
files: ["**/*.{ts,tsx,js,jsx}"],
languageOptions: {
parser: tsParser,
parser: tseslint.parser,
ecmaVersion: 2024,
sourceType: "module",
parserOptions: {
@@ -40,4 +41,4 @@ export default [
"no-restricted-syntax": "off",
},
},
];
);