{"id":19758,"library":"eslint-plugin-flow","title":"ESLint Plugin Flow (alias for eslint-plugin-flowtype)","description":"This package (eslint-plugin-flow) is a legacy alias for eslint-plugin-flowtype, which provides Flowtype linting rules for ESLint. The current stable version of eslint-plugin-flowtype is 8.0.3 (October 2021). The package enforces Flow type annotations with over 30 rules, including type-id-match, no-weak-types, and sort-type-union-intersection-members. It is designed for projects using Flow with ESLint 8+. Key differentiators: it is the most mature Flow linting plugin, supports ESLint 8, and is maintained by the community. However, note that this alias package is deprecated and should be replaced with eslint-plugin-flowtype directly.","status":"deprecated","version":"2.29.1","language":"javascript","source_language":"en","source_url":"https://github.com/gajus/eslint-plugin-flowtype","tags":["javascript","eslint","plugin","flowtype"],"install":[{"cmd":"npm install eslint-plugin-flow","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-flow","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-flow","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency, ESLint 2.0+ compatible, but v8 requires ESLint 8","package":"eslint","optional":false}],"imports":[{"note":"The 'eslint-plugin-flow' package is deprecated; use 'eslint-plugin-flowtype' instead. ESM import works in ESLint 8+.","wrong":"const plugin = require('eslint-plugin-flow')","symbol":"plugin as default","correct":"import plugin from 'eslint-plugin-flowtype'"},{"note":"Accessing rules from the deprecated alias may still work but is not recommended.","wrong":"const { rules } = require('eslint-plugin-flow')","symbol":"rules","correct":"import { rules } from 'eslint-plugin-flowtype'"},{"note":"Configs are recommended. Not available in the deprecated alias.","symbol":"configs","correct":"import { configs } from 'eslint-plugin-flowtype'"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n  plugins: ['flowtype'],\n  extends: ['plugin:flowtype/recommended'],\n  rules: {\n    'flowtype/boolean-style': [2, 'boolean'],\n    'flowtype/no-weak-types': 2,\n  },\n};\n\n// Install:\n// npm install --save-dev eslint eslint-plugin-flowtype\n// Do not use eslint-plugin-flow (deprecated).","lang":"javascript","description":"This shows how to configure ESLint with the flowtype plugin using recommended config and custom rules. Avoid the deprecated eslint-plugin-flow package."},"warnings":[{"fix":"Upgrade ESLint to version 8 or later, or use eslint-plugin-flowtype@^7 if you must stay on ESLint 7.","message":"eslint-plugin-flowtype v8 drops support for ESLint 7. Requires ESLint 8+.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Use Node.js 12 or later.","message":"eslint-plugin-flowtype v7 drops Node.js 10 support.","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Replace 'eslint-plugin-flow' with 'eslint-plugin-flowtype' in your package.json and update all imports/requires.","message":"eslint-plugin-flow is deprecated. Use eslint-plugin-flowtype instead.","severity":"deprecated","affected_versions":"all"},{"fix":"In .eslintrc, use: plugins: ['flowtype'] and rules: { 'flowtype/no-weak-types': 2 }.","message":"The plugin's default export is the plugin object, not a function. You cannot use it with ESLint's 'plugin' key incorrectly.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Ensure your Flow version is compatible with the rule semantics (e.g., sort-type-union-intersection-members requires Flow 0.155+).","message":"Some rules require specific Flow version schemas; not all rules work with older Flow versions.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install --save-dev eslint-plugin-flowtype and replace all references.","cause":"The package is deprecated and may not be published to npm under that name.","error":"Cannot find module 'eslint-plugin-flow'"},{"fix":"Use valid rule names like 'flowtype/no-weak-types' in rules.","cause":"Using the deprecated alias to try to access rules.","error":"Error: ESLint configuration in .eslintrc is invalid: Environment key \"eslint-plugin-flowtype/rules\" is not valid."},{"fix":"The default export is an object, not a function. Use it as part of ESLint's plugin system.","cause":"Attempting to call the default export as a function (e.g., plugin()).","error":"TypeError: plugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}