Skip to content

Commit aa3a7fb

Browse files
committed
nye versjoner, eslint 9 og oppdatering fra vite react typescript template
1 parent e88b333 commit aa3a7fb

15 files changed

+1602
-3584
lines changed

client/.eslintrc.cjs

Lines changed: 0 additions & 25 deletions
This file was deleted.

client/eslint.config.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import js from '@eslint/js'
2+
import prettier from 'eslint-config-prettier'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import globals from 'globals'
6+
import tseslint from 'typescript-eslint'
7+
8+
export default tseslint.config(
9+
{ ignores: ['dist'] },
10+
{
11+
extends: [js.configs.recommended, ...tseslint.configs.recommended, prettier],
12+
files: ['**/*.{ts,tsx}'],
13+
languageOptions: {
14+
ecmaVersion: 2020,
15+
globals: globals.browser,
16+
},
17+
plugins: {
18+
'react-hooks': reactHooks,
19+
'react-refresh': reactRefresh,
20+
},
21+
rules: {
22+
...reactHooks.configs.recommended.rules,
23+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
24+
'@typescript-eslint/no-explicit-any': 0,
25+
'@typescript-eslint/no-non-null-assertion': 0,
26+
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
27+
'react/display-name': 0,
28+
'react/prop-types': 0,
29+
'react/react-in-jsx-scope': 0,
30+
},
31+
}
32+
)

0 commit comments

Comments
 (0)