Skip to content

Add ESLint to the codebase for JavaScript linting and code quality #97

Description

@Ubayed-Bin-Sufian

Description

To maintain a consistent code style, prevent common bugs, and enforce best practices across our JavaScript files, we need to integrate ESLint into the project. Currently, we lack an automated tool to catch syntax errors or style deviations before code is committed.

Proposed Changes

  • Initialize and configure ESLint in the root directory.
  • Extend a standard, widely-accepted style guide (e.g., eslint:recommended).
  • Add linting scripts to package.json to easily run the linter locally (npm run lint).
  • Ensure the linter ignores non-essential directories (like node_modules or build artifacts) via .eslintignore.

Todo List

  • Install ESLint as a development dependency (npm install eslint --save-dev).
  • Run initialization wizard (npm init @eslint/config) or create a custom .eslintrc configuration file.
  • Configure standard rules for environment (e.g., Browser, Node, ES6+).
  • Add lint and lint:fix scripts to package.json.
  • Verify that the setup catches issues by running it against existing files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions