diff --git a/eslint.config.js b/eslint.config.js index a1a8396..5fd72ce 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -67,21 +67,4 @@ export default [ }, /* 5 - JSX files */ - { - files: ['**/*.jsx'], - plugins: { node: nodePlugin, import: importPlugin }, - languageOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - globals: { ...nodeGlobals, ...browserGlobals }, - parserOptions: { ecmaFeatures: { jsx: true } }, - }, - rules: { - 'node/no-unsupported-features/es-syntax': 'off', - 'import/no-unresolved': 'error', - 'import/named': 'error', - 'import/default': 'error', - 'import/no-absolute-path': 'error', - }, - }, ]; diff --git a/package.json b/package.json index 95ecbc9..e35cdd2 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,16 @@ "workspaces": [ "packages/*" ], - "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad", + "packageManager": "pnpm@10.13.1", "references": [ { "path": "packages/core" }, { "path": "packages/cli" + }, + { + "path": "packages/eslint-plugin-react-zero-ui" } ], "scripts": { @@ -37,15 +40,16 @@ "size": "npx esbuild ./packages/core/dist/index.js --bundle --minify --format=esm --external:react --define:process.env.NODE_ENV='\"production\"' | gzip -c | wc -c" }, "devDependencies": { - "@eslint/js": "^9.30.1", - "@types/node": "^24.0.13", - "esbuild": "^0.25.6", - "eslint": "^9.30.1", + "@eslint/js": "^9.32.0", + "@types/node": "^24.1.0", + "esbuild": "^0.25.8", + "eslint": "^9.32.0", "eslint-plugin-import": "^2.32.0", "eslint-plugin-node": "^11.1.0", + "eslint-plugin-react-zero-ui": "workspace:*", "prettier": "^3.6.2", "release-please": "^17.1.1", "tsx": "^4.20.3", - "typescript": "^5.8.3" + "typescript": "^5.9.2" } -} +} \ No newline at end of file diff --git a/packages/core/__tests__/fixtures/next/app/LintFailures.tsx b/packages/core/__tests__/fixtures/next/app/LintFailures.tsx new file mode 100644 index 0000000..f5958ff --- /dev/null +++ b/packages/core/__tests__/fixtures/next/app/LintFailures.tsx @@ -0,0 +1,52 @@ +'use client'; +import { useScopedUI } from '@react-zero-ui/core'; + +/** + * This component is intentionally WRONG. + * – Missing data-attr on
+ * – Missing ref attachment on