diff --git a/configs/eslint-config/eslint.config.mjs b/configs/eslint-config/eslint.config.mjs deleted file mode 100644 index 138314392..000000000 --- a/configs/eslint-config/eslint.config.mjs +++ /dev/null @@ -1,60 +0,0 @@ -import tseslint from 'typescript-eslint' -import jsdoc from 'eslint-plugin-jsdoc' -import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' - -export default [ - { ignores: ['**/build/**', '**/coverage/**', '**/dist/**'] }, - { - files: ['**/*.{ts,tsx}'], - languageOptions: { - // @ts-expect-error TODO: remove this - parser: tseslint.parser, - parserOptions: { - project: true, - parser: tseslint.parser, - }, - }, - plugins: { - jsdoc: jsdoc, - // @ts-expect-error TODO: remove this - '@typescript-eslint': tseslint.plugin, - }, - rules: { - '@typescript-eslint/no-unused-vars': 'error', - '@typescript-eslint/consistent-type-imports': 'error', - '@typescript-eslint/no-explicit-any': 'warn', - '@typescript-eslint/naming-convention': [ - 'error', - { - selector: 'typeParameter', - format: ['PascalCase'], - leadingUnderscore: 'forbid', - trailingUnderscore: 'forbid', - custom: { - regex: '^(T|T[A-Z][A-Za-z]+)$', - match: true, - }, - }, - ], - 'jsdoc/require-description': 'warn', - 'jsdoc/require-returns': 'off', - 'jsdoc/require-jsdoc': 'off', - 'jsdoc/check-param-names': 'error', - 'jsdoc/no-types': 'off', - - // @typescript-eslint/strict - '@typescript-eslint/no-unsafe-assignment': 'warn', - '@typescript-eslint/no-unsafe-member-access': 'warn', - '@typescript-eslint/no-floating-promises': 'warn', - '@typescript-eslint/no-unsafe-call': 'warn', - '@typescript-eslint/only-throw-error': 'warn', - '@typescript-eslint/no-confusing-void-expression': 'off', - '@typescript-eslint/restrict-template-expressions': 'off', - '@typescript-eslint/no-empty-function': 'warn', - '@typescript-eslint/no-extra-semi': 'warn', - '@typescript-eslint/no-empty-interface': 'warn', - '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 3 }], - }, - }, - eslintPluginPrettierRecommended, -] diff --git a/configs/eslint-config/src/index.ts b/configs/eslint-config/index.js similarity index 88% rename from configs/eslint-config/src/index.ts rename to configs/eslint-config/index.js index e1223e009..2bfd386c7 100644 --- a/configs/eslint-config/src/index.ts +++ b/configs/eslint-config/index.js @@ -1,25 +1,19 @@ import pluginReact from '@eslint-react/eslint-plugin' -import type { Linter } from 'eslint' -// @ts-expect-error TODO: remove this import importPlugin from 'eslint-plugin-import' import jsdoc from 'eslint-plugin-jsdoc' -// @ts-expect-error TODO: remove this import reactCompiler from 'eslint-plugin-react-compiler' -// @ts-expect-error TODO: remove this import reactHooks from 'eslint-plugin-react-hooks' import tseslint from 'typescript-eslint' import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended' -// @ts-expect-error TODO: remove this import next from '@next/eslint-plugin-next' import cspellConfigs from '@cspell/eslint-plugin/configs' import vitest from '@vitest/eslint-plugin' -// @ts-expect-error TODO: remove this import jestDom from 'eslint-plugin-jest-dom' import mdx from 'eslint-plugin-mdx' -const ignores = ['**/.next/**', '**/build/**', '**/coverage/**', '**/dist/**'] satisfies Linter.Config['ignores'] +const ignores = ['**/.next/**', '**/build/**', '**/coverage/**', '**/dist/**'] -export const suspensiveTypeScriptConfig: ReturnType = tseslint.config( +export const suspensiveTypeScriptConfig = tseslint.config( { ignores, }, @@ -116,7 +110,7 @@ export const suspensiveTypeScriptConfig: ReturnType = ts eslintPluginPrettierRecommended ) -export const suspensiveReactTypeScriptConfig: ReturnType = tseslint.config( +export const suspensiveReactTypeScriptConfig = tseslint.config( ...suspensiveTypeScriptConfig, { files: ['**/*.{ts,tsx}'], @@ -144,12 +138,12 @@ export const suspensiveReactTypeScriptConfig: ReturnType } ) -export const suspensiveNextTypeScriptConfig: ReturnType = [ +export const suspensiveNextTypeScriptConfig = [ ...suspensiveReactTypeScriptConfig, { plugins: { 'plugin:@next/next/recommended': next.configs.recommended } }, ] -export const suspensiveMDXConfig: Linter.Config[] = [ +export const suspensiveMDXConfig = [ mdx.configs.flat, mdx.configs.flatCodeBlocks, { diff --git a/configs/eslint-config/package.json b/configs/eslint-config/package.json index 4962de4c7..97865ed38 100644 --- a/configs/eslint-config/package.json +++ b/configs/eslint-config/package.json @@ -5,30 +5,10 @@ "license": "MIT", "author": "Jonghyeon Ko ", "type": "module", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "require": { - "types": "./dist/index.d.cts", - "default": "./dist/index.cjs" - } - }, - "./package.json": "./package.json" - }, - "main": "dist/index.cjs", - "module": "dist/index.js", - "types": "dist/index.d.ts", + "main": "index.js", + "module": "index.js", "scripts": { - "build": "tsup", - "ci:attw": "attw --pack", - "ci:eslint": "eslint \"**/*.{ts,tsx,cts,mts}\"", - "ci:publint": "publint --strict", - "ci:type": "tsc --noEmit", - "clean": "rimraf ./dist && rimraf ./coverage", - "prepack": "pnpm build" + "clean": "rimraf ./dist && rimraf ./coverage" }, "dependencies": { "@cspell/eslint-plugin": "^8.14.4", @@ -44,8 +24,5 @@ "eslint-plugin-react-compiler": "0.0.0-experimental-7670337-20240918", "eslint-plugin-react-hooks": "^4.6.2", "typescript-eslint": "^8.9.0" - }, - "devDependencies": { - "@suspensive/tsconfig": "workspace:*" } } diff --git a/configs/eslint-config/tsconfig.json b/configs/eslint-config/tsconfig.json deleted file mode 100644 index c018a7da4..000000000 --- a/configs/eslint-config/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "@suspensive/tsconfig/base.json", - "include": [".", "./eslint.config.mjs"], - "exclude": ["dist", "node_modules"], - "compilerOptions": { - "module": "NodeNext", - "moduleResolution": "NodeNext", - "outDir": "dist" - } -} diff --git a/configs/eslint-config/tsup.config.ts b/configs/eslint-config/tsup.config.ts deleted file mode 100644 index e75b14e14..000000000 --- a/configs/eslint-config/tsup.config.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { defineConfig } from 'tsup' -import { options } from '../tsup/src/index.js' - -export default defineConfig(options) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ae3e005a..72d7acf04 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -230,10 +230,6 @@ importers: typescript-eslint: specifier: ^8.9.0 version: 8.14.0(eslint@9.14.0(jiti@2.4.0))(typescript@5.6.3) - devDependencies: - '@suspensive/tsconfig': - specifier: workspace:* - version: link:../tsconfig configs/tsconfig: {} @@ -2515,67 +2511,79 @@ packages: resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-arm@1.0.5': resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-s390x@1.0.4': resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-libvips-linux-x64@1.0.4': resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-libvips-linuxmusl-arm64@1.0.4': resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-libvips-linuxmusl-x64@1.0.4': resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-linux-arm64@0.33.5': resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [glibc] '@img/sharp-linux-arm@0.33.5': resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] + libc: [glibc] '@img/sharp-linux-s390x@0.33.5': resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] + libc: [glibc] '@img/sharp-linux-x64@0.33.5': resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [glibc] '@img/sharp-linuxmusl-arm64@0.33.5': resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] + libc: [musl] '@img/sharp-linuxmusl-x64@0.33.5': resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] + libc: [musl] '@img/sharp-wasm32@0.33.5': resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} @@ -2805,36 +2813,42 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@napi-rs/simple-git-linux-arm64-musl@0.1.19': resolution: {integrity: sha512-OwTRF+H4IZYxmDFRi1IrLMfqbdIpvHeYbJl2X94NVsLVOY+3NUHvEzL3fYaVx5urBaMnIK0DD3wZLbcueWvxbA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@napi-rs/simple-git-linux-powerpc64le-gnu@0.1.19': resolution: {integrity: sha512-p7zuNNVyzpRvkCt2RIGv9FX/WPcPbZ6/FRUgUTZkA2WU33mrbvNqSi4AOqCCl6mBvEd+EOw5NU4lS9ORRJvAEg==} engines: {node: '>= 10'} cpu: [powerpc64le] os: [linux] + libc: [glibc] '@napi-rs/simple-git-linux-s390x-gnu@0.1.19': resolution: {integrity: sha512-6N2vwJUPLiak8GLrS0a3is0gSb0UwI2CHOOqtvQxPmv+JVI8kn3vKiUscsktdDb0wGEPeZ8PvZs0y8UWix7K4g==} engines: {node: '>= 10'} cpu: [s390x] os: [linux] + libc: [glibc] '@napi-rs/simple-git-linux-x64-gnu@0.1.19': resolution: {integrity: sha512-61YfeO1J13WK7MalLgP3QlV6of2rWnVw1aqxWkAgy/lGxoOFSJ4Wid6ANVCEZk4tJpPX/XNeneqkUz5xpeb2Cw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@napi-rs/simple-git-linux-x64-musl@0.1.19': resolution: {integrity: sha512-cCTWNpMJnN3PrUBItWcs3dQKCydsIasbrS3laMzq8k7OzF93Zrp2LWDTPlLCO9brbBVpBzy2Qk5Xg9uAfe/Ukw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@napi-rs/simple-git-win32-arm64-msvc@0.1.19': resolution: {integrity: sha512-sWavb1BjeLKKBA+PbTsRSSzVNfb7V/dOpaJvkgR5d2kWFn/AHmCZHSSj/3nyZdYf0BdDC+DIvqk3daAEZ6QMVw==} @@ -2875,24 +2889,28 @@ packages: engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [glibc] '@next/swc-linux-arm64-musl@15.0.3': resolution: {integrity: sha512-WkAk6R60mwDjH4lG/JBpb2xHl2/0Vj0ZRu1TIzWuOYfQ9tt9NFsIinI1Epma77JVgy81F32X/AeD+B2cBu/YQA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + libc: [musl] '@next/swc-linux-x64-gnu@15.0.3': resolution: {integrity: sha512-gWL/Cta1aPVqIGgDb6nxkqy06DkwJ9gAnKORdHWX1QBbSZZB+biFYPFti8aKIQL7otCE1pjyPaXpFzGeG2OS2w==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [glibc] '@next/swc-linux-x64-musl@15.0.3': resolution: {integrity: sha512-QQEMwFd8r7C0GxQS62Zcdy6GKx999I/rTO2ubdXEe+MlZk9ZiinsrjwoiBL5/57tfyjikgh6GOU2WRQVUej3UA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + libc: [musl] '@next/swc-win32-arm64-msvc@15.0.3': resolution: {integrity: sha512-9TEp47AAd/ms9fPNgtgnT7F3M1Hf7koIYYWCMQ9neOwjbVWJsHZxrFbI3iEDJ8rf1TDGpmHbKxXf2IFpAvheIQ==} @@ -3215,46 +3233,55 @@ packages: resolution: {integrity: sha512-paHF1bMXKDuizaMODm2bBTjRiHxESWiIyIdMugKeLnjuS1TCS54MF5+Y5Dx8Ui/1RBPVRE09i5OUlaLnv8OGnA==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.26.0': resolution: {integrity: sha512-cwxiHZU1GAs+TMxvgPfUDtVZjdBdTsQwVnNlzRXC5QzIJ6nhfB4I1ahKoe9yPmoaA/Vhf7m9dB1chGPpDRdGXg==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.26.0': resolution: {integrity: sha512-4daeEUQutGRCW/9zEo8JtdAgtJ1q2g5oHaoQaZbMSKaIWKDQwQ3Yx0/3jJNmpzrsScIPtx/V+1AfibLisb3AMQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.26.0': resolution: {integrity: sha512-eGkX7zzkNxvvS05ROzJ/cO/AKqNvR/7t1jA3VZDi2vRniLKwAWxUr85fH3NsvtxU5vnUUKFHKh8flIBdlo2b3Q==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.26.0': resolution: {integrity: sha512-Odp/lgHbW/mAqw/pU21goo5ruWsytP7/HCC/liOt0zcGG0llYWKrd10k9Fj0pdj3prQ63N5yQLCLiE7HTX+MYw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.26.0': resolution: {integrity: sha512-MBR2ZhCTzUgVD0OJdTzNeF4+zsVogIR1U/FsyuFerwcqjZGvg2nYe24SAHp8O5sN8ZkRVbHwlYeHqcSQ8tcYew==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.26.0': resolution: {integrity: sha512-YYcg8MkbN17fMbRMZuxwmxWqsmQufh3ZJFxFGoHjrE7bv0X+T6l3glcdzd7IKLiwhT+PZOJCblpnNlz1/C3kGQ==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.26.0': resolution: {integrity: sha512-ZuwpfjCwjPkAOxpjAEjabg6LRSfL7cAJb6gSQGZYjGhadlzKKywDkCUnJ+KEfrNY1jH5EEoSIKLCb572jSiglA==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.26.0': resolution: {integrity: sha512-+HJD2lFS86qkeF8kNu0kALtifMpPCZU80HvwztIKnYwym3KnA1os6nsX4BGSTLtS2QVAGG1P3guRgsYyMA0Yhg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.26.0': resolution: {integrity: sha512-WUQzVFWPSw2uJzX4j6YEbMAiLbs0BUysgysh8s817doAYhR5ybqTI1wtKARQKo6cGop3pHnrUJPFCsXdoFaimQ==} @@ -7313,24 +7340,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.27.0: resolution: {integrity: sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.27.0: resolution: {integrity: sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.27.0: resolution: {integrity: sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.27.0: resolution: {integrity: sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==}