Skip to content

Code Linting

Code linting on the frontend can guarantee the code quality and make the code more readable.

We use eslint and stylelint to lint the code, and you can just use them out of the box.

ESLint

ESLint is a static code analysis tool for identifying problematic patterns found in JavaScript code. It helps maintain code quality by enforcing coding standards and best practices. Some benefits of using ESLint include:

  • Code Consistency: ESLint ensures that all code in the project follows the same style and guidelines, making it easier for developers to collaborate.
  • Error Prevention: It helps catch common programming errors and potential bugs during development.
  • Customizable Rules: ESLint allows you to configure rules based on your project's specific requirements.
  • Integration: ESLint can be easily integrated into various build tools and IDEs.

Stylelint

Stylelint is a linting tool for CSS and SCSS that helps maintain consistent coding styles and prevents errors in your stylesheets. Some benefits of using Stylelint include:

  • Consistent Styles: Stylelint enforces consistent coding styles across your stylesheets, ensuring a uniform look and feel.
  • Error Detection: It helps identify errors and potential issues in your CSS code.
  • Customizable Configuration: Stylelint allows you to configure rules and plugins to suit your project's needs.
  • Integration: Stylelint can be seamlessly integrated into your build process and editor.