-
Notifications
You must be signed in to change notification settings - Fork 447
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(format): use eslint as the formatting tool #1797
Conversation
I have some thoughts and suggestions for the optimization of ESLint. I don't want overly strict rules to exist. Of course, excellent lint will make code more readable and understandable and enhance development efficiency. However, if there are too many rules or destructive rules, it will cause many troubles for developers. Therefore, I want to find a balance point in the middle to meet the requirements, but don't overly pursue "perfection". |
Certainly, there is much to discuss regarding the optimization of ESLint. I completely agree that finding the right balance in rule-setting is essential. The complexity of ESLint sometimes draws criticism, but importantly, most errors can be automatically fixed upon saving the file. Additionally, adhering to certain recommended practices can indeed enhance the robustness and maintainability of the code. We need to continue discussing and adjusting to ensure the rules are neither too strict nor too lenient, thereby helping developers to efficiently write higher-quality code. |
This pull request includes several updates to the
apps/cli
package, focusing on code refactoring, configuration changes, and dependency updates. The most important changes include refactoring functions to use thefunction
keyword, updating import paths, and modifying configuration files to improve code formatting and linting.Code Refactoring:
apps/cli/src/lib/conn.ts
,apps/cli/src/lib/ls.ts
, andapps/cli/src/lib/pub.ts
to use thefunction
keyword instead of arrow functions for better readability and consistency. [1] [2] [3]node:
prefix for core modules inapps/cli/src/lib/ls.ts
and added type imports for better type checking and performance. [1] [2]Configuration Changes:
.prettierrc.json
file, indicating a switch to using ESLint for formatting..vscode/settings.json
to disable Prettier, enable ESLint for various languages, and customize ESLint rules to silence stylistic warnings while still auto-fixing them.Dependency Updates:
@mqttx/tsconfig
and@types/mqttx
as workspace dependencies inapps/cli/package.json
.Other Changes:
apps/cli/src/index.ts
andapps/cli/src/lib/pub.ts
for better organization and readability. [1] [2]These changes aim to improve the codebase's maintainability, readability, and consistency across the project.