8000
Skip to content

tests(eslint): add export rule - #13282

Merged
devtools-bot merged 11 commits into
masterfrom
lint-exports
Nov 3, 2021
Merged

tests(eslint): add export rule#13282
devtools-bot merged 11 commits into
masterfrom
lint-exports

Conversation

@connorjclark
Copy link
Copy Markdown
Collaborator

Adds lint rules enforcing 1) no statements after an export and 2) at most one export statement in a file

@connorjclark
connorjclark requested a review from a team as a code owner October 28, 2021 23:39
@connorjclark
connorjclark requested review from adamraine and removed request for a team October 28, 2021 23:39
@google-cla google-cla Bot added the cla: yes label Oct 28, 2021
const ANIMATION_FRAME_DURATION_MS = 500;

export const Separator: FunctionComponent = () => {
const Separator: FunctionComponent = () => {
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.

ah, I forgot about flow report stuff. This is a big change for this code. @adamraine what are your thoughts on export style for component files?

We could always exclude tsx files if it's generally considered more idiomatic this way

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.

It's fine, I'll probably get used to it

Comment thread report/renderer/util.js Outdated
/**
* Report-renderer-specific strings.
*/
const UIStrings = {
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.

This is more in line with every other use of UIStrings, but to me this isn't worth breaking blame.

@paulirish
Copy link
Copy Markdown
Member

👍 to the rules. i find it easier to navigate this way.

Comment thread flow-report/src/i18n/i18n.tsx
@connorjclark
connorjclark commented Nov 2, 2021
Copy link
Copy Markdown
Collaborator Author

image

can't work out this TS error. @brendankenny thoughts? https://gist.github.com/connorjclark/20a7d2df46fbc440da83fbbc7f84d795

@brendankenny
Copy link
Copy Markdown
Contributor

one of the tsc projects is seeing into util.js when it couldn't before, and it doesn't have an LH.ReportResult defined in its globals

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0