File tree 6 files changed +8
-10
lines changed
6 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ $ npm install --save-dev eslint eslint-plugin-node
65
65
| Rule ID | Description | |
66
66
| :--------| :------------| :--:|
67
67
| [ node/no-callback-literal] ( ./docs/rules/no-callback-literal.md ) | ensure Node.js-style error-first callback pattern is followed | |
68
- | [ node/no-exports-assign] ( ./docs/rules/no-exports-assign.md ) | disallow the assignment to ` exports ` | |
68
+ | [ node/no-exports-assign] ( ./docs/rules/no-exports-assign.md ) | disallow the assignment to ` exports ` | ⭐️ |
69
69
| [ node/no-extraneous-import] ( ./docs/rules/no-extraneous-import.md ) | disallow ` import ` declarations which import extraneous modules | ⭐️ |
70
70
| [ node/no-extraneous-require] ( ./docs/rules/no-extraneous-require.md ) | disallow ` require() ` expressions which import extraneous modules | ⭐️ |
71
71
| [ node/no-missing-import] ( ./docs/rules/no-missing-import.md ) | disallow ` import ` declarations which import non-existence modules | ⭐️ |
Original file line number Diff line number Diff line change 1
1
# node/no-exports-assign
2
2
> disallow the assignment to ` exports `
3
+ > - ⭐️ This rule is included in ` plugin:node/recommended ` preset.
3
4
4
5
To assign to ` exports ` variable would not work as expected.
5
6
@@ -38,7 +39,6 @@ exports = module.exports = {}
38
39
exports = {}
39
40
```
40
41
41
-
42
42
## 🔎 Implementation
43
43
44
44
- [ Rule source] ( ../../lib/rules/no-exports-assign.js )
Original file line number Diff line number Diff line change @@ -59,9 +59,13 @@ module.exports = {
59
59
commonRules : {
60
60
"no-process-exit" : "error" ,
61
61
"node/no-deprecated-api" : "error" ,
62
+ "node/no-extraneous-import" : "error" ,
62
63
"node/no-extraneous-require" : "error" ,
64
+ "node/no-exports-assign" : "error" ,
65
+ "node/no-missing-import" : "error" ,
63
66
"node/no-missing-require" : "error" ,
64
67
"node/no-unpublished-bin" : "error" ,
68
+ "node/no-unpublished-import" : "error" ,
65
69
"node/no-unpublished-require" : "error" ,
66
70
"node/no-unsupported-features/es-builtins" : "error" ,
67
71
"node/no-unsupported-features/es-syntax" : "error" ,
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ module.exports = {
19
19
plugins : [ "node" ] ,
20
20
rules : {
21
21
...commonRules ,
22
- "node/no-extraneous-import" : "error" ,
23
- "node/no-missing-import" : "error" ,
24
- "node/no-unpublished-import" : "error" ,
25
22
"node/no-unsupported-features/es-syntax" : [
26
23
"error" ,
27
24
{ ignores : [ "modules" ] } ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
7
7
...commonGlobals ,
8
8
__dirname : "readonly" ,
9
9
__filename : "readonly" ,
10
- exports : "readonly " ,
10
+ exports : "writable " ,
11
11
module : "readonly" ,
12
12
require : "readonly" ,
13
13
} ,
@@ -19,9 +19,6 @@ module.exports = {
19
19
plugins : [ "node" ] ,
20
20
rules : {
21
21
...commonRules ,
22
- "node/no-extraneous-import" : "off" ,
23
- "node/no-missing-import" : "off" ,
24
- "node/no-unpublished-import" : "off" ,
25
22
"node/no-unsupported-features/es-syntax" : [ "error" , { ignores : [ ] } ] ,
26
23
} ,
27
24
}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ module.exports = {
39
39
docs : {
40
40
description : "disallow the assignment to `exports`" ,
41
41
category : "Possible Errors" ,
42
- recommended : false ,
42
+ recommended : true ,
43
43
url :
44
44
"https://github.com/mysticatea/eslint-plugin-node/blob/v9.2.0/docs/rules/no-exports-assign.md" ,
45
45
} ,
You can’t perform that action at this time.
0 commit comments