Skip to content
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

Fixed Lint issues and updated Eslint rules #2163

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Merge branch 'feature/eslint' of https://github.com/Plant-for-the-Pla…

01c8f4a
Select commit
Loading
Failed to load commit list.
Open

Fixed Lint issues and updated Eslint rules #2163

Merge branch 'feature/eslint' of https://github.com/Plant-for-the-Pla…
01c8f4a
Select commit
Loading
Failed to load commit list.
codefactor.io / CodeFactor failed Aug 20, 2024 in 1m 11s

7 issues fixed. 2223 issues found. Autofix available.

Annotations

Check notice on line 68 in pages/sites/[slug]/[locale]/profile/planetcash/index.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pages/sites/[slug]/[locale]/profile/planetcash/index.tsx#L68

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 22 in src/features/user/Profile/components/MyForestMap/microComponents/SingleMarkerUnits.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/Profile/components/MyForestMap/microComponents/SingleMarkerUnits.tsx#L22

Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)

Check notice on line 141 in src/features/user/TreeMapper/components/Map.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/TreeMapper/components/Map.tsx#L141

No magic number: 100. (no-magic-numbers)

Check notice on line 3 in public/assets/images/icons/manageProjects/changeChocolate.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

public/assets/images/icons/manageProjects/changeChocolate.tsx#L3

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 56 in src/features/user/Account/Recurrency.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/Account/Recurrency.tsx#L56

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 18 in src/temp/ProjectListControls/ActiveSearchField.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/temp/ProjectListControls/ActiveSearchField.tsx#L18

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 4 in src/temp/icons/FireIcon.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/temp/icons/FireIcon.tsx#L4

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 130 in src/tenants/salesforce/Home/components/Timeline.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/tenants/salesforce/Home/components/Timeline.tsx#L130

No magic number: 2. (no-magic-numbers)

Check notice on line 112 in src/features/common/TreeCounter/TreeCounter.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/common/TreeCounter/TreeCounter.tsx#L112

No magic number: 100. (no-magic-numbers)

Check notice on line 64 in src/features/user/Settings/ImpersonateUser/ImpersonateUserForm.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/Settings/ImpersonateUser/ImpersonateUserForm.tsx#L64

Unexpected console statement. (no-console)

Check notice on line 62 in src/features/user/Account/History.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/Account/History.tsx#L62

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 68 in src/features/common/TreeCounter/TreeCounter.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/common/TreeCounter/TreeCounter.tsx#L68

Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)

Check notice on line 138 in src/features/user/TreeMapper/Import/components/SampleTrees.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/TreeMapper/Import/components/SampleTrees.tsx#L138

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 146 in src/features/user/CompleteSignup/index.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/CompleteSignup/index.tsx#L146

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 12 in src/features/user/MFV2/MyContributions/index.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/MFV2/MyContributions/index.tsx#L12

Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)

Check notice on line 180 in src/features/projects/components/projectDetails/ProjectInfo.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/projects/components/projectDetails/ProjectInfo.tsx#L180

No magic number: 2. (no-magic-numbers)

Check notice on line 11 in src/features/user/RegisterTrees/RegisterTrees/DrawMap.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/RegisterTrees/RegisterTrees/DrawMap.tsx#L11

Don't use `Function` as a type. The `Function` type accepts any function-like value.
It provides no type safety when calling the function, which can be a common source of bugs.
It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.
If you are expecting the function to accept certain arguments, you should explicitly define the function shape. (@typescript-eslint/ban-types)

Check notice on line 50 in pages/sites/[slug]/[locale]/profile/edit.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pages/sites/[slug]/[locale]/profile/edit.tsx#L50

Missing return type on function. (@typescript-eslint/explicit-module-boundary-types)

Check notice on line 17 in src/features/projects/components/maps/Location.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/projects/components/maps/Location.tsx#L17

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 10 in src/features/common/TreeCounter/legacy/TreeCounterData.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/common/TreeCounter/legacy/TreeCounterData.tsx#L10

Missing return type on function. (@typescript-eslint/explicit-function-return-type)

Check notice on line 268 in src/features/user/TreeMapper/Import/components/SampleTreeCard.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/TreeMapper/Import/components/SampleTreeCard.tsx#L268

Arrow function expected no return value. (consistent-return)

Check notice on line 334 in src/features/user/ManageProjects/components/ProjectCertificates.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/ManageProjects/components/ProjectCertificates.tsx#L334

Prop spreading is forbidden (react/jsx-props-no-spreading)

Check notice on line 81 in middleware.ts

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

middleware.ts#L81

Unexpected console statement. (no-console)

Check notice on line 18 in pages/api/data-explorer/trees-planted.ts

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pages/api/data-explorer/trees-planted.ts#L18

No magic number: 60. (no-magic-numbers)

Check notice on line 79 in src/features/user/TreeMapper/Analytics/components/TreePlanted/index.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

src/features/user/TreeMapper/Analytics/components/TreePlanted/index.tsx#L79

Missing return type on function. (@typescript-eslint/explicit-function-return-type)