{"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,"search_vec":"'2021':44 '30':53 '8':80,93 '8.0.3':42 'alia':4,19,104 'annot':50 'communiti':99 'current':33 'deprec':107 'design':73 'differenti':82 'direct':117 'enforc':47 'eslint':1,7,13,22,31,38,79,92,114,119 'eslint-plugin-flow':12 'eslint-plugin-flowtyp':6,21,37,113 'flow':3,15,48,77,88 'flowtyp':9,24,27,40,116,121 'howev':100 'id':58 'includ':55 'intersect':69 'javascript':118 'key':81 'legaci':18 'lint':28,89 'maintain':96 'match':59 'matur':87 'member':70 'no-weak-typ':60 'note':101 'octob':43 'packag':11,46,105 'plugin':2,8,14,23,39,90,115,120 'project':75 'provid':26 'replac':111 'rule':29,54 'sort':66 'sort-type-union-intersection-memb':65 'stabl':34 'support':91 'type':49,57,63,67 'type-id-match':56 'union':68 'use':76 'version':35 'weak':62","created_at":"2026-04-25T11:19:29.765458+00:00","updated_at":"2026-04-25T11:19:29.765458+00:00","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,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/gajus/eslint-plugin-flowtype","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-flow","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}