Registry / testing / eslint-plugin-flowtype-errors

eslint-plugin-flowtype-errors

JSON →
library4.5.0jsnpmunverified

An ESLint plugin that wraps Flow errors and displays them as ESLint errors. Version 4.5.0 is the latest stable release. It allows any editor with ESLint support to also show Flow type errors, reducing configuration complexity by eliminating the need for a separate Flow linter integration. Maintained actively with frequent dependency updates. Supports Flow >=0.93.0 and ESLint >=5.16.0. Only works on 64-bit operating systems; Windows 32-bit is not supported.

npm install eslint-plugin-flowtype-errors
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-FLOW
E
eslint-plugin-flowtype-errors
testingjavascriptv4.5.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

plugin
✓ import plugin from 'eslint-plugin-flowtype-errors';
✗ import { plugin } from 'eslint-plugin-flowtype-errors';
Default export is the plugin object; named export does not exist.
configs
✓ import { configs } from 'eslint-plugin-flowtype-errors';
✗ import configs from 'eslint-plugin-flowtype-errors/configs';
Named export configs contains recommended and other presets.
ESLint config (recommended)
✓ extends: ['plugin:flowtype-errors/recommended']
✗ extends: ['eslint-plugin-flowtype-errors']
Use the plugin prefix string in extends; do not reference the module directly.

Shows how to install and configure the plugin with ESLint, enabling Flow errors as ESLint errors.

// Install the plugin and required peer dependencies // npm install --save-dev eslint eslint-plugin-flowtype-errors flow-bin // .eslintrc.js module.exports = { plugins: ['flowtype-errors'], extends: ['plugin:flowtype-errors/recommended'], // Optional: specify Flow path or options settings: { flowtype: { onlyFilesWithFlowAnnotation: true, }, }, }; // Now ESLint will show Flow type errors in your editor // Example file with Flow: // @flow function foo(x: number): string { return x; } // ESLint reports Flow error: string expected number
Debug
Known issues
gotchaOnly 64-bit OS is supported. 32-bit operating systems, especially Windows 32-bit, will fail to run Flow.
fix
Install a 64-bit version of your operating system.
affects: >=4.0.0
breakingVersion 4.0.0 changed the plugin export structure. The recommended config is now under 'plugin:flowtype-errors/recommended' instead of previous paths.
fix
Update your ESLint config extends to 'plugin:flowtype-errors/recommended'.
affects: >=4.0.0
deprecatedThe 'flowtype-errors' plugin ID is deprecated in favor of 'eslint-plugin-flowtype-errors' in ESLint config.
fix
Use 'plugins: ["flowtype-errors"]' or specifiy full package name if necessary.
affects: >=4.0.0
breakingPeer dependency flow-bin must be >=0.93.0. Older versions of Flow are not supported.
fix
Upgrade flow-bin to >=0.93.0.
affects: >=4.0.0
breakingPeer dependency eslint must be >=5.16.0. Older ESLint versions are incompatible.
fix
Upgrade ESLint to >=5.16.0.
affects: >=4.0.0
Errors
Common errors & fixes
Cannot find module 'eslint-plugin-flowtype-errors'
Plugin not installed or not present in node_modules.
fix
Run 'npm install --save-dev eslint-plugin-flowtype-errors'.
Error: No such plugin: flowtype-errors
ESLint config references a plugin that is not loaded.
fix
Add 'plugins: ["flowtype-errors"]' to your ESLint config.
Configuration for rule 'flowtype-errors/...' is invalid
Incorrect rule configuration or rule name.
fix
Check that you are using valid rule names like 'flowtype-errors/enforce-min-coverage'.
Upgrade
Version history
4.5.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency required for ESLint plugin functionality
flow-binrequiredpeer dependency to run Flow and produce errors
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-plugin-flowtype-errors — npm install eslint-plugin-flowtype-errors · libregistry