eslint-config-flowtype-essential
Shareable configuration for eslint-plugin-flowtype
.
The main idea of this configuration is to be:
- Strict about syntax
- Permissive about types
- Opened for further extensions
Installation
npm install --save-dev eslint-config-flowtype-essential
Then, modify your eslint
configuration:
Done! Later you can modify your configuration to include any extra rules you need.
Code example
This code is considered valid (and beautiful):
type Client<T> = name: string surname: string age: number | string isRegular: boolean reference: T related: Array<T> preferences: Array<string | Promise<string>> : string { return `Hi, -{$client.reference}`}
License
MIT.