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

chore: improve lint setup #1281

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

mcmxcdev
Copy link
Contributor

@mcmxcdev mcmxcdev commented Jul 24, 2023

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

  • update eslint config
  • merged eslint rules for JS and TS to avoid duplicates
  • extended stricter lint ruleset from typescript-eslint
  • corrected wrong setup for certain eslint rulesets
  • opt in to eslint reportUnusedDisableDirectives config option
  • fix or disable a lot of lint issues throughout codebase
  • remove trailingComma: all from prettier config which is default in prettier v3
  • add volta configuration to package.json to autoload correct node and pnpm versions
  • upgrade all eslint and prettier related dependencies to latest
  • remove config options from settings.json which are default anyways
  • remove config options from settings.json which are outdated/unknown
  • set up prettier as default formatter in settings.json

Motivation and Context

The lint setup should be up to date so that developers avoid creating bugs or mistakes in the codebase.

Screenshots

Checklist

  • My pull request is properly named
  • The changes respect the code style of the project (pnpm prepare-code)
  • pnpm test passes
  • I tested/previewed my changes locally

Release Notes

@@ -28,123 +32,50 @@ module.exports = {
node: true,
jest: true,
},
reportUnusedDisableDirectives: true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This config options makes eslint check for eslint-disable statements which are outdated and autoremoves them like in e.g. https://github.com/ferdium/ferdium-app/pull/1281/files#diff-7db082e9f1255575e774bf5f2c4b23b7ed970cedaf3b8a4cf583ac46d19f96b6L71

Copy link
Contributor

Choose a reason for hiding this comment

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

please raise the similar changes on the ferdium-recipes repo as well. TIA

.eslintrc.js Show resolved Hide resolved
.eslintrc.js Show resolved Hide resolved
package.json Show resolved Hide resolved
src/app.tsx Show resolved Hide resolved
.eslintrc.js Show resolved Hide resolved
@mcmxcdev mcmxcdev marked this pull request as ready for review July 24, 2023 03:04
@mcmxcdev mcmxcdev requested a review from a team as a code owner July 24, 2023 03:04
.eslintrc.js Show resolved Hide resolved
@@ -28,123 +32,50 @@ module.exports = {
node: true,
jest: true,
},
reportUnusedDisableDirectives: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

please raise the similar changes on the ferdium-recipes repo as well. TIA

.eslintrc.js Show resolved Hide resolved
Copy link
Contributor

@vraravam vraravam left a comment

Choose a reason for hiding this comment

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

Please remove the addition of the recipes submodule from this PR. Then it can be merged.

@mcmxcdev
Copy link
Contributor Author

Please remove the addition of the recipes submodule from this PR. Then it can be merged.

@vraravam I can't seem to find a way to remove it from being tracked in the PR. I remember having the same issues back with Ferdi.

- update eslint config
- merged eslint rules for JS and TS to avoid duplicates
- extended stricter lint ruleset from typescript-eslint
- corrected wrong setup for certain eslint rulesets
- opt in to reportUnusedDisableDirectives config option
- fix or disable a lot of lint issues throughout codebase
- remove trailingComma: all from prettier config which is default in prettier v3
- add volta configuration to package.json to autoload correct node and pnpm versions
- upgrade all eslint and prettier related dependencies to latest
- remove config options from settings.json which are default anyways
- remove config options from settings.json which are outdated/unknown
- set up prettier as default formatter in settings.json
@vraravam vraravam merged commit 8c13107 into ferdium:develop Jul 25, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants