ota-meshi / eslint-plugin-astro

ESLint plugin for Astro component
https://ota-meshi.github.io/eslint-plugin-astro/
MIT License
309 stars 22 forks source link

(doc): use starlight for the doc #429

Open Foxeye-Rinx opened 4 days ago

Foxeye-Rinx commented 4 days ago

Description

Astro doc is using starlight, It would be really nice if this plugin also uses it for:

ota-meshi commented 3 days ago

Sounds good to me! Could you please send a PR?

Foxeye-Rinx commented 3 days ago

I guess I will have to make a checklist/plan for myself and for people who want to track on this, I will use this comment as a todo list:

Settings up TODOs:

Programming model changes TODOs:

Separate repo's README.md and website index page

If we use mdx syntax to create a container with styles to wrap the download status badges that would bring a natural mental programming model to the doc:

{/* This is the README.mdx file */}
<div class="download-badges">

[![NPM license](https://img.shields.io/npm/l/eslint-plugin-astro.svg)](https://www.npmjs.com/package/eslint-plugin-astro)
[![NPM version](https://img.shields.io/npm/v/eslint-plugin-astro.svg)](https://www.npmjs.com/package/eslint-plugin-astro)
[![NPM downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-astro&maxAge=3600)](http://www.npmtrends.com/eslint-plugin-astro)
[![NPM downloads](https://img.shields.io/npm/dw/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)
[![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)
[![NPM downloads](https://img.shields.io/npm/dy/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)
[![NPM downloads](https://img.shields.io/npm/dt/eslint-plugin-astro.svg)](http://www.npmtrends.com/eslint-plugin-astro)
[![Build Status](https://github.com/ota-meshi/eslint-plugin-astro/workflows/CI/badge.svg?branch=main)](https://github.com/ota-meshi/eslint-plugin-astro/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/ota-meshi/eslint-plugin-astro/badge.svg?branch=main)](https://coveralls.io/github/ota-meshi/eslint-plugin-astro?branch=main)

</div>

If we don't use the wrapper above and just want to use the bare markdown to reuse it in the repo's README we need to remove the <div class="download-badges"> above and use a global CSS selector like this which is harder to maintain for new contributors:

p:has(> a[href^="https://www.npmjs.com"]:nth-child(n+2)) {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

It's hard for new contributors to be aware there is a CSS like that somewhere that assumes the README file content is on a fixed structure.

Same for the <!--DOCS_IGNORE_START--> annotation. It's hard to know it's used by a tools/update-readme.ts

Make rules searchable

ota-meshi commented 3 days ago

Thank you!!!

Just to be clear, here are some things to know: