Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: consolidate eslint config (#627)
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) - Upgrade `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` - 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. chore: remove @metamask/eslint-config-nodejs (#639) Closes #637 This removes the dep on `@metamask/eslint-config-nodejs` which has a peer dep on `@metamask/eslint-config`. `npm` will automatically install that module, and that module _itself_ has peer deps which may also conflict with our deps currently or in the future. Given `@metamask/eslint-config-nodejs` is _intended_ to be used with `@metamask/eslint-config`, we then must drop it. The ESLint config has been modified to extend both `eslint/recommended` and `eslint-plugin-n/recommended` configs. Extra rules were copied from `@metamask/eslint-config-nodejs`, but many (such as restrictions on browser-only globals) were not, since these can be trivially addressed by ESLint's `env` configuration (unsure what they are doing where this is a problem). Since this surfaced a whole lot of new issues--especially in test code and templates--additional overrides were necessary. Any rules which were removed from the main `rules` prop were likely already enabled in `eslint/recommended`. chore: lint everything
- Loading branch information