diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 182babcc..00000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -./src/components/blocks/index.tsx \ No newline at end of file diff --git a/eslint.config.js b/eslint.config.js index de2eef38..cf7e656a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -2,8 +2,6 @@ import eslintConfig from 'configs/eslint'; import { FlatCompat } from '@eslint/eslintrc'; import { fileURLToPath } from 'url'; import path from 'path'; -import tmpExcludes from './tmp-lint-excludes.js'; -import tseslint from 'typescript-eslint'; // mimic CommonJS variables -- not needed if using CommonJS const __filename = fileURLToPath(import.meta.url); @@ -25,10 +23,9 @@ export default [ ...eslintConfig.filter(config => config.name !== 'custom:turbo-config'), { - name: 'tmp-ignore-ts', + name: 'ignore-old-ts-files', rules: { '@typescript-eslint/ban-ts-comment': 'off', }, - // ignores: tmpExcludes, }, ]; diff --git a/package.json b/package.json index 53d2b7a4..c13ce2f9 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,10 @@ "build": "next build", "dev": "next dev", "start": "next start", - "pre:typecheck": "node tsconfig.generator.js", - "typecheck": "pnpm pre:typecheck && tsc --noEmit", "lint": "eslint src", "lint:fix": "eslint src --fix", - "lint:strict": "pnpm typecheck && pnpm lint --max-warnings 0", - "lint:strict2": "pnpm typecheck && pnpm lint --max-warnings 0" + "lint:strict": "tsc --noEmit && pnpm lint --max-warnings 0", + "lint:strict2": "tsc --noEmit && pnpm lint --max-warnings 0" }, "dependencies": { "@bufbuild/protobuf": "^1.10.0", diff --git a/scripts/disable-lint-for-tmp-excludes.js b/scripts/disable-lint-for-tmp-excludes.js index d9d2e949..4c6ad69a 100644 --- a/scripts/disable-lint-for-tmp-excludes.js +++ b/scripts/disable-lint-for-tmp-excludes.js @@ -1,15 +1,11 @@ import fs from 'fs'; -import path from 'path'; -import tmpExcludes from '../tmp-lint-excludes.js'; - -// Array of file paths to process -const filePaths = tmpExcludes.map(filepath => filepath); +import tmpExcludes from './tmp-lint-excludes.js'; // The ESLint comment to be added const eslintComment = '// @ts-nocheck\n/* eslint-disable -- disabling this file as this was created before our strict rules */\n'; -filePaths.forEach(filePath => { +tmpExcludes.forEach(filePath => { // Read the file fs.readFile(filePath, 'utf8', (err, data) => { console.log('TCL: err', err); diff --git a/tmp-lint-excludes.js b/scripts/tmp-lint-excludes.js similarity index 100% rename from tmp-lint-excludes.js rename to scripts/tmp-lint-excludes.js diff --git a/tsconfig.generator.js b/tsconfig.generator.js deleted file mode 100644 index 3bdffc80..00000000 --- a/tsconfig.generator.js +++ /dev/null @@ -1,30 +0,0 @@ -import fs from 'fs'; -import tmpExcludes from './tmp-lint-excludes.js'; - -const tsconfig = { - compilerOptions: { - composite: true, - exactOptionalPropertyTypes: false, - lib: ['ESNext', 'DOM', 'DOM.Iterable', 'DOM.AsyncIterable'], - noEmit: true, - target: 'ESNext', - skipLibCheck: true, - plugins: [ - { - name: 'next', - }, - ], - paths: { - '@/*': ['./src/*', './styles/*'], - }, - allowJs: true, - incremental: true, - jsx: 'preserve', - }, - extends: ['@tsconfig/strictest/tsconfig.json', '@tsconfig/vite-react/tsconfig.json'], - include: ['next-env.d.ts', '**/*.ts', '**/*.tsx', '.next/types/**/*.ts', 'styles/styles.d.ts'], - exclude: ['node_modules'], - // exclude: ['node_modules', ...tmpExcludes], -}; - -fs.writeFileSync('tsconfig.json', JSON.stringify(tsconfig, null, 2));