Further tuning the formatting and linting rules
This commit is contained in:
parent
4b156d6bbf
commit
2632aa458c
4 changed files with 1414 additions and 3 deletions
|
@ -5,6 +5,7 @@ module.exports = {
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:@typescript-eslint/strict-type-checked',
|
'plugin:@typescript-eslint/strict-type-checked',
|
||||||
'plugin:@typescript-eslint/stylistic-type-checked',
|
'plugin:@typescript-eslint/stylistic-type-checked',
|
||||||
|
"plugin:react/recommended",
|
||||||
'plugin:react-hooks/recommended',
|
'plugin:react-hooks/recommended',
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
],
|
],
|
||||||
|
@ -19,6 +20,8 @@ module.exports = {
|
||||||
'warn',
|
'warn',
|
||||||
{ allowConstantExport: true },
|
{ allowConstantExport: true },
|
||||||
],
|
],
|
||||||
|
"react/react-in-jsx-scope": "off",
|
||||||
|
"react/jsx-filename-extension": [1, { "extensions": [".tsx"] }],
|
||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
|
@ -26,4 +29,9 @@ module.exports = {
|
||||||
project: ['./tsconfig.json', './tsconfig.node.json'],
|
project: ['./tsconfig.json', './tsconfig.node.json'],
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
},
|
},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: "detect"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
1402
frontend/package-lock.json
generated
1402
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -23,6 +23,7 @@
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
|
"eslint-plugin-react": "^7.33.2",
|
||||||
"eslint-plugin-react-hooks": "^4.6.0",
|
"eslint-plugin-react-hooks": "^4.6.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.5",
|
"eslint-plugin-react-refresh": "^0.4.5",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
|
|
|
@ -9,10 +9,10 @@ function App(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<a href="https://vitejs.dev" target="_blank">
|
<a href="https://vitejs.dev" target="_blank" rel="noreferrer">
|
||||||
<img src={viteLogo} className="logo" alt="Vite logo" />
|
<img src={viteLogo} className="logo" alt="Vite logo" />
|
||||||
</a>
|
</a>
|
||||||
<a href="https://react.dev" target="_blank">
|
<a href="https://react.dev" target="_blank" rel="noreferrer">
|
||||||
<img src={reactLogo} className="logo react" alt="React logo" />
|
<img src={reactLogo} className="logo react" alt="React logo" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,7 +20,7 @@ function App(): JSX.Element {
|
||||||
<div className="card">
|
<div className="card">
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCount((count) => count + 1);
|
setCount((count): number => count + 1);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
count is {count}
|
count is {count}
|
||||||
|
|
Loading…
Reference in a new issue