Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

add initial rulesets#4

Merged
pq merged 2 commits into
mainfrom
init_rulesets
Apr 27, 2021
Merged

add initial rulesets#4
pq merged 2 commits into
mainfrom
init_rulesets

Conversation

@pq

@pq pq commented Apr 27, 2021

Copy link
Copy Markdown
Contributor

Comment thread lib/core.yaml
@parlough

parlough commented Apr 27, 2021

Copy link
Copy Markdown
Contributor

Just as an unrelated question, once these are released, do you think you'll include them in the sets fields of the machine generated linter JSON?

@pq

pq commented Apr 27, 2021

Copy link
Copy Markdown
Contributor Author

@parlough: totally, we should do that. could you maybe open an issue on the linter to track?

@parlough

parlough commented Apr 27, 2021

Copy link
Copy Markdown
Contributor

@parlough: totally, we should do that. could you maybe open an issue on the linter to track?

For reference, opened an issue at dart-lang/sdk#58382

Comment thread lib/recommend.yaml
Comment thread lib/core.yaml
@@ -0,0 +1,28 @@
linter:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we want the file path here to be /lib/dart/core.yaml so that we could also have a /lib/flutter/core.yaml ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Scoping has some other nice benefits too.

@goderbauer @devoncarew : wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH I think that supporting frameworks in this package will be challenging. Once we add one there's no reason we shouldn't then support more; changes here will be tightly versioned together even though the frameworks will be logically unrelated.

I'd optimize for the 'dart' case here, and just have the two main files in the top level of the lib/ directory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd optimize for the 'dart' case here,

I guess if we leave it as is, we could always add directories for frameworks (if we added them). So we might have something like:

lib/
 core.yaml
 recommend.yaml
 framework_1/
   core.yaml
   recommend.yaml
 framework_2/
   core.yaml
 ...

What do we think about flutter in the short term? Top-level, nested or somewhere else?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I don't think we will have multiple lint sets for flutter. There'll just be a flutter.yaml set,

Comment thread lib/recommend.yaml
@pq

pq commented Apr 27, 2021

Copy link
Copy Markdown
Contributor Author

Landing and we can iterate.

Thanks for all the thoughtful back and forth!

@pq pq merged commit 9394d5a into main Apr 27, 2021
@pq pq deleted the init_rulesets branch April 27, 2021 23:52
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 18, 2024
* initial rulesets

* + include
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants