Skip to content

Commit

Permalink
Merge pull request #40 from timofei-iatsenko/chore/eslint-9
Browse files Browse the repository at this point in the history
update eslint to 9
  • Loading branch information
garronej authored Nov 22, 2024
2 parents a543bc0 + 9f74b95 commit ef759e3
Show file tree
Hide file tree
Showing 7 changed files with 1,004 additions and 368 deletions.
27 changes: 0 additions & 27 deletions .eslintrc.cjs

This file was deleted.

48 changes: 48 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import typescriptEslint from "typescript-eslint";
import reactRefresh from "eslint-plugin-react-refresh";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import eslintConfigPrettier from "eslint-config-prettier";
import globals from "globals";
import js from "@eslint/js";
import storybook from "eslint-plugin-storybook";

export default typescriptEslint.config(
js.configs.recommended,
...typescriptEslint.configs.recommended,
react.configs.flat.recommended,
react.configs.flat["jsx-runtime"],
eslintConfigPrettier,
...storybook.configs["flat/recommended"],
{
ignores: ["dist/**", "public/**"],
},
{
plugins: {
"react-refresh": reactRefresh,
"react-hooks": reactHooks,
},
languageOptions: {
globals: {
...globals.browser,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/no-redeclare": "off",
"no-labels": "off",
},
},
{
files: ["**/*.stories.*"],
rules: {
"import/no-anonymous-default-export": "off",
},
},
);
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,29 @@
"react-dom": "^18.2.0"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"storybook": "^8.1.10",
"@storybook/react": "^8.1.10",
"@storybook/react-vite": "^8.1.10",
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"eslint-plugin-storybook": "^0.8.0",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-storybook": "^0.11.1",
"globals": "^15.12.0",
"prettier": "3.3.1",
"typescript": "^5.2.2",
"typescript-eslint": "^8.15.0",
"vite": "^5.0.8"
},
"engines": {
"node": "^18.0.0 || >=20.0.0"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 1 addition & 1 deletion src/login/KcContext.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable @typescript-eslint/no-empty-object-type */
import type { ExtendKcContext } from "keycloakify/login";
import type { KcEnvName, ThemeName } from "../kc.gen";

Expand Down
1 change: 1 addition & 0 deletions src/login/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { i18nBuilder } from "keycloakify/login";
import type { ThemeName } from "../kc.gen";

/** @see: https://docs.keycloakify.dev/i18n */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { useI18n, ofTypeI18n } = i18nBuilder.withThemeName<ThemeName>().build();

type I18n = typeof ofTypeI18n;
Expand Down
1 change: 0 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable react-refresh/only-export-components */
import { createRoot } from "react-dom/client";
import { StrictMode } from "react";
import { KcPage } from "./kc.gen";
Expand Down
Loading

0 comments on commit ef759e3

Please sign in to comment.