Skip to content

Commit

Permalink
[add] code spell check extension
Browse files Browse the repository at this point in the history
[polish] comment message
  • Loading branch information
Soecka committed Sep 10, 2024
1 parent 8fbea75 commit 27db057
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 9 additions & 7 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -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
},
Expand All @@ -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}'],
Expand All @@ -36,7 +38,7 @@ export default [
'consistent-return': 'error'
}
},
// react
// React
{
name: 'react-jsx',
files: ['**/*.{js,ts,jsx,tsx}'],
Expand All @@ -62,7 +64,7 @@ export default [
language: 'json/json',
plugins: { json }
},
// markdown
// MarkDown
{
files: ['**/*.md'],
language: 'markdown/gfm',
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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"
]
Expand Down
23 changes: 22 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"resolveJsonModule": true,
"useDefineForClassFields": true,
"lib": ["ES2023", "DOM"],
"checkJs": true,
"skipLibCheck": true,
"baseUrl": "./",
"jsx": "react-jsx",
Expand All @@ -19,5 +20,5 @@
"sourceMap": true,
"outDir": "./dist/"
},
"include": ["src/**/*"]
"include": ["src/**/*", "*.mjs"]
}

0 comments on commit 27db057

Please sign in to comment.