File tree Expand file tree Collapse file tree 6 files changed +8
-10
lines changed Expand file tree Collapse file tree 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
6565|  Rule ID |  Description |     | 
6666| :--------| :------------| :--:| 
6767|  [ 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 `  |  ⭐️  | 
6969|  [ node/no-extraneous-import] ( ./docs/rules/no-extraneous-import.md )  |  disallow ` import `  declarations which import extraneous modules |  ⭐️ | 
7070|  [ node/no-extraneous-require] ( ./docs/rules/no-extraneous-require.md )  |  disallow ` require() `  expressions which import extraneous modules |  ⭐️ | 
7171|  [ 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 11# node/no-exports-assign  
22>  disallow the assignment to ` exports ` 
3+ >  -  ⭐️ This rule is included in ` plugin:node/recommended `  preset.
34
45To assign to ` exports `  variable would not work as expected.
56
@@ -38,7 +39,6 @@ exports = module.exports = {}
3839exports  =  {}
3940``` 
4041
41- 
4242## 🔎 Implementation  
4343
4444-  [ Rule source] ( ../../lib/rules/no-exports-assign.js ) 
Original file line number Diff line number Diff line change @@ -59,9 +59,13 @@ module.exports = {
5959    commonRules : { 
6060        "no-process-exit" : "error" , 
6161        "node/no-deprecated-api" : "error" , 
62+         "node/no-extraneous-import" : "error" , 
6263        "node/no-extraneous-require" : "error" , 
64+         "node/no-exports-assign" : "error" , 
65+         "node/no-missing-import" : "error" , 
6366        "node/no-missing-require" : "error" , 
6467        "node/no-unpublished-bin" : "error" , 
68+         "node/no-unpublished-import" : "error" , 
6569        "node/no-unpublished-require" : "error" , 
6670        "node/no-unsupported-features/es-builtins" : "error" , 
6771        "node/no-unsupported-features/es-syntax" : "error" , 
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ module.exports = {
1919    plugins : [ "node" ] , 
2020    rules : { 
2121        ...commonRules , 
22-         "node/no-extraneous-import" : "error" , 
23-         "node/no-missing-import" : "error" , 
24-         "node/no-unpublished-import" : "error" , 
2522        "node/no-unsupported-features/es-syntax" : [ 
2623            "error" , 
2724            {  ignores : [ "modules" ]  } , 
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module.exports = {
77        ...commonGlobals , 
88        __dirname : "readonly" , 
99        __filename : "readonly" , 
10-         exports : "readonly " , 
10+         exports : "writable " , 
1111        module : "readonly" , 
1212        require : "readonly" , 
1313    } , 
@@ -19,9 +19,6 @@ module.exports = {
1919    plugins : [ "node" ] , 
2020    rules : { 
2121        ...commonRules , 
22-         "node/no-extraneous-import" : "off" , 
23-         "node/no-missing-import" : "off" , 
24-         "node/no-unpublished-import" : "off" , 
2522        "node/no-unsupported-features/es-syntax" : [ "error" ,  {  ignores : [ ]  } ] , 
2623    } , 
2724} 
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ module.exports = {
3939        docs : { 
4040            description : "disallow the assignment to `exports`" , 
4141            category : "Possible Errors" , 
42-             recommended : false , 
42+             recommended : true , 
4343            url :
4444                "https://github.com/mysticatea/eslint-plugin-node/blob/v9.2.0/docs/rules/no-exports-assign.md" , 
4545        } , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments