diff --git a/.gitpod.yml b/.gitpod.yml index 58842dd..001d3f1 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -21,6 +21,8 @@ vscode: - eamodio.gitlens - github.vscode-pull-request-github - github.vscode-github-actions + - streetsidesoftware.code-spell-checker + tasks: - init: pnpm i command: npm start diff --git a/eslint.config.mjs b/eslint.config.mjs index bb56c65..a1b5ad6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,16 +1,18 @@ +import typescriptPlugin from 'typescript-eslint'; import globals from 'globals'; + import js from '@eslint/js'; import json from '@eslint/json'; import markdown from '@eslint/markdown'; -import tseslint from 'typescript-eslint'; -import react from 'eslint-plugin-react'; import eslintConfigPrettier from 'eslint-config-prettier'; +import react from 'eslint-plugin-react'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; export default [ // import sort { + files: ['**/*.{js,ts,jsx,tsx}'], plugins: { 'simple-import-sort': simpleImportSort }, @@ -19,14 +21,14 @@ export default [ 'simple-import-sort/imports': 'error' } }, - // typescript + // TypeScript { files: ['**/*.{ts,tsx}'], plugins: { - '@typescript-eslint': tseslint.plugin + '@typescript-eslint': typescriptPlugin.plugin } }, - // js + // JavaScript { name: 'eslint/js', files: ['**/*.{js,ts,jsx,tsx}'], @@ -36,7 +38,7 @@ export default [ 'consistent-return': 'error' } }, - // react + // React { name: 'react-jsx', files: ['**/*.{js,ts,jsx,tsx}'], @@ -62,7 +64,7 @@ export default [ language: 'json/json', plugins: { json } }, - // markdown + // MarkDown { files: ['**/*.md'], language: 'markdown/gfm', diff --git a/package.json b/package.json index 6704810..ea0db9e 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "echarts-jsx": "^1.2.1", "editorjs-html": "^3.4.3", "idea-react": "^2.0.0-rc.2", - "koajax": "^3.0.2", + "koajax": "^3.0.0", "lodash": "^4.17.21", "mobx": "^6.13.1", "mobx-github": "^0.3.2", @@ -50,6 +50,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-react": "^7.35.0", "eslint-plugin-simple-import-sort": "^12.1.1", + "eslint-plugin-spellcheck": "^0.0.20", "globals": "^15.9.0", "husky": "^9.1.5", "lint-staged": "^15.2.9", @@ -75,7 +76,7 @@ "tabWidth": 4 }, "lint-staged": { - "*.{html,md,less,json,yml,js,ts,tsx}": [ + "*.{html,md,less,json,yml,js,mjs,ts,tsx}": [ "eslint --fix", "prettier --write" ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed7819d..66e6a16 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,7 +48,7 @@ importers: specifier: ^2.0.0-rc.2 version: 2.0.0-rc.2(@types/react@18.3.5)(typescript@5.5.4) koajax: - specifier: ^3.0.2 + specifier: ^3.0.0 version: 3.0.2(typescript@5.5.4) lodash: specifier: ^4.17.21 @@ -141,6 +141,9 @@ importers: eslint-plugin-simple-import-sort: specifier: ^12.1.1 version: 12.1.1(eslint@9.9.1) + eslint-plugin-spellcheck: + specifier: ^0.0.20 + version: 0.0.20(eslint@9.9.1) globals: specifier: ^15.9.0 version: 15.9.0 @@ -2335,6 +2338,11 @@ packages: peerDependencies: eslint: '>=5.0.0' + eslint-plugin-spellcheck@0.0.20: + resolution: {integrity: sha512-GJa6vgzWAYqe0elKADAsiBRrhvqBnKyt7tpFSqlCZJsK2W9+K80oMyHhKolA7vJ13H5RCGs5/KCN+mKUyKoAiA==} + peerDependencies: + eslint: '>=0.8.0' + eslint-scope@8.0.2: resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2725,6 +2733,10 @@ packages: humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} + hunspell-spellchecker@1.0.2: + resolution: {integrity: sha512-4DwmFAvlz+ChsqLDsZT2cwBsYNXh+oWboemxXtafwKIyItq52xfR4e4kr017sLAoPaSYVofSOvPUfmOAhXyYvw==} + hasBin: true + husky@9.1.5: resolution: {integrity: sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==} engines: {node: '>=18'} @@ -7624,6 +7636,13 @@ snapshots: dependencies: eslint: 9.9.1 + eslint-plugin-spellcheck@0.0.20(eslint@9.9.1): + dependencies: + eslint: 9.9.1 + globals: 13.24.0 + hunspell-spellchecker: 1.0.2 + lodash: 4.17.21 + eslint-scope@8.0.2: dependencies: esrecurse: 4.3.0 @@ -8108,6 +8127,8 @@ snapshots: dependencies: ms: 2.1.3 + hunspell-spellchecker@1.0.2: {} + husky@9.1.5: {} iconv-lite@0.4.24: diff --git a/tsconfig.json b/tsconfig.json index 9179e49..02bc40e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "resolveJsonModule": true, "useDefineForClassFields": true, "lib": ["ES2023", "DOM"], + "checkJs": true, "skipLibCheck": true, "baseUrl": "./", "jsx": "react-jsx", @@ -19,5 +20,5 @@ "sourceMap": true, "outDir": "./dist/" }, - "include": ["src/**/*"] + "include": ["src/**/*", "*.mjs"] }