Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
chore: enable @typescript-eslint/no-unused-vars rule (#3869)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian authored Jun 15, 2021
1 parent 111dac1 commit 070250f
Show file tree
Hide file tree
Showing 328 changed files with 4,672 additions and 4,820 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ src/i18n
src/resources/*
src/tailwind.config.js
src/tests
*.d.ts
7 changes: 4 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
rules: {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
Expand All @@ -45,14 +46,14 @@ module.exports = {
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-regexp-exec": "off",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/unbound-method": "off",
"no-unused-expressions": "off",
"no-unused-vars": "off",
"arrow-body-style": ["error", "as-needed"],
"prefer-const": [
"error",
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
- name: Format
run: yarn format

# - name: RustyWind
# run: |
# curl -LSfs https://avencera.github.io/rustywind/install.sh | sh -s -- --git avencera/rustywind
# rustywind --write .

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "style: resolve style guide violations"
Expand Down
6 changes: 3 additions & 3 deletions src/app/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe("App", () => {
.reply(200, require("tests/fixtures/plugins/registry/@dated/delegate-calculator-plugin.json"))
.persist();

jest.spyOn(electron.ipcRenderer, "invoke").mockImplementation((event: string, data) => {
jest.spyOn(electron.ipcRenderer, "invoke").mockImplementation((event: string) => {
let isUpdateCalled = false;
if (event === "updater:check-for-updates") {
const response = {
Expand Down Expand Up @@ -112,7 +112,7 @@ describe("App", () => {

jest.spyOn(utils, "shouldUseDarkColors").mockReturnValue(shouldUseDarkColors);

const { getByTestId, getByText } = renderWithRouter(<App />, { withProviders: false });
const { getByText } = renderWithRouter(<App />, { withProviders: false });

await waitFor(() => {
expect(getByText(profileTranslations.PAGE_WELCOME.WITH_PROFILES.TITLE)).toBeInTheDocument();
Expand Down Expand Up @@ -307,7 +307,7 @@ describe("App", () => {
it("should not migrate profiles", async () => {
process.env.REACT_APP_IS_E2E = undefined;

const { container, asFragment, getByText, getByTestId } = renderWithRouter(<App />, { withProviders: false });
const { asFragment, getByText, getByTestId } = renderWithRouter(<App />, { withProviders: false });
expect(getByTestId("Splash__text")).toBeInTheDocument();

await act(async () => {
Expand Down
64 changes: 32 additions & 32 deletions src/app/__snapshots__/App.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`App should close splash screen if not e2e 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -68,15 +68,15 @@ exports[`App should close splash screen if not e2e 1`] = `
Select Profile
</h2>
<p
class="text-sm text-theme-secondary-text md:text-base"
class="text-sm md:text-base text-theme-secondary-text"
>
Choose from an existing Profile below or create a new Profile to get started.
</p>
<div
class="mt-8"
>
<div
class="ml-4.5 -mb-4.5 flex flex-wrap justify-center"
class="flex flex-wrap justify-center ml-4.5 -mb-4.5"
>
<div
class="w-40 h-40 leading-tight mr-4.5 mb-4.5"
Expand Down Expand Up @@ -241,7 +241,7 @@ exports[`App should close splash screen if not e2e 1`] = `
>
<div>
<div
class="Circle__CircleWrapper-uw7h4j-0 lmmopM text-theme-primary-600 dark:text-white dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:text-white group-hover:bg-theme-primary-700 ring-theme-background"
class="Circle__CircleWrapper-uw7h4j-0 lmmopM dark:text-white group-hover:text-white text-theme-primary-600 dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:bg-theme-primary-700 ring-theme-background"
>
<div
class="sc-bdfBwQ fdfkzt"
Expand All @@ -255,7 +255,7 @@ exports[`App should close splash screen if not e2e 1`] = `
</div>
</div>
<span
class="mt-3 font-semibold text-theme-primary-600 dark:text-white max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
class="mt-3 font-semibold dark:text-white text-theme-primary-600 max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
>
Create Profile
</span>
Expand All @@ -268,7 +268,7 @@ exports[`App should close splash screen if not e2e 1`] = `
</div>
</div>
<p
class="text-sm text-theme-secondary-text md:text-base mt-16"
class="mt-16 text-sm md:text-base text-theme-secondary-text"
>
<span>
Exported a Profile before?
Expand Down Expand Up @@ -313,7 +313,7 @@ exports[`App should not migrate profiles 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -364,15 +364,15 @@ exports[`App should not migrate profiles 1`] = `
Select Profile
</h2>
<p
class="text-sm text-theme-secondary-text md:text-base"
class="text-sm md:text-base text-theme-secondary-text"
>
Choose from an existing Profile below or create a new Profile to get started.
</p>
<div
class="mt-8"
>
<div
class="ml-4.5 -mb-4.5 flex flex-wrap justify-center"
class="flex flex-wrap justify-center ml-4.5 -mb-4.5"
>
<div
class="w-40 h-40 leading-tight mr-4.5 mb-4.5"
Expand Down Expand Up @@ -537,7 +537,7 @@ exports[`App should not migrate profiles 1`] = `
>
<div>
<div
class="Circle__CircleWrapper-uw7h4j-0 lmmopM text-theme-primary-600 dark:text-white dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:text-white group-hover:bg-theme-primary-700 ring-theme-background"
class="Circle__CircleWrapper-uw7h4j-0 lmmopM dark:text-white group-hover:text-white text-theme-primary-600 dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:bg-theme-primary-700 ring-theme-background"
>
<div
class="sc-bdfBwQ fdfkzt"
Expand All @@ -551,7 +551,7 @@ exports[`App should not migrate profiles 1`] = `
</div>
</div>
<span
class="mt-3 font-semibold text-theme-primary-600 dark:text-white max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
class="mt-3 font-semibold dark:text-white text-theme-primary-600 max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
>
Create Profile
</span>
Expand All @@ -564,7 +564,7 @@ exports[`App should not migrate profiles 1`] = `
</div>
</div>
<p
class="text-sm text-theme-secondary-text md:text-base mt-16"
class="mt-16 text-sm md:text-base text-theme-secondary-text"
>
<span>
Exported a Profile before?
Expand Down Expand Up @@ -606,7 +606,7 @@ exports[`App should render application error if the app fails to boot 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -694,7 +694,7 @@ exports[`App should render mock 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -745,15 +745,15 @@ exports[`App should render mock 1`] = `
Select Profile
</h2>
<p
class="text-sm text-theme-secondary-text md:text-base"
class="text-sm md:text-base text-theme-secondary-text"
>
Choose from an existing Profile below or create a new Profile to get started.
</p>
<div
class="mt-8"
>
<div
class="ml-4.5 -mb-4.5 flex flex-wrap justify-center"
class="flex flex-wrap justify-center ml-4.5 -mb-4.5"
>
<div
class="w-40 h-40 leading-tight mr-4.5 mb-4.5"
Expand Down Expand Up @@ -918,7 +918,7 @@ exports[`App should render mock 1`] = `
>
<div>
<div
class="Circle__CircleWrapper-uw7h4j-0 lmmopM text-theme-primary-600 dark:text-white dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:text-white group-hover:bg-theme-primary-700 ring-theme-background"
class="Circle__CircleWrapper-uw7h4j-0 lmmopM dark:text-white group-hover:text-white text-theme-primary-600 dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:bg-theme-primary-700 ring-theme-background"
>
<div
class="sc-bdfBwQ fdfkzt"
Expand All @@ -932,7 +932,7 @@ exports[`App should render mock 1`] = `
</div>
</div>
<span
class="mt-3 font-semibold text-theme-primary-600 dark:text-white max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
class="mt-3 font-semibold dark:text-white text-theme-primary-600 max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
>
Create Profile
</span>
Expand All @@ -945,7 +945,7 @@ exports[`App should render mock 1`] = `
</div>
</div>
<p
class="text-sm text-theme-secondary-text md:text-base mt-16"
class="mt-16 text-sm md:text-base text-theme-secondary-text"
>
<span>
Exported a Profile before?
Expand Down Expand Up @@ -990,7 +990,7 @@ exports[`App should render splash screen 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -1041,15 +1041,15 @@ exports[`App should render splash screen 1`] = `
Select Profile
</h2>
<p
class="text-sm text-theme-secondary-text md:text-base"
class="text-sm md:text-base text-theme-secondary-text"
>
Choose from an existing Profile below or create a new Profile to get started.
</p>
<div
class="mt-8"
>
<div
class="ml-4.5 -mb-4.5 flex flex-wrap justify-center"
class="flex flex-wrap justify-center ml-4.5 -mb-4.5"
>
<div
class="w-40 h-40 leading-tight mr-4.5 mb-4.5"
Expand Down Expand Up @@ -1214,7 +1214,7 @@ exports[`App should render splash screen 1`] = `
>
<div>
<div
class="Circle__CircleWrapper-uw7h4j-0 lmmopM text-theme-primary-600 dark:text-white dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:text-white group-hover:bg-theme-primary-700 ring-theme-background"
class="Circle__CircleWrapper-uw7h4j-0 lmmopM dark:text-white group-hover:text-white text-theme-primary-600 dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:bg-theme-primary-700 ring-theme-background"
>
<div
class="sc-bdfBwQ fdfkzt"
Expand All @@ -1228,7 +1228,7 @@ exports[`App should render splash screen 1`] = `
</div>
</div>
<span
class="mt-3 font-semibold text-theme-primary-600 dark:text-white max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
class="mt-3 font-semibold dark:text-white text-theme-primary-600 max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
>
Create Profile
</span>
Expand All @@ -1241,7 +1241,7 @@ exports[`App should render splash screen 1`] = `
</div>
</div>
<p
class="text-sm text-theme-secondary-text md:text-base mt-16"
class="mt-16 text-sm md:text-base text-theme-secondary-text"
>
<span>
Exported a Profile before?
Expand Down Expand Up @@ -1286,7 +1286,7 @@ exports[`App should render the offline screen if there is no internet connection
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -1364,7 +1364,7 @@ exports[`App should render welcome screen after splash screen 1`] = `
class="NavigationBar__NavWrapper-sc-1qsoskw-0 jBDhtO"
>
<div
class="relative flex h-21"
class="flex relative h-21"
>
<div
class="flex flex-1 px-8 ml-12"
Expand Down Expand Up @@ -1415,15 +1415,15 @@ exports[`App should render welcome screen after splash screen 1`] = `
Select Profile
</h2>
<p
class="text-sm text-theme-secondary-text md:text-base"
class="text-sm md:text-base text-theme-secondary-text"
>
Choose from an existing Profile below or create a new Profile to get started.
</p>
<div
class="mt-8"
>
<div
class="ml-4.5 -mb-4.5 flex flex-wrap justify-center"
class="flex flex-wrap justify-center ml-4.5 -mb-4.5"
>
<div
class="w-40 h-40 leading-tight mr-4.5 mb-4.5"
Expand Down Expand Up @@ -1588,7 +1588,7 @@ exports[`App should render welcome screen after splash screen 1`] = `
>
<div>
<div
class="Circle__CircleWrapper-uw7h4j-0 lmmopM text-theme-primary-600 dark:text-white dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:text-white group-hover:bg-theme-primary-700 ring-theme-background"
class="Circle__CircleWrapper-uw7h4j-0 lmmopM dark:text-white group-hover:text-white text-theme-primary-600 dark:group-hover:border-theme-secondary-800 dark:group-hover:bg-theme-secondary-800 group-hover:bg-theme-primary-700 ring-theme-background"
>
<div
class="sc-bdfBwQ fdfkzt"
Expand All @@ -1602,7 +1602,7 @@ exports[`App should render welcome screen after splash screen 1`] = `
</div>
</div>
<span
class="mt-3 font-semibold text-theme-primary-600 dark:text-white max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
class="mt-3 font-semibold dark:text-white text-theme-primary-600 max-w-32 truncate dark:group-hover:text-white group-hover:text-theme-primary-700"
>
Create Profile
</span>
Expand All @@ -1615,7 +1615,7 @@ exports[`App should render welcome screen after splash screen 1`] = `
</div>
</div>
<p
class="text-sm text-theme-secondary-text md:text-base mt-16"
class="mt-16 text-sm md:text-base text-theme-secondary-text"
>
<span>
Exported a Profile before?
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/Address/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const Address = ({
};

return (
<div className="flex-grow flex items-center no-ligatures overflow-hidden whitespace-nowrap space-x-2">
<div className="flex overflow-hidden flex-grow items-center space-x-2 whitespace-nowrap no-ligatures">
{walletName && (
<span
data-testid="Address__alias"
Expand Down
Loading

0 comments on commit 070250f

Please sign in to comment.