Skip to content

Commit

Permalink
chore: update eslint to v9
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafYeeXYZ committed Dec 12, 2024
1 parent cf68033 commit 84d005e
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
45 changes: 45 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import reactCompiler from "eslint-plugin-react-compiler";


/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
languageOptions: {
globals: globals.browser,
parserOptions: {
project: "./tsconfig.json",
},
}
},
pluginJs.configs.recommended,
// ...tseslint.configs.stylisticTypeChecked,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
{
plugins: {
'react-compiler': reactCompiler,
},
rules: {
'react-compiler/react-compiler': 'error',
},
},
{
rules: {
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'react/no-unescaped-entities': 'off',
},
},
{
settings: {
react: {
version: 'detect',
},
},
}
];
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "1.7.0",
"description": "Web statistic app for Psychology and Education",
"engines": {
"bun": "^1.1.32",
"deno": "^2.1.3"
"bun": "^1.1.32"
},
"private": true,
"type": "module",
Expand All @@ -21,7 +20,7 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "deno lint src/",
"lint": "eslint src/",
"preview": "vite preview",
"release": "commit-and-tag-version",
"dep": "git push --follow-tags origin main"
Expand All @@ -37,6 +36,7 @@
"echarts-gl": "^2.0.9",
"echarts-stat": "^1.2.0",
"echarts-wordcloud": "^2.1.0",
"eslint-plugin-react-compiler": "^19.0.0-beta-37ed2a7-20241206",
"html2canvas": "^1.4.1",
"jieba-wasm": "^2.2.0",
"ml-kmeans": "^6.0.0",
Expand All @@ -45,16 +45,21 @@
"zustand": "^5.0.2"
},
"devDependencies": {
"@eslint/js": "^9.16.0",
"@types/bun": "^1.1.14",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"babel-plugin-react-compiler": "^19.0.0-beta-df7b47d-20241124",
"commit-and-tag-version": "^12.5.0",
"eslint": "^9.16.0",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.13.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.0",
"vite": "^6.0.3"
},
"commit-and-tag-version": {
Expand Down
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export function App() {
<a
href='https://github.com/LeafYeeXYZ/PsychPen'
target='_blank'
rel='noreferrer'
className='absolute right-4 text-sm hover:underline'
>
<LinkOutlined /> GitHub
Expand Down

0 comments on commit 84d005e

Please sign in to comment.