leancodepl / flutter_corelibrary

Our core packages used for building the best Flutter apps.
https://pub.dev/publishers/leancode.co
57 stars 7 forks source link

Using leancode linter above package:lint ? #297

Closed EArminjon closed 6 months ago

EArminjon commented 6 months ago

Is it possible to use the leancode linter above actual package lint ? https://pub.dev/packages/lint

And so opt in only some specific new linter rule ?

shilangyu commented 6 months ago

If you want to use the custom lints and not the configuration of lints, then it is most certainly possible. You can not use it in the include: directive of analysis_options but follow the rest of the instructions in the readme.

Then to opt in to custom lints, you have to first disable all lints, and enable specifically those that you care about. For example:

custom_lint:
  enable_all_lint_rules: false
  rules:
    - prefix_widgets_returning_slivers

Let me know if that helps and if you have more questions.

EArminjon commented 6 months ago

Perfect :)