PrestaShop/PrestaShop

Improve eslint disabled lines

开放

#27,979 创建于 2022年3月19日

 (4 条评论) (0 个反应) (0 位负责人)PHP (4,734 个派生)batch import
BODeveloper FeatureFront-endGood first issueHacktoberfestImprovementReady

仓库指标

星标
 (7,621 个星标)
PR 合并指标
 (平均合并 26天 17小时) (30 天内合并 116 个 PR)

描述

Prerequisites

Is your feature request related to a problem?

Actually, there are 59 fully ESLint disabled lines

We can improve it by making it more specific to the error we need to disable

Describe the solution you'd like

Before: // eslint-disable-next-line

After: // eslint-disable-next-line max-len

Disabling every rules is a wrong practice because it's hiding some others errors that could be important to know

This work can be separated into multiple batches:

Back-office

  • Default
  • New theme

Front-office

  • Classic
  • Hummingbird

Alternatives you've considered

No response

Additional context

Acceptance Criteria

  • Verify that the line is forced to be disabled because sometime the line could be disabled without any real reasons
  • If it's the case, just ignore the specific rule instead of disabling every ESLint errors

Do you plan to work on this feature?

  • I'm willing to contribute a formal specification.
  • I'm willing to provide any wireframes or design assets required for this feature.
  • I'm willing to submit a Pull Request that implements this feature.
  • I'm willing to help verify that the implemented feature works as intended and produces no unintended side effects.

贡献者指南