Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Closure Linter sắp ngừng hoạt động
Khi cú pháp của JavaScript tiếp tục phát triển, với ES2015 trở lên, việc cập nhật Closure Linter ngày càng trở nên khó khăn hơn. Đây là một dự án không có nhân viên, không được duy trì và không được dùng nữa.
Hầu hết các dự án tại Google đều đã di chuyển sang trình kiểm tra lỗi mới.
Đối với những nhóm sử dụng các công cụ Closure, họ nên sử dụng trình kiểm tra lỗi mới dựa trên Trình biên dịch Closure. Bạn có thể thực hiện việc này bằng cách truyền --jscomp_warning=lintChecks
đến trình biên dịch hoặc tạo tệp nhị phân linter độc lập; hãy xem
wiki của Trình biên dịch Closure
để biết thông tin chi tiết. Phần còn lại của thông tin trên trang này sẽ được giữ lại một thời gian cho những nhóm vẫn đang sử dụng Closure Linter.
Closure Linter là gì?
Closure Linter là một tiện ích kiểm tra các tệp JavaScript để tìm các vấn đề về kiểu như vị trí của toán tử, dấu chấm phẩy bị thiếu, khoảng cách, sự hiện diện của chú thích JsDoc, v.v.
Closure Linter có thể làm gì cho tôi?
Closure Linter đảm bảo rằng tất cả mã JavaScript trong dự án của bạn đều tuân theo các nguyên tắc trong Hướng dẫn về kiểu JavaScript của Google. Tính năng này cũng có thể tự động khắc phục nhiều lỗi thường gặp, giúp bạn tiết kiệm thời gian và tập trung vào việc viết mã.
Tôi nên bắt đầu bằng cách nào?
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003eClosure Linter is deprecated and no longer actively maintained due to difficulties in keeping up with evolving JavaScript syntax.\u003c/p\u003e\n"],["\u003cp\u003eGoogle recommends using the new linter integrated with Closure Compiler by passing \u003ccode\u003e--jscomp_warning=lintChecks\u003c/code\u003e to the compiler or building the standalone linter binary.\u003c/p\u003e\n"],["\u003cp\u003eClosure Linter, while deprecated, is a tool used for checking JavaScript files for style issues, ensuring code follows Google JavaScript Style Guide, and automatically fixing common errors.\u003c/p\u003e\n"]]],[],null,["Closure Linter is deprecated\n----------------------------\n\n\nAs the syntax of JavaScript has continued to evolve, with ES2015\nand beyond, it has become increasingly difficult to keep Closure\nLinter up to date. It is unstaffed, unmaintained, and deprecated.\nMost projects at Google have migrated to the new linter.\n\n\nFor teams using the Closure tools, we recommend they use the new\nlinter based on the Closure Compiler instead. You can do this by\npassing `--jscomp_warning=lintChecks` to the compiler,\nor building the standalone linter binary; see the\n[Closure Compiler wiki](https://github.com/google/closure-compiler/wiki/Lint-checks) for details. The rest of the information on this page will be\nkept up for a while, for teams who are still using Closure Linter.\n\nWhat is the Closure Linter?\n---------------------------\n\n\nThe Closure Linter is a utility that checks JavaScript files for\nstyle issues such as operator placement, missing semicolons,\nspacing, the presence of JsDoc annotations, and more.\n\nWhat can the Closure Linter do for me?\n--------------------------------------\n\n\nThe Closure Linter ensures that all of your project's JavaScript\ncode follows the guidelines in\nthe [Google\nJavaScript Style Guide](https://google.github.io/styleguide/javascriptguide.xml). It can also automatically fix many\ncommon errors, which saves you time and lets you focus on coding. \n\nHow do I start?\n---------------\n\n\n- [Download Closure Linter](https://github.com/google/closure-linter/zipball/master).\n- Read [How to Use Closure Linter](/closure/utilities/docs/linter_howto).\n- Browse [the source code](https://github.com/google/closure-linter/).\n- Questions? Ask the [discussion forum](http://groups.google.com/group/closure-linter-discuss).\n\n\u003cbr /\u003e"]]