Closed
      
        Bug 1772358
      
      
        Opened 3 years ago
          Closed 3 years ago
      
        
    
  
Create an ESLint rule to reject defining lazy getter for Services etc
Categories
(Developer Infrastructure :: Lint and Formatting, task)
        Developer Infrastructure
          
        
        
      
        
    
        Lint and Formatting
          
        
        
      
        
    Tracking
(firefox103 fixed)
        RESOLVED
        FIXED
        
    
  
        
            103 Branch
        
    
  
| Tracking | Status | |
|---|---|---|
| firefox103 | --- | fixed | 
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
Some system modules (JSM) are loaded in early startup and not necessarily be lazy getter.
bug 1608279 and depending patches discovered that there are too many cases that those modules are defined as lazy getter.
we should have an ESLint rule that rejects such definition.
| Assignee | ||
| Comment 1•3 years ago
           | ||
This can be implemented by extending bug 1773747 rule, to always mark Services etc eager.
Blocks: esm-ification
Depends on: 1773747
| Assignee | ||
| Comment 2•3 years ago
           | ||
bug 1773747 is about all lazy getters, not only about import, so the logic is slightly different, and adding separate rule is better.
No longer depends on: 1773747
| Assignee | ||
| Comment 3•3 years ago
           | ||
| Updated•3 years ago
           | 
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/9779ccacc2d7
Add ESLint rule to reject defining lazy getters for always available modules. r=Standard8
|   | ||
| Comment 5•3 years ago
           | ||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
          status-firefox103:
          --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
| Updated•3 years ago
           | 
Product: Firefox Build System → Developer Infrastructure
          You need to log in
          before you can comment on or make changes to this bug.
        
Description
•