Skip to content

Commit b129713

Browse files
committed
docs: update pkgname in readme
1 parent 508479d commit b129713

File tree

1 file changed

+62
-62
lines changed

1 file changed

+62
-62
lines changed

README.md

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
# eslint-plugin-n
22

3-
> forked from [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node) v11.1.0. as the original repository seems [unmaintained](https://github.com/mysticatea/eslint-plugin-node/issues/300).
3+
> forked from [eslint-plugin-node](https://www.npmjs.com/package/eslint-plugin-node) v11.1.0. as the original repository seems [no longer maintained](https://github.com/mysticatea/eslint-plugin-node/issues/300).
44
5-
[![npm version](https://img.shields.io/npm/v/eslint-plugin-node.svg)](https://www.npmjs.com/package/eslint-plugin-node)
6-
[![Downloads/month](https://img.shields.io/npm/dm/eslint-plugin-node.svg)](http://www.npmtrends.com/eslint-plugin-node)
7-
[![Build Status](https://github.com/mysticatea/eslint-plugin-node/workflows/CI/badge.svg)](https://github.com/mysticatea/eslint-plugin-node/actions)
8-
[![Coverage Status](https://codecov.io/gh/mysticatea/eslint-plugin-node/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/eslint-plugin-node)
9-
[![Dependency Status](https://david-dm.org/mysticatea/eslint-plugin-node.svg)](https://david-dm.org/mysticatea/eslint-plugin-node)
5+
[![npm version](https://img.shields.io/npm/v/eslint-plugin-n.svg)](https://www.npmjs.com/package/eslint-plugin-n)
6+
[![Downloads/month](https://img.shields.io/npm/dm/eslint-plugin-n.svg)](http://www.npmtrends.com/eslint-plugin-n)
7+
[![Build Status](https://github.com/weiran-zsd/eslint-plugin-node/workflows/CI/badge.svg)](https://github.com/weiran-zsd/eslint-plugin-node/actions)
8+
[![Coverage Status](https://codecov.io/gh/weiran-zsd/eslint-plugin-node/branch/master/graph/badge.svg)](https://codecov.io/gh/weiran-zsd/eslint-plugin-node)
9+
[![Dependency Status](https://david-dm.org/weiran-zsd/eslint-plugin-node.svg)](https://david-dm.org/weiran-zsd/eslint-plugin-node)
1010

1111
Additional ESLint's rules for Node.js
1212

1313
## 💿 Install & Usage
1414

1515
```
16-
$ npm install --save-dev eslint eslint-plugin-node
16+
$ npm install --save-dev eslint eslint-plugin-n
1717
```
1818

1919
- Requires Node.js `>=8.10.0`
2020
- Requires ESLint `>=5.16.0`
2121

22-
**Note:** It recommends a use of [the "engines" field of package.json](https://docs.npmjs.com/files/package.json#engines). The "engines" field is used by `node/no-unsupported-features/*` rules.
22+
**Note:** It recommends a use of [the "engines" field of package.json](https://docs.npmjs.com/files/package.json#engines). The "engines" field is used by `n/no-unsupported-features/*` rules.
2323

2424
**.eslintrc.json** (An example)
2525

2626
```jsonc
2727
{
2828
"extends": [
2929
"eslint:recommended",
30-
"plugin:node/recommended"
30+
"plugin:n/recommended"
3131
],
3232
"parserOptions": {
3333
// Only ESLint 6.2.0 and later support ES2020.
3434
"ecmaVersion": 2020
3535
},
3636
"rules": {
37-
"node/exports-style": ["error", "module.exports"],
38-
"node/file-extension-in-import": ["error", "always"],
39-
"node/prefer-global/buffer": ["error", "always"],
40-
"node/prefer-global/console": ["error", "always"],
41-
"node/prefer-global/process": ["error", "always"],
42-
"node/prefer-global/url-search-params": ["error", "always"],
43-
"node/prefer-global/url": ["error", "always"],
44-
"node/prefer-promises/dns": "error",
45-
"node/prefer-promises/fs": "error"
37+
"n/exports-style": ["error", "module.exports"],
38+
"n/file-extension-in-import": ["error", "always"],
39+
"n/prefer-global/buffer": ["error", "always"],
40+
"n/prefer-global/console": ["error", "always"],
41+
"n/prefer-global/process": ["error", "always"],
42+
"n/prefer-global/url-search-params": ["error", "always"],
43+
"n/prefer-global/url": ["error", "always"],
44+
"n/prefer-promises/dns": "error",
45+
"n/prefer-promises/fs": "error"
4646
}
4747
}
4848
```
@@ -70,72 +70,72 @@ $ npm install --save-dev eslint eslint-plugin-node
7070

7171
| Rule ID | Description | |
7272
|:--------|:------------|:--:|
73-
| [node/handle-callback-err](./docs/rules/handle-callback-err.md) | require error handling in callbacks | |
74-
| [node/no-callback-literal](./docs/rules/no-callback-literal.md) | ensure Node.js-style error-first callback pattern is followed | |
75-
| [node/no-exports-assign](./docs/rules/no-exports-assign.md) | disallow the assignment to `exports` | ⭐️ |
76-
| [node/no-extraneous-import](./docs/rules/no-extraneous-import.md) | disallow `import` declarations which import extraneous modules | ⭐️ |
77-
| [node/no-extraneous-require](./docs/rules/no-extraneous-require.md) | disallow `require()` expressions which import extraneous modules | ⭐️ |
78-
| [node/no-missing-import](./docs/rules/no-missing-import.md) | disallow `import` declarations which import non-existence modules | ⭐️ |
79-
| [node/no-missing-require](./docs/rules/no-missing-require.md) | disallow `require()` expressions which import non-existence modules | ⭐️ |
80-
| [node/no-new-require](./docs/rules/no-new-require.md) | disallow `new` operators with calls to `require` | |
81-
| [node/no-path-concat](./docs/rules/no-path-concat.md) | disallow string concatenation with `__dirname` and `__filename` | |
82-
| [node/no-process-exit](./docs/rules/no-process-exit.md) | disallow the use of `process.exit()` | |
83-
| [node/no-unpublished-bin](./docs/rules/no-unpublished-bin.md) | disallow `bin` files that npm ignores | ⭐️ |
84-
| [node/no-unpublished-import](./docs/rules/no-unpublished-import.md) | disallow `import` declarations which import private modules | ⭐️ |
85-
| [node/no-unpublished-require](./docs/rules/no-unpublished-require.md) | disallow `require()` expressions which import private modules | ⭐️ |
86-
| [node/no-unsupported-features/es-builtins](./docs/rules/no-unsupported-features/es-builtins.md) | disallow unsupported ECMAScript built-ins on the specified version | ⭐️ |
87-
| [node/no-unsupported-features/es-syntax](./docs/rules/no-unsupported-features/es-syntax.md) | disallow unsupported ECMAScript syntax on the specified version | ⭐️ |
88-
| [node/no-unsupported-features/node-builtins](./docs/rules/no-unsupported-features/node-builtins.md) | disallow unsupported Node.js built-in APIs on the specified version | ⭐️ |
89-
| [node/process-exit-as-throw](./docs/rules/process-exit-as-throw.md) | make `process.exit()` expressions the same code path as `throw` | ⭐️ |
90-
| [node/shebang](./docs/rules/shebang.md) | suggest correct usage of shebang | ⭐️✒️ |
73+
| [n/handle-callback-err](./docs/rules/handle-callback-err.md) | require error handling in callbacks | |
74+
| [n/no-callback-literal](./docs/rules/no-callback-literal.md) | ensure Node.js-style error-first callback pattern is followed | |
75+
| [n/no-exports-assign](./docs/rules/no-exports-assign.md) | disallow the assignment to `exports` | ⭐️ |
76+
| [n/no-extraneous-import](./docs/rules/no-extraneous-import.md) | disallow `import` declarations which import extraneous modules | ⭐️ |
77+
| [n/no-extraneous-require](./docs/rules/no-extraneous-require.md) | disallow `require()` expressions which import extraneous modules | ⭐️ |
78+
| [n/no-missing-import](./docs/rules/no-missing-import.md) | disallow `import` declarations which import non-existence modules | ⭐️ |
79+
| [n/no-missing-require](./docs/rules/no-missing-require.md) | disallow `require()` expressions which import non-existence modules | ⭐️ |
80+
| [n/no-new-require](./docs/rules/no-new-require.md) | disallow `new` operators with calls to `require` | |
81+
| [n/no-path-concat](./docs/rules/no-path-concat.md) | disallow string concatenation with `__dirname` and `__filename` | |
82+
| [n/no-process-exit](./docs/rules/no-process-exit.md) | disallow the use of `process.exit()` | |
83+
| [n/no-unpublished-bin](./docs/rules/no-unpublished-bin.md) | disallow `bin` files that npm ignores | ⭐️ |
84+
| [n/no-unpublished-import](./docs/rules/no-unpublished-import.md) | disallow `import` declarations which import private modules | ⭐️ |
85+
| [n/no-unpublished-require](./docs/rules/no-unpublished-require.md) | disallow `require()` expressions which import private modules | ⭐️ |
86+
| [n/no-unsupported-features/es-builtins](./docs/rules/no-unsupported-features/es-builtins.md) | disallow unsupported ECMAScript built-ins on the specified version | ⭐️ |
87+
| [n/no-unsupported-features/es-syntax](./docs/rules/no-unsupported-features/es-syntax.md) | disallow unsupported ECMAScript syntax on the specified version | ⭐️ |
88+
| [n/no-unsupported-features/node-builtins](./docs/rules/no-unsupported-features/node-builtins.md) | disallow unsupported Node.js built-in APIs on the specified version | ⭐️ |
89+
| [n/process-exit-as-throw](./docs/rules/process-exit-as-throw.md) | make `process.exit()` expressions the same code path as `throw` | ⭐️ |
90+
| [n/shebang](./docs/rules/shebang.md) | suggest correct usage of shebang | ⭐️✒️ |
9191

9292
### Best Practices
9393

9494
| Rule ID | Description | |
9595
|:--------|:------------|:--:|
96-
| [node/no-deprecated-api](./docs/rules/no-deprecated-api.md) | disallow deprecated APIs | ⭐️ |
96+
| [n/no-deprecated-api](./docs/rules/no-deprecated-api.md) | disallow deprecated APIs | ⭐️ |
9797

9898
### Stylistic Issues
9999

100100
| Rule ID | Description | |
101101
|:--------|:------------|:--:|
102-
| [node/callback-return](./docs/rules/callback-return.md) | require `return` statements after callbacks | |
103-
| [node/exports-style](./docs/rules/exports-style.md) | enforce either `module.exports` or `exports` | |
104-
| [node/file-extension-in-import](./docs/rules/file-extension-in-import.md) | enforce the style of file extensions in `import` declarations | ✒️ |
105-
| [node/global-require](./docs/rules/global-require.md) | require `require()` calls to be placed at top-level module scope | |
106-
| [node/no-mixed-requires](./docs/rules/no-mixed-requires.md) | disallow `require` calls to be mixed with regular variable declarations | |
107-
| [node/no-process-env](./docs/rules/no-process-env.md) | disallow the use of `process.env` | |
108-
| [node/no-restricted-import](./docs/rules/no-restricted-import.md) | disallow specified modules when loaded by `import` declarations | |
109-
| [node/no-restricted-require](./docs/rules/no-restricted-require.md) | disallow specified modules when loaded by `require` | |
110-
| [node/no-sync](./docs/rules/no-sync.md) | disallow synchronous methods | |
111-
| [node/prefer-global/buffer](./docs/rules/prefer-global/buffer.md) | enforce either `Buffer` or `require("buffer").Buffer` | |
112-
| [node/prefer-global/console](./docs/rules/prefer-global/console.md) | enforce either `console` or `require("console")` | |
113-
| [node/prefer-global/process](./docs/rules/prefer-global/process.md) | enforce either `process` or `require("process")` | |
114-
| [node/prefer-global/text-decoder](./docs/rules/prefer-global/text-decoder.md) | enforce either `TextDecoder` or `require("util").TextDecoder` | |
115-
| [node/prefer-global/text-encoder](./docs/rules/prefer-global/text-encoder.md) | enforce either `TextEncoder` or `require("util").TextEncoder` | |
116-
| [node/prefer-global/url-search-params](./docs/rules/prefer-global/url-search-params.md) | enforce either `URLSearchParams` or `require("url").URLSearchParams` | |
117-
| [node/prefer-global/url](./docs/rules/prefer-global/url.md) | enforce either `URL` or `require("url").URL` | |
118-
| [node/prefer-promises/dns](./docs/rules/prefer-promises/dns.md) | enforce `require("dns").promises` | |
119-
| [node/prefer-promises/fs](./docs/rules/prefer-promises/fs.md) | enforce `require("fs").promises` | |
102+
| [n/callback-return](./docs/rules/callback-return.md) | require `return` statements after callbacks | |
103+
| [n/exports-style](./docs/rules/exports-style.md) | enforce either `module.exports` or `exports` | |
104+
| [n/file-extension-in-import](./docs/rules/file-extension-in-import.md) | enforce the style of file extensions in `import` declarations | ✒️ |
105+
| [n/global-require](./docs/rules/global-require.md) | require `require()` calls to be placed at top-level module scope | |
106+
| [n/no-mixed-requires](./docs/rules/no-mixed-requires.md) | disallow `require` calls to be mixed with regular variable declarations | |
107+
| [n/no-process-env](./docs/rules/no-process-env.md) | disallow the use of `process.env` | |
108+
| [n/no-restricted-import](./docs/rules/no-restricted-import.md) | disallow specified modules when loaded by `import` declarations | |
109+
| [n/no-restricted-require](./docs/rules/no-restricted-require.md) | disallow specified modules when loaded by `require` | |
110+
| [n/no-sync](./docs/rules/no-sync.md) | disallow synchronous methods | |
111+
| [n/prefer-global/buffer](./docs/rules/prefer-global/buffer.md) | enforce either `Buffer` or `require("buffer").Buffer` | |
112+
| [n/prefer-global/console](./docs/rules/prefer-global/console.md) | enforce either `console` or `require("console")` | |
113+
| [n/prefer-global/process](./docs/rules/prefer-global/process.md) | enforce either `process` or `require("process")` | |
114+
| [n/prefer-global/text-decoder](./docs/rules/prefer-global/text-decoder.md) | enforce either `TextDecoder` or `require("util").TextDecoder` | |
115+
| [n/prefer-global/text-encoder](./docs/rules/prefer-global/text-encoder.md) | enforce either `TextEncoder` or `require("util").TextEncoder` | |
116+
| [n/prefer-global/url-search-params](./docs/rules/prefer-global/url-search-params.md) | enforce either `URLSearchParams` or `require("url").URLSearchParams` | |
117+
| [n/prefer-global/url](./docs/rules/prefer-global/url.md) | enforce either `URL` or `require("url").URL` | |
118+
| [n/prefer-promises/dns](./docs/rules/prefer-promises/dns.md) | enforce `require("dns").promises` | |
119+
| [n/prefer-promises/fs](./docs/rules/prefer-promises/fs.md) | enforce `require("fs").promises` | |
120120

121121
### Deprecated rules
122122

123123
These rules have been deprecated in accordance with the [deprecation policy](https://eslint.org/docs/user-guide/rule-deprecation), and replaced by newer rules:
124124

125125
| Rule ID | Replaced by |
126126
|:--------|:------------|
127-
| [node/no-hide-core-modules](./docs/rules/no-hide-core-modules.md) | (nothing) |
128-
| [node/no-unsupported-features](./docs/rules/no-unsupported-features.md) | [node/no-unsupported-features/es-syntax](./docs/rules/no-unsupported-features/es-syntax.md) and [node/no-unsupported-features/es-builtins](./docs/rules/no-unsupported-features/es-builtins.md) |
127+
| [n/no-hide-core-modules](./docs/rules/no-hide-core-modules.md) | (nothing) |
128+
| [n/no-unsupported-features](./docs/rules/no-unsupported-features.md) | [n/no-unsupported-features/es-syntax](./docs/rules/no-unsupported-features/es-syntax.md) and [n/no-unsupported-features/es-builtins](./docs/rules/no-unsupported-features/es-builtins.md) |
129129

130130
<!--RULES_TABLE_END-->
131131

132132
## 🔧 Configs
133133

134134
This plugin provides three configs:
135135

136-
- `plugin:node/recommended` considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS.
137-
- `plugin:node/recommended-module` considers all files as ES Modules.
138-
- `plugin:node/recommended-script` considers all files as CommonJS.
136+
- `plugin:n/recommended` considers both CommonJS and ES Modules. If [`"type":"module"` field](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff#b023) existed in package.json then it considers files as ES Modules. Otherwise it considers files as CommonJS. In addition, it considers `*.mjs` files as ES Modules and `*.cjs` files as CommonJS.
137+
- `plugin:n/recommended-module` considers all files as ES Modules.
138+
- `plugin:n/recommended-script` considers all files as CommonJS.
139139

140140
Those preset config:
141141

@@ -152,7 +152,7 @@ Those preset config:
152152

153153
## 🚥 Semantic Versioning Policy
154154

155-
`eslint-plugin-node` follows [semantic versioning](http://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
155+
`eslint-plugin-n` follows [semantic versioning](http://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
156156

157157
- Patch release (intended to not break your lint build)
158158
- A bug fix in a rule that results in it reporting fewer errors.
@@ -174,7 +174,7 @@ Those preset config:
174174

175175
## 📰 Changelog
176176

177-
- [GitHub Releases](https://github.com/mysticatea/eslint-plugin-node/releases)
177+
- [GitHub Releases](https://github.com/weiran-zsd/eslint-plugin-n/releases)
178178

179179
## ❤️ Contributing
180180

0 commit comments

Comments
 (0)