prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey

linting back on with some rules off

Tyler 5494cf73 8ecbee41

+56 -20
+6 -11
eslint.config.js
··· 1 import eslint from "@eslint/js"; 2 import tseslint from "typescript-eslint"; 3 - import reactCompiler from "eslint-plugin-react-compiler"; 4 5 export default tseslint.config( 6 - { ignores: ["lib", "node_modules", "pnpm-lock.yaml", "setup-vitest.ts"] }, 7 { linterOptions: { reportUnusedDisableDirectives: "error" } }, 8 eslint.configs.recommended, 9 { ··· 19 }, 20 rules: { 21 "@typescript-eslint/consistent-type-definitions": "off", 22 - }, 23 - }, 24 - { 25 - files: ["**/*.{jsx,tsx}"], 26 - plugins: { 27 - "react-compiler": reactCompiler, 28 - }, 29 - rules: { 30 - "react-compiler/react-compiler": "error", 31 }, 32 }, 33 {
··· 1 import eslint from "@eslint/js"; 2 import tseslint from "typescript-eslint"; 3 4 export default tseslint.config( 5 + { ignores: ["**/lib/**", "**/dist/**", "node_modules", "pnpm-lock.yaml", "**/setup-vitest.ts", "**/cli.js", "**/tests/**"] }, 6 { linterOptions: { reportUnusedDisableDirectives: "error" } }, 7 eslint.configs.recommended, 8 { ··· 18 }, 19 rules: { 20 "@typescript-eslint/consistent-type-definitions": "off", 21 + "@typescript-eslint/no-unsafe-assignment": "off", 22 + "@typescript-eslint/no-unsafe-argument": "off", 23 + "@typescript-eslint/no-unsafe-member-access": "off", 24 + "@typescript-eslint/no-unsafe-call": "off", 25 + "@typescript-eslint/restrict-plus-operands": "off", 26 }, 27 }, 28 {
+1
package.json
··· 2 "name": "prototypey-monorepo", 3 "version": "0.0.0", 4 "private": true, 5 "description": "atproto lexicon typescript toolkit", 6 "repository": { 7 "type": "git",
··· 2 "name": "prototypey-monorepo", 3 "version": "0.0.0", 4 "private": true, 5 + "type": "module", 6 "description": "atproto lexicon typescript toolkit", 7 "repository": { 8 "type": "git",
+1
packages/cli/package.json
··· 22 ], 23 "scripts": { 24 "build": "tsdown --entry src/index.ts --format esm --dts false", 25 "test": "vitest run", 26 "tsc": "tsc" 27 },
··· 22 ], 23 "scripts": { 24 "build": "tsdown --entry src/index.ts --format esm --dts false", 25 + "lint": "eslint .", 26 "test": "vitest run", 27 "tsc": "tsc" 28 },
+1 -1
packages/cli/src/commands/gen-emit.ts
··· 29 return; 30 } 31 32 - console.log(`Found ${sourceFiles.length} source file(s)`); 33 34 // Ensure output directory exists 35 await mkdir(outdir, { recursive: true });
··· 29 return; 30 } 31 32 + console.log(`Found ${String(sourceFiles.length)} source file(s)`); 33 34 // Ensure output directory exists 35 await mkdir(outdir, { recursive: true });
+1 -1
packages/cli/tests/commands/gen-emit.test.ts
··· 10 11 beforeEach(async () => { 12 // Create a temporary directory for test files 13 - testDir = join(tmpdir(), `prototypey-test-${Date.now()}`); 14 outDir = join(testDir, "output"); 15 await mkdir(testDir, { recursive: true }); 16 await mkdir(outDir, { recursive: true });
··· 10 11 beforeEach(async () => { 12 // Create a temporary directory for test files 13 + testDir = join(tmpdir(), `prototypey-test-${String(Date.now())}`); 14 outDir = join(testDir, "output"); 15 await mkdir(testDir, { recursive: true }); 16 await mkdir(outDir, { recursive: true });
+1 -1
packages/cli/tests/integration/error-handling.test.ts
··· 11 12 beforeEach(async () => { 13 // Create a temporary directory for test files 14 - testDir = join(tmpdir(), `prototypey-error-test-${Date.now()}`); 15 outDir = join(testDir, "output"); 16 schemasDir = join(testDir, "schemas"); 17 await mkdir(testDir, { recursive: true });
··· 11 12 beforeEach(async () => { 13 // Create a temporary directory for test files 14 + testDir = join(tmpdir(), `prototypey-error-test-${String(Date.now())}`); 15 outDir = join(testDir, "output"); 16 schemasDir = join(testDir, "schemas"); 17 await mkdir(testDir, { recursive: true });
+1 -1
packages/cli/tests/integration/filesystem.test.ts
··· 18 19 beforeEach(async () => { 20 // Create a temporary directory for test files 21 - testDir = join(tmpdir(), `prototypey-fs-test-${Date.now()}`); 22 outDir = join(testDir, "output"); 23 schemasDir = join(testDir, "schemas"); 24 await mkdir(testDir, { recursive: true });
··· 18 19 beforeEach(async () => { 20 // Create a temporary directory for test files 21 + testDir = join(tmpdir(), `prototypey-fs-test-${String(Date.now())}`); 22 outDir = join(testDir, "output"); 23 schemasDir = join(testDir, "schemas"); 24 await mkdir(testDir, { recursive: true });
+1 -1
packages/cli/tests/integration/workflow.test.ts
··· 11 12 beforeEach(async () => { 13 // Create a temporary directory for test files 14 - testDir = join(tmpdir(), `prototypey-e2e-test-${Date.now()}`); 15 schemasDir = join(testDir, "schemas"); 16 generatedDir = join(testDir, "generated"); 17 await mkdir(testDir, { recursive: true });
··· 11 12 beforeEach(async () => { 13 // Create a temporary directory for test files 14 + testDir = join(tmpdir(), `prototypey-e2e-test-${String(Date.now())}`); 15 schemasDir = join(testDir, "schemas"); 16 generatedDir = join(testDir, "generated"); 17 await mkdir(testDir, { recursive: true });
+1
packages/prototypey/package.json
··· 28 ], 29 "scripts": { 30 "build": "tsdown", 31 "test": "vitest run", 32 "test:bench": "node tests/infer.bench.ts", 33 "test:update-snapshots": "vitest run -u",
··· 28 ], 29 "scripts": { 30 "build": "tsdown", 31 + "lint": "eslint .", 32 "test": "vitest run", 33 "test:bench": "node tests/infer.bench.ts", 34 "test:update-snapshots": "vitest run -u",
+37
packages/site/eslint.config.js
···
··· 1 + import baseConfig from "../../eslint.config.js"; 2 + import reactCompiler from "eslint-plugin-react-compiler"; 3 + import tseslint from "typescript-eslint"; 4 + 5 + export default tseslint.config( 6 + ...baseConfig, 7 + { 8 + files: ["**/*.{jsx,tsx}"], 9 + extends: [ 10 + tseslint.configs.strictTypeChecked, 11 + tseslint.configs.stylisticTypeChecked, 12 + ], 13 + languageOptions: { 14 + parserOptions: { 15 + projectService: { allowDefaultProject: ["*.config.*s"] }, 16 + }, 17 + }, 18 + plugins: { 19 + "react-compiler": reactCompiler, 20 + }, 21 + rules: { 22 + "@typescript-eslint/consistent-type-definitions": "off", 23 + "@typescript-eslint/no-unsafe-assignment": "off", 24 + "@typescript-eslint/no-unsafe-argument": "off", 25 + "@typescript-eslint/no-unsafe-member-access": "off", 26 + "@typescript-eslint/no-unsafe-call": "off", 27 + "@typescript-eslint/restrict-plus-operands": "off", 28 + "@typescript-eslint/no-confusing-void-expression": "off", 29 + "@typescript-eslint/prefer-nullish-coalescing": "off", 30 + "@typescript-eslint/prefer-regexp-exec": "off", 31 + "@typescript-eslint/no-implied-eval": "off", 32 + "@typescript-eslint/no-non-null-assertion": "off", 33 + "@typescript-eslint/no-floating-promises": "off", 34 + "react-compiler/react-compiler": "error", 35 + }, 36 + }, 37 + );
+1
packages/site/package.json
··· 6 "scripts": { 7 "dev": "vite", 8 "build": "tsc && vite build", 9 "preview": "vite preview", 10 "test": "vitest" 11 },
··· 6 "scripts": { 7 "dev": "vite", 8 "build": "tsc && vite build", 9 + "lint": "eslint .", 10 "preview": "vite preview", 11 "test": "vitest" 12 },
+1 -1
packages/site/src/components/Editor.tsx
··· 44 noSyntaxValidation: false, 45 }); 46 47 - Promise.all([ 48 import("prototypey/lib/type-utils.d.ts?raw"), 49 import("prototypey/lib/infer.d.ts?raw"), 50 import("prototypey/lib/lib.d.ts?raw"),
··· 44 noSyntaxValidation: false, 45 }); 46 47 + void Promise.all([ 48 import("prototypey/lib/type-utils.d.ts?raw"), 49 import("prototypey/lib/infer.d.ts?raw"), 50 import("prototypey/lib/lib.d.ts?raw"),
+3 -3
packages/site/src/components/Playground.tsx
··· 59 console.error("Failed to initialize TypeScript worker:", err); 60 } 61 }; 62 - initWorker(); 63 } 64 }, [monaco, editorReady]); 65 ··· 278 }} 279 > 280 <MonacoEditor 281 - height={`${codeWrappedLines * 18 + 32}px`} 282 defaultLanguage="typescript" 283 value={code} 284 theme={theme} ··· 330 }} 331 > 332 <MonacoEditor 333 - height={`${jsonWrappedLines * 18 + 32}px`} 334 defaultLanguage="json" 335 value={json} 336 theme={theme}
··· 59 console.error("Failed to initialize TypeScript worker:", err); 60 } 61 }; 62 + void initWorker(); 63 } 64 }, [monaco, editorReady]); 65 ··· 278 }} 279 > 280 <MonacoEditor 281 + height={`${String(codeWrappedLines * 18 + 32)}px`} 282 defaultLanguage="typescript" 283 value={code} 284 theme={theme} ··· 330 }} 331 > 332 <MonacoEditor 333 + height={`${String(jsonWrappedLines * 18 + 32)}px`} 334 defaultLanguage="json" 335 value={json} 336 theme={theme}