Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(eslint): Scope the rules to relevant files (#17242)

Ben Bachema1639facf61c
diff --git a/packages/config-eslint/next.js b/packages/config-eslint/next.js
index ef57cb87c0..b77cf277c2 100644
--- a/packages/config-eslint/next.js
+++ b/packages/config-eslint/next.js
@@ -54,20 +54,28 @@ export default [
},
},
rules: {
- ...reactPlugin.configs.recommended.rules,
- ...reactHooksPlugin.configs.recommended.rules,
...nextPlugin.configs["core-web-vitals"].rules,
"import/no-anonymous-default-export": "warn",
"import/no-duplicates": ["error", { "prefer-inline": true }],
- "react/no-unknown-property": "off",
- "react/react-in-jsx-scope": "off",
- "react/prop-types": "off",
"jsx-a11y/alt-text": ["warn", { elements: ["img"], img: ["Image"] }],
"jsx-a11y/aria-props": "warn",
"jsx-a11y/aria-proptypes": "warn",
"jsx-a11y/aria-unsupported-elements": "warn",
"jsx-a11y/role-has-required-aria-props": "warn",
"jsx-a11y/role-supports-aria-props": "warn",
+ },
+ },
+
+ {
+ name: "langfuse/next/react",
+ files: ["**/*.{js,jsx,mjs,ts,tsx,mts,cts}"],
+ ignores: ["**/*.servertest.{ts,tsx}"],
+ rules: {
+ ...reactPlugin.configs.recommended.rules,
+ ...reactHooksPlugin.configs.recommended.rules,
+ "react/no-unknown-property": "off",
+ "react/react-in-jsx-scope": "off",
+ "react/prop-types": "off",
"react/jsx-no-target-blank": "off",
},
},
@@ -94,6 +102,7 @@ export default [
// Keep the pre-React-Compiler hooks baseline used by this repo.
{
name: "langfuse/next/react-hooks-overrides",
+ ignores: ["**/*.servertest.{ts,tsx}"],
rules: {
"react-hooks/component-hook-factories": "off",
"react-hooks/config": "off",
@@ -157,6 +166,13 @@ export default [
},
],
"@typescript-eslint/no-deprecated": "warn",
+ },
+ },
+ {
+ name: "langfuse/next/typescript-react",
+ files: ["**/*.{ts,tsx,mts,cts}"],
+ ignores: ["**/*.servertest.{ts,tsx}"],
+ rules: {
"react/jsx-curly-brace-presence": [
"warn",
{
@@ -172,12 +188,15 @@ export default [
{
name: "langfuse/next/tests-and-stories",
files: [
+ "**/*.clienttest.{ts,tsx}",
+ "**/*.servertest.{ts,tsx}",
"**/*.test.{ts,tsx}",
"**/*.story.{ts,tsx}",
"**/*.stories.{ts,tsx}",
],
rules: {
"@repo/no-abstracted-overlay-trigger": "off",
+ "@repo/no-tailwind-overflow-scroll": "off",
},
},
];
diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs
index abc455b89c..94a5c1abe2 100644
--- a/web/eslint.config.mjs
+++ b/web/eslint.config.mjs
@@ -72,6 +72,13 @@ export default [
},
{
...tailwindcssRecommendedConfig,
+ ignores: [
+ ".storybook/**/*",
+ "src/**/__tests__/**",
+ "src/**/__e2e__/**",
+ "src/**/*.clienttest.{ts,tsx}",
+ "src/**/*.servertest.{ts,tsx}",
+ ],
settings: {
tailwindcss: {
cssConfigPath: "src/styles/globals.css",