Skip to content

Commit 62fc5ea

Browse files
committed
Fiks lint og fjern cpu-limit
1 parent 7daaf54 commit 62fc5ea

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.nais/obo-nais-dev.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ spec:
2323
cpuThresholdPercentage: 75
2424
resources:
2525
limits:
26-
cpu: "1"
2726
memory: 512Mi
2827
requests:
2928
cpu: 250m

eslint.config.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,41 @@
11
import eslint from '@eslint/js';
22
import tseslint from 'typescript-eslint';
33
import jsxA11y from 'eslint-plugin-jsx-a11y';
4+
import reactPlugin from 'eslint-plugin-react';
45
import reactHooks from 'eslint-plugin-react-hooks';
56
import reactRefresh from 'eslint-plugin-react-refresh';
67
import globals from 'globals';
78

8-
export default tseslint.config({
9+
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, {
910
languageOptions: {
1011
globals: {
1112
...globals.browser,
1213
...globals.es2025
1314
},
1415
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }
1516
},
16-
extends: [eslint.configs.recommended, tseslint.configs.recommended],
1717
files: ['**/*.{js,jsx,ts,tsx}'],
1818
plugins: {
1919
'jsx-a11y': jsxA11y,
20+
react: reactPlugin,
2021
'react-hooks': reactHooks,
2122
'react-refresh': reactRefresh
2223
},
2324
rules: {
2425
...jsxA11y.flatConfigs.recommended.rules,
26+
...reactPlugin.configs.recommended.rules,
27+
...reactPlugin.configs['jsx-runtime'].rules, // React >=17
2528
...reactHooks.configs.recommended.rules,
2629
'react-refresh/only-export-components': 'warn',
2730
'@typescript-eslint/ban-ts-comment': 'off',
2831
'@typescript-eslint/no-explicit-any': 'warn',
2932
'@typescript-eslint/no-empty-object-type': 'off',
3033
'no-debugger': 'warn',
3134
'no-console': 'warn'
35+
},
36+
settings: {
37+
react: {
38+
version: 'detect' // reactPlugin trenger å vite dette
39+
}
3240
}
3341
});

src/components/datafetcher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { hasAnyFailed, isAnyNotStartedOrPending, isNotStarted } from '../rest/ut
44
import { Alert } from '@navikt/ds-react';
55
import Spinner from './felles/spinner/spinner';
66

7-
export function DataFetcher(props: { children: any }) {
7+
export function DataFetcher(props: { children: React.ReactNode }) {
88
const { innloggetVeilederFetcher, aktivEnhetFetcher, tilhorerVeilederUtrulletKontorFetcher } =
99
useDataFetcherStore();
1010

src/components/felles/show.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interface ShowProps {
2-
if?: any;
3-
children?: any;
2+
if?: boolean;
3+
children?: React.ReactNode;
44
}
55

66
const Show = (props: ShowProps) => (props.if ? props.children : null);

0 commit comments

Comments
 (0)