diff --git a/eng/tools/tsconfig.json b/eng/tools/tsconfig.json index 44787ca9f682..eca3d4cdace7 100644 --- a/eng/tools/tsconfig.json +++ b/eng/tools/tsconfig.json @@ -11,7 +11,6 @@ "composite": true, }, "references": [ - { "path": "./eslint-plugin-tsv" }, { "path": "./specs-model" }, { "path": "./suppressions" }, { "path": "./tsp-client-tests" }, diff --git a/eng/tools/typespec-validation/src/eslint-plugin-tsv/src/eslint-plugin-tsv.ts b/eng/tools/typespec-validation/src/eslint-plugin-tsv/src/eslint-plugin-tsv.ts index 027cee59ab7a..581472b85320 100644 --- a/eng/tools/typespec-validation/src/eslint-plugin-tsv/src/eslint-plugin-tsv.ts +++ b/eng/tools/typespec-validation/src/eslint-plugin-tsv/src/eslint-plugin-tsv.ts @@ -1,16 +1,11 @@ import parser from "yaml-eslint-parser"; import { NamedESLint } from "./interfaces/named-eslint.js"; -import emitAutorest from "./rules/emit-autorest.js"; -import kebabCaseOrg from "./rules/kebab-case-org.js"; import tspconfigValidationRules from "./rules/tspconfig-validation-rules.js"; const plugin: NamedESLint.Plugin = { configs: { recommended: {} }, name: "tsv", - rules: { - [kebabCaseOrg.name]: kebabCaseOrg, - [emitAutorest.name]: emitAutorest, - }, + rules: {}, }; plugin.configs.recommended = { @@ -18,10 +13,7 @@ plugin.configs.recommended = { [plugin.name]: plugin, }, files: ["*.yaml", "**/*.yaml"], - rules: { - [`${plugin.name}/${kebabCaseOrg.name}`]: "error", - [`${plugin.name}/${emitAutorest.name}`]: "error", - }, + rules: {}, languageOptions: { parser: parser, }, diff --git a/eng/tools/typespec-validation/src/eslint-plugin-tsv/test/utils/npm.test.ts b/eng/tools/typespec-validation/src/eslint-plugin-tsv/test/utils/npm.test.ts deleted file mode 100644 index 28e54924170a..000000000000 --- a/eng/tools/typespec-validation/src/eslint-plugin-tsv/test/utils/npm.test.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { beforeEach, describe, expect, it, vi } from "vitest"; -import { vol } from "memfs"; -import { resolve } from "path"; -import { Npm } from "../../src/utils/npm.js"; - -vi.mock("fs/promises", async () => { - const memfs = await import("memfs"); - return { - ...memfs.fs.promises, - }; -}); - -describe("prefix", () => { - beforeEach(() => { - vol.reset(); - }); - - describe("returns current directory if no match", () => { - it.each([ - ["/foo/bar/tspconfig.yaml", "/foo/bar"], - ["/foo/bar", "/foo/bar"], - ])("%s", async (path, expected) => { - vol.fromJSON({ - "/foo/bar/tspconfig.yaml": "", - }); - - expect(await Npm.prefix(path)).toBe(resolve(expected)); - }); - }); - - describe("returns first match", () => { - it.each([ - ["/pj", "/pj"], - ["/pj/none", "/pj"], - ["/pj/none/none/none", "/pj"], - ["/pj/nm", "/pj/nm"], - ["/pj/nm/none", "/pj/nm"], - ["/pj/pj", "/pj/pj"], - ["/pj/nm/pj", "/pj/nm/pj"], - ["/pj/pj/nm", "/pj/pj/nm"], - ])("%s", async (path, expected) => { - vol.fromJSON({ - "/pj/package.json": "", - "/pj/none": null, - "/pj/none/none/none": null, - "/pj/nm/node_modules": null, - "/pj/nm/none": null, - "/pj/pj/package.json": "", - "/pj/nm/pj/package.json": "", - "/pj/pj/nm/node_modules": null, - }); - - expect(await Npm.prefix(path)).toBe(resolve(expected)); - }); - }); -});