Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#4878 closed change (fixed)

Start using ESLint for adblockpluscore repository

Reported by: kzar Assignee: kzar
Priority: Unknown Milestone:
Module: Unknown Keywords:
Cc: trev Blocked By: #3692
Blocking: #5061 Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Background

With #3692 we're adding a base ESLint configuration to the buildtools repository. Once that is finished we want to start using the configuration for the adblockpluscore repository.

What to change

  • Add a ESLint configuration to adblockpluscore which inherits from our base configuration:
    {
      "extends": "eslint-config-eyeo",
      "root": true,
      ...
    }
    
  • If necessary add an ESLint ignore file to ignore third party libraries such as jQuery.
  • Make the necessary changes to the adblockpluscore code so that linting passes.
  • Add a note to the README explaining how to lint the code (eslint *.js chrome lib test).

Notes

  • Since we're now using String.prototype.includes we'll need to bump the minimum Firefox version to 40 when we update the adblockpluscore dependency to include these changes.
  • We've changes Cu.import calls to use the alternative syntax, this will require changes in the adblockpluschrome compat code. For example Cu.import("resource://gre/modules/XPCOMUtils.jsm"); becomes const {XPCOMUtils} = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {});.

Change History (6)

comment:1 Changed 3 years ago by kzar

  • Description modified (diff)

comment:2 Changed 2 years ago by kzar

  • Description modified (diff)

comment:3 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 4878 - Start using ESLint for adblockpluscore

comment:4 Changed 2 years ago by kzar

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 2 years ago by kzar

  • Description modified (diff)

comment:6 Changed 2 years ago by kzar

  • Blocking 5061 added
Note: See TracTickets for help on using tickets.