mdn / mdn/webextensions-examples
Update eslint, fix linting errors and integrate in CI
Nobody has claimed this yet.
- 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:
- 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 testis 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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