webextensions-examples icon indicating copy to clipboard operation
webextensions-examples copied to clipboard

Update eslint, fix linting errors and integrate in CI

Open Rob--W opened this issue 2 years ago • 0 comments

This repo has an .eslintrc, added in #244: https://github.com/mdn/webextensions-examples/blob/main/.eslintrc.json

... but it is stuck in 2017 and it doesn't appear to be enforced (evidenced by the plenty of failures when I run the following from the root of the repo:

npm install
npm test   # this is equivalent to: ./node_modules/.bin/eslintrc .

eslint used to be run in CI, but for some unknown reason it was dropped in #259. We should re-enable CI. Move to Github Actions instead of Travis CI, because Travis CI is no longer free and most mdn/Mozilla projects have switched already.

Task list:

  • [ ] Update eslint to latest version, by bumping: https://github.com/mdn/webextensions-examples/blob/9433f842d6295db366c399df752332d78a9cc859/package.json#L7
  • [ ] Update .eslintrc to support modern syntax and APIs.
  • [ ] Resolve or suppress linter warnings when npm test is run.
  • [ ] Replace the Travis with Github actions: https://docs.github.com/en/actions/migrating-to-github-actions/manual-migrations/migrating-from-travis-ci-to-github-actions

Rob--W avatar May 16 '23 12:05 Rob--W