Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): remove @metamask/eslint-config-nodejs #639

Merged

Conversation

boneskull
Copy link
Contributor

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.

@boneskull boneskull force-pushed the boneskull/consolidate-eslint branch from fb5c7c7 to d71fb9f Compare August 1, 2023 18:30
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from da3d434 to f10548b Compare August 1, 2023 18:30
@boneskull boneskull force-pushed the boneskull/consolidate-eslint branch from d71fb9f to ca03621 Compare August 2, 2023 19:37
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from f10548b to 2656b19 Compare August 2, 2023 19:37
@boneskull boneskull force-pushed the boneskull/consolidate-eslint branch from ca03621 to d31f9eb Compare August 2, 2023 19:40
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from 2656b19 to 44a72eb Compare August 2, 2023 19:40
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from 44a72eb to e14a16b Compare August 10, 2023 21:57
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from e14a16b to 98f6de1 Compare August 10, 2023 22:03
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from 98f6de1 to 4f6c1ab Compare August 11, 2023 04:55
@boneskull boneskull self-assigned this Aug 11, 2023
@boneskull boneskull added the chore overhead, tests, dev env, etc. label Aug 15, 2023
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from 4f6c1ab to 0f3f25b Compare August 16, 2023 22:19
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`.
@boneskull boneskull force-pushed the boneskull/issue637-mm-eslint-node branch from 0f3f25b to 766d478 Compare August 16, 2023 22:33
@boneskull boneskull merged commit e30a3b1 into boneskull/consolidate-eslint Aug 17, 2023
7 checks passed
@boneskull boneskull deleted the boneskull/issue637-mm-eslint-node branch August 17, 2023 23:56
@boneskull boneskull restored the boneskull/issue637-mm-eslint-node branch August 22, 2023 22:59
boneskull added a commit that referenced this pull request Aug 22, 2023
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
boneskull added a commit to boneskull/LavaMoat that referenced this pull request Feb 6, 2024
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 (LavaMoat#639)

Closes LavaMoat#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
boneskull added a commit to boneskull/LavaMoat that referenced this pull request Feb 6, 2024
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 (LavaMoat#639)

Closes LavaMoat#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore overhead, tests, dev env, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants