You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/file-extension-in-import.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# node/file-extension-in-import
1
+
# n/file-extension-in-import
2
2
> enforce the style of file extensions in `import` declarations
3
3
> - ✒️ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
4
4
@@ -23,7 +23,7 @@ This rule has a string option and an object option.
23
23
24
24
```json
25
25
{
26
-
"node/file-extension-in-import": [
26
+
"n/file-extension-in-import": [
27
27
"error",
28
28
"always"or "never",
29
29
{
@@ -44,15 +44,15 @@ This rule has a string option and an object option.
44
44
Examples of :-1:**incorrect** code for the `"always"` option:
Copy file name to clipboardExpand all lines: docs/rules/no-callback-literal.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# node/no-callback-literal
1
+
# n/no-callback-literal
2
2
> ensure Node.js-style error-first callback pattern is followed
3
3
4
4
When invoking a callback function which uses the Node.js error-first callback pattern, all of your errors should either use the `Error` class or a subclass of it. It is also acceptable to use `undefined` or `null` if there is no error.
@@ -10,7 +10,7 @@ When a function is named `cb` or `callback`, then it must be invoked with a firs
Copy file name to clipboardExpand all lines: docs/rules/no-exports-assign.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# node/no-exports-assign
1
+
# n/no-exports-assign
2
2
> disallow the assignment to `exports`
3
-
> - ⭐️ This rule is included in `plugin:node/recommended` preset.
3
+
> - ⭐️ This rule is included in `plugin:n/recommended` preset.
4
4
5
5
To assign to `exports` variable would not work as expected.
6
6
@@ -14,12 +14,12 @@ exports = {
14
14
15
15
## 📖 Rule Details
16
16
17
-
This rule is aimed at disallowing `exports = {}`, but allows `module.exports = exports = {}` to avoid conflict with [node/exports-style](./exports-style.md) rule's `allowBatchAssign` option.
17
+
This rule is aimed at disallowing `exports = {}`, but allows `module.exports = exports = {}` to avoid conflict with [n/exports-style](./exports-style.md) rule's `allowBatchAssign` option.
Copy file name to clipboardExpand all lines: docs/rules/no-extraneous-import.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# node/no-extraneous-import
1
+
# n/no-extraneous-import
2
2
> disallow `import` declarations which import extraneous modules
3
-
> - ⭐️ This rule is included in `plugin:node/recommended` preset.
3
+
> - ⭐️ This rule is included in `plugin:n/recommended` preset.
4
4
5
5
If an `import` declaration's source is extraneous (it's not written in `package.json`), the program works in local, but will not work after dependencies are re-installed. It will cause troubles to your team/contributors.
6
6
This rule disallows `import` declarations of extraneous modules.
@@ -14,7 +14,7 @@ This rule warns `import` declarations of extraneous modules.
14
14
```json
15
15
{
16
16
"rules": {
17
-
"node/no-extraneous-import": ["error", {
17
+
"n/no-extraneous-import": ["error", {
18
18
"allowModules": [],
19
19
"resolvePaths": [],
20
20
"tryExtensions": []
@@ -34,7 +34,7 @@ This option is an array of strings as module names.
0 commit comments