mdn / mdn/webextensions-examples

Update eslint, fix linting errors and integrate in CI

Open
#525 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement idle
Dominant language
JavaScript
Stars
4.5k
Forks
2.6k
Avg merge
15h 27m
Merged PRs (30d)
3

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review package.json and .eslintrc.json, then run npm install and npm test to inventory the current lint failures. Inspect the existing Travis CI setup before planning its GitHub Actions replacement. Done means modern ESLint support, resolved or intentionally suppressed warnings, passing npm test, and linting enforced in CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.