aboutsummaryrefslogtreecommitdiffhomepage
path: root/eslint.config.js
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-17 22:19:18 +0900
committernsfisis <nsfisis@gmail.com>2025-03-17 22:19:18 +0900
commitfacdf9357e576f6d47e7dd23f4f7b2b34f6a8d30 (patch)
tree21c6aee60b3ddc26ff88ee3273c887125bb5828f /eslint.config.js
parentc739bbfa7cbb68a51755254d59abf15e514795ca (diff)
downloadPHPerKaigi2025-tokens-facdf9357e576f6d47e7dd23f4f7b2b34f6a8d30.tar.gz
PHPerKaigi2025-tokens-facdf9357e576f6d47e7dd23f4f7b2b34f6a8d30.tar.zst
PHPerKaigi2025-tokens-facdf9357e576f6d47e7dd23f4f7b2b34f6a8d30.zip
commit files
Diffstat (limited to 'eslint.config.js')
-rw-r--r--eslint.config.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..fd1b968
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,28 @@
+import js from "@eslint/js";
+import globals from "globals";
+import reactHooks from "eslint-plugin-react-hooks";
+import reactRefresh from "eslint-plugin-react-refresh";
+import tseslint from "typescript-eslint";
+
+export default tseslint.config(
+ { ignores: ["dist"] },
+ {
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
+ files: ["**/*.{ts,tsx}"],
+ languageOptions: {
+ ecmaVersion: 2020,
+ globals: globals.browser,
+ },
+ plugins: {
+ "react-hooks": reactHooks,
+ "react-refresh": reactRefresh,
+ },
+ rules: {
+ ...reactHooks.configs.recommended.rules,
+ "react-refresh/only-export-components": [
+ "warn",
+ { allowConstantExport: true },
+ ],
+ },
+ },
+);