Skip to content

Commit

Permalink
dev: add eslint for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Aug 20, 2022
1 parent 54e1ec8 commit 3e19fb9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
1 change: 1 addition & 0 deletions GZCTF/ClientApp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ yarn-error.log*
*.tsbuildinfo

template/swagger.json
.eslintcache
3 changes: 2 additions & 1 deletion GZCTF/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.18.9",
"@nabla/vite-plugin-eslint": "^1.4.1",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@types/marked": "^4.0.5",
"@types/node": "18.7.6",
"@types/node": "18.7.8",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.33.1",
Expand Down
39 changes: 32 additions & 7 deletions GZCTF/ClientApp/pnpm-lock.yaml

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

2 changes: 2 additions & 0 deletions GZCTF/ClientApp/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import react from '@vitejs/plugin-react'
import { defineConfig, loadEnv } from 'vite'
import Pages from 'vite-plugin-pages'
import tsconfigPaths from 'vite-tsconfig-paths'
import eslintPlugin from '@nabla/vite-plugin-eslint'

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
Expand Down Expand Up @@ -36,6 +37,7 @@ export default defineConfig(({ mode }) => {
},
plugins: [
react(),
eslintPlugin(), // only for development
Pages({
dirs: [{ dir: 'src/pages', baseRoute: '' }],
}),
Expand Down

0 comments on commit 3e19fb9

Please sign in to comment.