Skip to content

Commit

Permalink
chore: consolidate eslint config
Browse files Browse the repository at this point in the history
This change:

- Removes all `.eslintignore` , `.eslintrc` files or `package.json`-embedded config and replaces it with a single root `.eslintrc.js`
- Removes all lint-related scripts from all workspaces (including `depcheck`)
- Removes all dev deps on `eslint` and its ilk (and `ava`, since it will come from the workspace root)
- Upgrades `@metamask/eslint-config-nodejs`, `eslint`, `eslint-plugin-ava`, as well as other plugins used by specific packages; moves them all to workspace root
- Removes unused/deprecated `eslint-plugin-node` in lieu of `eslint-plugin-n`, which the new version of `@metamask/eslint-config-nodejs` needs
- Adds a prettier config (in case someone wants to use it; I'd like to add it to our workflow later)

I note that ESLint seemed to be misconfigured before this change; none of the rules specified in the root config were being checked.  This means that there are a whole lot of lint fixes that need to be made.

To lint, run `yarn lint` as before (which will also run `depcheck`) from the workspace root.  Likewise, `lint:fix` runs a fix, and `lint:depcheck` will use lerna to run `lint:depcheck` wherever it is defined.
  • Loading branch information
boneskull committed Aug 22, 2023
1 parent 2b1eb8e commit 4b5f6fc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"merge-deep": "^3.0.3"
},
"devDependencies": {
"ses": "^0.18.4",
"ses": "^0.18.7",
"tmp-promise": "^3.0.3"
},
"scripts": {
Expand Down

0 comments on commit 4b5f6fc

Please sign in to comment.