Compare commits

..

1 Commits

Author SHA1 Message Date
ea91710510 delete lock file 2024-10-10 21:37:01 -04:00
7 changed files with 8 additions and 40 deletions

View File

@ -1,2 +0,0 @@
node_modules
dist

View File

@ -1,6 +0,0 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"semi": false
}

View File

@ -4,16 +4,11 @@ import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import prettierPlugin from 'eslint-plugin-prettier'
export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
'plugin:prettier/recommended',
],
extends: [js.configs.recommended, ...tseslint.configs.recommendedTypeChecked],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
@ -21,23 +16,15 @@ export default tseslint.config(
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
},
settings: { react: { version: '18.3' } },
plugins: {
prettier: prettierPlugin,
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
'prettier/prettier': 'error',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
...reactHooks.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,

View File

@ -7,7 +7,6 @@
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"format": "prettier --write .",
"preview": "vite preview"
},
"dependencies": {
@ -20,13 +19,10 @@
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.0",
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.1",
"vite": "^5.4.1"

View File

@ -2,9 +2,7 @@ import React from 'react'
export default function App() {
const [count, setCount] = React.useState(0)
return (
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
)
return <button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>;
}

View File

@ -1,11 +1,6 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import App from './App';
const root = document.getElementById('root')
root &&
ReactDOM.createRoot(root).render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
const root = document.getElementById('root');
root && ReactDOM.createRoot(root).render(<React.StrictMode><App /></React.StrictMode>);

View File

@ -20,5 +20,5 @@
"types": ["vite/client"]
},
"include": ["vite.config.ts"]
"include": ["vite.config.ts"],
}