{"id":25530,"library":"eslint-plugin-sweepit","title":"eslint-plugin-sweepit","description":"Opinionated architectural ESLint rules for TypeScript projects with React support. Current stable version 0.0.23, updated irregularly. Ships type definitions. Requires ESLint ^9.0.0 and TypeScript >=5.0.0. Key differentiators: prescriptive flat configs (core and React) that bundle recommended TypeScript-ESLint rules, functional programming rules, and custom rules for naming conventions (e.g., no TitleCase/titleCase props, no custom kebab-case props, restrict set* prefix to useState setters). Automatically enables TypeScript project service for type-aware rules. Focused on enforcing consistent prop naming and architectural boundaries.","status":"active","version":"0.0.23","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install eslint-plugin-sweepit","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-sweepit","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-sweepit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to work","package":"eslint","optional":false},{"reason":"peer dependency required for TypeScript rules and type information","package":"typescript","optional":false}],"imports":[{"note":"ESM-only package with default export of plugin object. No CommonJS support.","wrong":"const sweepit = require('eslint-plugin-sweepit')","symbol":"default","correct":"import sweepit from 'eslint-plugin-sweepit'"},{"note":"configs is accessed via the default export, not a named export.","wrong":"import { configs } from 'eslint-plugin-sweepit'","symbol":"configs","correct":"import sweepit from 'eslint-plugin-sweepit'; sweepit.configs.core"},{"note":"Rules are properties on the default export object, not standalone exports.","wrong":"import { rules } from 'eslint-plugin-sweepit'","symbol":"rules","correct":"import sweepit from 'eslint-plugin-sweepit'; sweepit.rules['no-array-props']"}],"quickstart":{"code":"// eslint.config.js\nimport sweepit from 'eslint-plugin-sweepit';\n\nexport default [\n  ...sweepit.configs.core,\n  ...sweepit.configs.react,\n  {\n    rules: {\n      'sweepit/no-array-props': 'warn',\n      'sweepit/no-prefixed-prop-bundles': ['error', { threshold: 4 }],\n    },\n  },\n];","lang":"javascript","description":"Shows how to set up eslint-plugin-sweepit with flat config, including core and React configs and rule overrides."},"warnings":[{"fix":"Migrate to flat config (eslint.config.js). See ESLint migration guide.","message":"ESLint 9 flat config required. Legacy .eslintrc format is not supported.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Disable projectService in parserOptions if performance is an issue: set parserOptions.projectService to false.","message":"configs.core and configs.react enable TypeScript projectService by default, which can slow down linting on large projects.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use consistent kebab-case rule keys as specified in the plugin.","message":"Rule naming may change in future major versions; currently uses kebab-case in the rule key but title-case in documentation references.","severity":"deprecated","affected_versions":"0.0.x"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-plugin-sweepit eslint typescript`.","cause":"Package not installed or missing dependencies.","error":"Failed to load plugin 'eslint-plugin-sweepit': Cannot find module 'eslint-plugin-sweepit'"},{"fix":"Import sweepit and spread configs into the config array: `import sweepit from 'eslint-plugin-sweepit'; export default [...sweepit.configs.core];`","cause":"Plugin not included in flat config or loaded incorrectly.","error":"ESLint couldn't determine the plugin for rule 'sweepit/no-array-props'"},{"fix":"Use default import: `import sweepit from 'eslint-plugin-sweepit';`.","cause":"Default export used incorrectly (e.g., named import).","error":"TypeError: Cannot read properties of undefined (reading 'core')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}