• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ota-meshi / eslint-plugin-astro / 11624632062
82%

Build:
DEFAULT BRANCH: main
Ran 01 Nov 2024 05:07AM UTC
Jobs 1
Files 59
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Nov 2024 05:05AM UTC coverage: 82.249%. Remained the same
11624632062

push

github

web-flow
chore: add doc-renderer for generating & updating detailed rule docs (#442)

### Problems:

- The new rule document (generated by `npm run new`) was unclear about which part is the header and which part is the body.
       
- In `tools/update-docs.ts`, when generating notes and adding them to the header section:
  - The process is too much like cutting and pasting manually on the string, it reduces the readability
  - The code for producing the new header (with notes included) is quite fragmented and long
  - Includes legacy/redundant code `header.replace(/\$/g, "$$$$")`
  - Inefficient code, it creates two new items for the notes then `join()` it with `'\n'` later to create the trailing `'\n\n'`
  
   ```ts
       if (notes.length >= 1) {
         notes.push("", "")
       }
       ...
       const header = `\n${title}\n\n${notes.join("\n")}`

    ```

### This PR:
  - Create renderRuleHeader function and a RuleDocHeader type to clarify the structure of the header. Then applies this to both the generation and update tools for the detailed rule Markdown files

```ts
type RuleDocHeader = {
  ruleId: string
  description: string
  notes: string[]
}
const header = renderRuleHeader({ ruleId, description, notes })
```
 - Make it clear there are `\n\n` between each part of the header in the `renderRuleHeader` function

740 of 1016 branches covered (72.83%)

Branch coverage included in aggregate %.

1878 of 2167 relevant lines covered (86.66%)

47.27 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11624632062.1 01 Nov 2024 05:07AM UTC 59
82.25
GitHub Action Run
Source Files on build 11624632062
  • Tree
  • List 59
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #11624632062
  • db90a412 on github
  • Prev Build on main (#11586528242)
  • Next Build on main (#11695098288)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc