Skip to content

Standardize linting configuration across the project #7229

@afarber

Description

@afarber

Summary

After the Cucumber-js upgrade and ESM migration, we should enhance our ESLint configuration to better
support modern JavaScript patterns and ESM.

Current Configuration

  • eslint.config.js exists but may need ESM-specific rules

Proposed Enhancements

  1. ESM-specific rules

    • Enforce import/export over require/module.exports
    • Add rules for proper import ordering
    • Validate ESM syntax patterns
  2. Modern JavaScript features

    • Update to latest ECMAScript version support
    • Enable/configure rules for async/await, destructuring, etc.
    • Add rules for Node.js 20+ features (minimum version)
  3. Integration improvements

    • Ensure VS Code/IDE integration works properly
    • Add lint scripts for different file types
    • Consider adding eslint-plugin-import for better ESM support

Example additions to eslint.config.js

  {
    files: ["**/*.js"],
    languageOptions: {
      ecmaVersion: 2024,
      sourceType: "module"
    },
    rules: {
      "prefer-const": "error",
      "no-var": "error"
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions