Socket
Socket
Sign inDemoInstall

@metamask/eslint-config-nodejs

Package Overview
Dependencies
Maintainers
9
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@metamask/eslint-config-nodejs - npm Package Compare versions

Comparing version 9.0.0 to 12.0.0

src/environment.json

45

CHANGELOG.md

@@ -9,7 +9,41 @@ # Changelog

## [12.0.0]
### Changed
- **BREAKING:** Update peer dependency `@metamask/eslint-config` to v12
- **BREAKING:** Replace `eslint-plugin-node` with `eslint-plugin-n` ([#297](https://github.com/MetaMask/eslint-config/pull/297))
## [11.1.0]
### Changed
- Exclude test files from package ([#266](https://github.com/MetaMask/eslint-config/pull/266))
## [11.0.1]
### Fixed
- Disable import/no-nodejs-modules in Node.js config ([#257](https://github.com/MetaMask/eslint-config/pull/257))
- This rule was added to the base config, but we accidentally forgot to disable it here.
## [11.0.0]
### Changed
- **BREAKING:** Remove no-undef in favour of custom environments configuration ([#254](https://github.com/MetaMask/eslint-config/pull/254))
- This config now only allows globals that are available in Node.js.
- **BREAKING:** Bump all ESLint dependencies to the latest version ([#252](https://github.com/MetaMask/eslint-config/pull/252))
- This includes peer dependencies.
## [10.0.0]
### Changed
- **BREAKING:** Update ESLint from v7 to v8 ([#233](https://github.com/MetaMask/eslint-config/pull/233))
- This is breaking because `eslint` is a `peerDependency`.
- Four new rules have been added:
- [`no-loss-of-precision`](https://eslint.org/docs/latest/rules/no-loss-of-precision)
- [`no-nonoctal-decimal-escape`](https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape)
- [`no-unsafe-optional-chaining`](https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining)
- [`no-useless-backreference`](https://eslint.org/docs/latest/rules/no-useless-backreference)
- **BREAKING:** Update minimium Node.js version to v14 ([#225](https://github.com/MetaMask/eslint-config/pull/225))
## [9.0.0]
### Added
- **BREAKING** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203))
- **BREAKING:** Add JSDoc ESLint rules ([#203](https://github.com/MetaMask/eslint-config/pull/203))
## [8.0.0]
### Changed
- **BREAKING:** The peer dependency `@metamask/eslint-config` has been updated from v7 to v8.

@@ -34,3 +68,3 @@ ## [7.0.1]

### Changed
- **(BREAKING)** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144))
- **BREAKING:** Set minimum Node.js version to `^12.0.0` ([#144](https://github.com/MetaMask/eslint-config/pull/144))
- Publish this config as its own package ([#141](https://github.com/MetaMask/eslint-config/pull/141))

@@ -42,3 +76,8 @@ - The contents of this package were previously published as part of [`@metamask/eslint-config`](https://npmjs.com/package/@metamask/eslint-config).

[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...HEAD
[Unreleased]: https://github.com/MetaMask/eslint-config/compare/v12.0.0...HEAD
[12.0.0]: https://github.com/MetaMask/eslint-config/compare/v11.1.0...v12.0.0
[11.1.0]: https://github.com/MetaMask/eslint-config/compare/v11.0.1...v11.1.0
[11.0.1]: https://github.com/MetaMask/eslint-config/compare/v11.0.0...v11.0.1
[11.0.0]: https://github.com/MetaMask/eslint-config/compare/v10.0.0...v11.0.0
[10.0.0]: https://github.com/MetaMask/eslint-config/compare/v9.0.0...v10.0.0
[9.0.0]: https://github.com/MetaMask/eslint-config/compare/v8.0.0...v9.0.0

@@ -45,0 +84,0 @@ [8.0.0]: https://github.com/MetaMask/eslint-config/compare/v7.0.1...v8.0.0

58

package.json
{
"name": "@metamask/eslint-config-nodejs",
"version": "9.0.0",
"version": "12.0.0",
"description": "Shareable MetaMask ESLint config for Node.js.",
"main": "src/index.js",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
"homepage": "https://github.com/MetaMask/eslint-config#readme",
"bugs": {
"url": "https://github.com/MetaMask/eslint-config/issues"
},
"files": [
"src/"
],
"engines": {
"node": ">=12.0.0"
},
"scripts": {
"test": "eslint .",
"publish": "npm publish"
},
"repository": {

@@ -25,16 +14,35 @@ "type": "git",

"license": "MIT",
"bugs": {
"url": "https://github.com/MetaMask/eslint-config/issues"
"main": "src/index.js",
"files": [
"src/",
"!src/**/*.test.js"
],
"scripts": {
"lint:changelog": "auto-changelog validate",
"publish": "npm publish",
"test": "eslint ."
},
"homepage": "https://github.com/MetaMask/eslint-config#readme",
"devDependencies": {
"@metamask/eslint-config": "^9.0.0",
"eslint": "^7.23.0",
"eslint-plugin-node": "^11.1.0"
"@metamask/auto-changelog": "^3.0.0",
"@metamask/eslint-config": "^12.0.0",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.6.2",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.7.1"
},
"peerDependencies": {
"@metamask/eslint-config": "^9.0.0",
"eslint": "^7.23.0",
"eslint-plugin-node": "^11.1.0"
"@metamask/eslint-config": "^12.0.0",
"eslint": "^8.27.0",
"eslint-plugin-n": "^15.7.0"
},
"engines": {
"node": ">=14.0.0"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
}

@@ -9,12 +9,12 @@ # `@metamask/eslint-config-nodejs`

yarn add --dev \
@metamask/eslint-config@^9.0.0 \
@metamask/eslint-config-nodejs@^9.0.0 \
eslint@^7.23.0 \
eslint-config-prettier@^8.1.0 \
eslint-plugin-import@^2.22.1 \
eslint-plugin-jsdoc@^36.1.0 \
eslint-plugin-node@^11.1.0 \
eslint-plugin-prettier@^3.3.1 \
prettier@^2.2.1
@metamask/eslint-config@^12.0.0 \
@metamask/eslint-config-nodejs@^12.0.0 \
eslint@^8.27.0 \
eslint-config-prettier@^8.5.0 \
eslint-plugin-import@^2.26.0 \
eslint-plugin-jsdoc@^39.6.2 \
eslint-plugin-n@^15.7.0 \
eslint-plugin-prettier@^4.2.1 \
eslint-plugin-promise@^6.1.1 \
prettier@^2.7.1
```

@@ -21,0 +21,0 @@

@@ -0,3 +1,5 @@

const environmentRules = require('./environment.json');
module.exports = {
plugins: ['node'],
plugins: ['n'],

@@ -19,38 +21,39 @@ env: {

extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
rules: {
...environmentRules,
// Possible Errors
'node/handle-callback-err': ['error', '^(err|error)$'],
'node/no-callback-literal': 'error',
'node/no-missing-import': 'off', // Duplicates `import/no-unresolved`
'node/no-missing-require': 'off', // Duplicates `import/no-unresolved`
'node/no-new-require': 'error',
'node/no-path-concat': 'error',
'node/no-process-exit': 'error',
'node/no-unsupported-features/es-syntax': 'off',
'n/handle-callback-err': ['error', '^(err|error)$'],
'n/no-callback-literal': 'error',
'n/no-missing-import': 'off', // Duplicates `import/no-unresolved`
'n/no-missing-require': 'off', // Duplicates `import/no-unresolved`
'n/no-new-require': 'error',
'n/no-path-concat': 'error',
'n/no-unsupported-features/es-syntax': 'off',
// Stylistic rules
'node/callback-return': 'error',
'node/exports-style': 'error',
'node/global-require': 'error',
'node/no-mixed-requires': 'error',
'node/no-process-env': 'error',
'node/no-restricted-import': 'error',
'node/no-restricted-require': 'error',
'node/no-sync': 'error',
'node/prefer-global/buffer': 'error',
'node/prefer-global/console': 'error',
'node/prefer-global/process': 'error',
'node/prefer-global/text-decoder': 'error',
'node/prefer-global/text-encoder': 'error',
'node/prefer-global/url-search-params': 'error',
'node/prefer-global/url': 'error',
'node/prefer-promises/dns': 'error',
'node/prefer-promises/fs': 'error',
'n/callback-return': 'error',
'n/exports-style': 'error',
'n/global-require': 'error',
'n/no-mixed-requires': 'error',
'n/no-process-env': 'error',
'n/no-restricted-import': 'error',
'n/no-restricted-require': 'error',
'n/no-sync': 'error',
'n/prefer-global/buffer': 'error',
'n/prefer-global/console': 'error',
'n/prefer-global/process': 'error',
'n/prefer-global/text-decoder': 'error',
'n/prefer-global/text-encoder': 'error',
'n/prefer-global/url-search-params': 'error',
'n/prefer-global/url': 'error',
'n/prefer-promises/dns': 'error',
'n/prefer-promises/fs': 'error',
// Deprecated eslint core rule, erroneously enabled by recommended Node rules
// https://eslint.org/docs/rules/no-process-exit
'no-process-exit': 'off',
// Enabled in the base config, but this should be allowed in Node.js
// projects.
'import/no-nodejs-modules': 'off',
},
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc