Skip to content

Commit

Permalink
Merge pull request #1 from heyyou3/replace-eslint-plugin-node
Browse files Browse the repository at this point in the history
Replace eslint-plugin-node to eslint-plugin-n.
  • Loading branch information
ryota-ka authored Apr 20, 2024
2 parents c6e1b19 + d2fe4ac commit 3dd125b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
7 changes: 7 additions & 0 deletions node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change log

## v0.4.0

### Breaking changes

- Replace [`eslint-plugin-node`](https://www.npmjs.com/package/eslint-plugin-node) to [`eslint-plugin-n`](https://www.npmjs.com/package/eslint-plugin-n)
- `eslint-plugin-node` project has been no longer maintained.

## v0.3.0

### Non-breaking changes
Expand Down
2 changes: 1 addition & 1 deletion node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Note that the following packages are peer dependencies of this library, which ne
| Package | Version |
| ------------------------------------------------------------------------ | ---------- |
| [`eslint`](https://www.npmjs.com/package/eslint) | `7 \|\| 8` |
| [`eslint-plugin-node`](https://www.npmjs.com/package/eslint-plugin-node) | `11` |
| [`eslint-plugin-n`](https://www.npmjs.com/package/eslint-plugin-n) | `14` |

### Using [npm](https://www.npmjs.com/)

Expand Down
34 changes: 17 additions & 17 deletions node/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
module.exports = {
extends: ['plugin:node/recommended'],
plugins: ['node'],
extends: ['plugin:n/recommended'],
plugins: ['n'],
rules: {
'no-process-exit': 'off', // deprecated in ESLint v7.0.0
'node/global-require': 'error',
'node/no-missing-import': 'off', // let TypeScript check it
'node/no-path-concat': 'error',
'node/no-process-exit': 'error',
'node/no-sync': 'error',
'node/no-unsupported-features/es-syntax': ['error', { ignores: ['modules'] }],
'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': 'error',
'node/prefer-global/url-search-params': 'error',
'node/prefer-promises/dns': 'error',
'node/prefer-promises/fs': 'error',
'n/global-require': 'error',
'n/no-missing-import': 'off', // let TypeScript check it
'n/no-path-concat': 'error',
'n/no-process-exit': 'error',
'n/no-sync': 'error',
'n/no-unsupported-features/es-syntax': ['error', { ignores: ['modules'] }],
'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': 'error',
'n/prefer-global/url-search-params': 'error',
'n/prefer-promises/dns': 'error',
'n/prefer-promises/fs': 'error',
},
};
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"homepage": "https://github.com/herp-inc/eslint-config",
"peerDependencies": {
"eslint": "7 || 8",
"eslint-plugin-node": "11"
"eslint-plugin-n": "14"
}
}

0 comments on commit 3dd125b

Please sign in to comment.