New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update index.js to remove flowtype eslint rules #720
base: master
Are you sure you want to change the base?
Conversation
Flowtype rules shouldn't be included in the Fusion eslint rules because Fusion can be run on systems that don't include flowtype, such as Typescript. Requiring these rules would force projects to install eslint-plugin-flowtype even though they don't need it to run Fusion. Those projects would then have to include the following to disable flowtype linting errors: ``` rules: { "flowtype/require-valid-file-annotation": 0, "flowtype/no-types-missing-file-annotation": 0, ``` A recommendation is to split flowtype and typescript rules into their own packages, such as eslint-config-fusion-flowtype and eslint-config-fusion-typescript. The users of Fusion can choose which package to install, or the scaffolding tool can select the appropriate package depending on the type of project (if that choice becomes available in the future).
This proposal makes sense and follows fusions style of splitting components into smaller libraries. |
👍 This approach sounds reasonable to me. In order to support folks using the Flow rules today, we would also need to (1) publish the Flow-specific ruleset, and (2) include a codemod to add a dependency on the Flow-specific package in create-uber-web (internal link). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajbogh I would recommend remaking this PR in the private fusion monorepo to include all the changes @AlexMSmithCA mentioned. Feel free to ping me if you need any help
@chrisdothtml I'll be glad to attempt the requested codemod for the create-uber-web project. I'll add an additional public PR for the new packages so that this work can be tracked in the public repo and conversations can be available to everyone. |
eslint-plugin-flowtype should be installed as a separate package. It is left in devDeps to allow this project to still use flowtype, but it's removed from peerDeps so that peers are not required to use flowtype.
This should not be merged until #723 is approved and merged first AND a codemod is available for internal projects. It's recommended that eslint-config-fusion use a major version bump when this is merged. |
#723 has been merged, any updates on this one? (I'm trying to use fusionjs with typescript and get blocked by this). |
Flowtype rules shouldn't be included in the Fusion eslint rules because Fusion can be run on systems that don't include flowtype, such as Typescript. Requiring these rules would force projects to install eslint-plugin-flowtype even though they don't need it to run Fusion. Those projects would then have to include the following to disable flowtype linting errors:
A recommendation is to split flowtype and typescript rules into their own packages, such as eslint-config-fusion-flowtype and eslint-config-fusion-typescript. The users of Fusion can choose which package to install, or the scaffolding tool can select the appropriate package depending on the type of project (if that choice becomes available in the future).