google-java-format
ESLint
google-java-format | ESLint | |
---|---|---|
21 | 380 | |
5,416 | 24,310 | |
0.5% | 0.9% | |
8.6 | 9.7 | |
3 days ago | about 9 hours ago | |
Java | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
google-java-format
-
How to automatically format Java code similar to Rust (rustfmt)?
The code block you pasted is not at all what the Google Java Format utility would do. Don't use VSCode to handle IntelliJ's job :P
-
After a few attempts I'm officially a programmer :^)
Follow a style guide, doesn’t really matter which you choose, you’ll thank me later. This one will work automatically https://github.com/google/google-java-format
-
For Contributors to my OpenSSG
Like Prettier and ESLint in Javascript, I needed to add Java formatting and linting tools. For formatting, I looked at google-java-format, codestyle, and spotless. Since I'm not using Java framework, I can only use plugin to format my code. Although google-java-format does not support configurability, I just chose to follow Google Java format as I believe they have most common language format standard. To use google-java-format in MacOS, go to IntelliJ IDEA -> Preference (Windows: File -> Setting) and search "plugin" menu. Then, find google-java-format using search bar. Now all you need to do is to install the plugin. I didn't have to enable it, I think it needs to be enabled in some cases. You can refer to the documentation. To format your code, go to Code menu and select Reformat code or Reformat file. It will format your code.
-
Coding standards
I cloned a Maven plug-in that enforces Google code style guidelines (modifying a few things, like nesting depth): https://github.com/google/google-java-format
-
I declare as "final" every single variable whose value doesn't change. I also use "this" every time that I'm referring to an attribute, even when there's no ambiguity in not using it
They follow a rectangle rule, which is easy to follow, but can lead to ugly formatting due to excessive indentation in nested statements (which are common using protobuffers). The dart formatter was a lot nicer, and considered human friendly style instead of blindly following the rectangle rule.
-
Creating custom formatter for Java
I spent most of my development career writing simple CRUD applications, recently I read a fascinating article: http://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/. It looks like a nice challenge to try creating such a tool. For sure I need first to understand how to build AST etc. I could reuse existing solutions like https://github.com/google/google-java-format, or eclipse fmt, but I would like to understand the whole process, to be able to debug all cases.
- I am about to start a war
-
Zero Config Code Formatter?
Eventually it was clear that google-java-format was pulling ahead, and it was clear that the primary reason for that was The Rectangle Rule -- a principle I'd vomited forth one day that somehow had gone the distance. Structure-revealing code turns out to be readable code, and our users kept preferring it.
- Black, the Uncompromising (Python) Code Formatter Is Stable
-
google-java-format -> Diferences, how to sync with eclipse / stream format
Looks like this was changed in version 1.7.
ESLint
-
Shared Data-Layer Setup For Micro Frontend Application with Nx Workspace
ESLint: A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
-
To Review or Not to Review: The Debate on Mandatory Code Reviews
Automating code checks with static code analysis allows us to enforce code styling effectively. By integrating tools into our workflow, we can identify errors at an early stage, while coding instead of blocking us at the end. For instance, flake8 checks Python code for style and errors, eslint performs similar checks for JavaScript, and prettier automatically formats code to maintain consistency.
-
Biome.js : Prettier+ESLint killer ?
If you're a developer, you're surely familiar with Prettier and ESLint. With over 8 years of existence, they have established themselves as references in the JavaScript ecosystem.
-
Most basic code formatting
eslint is used to avoid code errors
-
How to use Lefthooks in your node project?
No lint errors: The committed code does not contain any lint errors (eslint).
-
Git Project Configuration With Husky and ESLint
Let’s walk through the steps for a one-time setup to configure husky pre-commit and pre-push hooks, ESLint with code styles conventions, prettier code formatter, and lint-staged. Husky automatically runs a script on each commit or push. This is useful for linting files to enforce code styles that keeps the entire code base following conventions.
-
What is an Abstract Syntax Tree in Programming?
GitHub | Website
-
Shared Tailwind Setup For Micro Frontend Application with Nx Workspace
ESLint: A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript.
-
6 Tools To Help Keep Your Dependencies And Code More Secure
ESLint
-
Six Factors That Raise The Risk Of Bugs In A Codebase
1. Lack of Static Code Analysis Static code analysis tools like TypeScript and ESLint play a crucial role in identifying and preventing bugs. TypeScript provides static typing, enhancing the robustness of the code. ESLint detects issues and enforces coding standards. The absence of these tools can significantly elevate the likelihood of bugs due to the lack of early detection and guidance provided during development.
What are some alternatives?
spotless - Keep your code spotless
XO - ❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults
palantir-java-format - A modern, lambda-friendly, 120 character Java formatter.
Standard - 🌟 JavaScript Style Guide, with linter & automatic code fixer
spring-javaformat
prettier - Prettier is an opinionated code formatter.
formatter-maven-plugin - Formatter Maven Plugin
JSHint - JSHint is a tool that helps to detect errors and potential problems in your JavaScript code
black - The uncompromising Python code formatter
JSLint - JSLint, The JavaScript Code Quality and Coverage Tool
fmt-maven-plugin - Opinionated Maven Plugin that formats your Java code.
Babel (Formerly 6to5) - 🐠 Babel is a compiler for writing next generation JavaScript.