Skip to content

Commit

Permalink
chore: upgrade eslint and lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreiffers committed Oct 24, 2024
1 parent fd0b292 commit e260fe5
Show file tree
Hide file tree
Showing 10 changed files with 428 additions and 442 deletions.
3 changes: 2 additions & 1 deletion apps/data-norge/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//@ts-check

// eslint-disable-next-line @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
const { composePlugins, withNx } = require('@nx/next');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const createMDX = require('@next/mdx');

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const sendEmailAction = async (prevState: FormState, formData: FormData)
}
revalidatePath('/');
return getFormState(FormStatusEnum.SUCCESS, 'Mail was sent successfully');
} catch (e) {
} catch {
// TODO: Log error to some error tracking service, not logging out to console because of security reasons
console.error('Sending email for Data Hunter Form failed');
return getFormState(FormStatusEnum.ERROR, 'Sending email failed');
Expand Down
4 changes: 2 additions & 2 deletions apps/data-norge/src/app/components/docs/docs-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export default async function DocsPage({ params, rootContentDirectory }: DocsPag
{content}
</MdxPage>
);
} catch (err) {
} catch {
notFound();
}
}
Expand Down Expand Up @@ -262,7 +262,7 @@ export const generateMetadata = async function ({ params, rootContentDirectory }
title,
description,
};
} catch (err) {
} catch {
return notFound();
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const LlmSearch = ({ endpoint, dictionary, baseUri }: LlmSearchProps) => {
} else {
setError(dictionary.aiBanner.prompt.errors.generic);
}
} catch (err) {
} catch {
setLoading(false);
setError(dictionary.aiBanner.prompt.errors.generic);
}
Expand Down
1 change: 1 addition & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable-no-require-imports */
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
7 changes: 5 additions & 2 deletions libs/ui/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable */
module.exports = {
import type { Config } from 'jest';

const config: Config = {
displayName: 'ui',
preset: './jest.preset.js',
coverageDirectory: '../../coverage/libs/ui',
Expand All @@ -10,3 +11,5 @@ module.exports = {
},
setupFilesAfterEnv: ['./jest.setup.tsx'],
};

export default config;
1 change: 1 addition & 0 deletions libs/ui/jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
Expand Down
3 changes: 1 addition & 2 deletions libs/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"extends": "../../tsconfig.base.json",
"files": [],
"include": ["additional.d.ts", "jest.setup.tsx"],
"references": [
{
"references": [{
"composite": true,
"path": "./tsconfig.lib.json"
},
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@axe-core/playwright": "^4.10.0",
"@babel/core": "^7.25.2",
"@babel/preset-react": "^7.24.7",
"@eslint/js": "^9.10.0",
"@eslint/js": "^9.13.0",
"@nx/devkit": "19.7.3",
"@nx/eslint": "19.7.3",
"@nx/eslint-plugin": "19.7.3",
Expand Down Expand Up @@ -104,17 +104,17 @@
"@types/node": "20.12.7",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "^7.6.0",
"@typescript-eslint/parser": "7.6.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "8.11.0",
"babel-jest": "^29.7.0",
"eslint": "^8.57.0",
"eslint-config-next": "14.2.5",
"eslint": "^9.13.0",
"eslint-config-next": "15.0.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.9.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.1",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-react": "7.37.2",
"eslint-plugin-react-hooks": "5.0.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-axe": "^9.0.0",
Expand Down
Loading

0 comments on commit e260fe5

Please sign in to comment.