-
Notifications
You must be signed in to change notification settings - Fork 25
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
ESLint: error on missing lint ignore comments #7829
Changes from 2 commits
6874763
ae79ad3
28bd6f7
9a30d78
89a95e3
682d1d6
ce69660
8b82924
90580d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,16 +114,19 @@ async function setIntegrationDependencyVars( | |
contextVars: VarMap, | ||
): Promise<void> { | ||
// Loop through all the integrations, so we can set the source for each dependency variable properly | ||
for (const integrationDependency of extension.integrationDependencies ?? []) { | ||
// eslint-disable-next-line no-await-in-loop | ||
const serviceContext = await makeServiceContextFromDependencies([ | ||
integrationDependency, | ||
]); | ||
contextVars.setExistenceFromValues({ | ||
source: `${KnownSources.SERVICE}:${integrationDependency.integrationId}`, | ||
values: serviceContext, | ||
}); | ||
} | ||
await Promise.all( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only functional change in the PR. This should be safe (and more efficient) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also have an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember that helper, but it looks like it no longer exists? |
||
(extension.integrationDependencies ?? []).map( | ||
async (integrationDependency) => { | ||
const serviceContext = await makeServiceContextFromDependencies([ | ||
integrationDependency, | ||
]); | ||
contextVars.setExistenceFromValues({ | ||
source: `${KnownSources.SERVICE}:${integrationDependency.integrationId}`, | ||
values: serviceContext, | ||
}); | ||
}, | ||
), | ||
); | ||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,8 +60,8 @@ export function selectUserDataUpdate({ | |
|
||
return { | ||
// TODO: Review Required/Partial in Me type | ||
// https://github.com/pixiebrix/pixiebrix-extension/issues/7725 | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-type-assertion | ||
// https://github.com/pixiebrix/pixiebrix-extension/issues/7725 | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unnecessary-type-assertion -- email is required | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe this one in particular will be fixed soon by @BLoe 's work. |
||
email: email!, | ||
organizationId: organization?.id ?? null, | ||
telemetryOrganizationId: telemetryOrganization?.id ?? null, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,43 +87,42 @@ describe("Add new element", () => { | |
const listElement = createNewElement("list") as ListDocumentElement; | ||
listElement.config.element.__value__ = createNewElement("container"); | ||
const containerElement = createNewElement("container"); | ||
// There's a row in the container and a column in the row. | ||
// eslint-disable-next-line testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-node-access -- There's a row in the container and a column in the row. | ||
containerElement.children[0].children[0].children[0] = listElement; | ||
|
||
const { container } = renderDocumentPreview(containerElement); | ||
|
||
// Select a dropdown inside a Col in List and open it | ||
await userEvent.click( | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: A single |
||
container.querySelector(".col .col .addElement button"), | ||
); | ||
expect( | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
container.querySelector(".col .col .addElement button"), | ||
).toHaveAttribute("aria-expanded", "true"); | ||
|
||
// Hover over the Col in the list | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
fireEvent.mouseOver(container.querySelector(".col .col")); | ||
expect( | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
container.querySelector(".col .col .addElement button"), | ||
).toHaveAttribute("aria-expanded", "true"); | ||
|
||
// Hover over the Container of the List, .root.root - is the Document root element | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
fireEvent.mouseOver(container.querySelector(".root.root > .container")); | ||
expect( | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
container.querySelector(".col .col .addElement button"), | ||
).toHaveAttribute("aria-expanded", "true"); | ||
}); | ||
|
||
test("can add an element to a container", async () => { | ||
const { container } = renderDocumentPreview(createNewElement("container")); | ||
|
||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access | ||
// eslint-disable-next-line testing-library/no-container, testing-library/no-node-access -- see test's TODO comment | ||
await userEvent.click(container.querySelector(".col .addElement button")); | ||
await userEvent.click(screen.getByText("Header", { selector: "a" })); | ||
|
||
|
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.
💯