Skip to content

Reconsider enforing arrow functions everywhere #23

@spike-rabbit

Description

@spike-rabbit

We currently have https://www.npmjs.com/package/eslint-plugin-prefer-arrow configured which enforces the use of arrow functions everywhere. (This rule also appears to be unmaintained)

Enforcing this for anonymous functions and in cases where this is used makes sense as this avoids potential errors.

But in all other cases it is pointless and potentially even worsens code quality. See https://github.com/siemens/ngx-datatable/pull/283/files for the impact on the datatable.

There is an alternative eslint-rule available that covers the relevant cases mentioned above: https://eslint.org/docs/latest/rules/prefer-arrow-callback .

We should switch to this rule.

Any options?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions