mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
chore: move oxlint tsconfigs under config
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"include": ["../../src/**/*", "../../ui/**/*", "../../packages/**/*"],
|
||||||
|
"exclude": ["../../node_modules", "../../dist", "../../dist-runtime"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"../../src/**/*",
|
||||||
|
"../../ui/src/**/*",
|
||||||
|
"../../packages/**/*.ts",
|
||||||
|
"../../extensions/**/*"
|
||||||
|
],
|
||||||
|
"exclude": ["../../node_modules", "../../dist", "../../dist-runtime"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"../../src/**/*",
|
||||||
|
"../../ui/**/*",
|
||||||
|
"../../packages/**/*",
|
||||||
|
"../../extensions/**/*",
|
||||||
|
"../../scripts/**/*"
|
||||||
|
],
|
||||||
|
"exclude": ["../../node_modules", "../../dist", "../../dist-runtime"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tsconfig.json",
|
||||||
|
"include": ["../../src/**/*.d.ts", "../../packages/**/*.d.ts", "../../scripts/**/*"],
|
||||||
|
"exclude": ["../../node_modules", "../../dist", "../../dist-runtime"]
|
||||||
|
}
|
||||||
+3
-3
@@ -1401,11 +1401,11 @@
|
|||||||
"lint:apps": "pnpm lint:swift",
|
"lint:apps": "pnpm lint:swift",
|
||||||
"lint:auth:no-pairing-store-group": "node scripts/check-no-pairing-store-group-auth.mjs",
|
"lint:auth:no-pairing-store-group": "node scripts/check-no-pairing-store-group-auth.mjs",
|
||||||
"lint:auth:pairing-account-scope": "node scripts/check-pairing-account-scope.mjs",
|
"lint:auth:pairing-account-scope": "node scripts/check-pairing-account-scope.mjs",
|
||||||
"lint:core": "node scripts/run-oxlint.mjs --tsconfig tsconfig.oxlint.core.json src ui packages",
|
"lint:core": "node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src ui packages",
|
||||||
"lint:docker-e2e": "node scripts/check-docker-e2e-boundaries.mjs",
|
"lint:docker-e2e": "node scripts/check-docker-e2e-boundaries.mjs",
|
||||||
"lint:docs": "pnpm dlx --config.resolution-mode=highest markdownlint-cli2 --config config/markdownlint-cli2.jsonc",
|
"lint:docs": "pnpm dlx --config.resolution-mode=highest markdownlint-cli2 --config config/markdownlint-cli2.jsonc",
|
||||||
"lint:docs:fix": "pnpm dlx --config.resolution-mode=highest markdownlint-cli2 --config config/markdownlint-cli2.jsonc --fix",
|
"lint:docs:fix": "pnpm dlx --config.resolution-mode=highest markdownlint-cli2 --config config/markdownlint-cli2.jsonc --fix",
|
||||||
"lint:extensions": "node scripts/run-oxlint.mjs --tsconfig tsconfig.oxlint.extensions.json extensions",
|
"lint:extensions": "node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.extensions.json extensions",
|
||||||
"lint:extensions:bundled": "node scripts/run-bundled-extension-oxlint.mjs",
|
"lint:extensions:bundled": "node scripts/run-bundled-extension-oxlint.mjs",
|
||||||
"lint:extensions:channels": "node scripts/run-extension-channel-oxlint.mjs",
|
"lint:extensions:channels": "node scripts/run-extension-channel-oxlint.mjs",
|
||||||
"lint:extensions:no-guarded-wildcard-reexports": "node scripts/check-extension-wildcard-reexports.mjs",
|
"lint:extensions:no-guarded-wildcard-reexports": "node scripts/check-extension-wildcard-reexports.mjs",
|
||||||
@@ -1420,7 +1420,7 @@
|
|||||||
"lint:plugins:no-monolithic-plugin-sdk-entry-imports": "node --import tsx scripts/check-no-monolithic-plugin-sdk-entry-imports.ts",
|
"lint:plugins:no-monolithic-plugin-sdk-entry-imports": "node --import tsx scripts/check-no-monolithic-plugin-sdk-entry-imports.ts",
|
||||||
"lint:plugins:no-register-http-handler": "node scripts/check-no-register-http-handler.mjs",
|
"lint:plugins:no-register-http-handler": "node scripts/check-no-register-http-handler.mjs",
|
||||||
"lint:plugins:plugin-sdk-subpaths-exported": "node scripts/check-plugin-sdk-subpath-exports.mjs",
|
"lint:plugins:plugin-sdk-subpaths-exported": "node scripts/check-plugin-sdk-subpath-exports.mjs",
|
||||||
"lint:scripts": "pnpm lint:docker-e2e && node scripts/run-oxlint.mjs --tsconfig tsconfig.oxlint.scripts.json scripts",
|
"lint:scripts": "pnpm lint:docker-e2e && node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.scripts.json scripts",
|
||||||
"lint:swift": "swiftlint lint --config config/swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
|
"lint:swift": "swiftlint lint --config config/swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
|
||||||
"lint:tmp:channel-agnostic-boundaries": "node scripts/check-channel-agnostic-boundaries.mjs",
|
"lint:tmp:channel-agnostic-boundaries": "node scripts/check-channel-agnostic-boundaries.mjs",
|
||||||
"lint:tmp:dynamic-import-warts": "node scripts/check-dynamic-import-warts.mjs",
|
"lint:tmp:dynamic-import-warts": "node scripts/check-dynamic-import-warts.mjs",
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ export function applyLocalOxlintPolicy(args, env, hostResources) {
|
|||||||
const nextArgs = [...args];
|
const nextArgs = [...args];
|
||||||
|
|
||||||
insertBeforeSeparator(nextArgs, "--type-aware");
|
insertBeforeSeparator(nextArgs, "--type-aware");
|
||||||
insertBeforeSeparator(nextArgs, "--tsconfig", "tsconfig.oxlint.json");
|
insertBeforeSeparator(nextArgs, "--tsconfig", "config/tsconfig/oxlint.json");
|
||||||
insertBeforeSeparator(nextArgs, "--allow", "eslint/no-underscore-dangle");
|
insertBeforeSeparator(nextArgs, "--allow", "eslint/no-underscore-dangle");
|
||||||
if (
|
if (
|
||||||
!hasFlag(nextArgs, "--report-unused-disable-directives") &&
|
!hasFlag(nextArgs, "--report-unused-disable-directives") &&
|
||||||
|
|||||||
@@ -23,15 +23,15 @@ if ((prepareResult.status ?? 1) !== 0) {
|
|||||||
const shards = [
|
const shards = [
|
||||||
{
|
{
|
||||||
name: "core",
|
name: "core",
|
||||||
args: ["--tsconfig", "tsconfig.oxlint.core.json", "src", "ui", "packages"],
|
args: ["--tsconfig", "config/tsconfig/oxlint.core.json", "src", "ui", "packages"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "extensions",
|
name: "extensions",
|
||||||
args: ["--tsconfig", "tsconfig.oxlint.extensions.json", "extensions"],
|
args: ["--tsconfig", "config/tsconfig/oxlint.extensions.json", "extensions"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "scripts",
|
name: "scripts",
|
||||||
args: ["--tsconfig", "tsconfig.oxlint.scripts.json", "scripts"],
|
args: ["--tsconfig", "config/tsconfig/oxlint.scripts.json", "scripts"],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ describe("local-heavy-check-runtime", () => {
|
|||||||
expect(args).toEqual([
|
expect(args).toEqual([
|
||||||
"--type-aware",
|
"--type-aware",
|
||||||
"--tsconfig",
|
"--tsconfig",
|
||||||
"tsconfig.oxlint.json",
|
"config/tsconfig/oxlint.json",
|
||||||
"--allow",
|
"--allow",
|
||||||
"eslint/no-underscore-dangle",
|
"eslint/no-underscore-dangle",
|
||||||
"--report-unused-disable-directives-severity",
|
"--report-unused-disable-directives-severity",
|
||||||
@@ -246,7 +246,7 @@ describe("local-heavy-check-runtime", () => {
|
|||||||
expect(args).toEqual([
|
expect(args).toEqual([
|
||||||
"--type-aware",
|
"--type-aware",
|
||||||
"--tsconfig",
|
"--tsconfig",
|
||||||
"tsconfig.oxlint.json",
|
"config/tsconfig/oxlint.json",
|
||||||
"--allow",
|
"--allow",
|
||||||
"eslint/no-underscore-dangle",
|
"eslint/no-underscore-dangle",
|
||||||
"--report-unused-disable-directives-severity",
|
"--report-unused-disable-directives-severity",
|
||||||
@@ -262,7 +262,7 @@ describe("local-heavy-check-runtime", () => {
|
|||||||
"--threads=8",
|
"--threads=8",
|
||||||
"--type-aware",
|
"--type-aware",
|
||||||
"--tsconfig",
|
"--tsconfig",
|
||||||
"tsconfig.oxlint.json",
|
"config/tsconfig/oxlint.json",
|
||||||
"--allow",
|
"--allow",
|
||||||
"eslint/no-underscore-dangle",
|
"eslint/no-underscore-dangle",
|
||||||
"--report-unused-disable-directives-severity",
|
"--report-unused-disable-directives-severity",
|
||||||
@@ -282,7 +282,7 @@ describe("local-heavy-check-runtime", () => {
|
|||||||
expect(args).toEqual([
|
expect(args).toEqual([
|
||||||
"--type-aware",
|
"--type-aware",
|
||||||
"--tsconfig",
|
"--tsconfig",
|
||||||
"tsconfig.oxlint.json",
|
"config/tsconfig/oxlint.json",
|
||||||
"--allow",
|
"--allow",
|
||||||
"eslint/no-underscore-dangle",
|
"eslint/no-underscore-dangle",
|
||||||
"--report-unused-disable-directives-severity",
|
"--report-unused-disable-directives-severity",
|
||||||
|
|||||||
@@ -80,16 +80,16 @@ function readJson(path: string): unknown {
|
|||||||
|
|
||||||
describe("oxlint config", () => {
|
describe("oxlint config", () => {
|
||||||
it("includes bundled extensions in type-aware lint coverage", () => {
|
it("includes bundled extensions in type-aware lint coverage", () => {
|
||||||
const tsconfig = readJson("tsconfig.oxlint.json") as OxlintTsconfig;
|
const tsconfig = readJson("config/tsconfig/oxlint.json") as OxlintTsconfig;
|
||||||
|
|
||||||
expect(tsconfig.include).toContain("extensions/**/*");
|
expect(tsconfig.include).toContain("../../extensions/**/*");
|
||||||
expect(tsconfig.exclude ?? []).not.toContain("extensions");
|
expect(tsconfig.exclude ?? []).not.toContain("../../extensions");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("includes scripts in root type-aware lint coverage", () => {
|
it("includes scripts in root type-aware lint coverage", () => {
|
||||||
const tsconfig = readJson("tsconfig.oxlint.json") as OxlintTsconfig;
|
const tsconfig = readJson("config/tsconfig/oxlint.json") as OxlintTsconfig;
|
||||||
|
|
||||||
expect(tsconfig.include).toContain("scripts/**/*");
|
expect(tsconfig.include).toContain("../../scripts/**/*");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("has a discoverable scripts tsconfig for type-aware linting", () => {
|
it("has a discoverable scripts tsconfig for type-aware linting", () => {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ describe("run-oxlint", () => {
|
|||||||
|
|
||||||
it("filters tracked targets missing from sparse checkouts", () => {
|
it("filters tracked targets missing from sparse checkouts", () => {
|
||||||
const result = filterSparseMissingOxlintTargets(
|
const result = filterSparseMissingOxlintTargets(
|
||||||
["--tsconfig", "tsconfig.oxlint.core.json", "src", "ui", "packages", "--threads=1"],
|
["--tsconfig", "config/tsconfig/oxlint.core.json", "src", "ui", "packages", "--threads=1"],
|
||||||
{
|
{
|
||||||
fileExists: (target: string) => target.endsWith("/src"),
|
fileExists: (target: string) => target.endsWith("/src"),
|
||||||
isSparseCheckoutEnabled: () => true,
|
isSparseCheckoutEnabled: () => true,
|
||||||
@@ -45,7 +45,7 @@ describe("run-oxlint", () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(result).toEqual({
|
expect(result).toEqual({
|
||||||
args: ["--tsconfig", "tsconfig.oxlint.core.json", "src", "--threads=1"],
|
args: ["--tsconfig", "config/tsconfig/oxlint.core.json", "src", "--threads=1"],
|
||||||
hadExplicitTargets: true,
|
hadExplicitTargets: true,
|
||||||
remainingExplicitTargets: 1,
|
remainingExplicitTargets: 1,
|
||||||
skippedTargets: ["ui", "packages"],
|
skippedTargets: ["ui", "packages"],
|
||||||
|
|||||||
Reference in New Issue
Block a user