Open chaitrali-r opened 1 year ago
Description: The goal of this task is to enhance the code quality of the Education Core Registry (https://github.com/Sunbird-RC/sunbird-rc-ui) by implementing the ESLint library. ESLint is a powerful static analysis tool that helps identify and enforce coding standards, detect potential errors, and promote best practices within the codebase.
Expected Changes:
1. Installation of ESLint: The project's dependencies will be updated to include the ESLint library. This can be achieved by adding ESLint as a devDependency in the project's package.json file and running the necessary package manager commands (e.g., npm install or yarn install) to install the library.
2. Configuration File: A configuration file named .eslintrc or .eslintrc.json will be added to the project's root directory. This file will define the ESLint rules and options specific to the project. The rules can be customized to align with the team's preferred coding style and quality guidelines.
3. Linting of Project Files: ESLint will be applied to the relevant files within the core registry repository. This includes TypeScript (.ts) files, Angular templates (.html), and other supported file formats. ESLint will analyze the code and provide warnings or errors for any violations of the defined rules.
4. Automated Code Fixes: ESLint can automatically fix certain issues, such as formatting inconsistencies or simple rule violations. This feature can be enabled within the ESLint configuration file to automatically apply fixes to the codebase, enhancing code quality and maintaining consistency.
5. Rule Customization: (Optional) The ESLint configuration file will be adjusted to include project-specific rules or extend existing rule sets based on the requirements. This step ensures that ESLint enforces the desired coding standards and practices for the Angular project.
By implementing ESLint, we aim to improve the overall code quality, maintain a consistent coding style, identify potential issues early on, and promote best practices throughout the registry code.
What is the bug related to?
Registry Core
What went wrong?
Use ES Lint / ng Lint in your local setup and reduce the number of errors/warnings
What did you expect to see?
-
Additional Context
No response
Relevant logs/output (if any)
No response