An open API service indexing awesome lists of open source software.

https://github.com/accesslint/create-accesslint

CLI tool to set up AccessLint GitHub Actions workflow
https://github.com/accesslint/create-accesslint

Last synced: 8 months ago
JSON representation

CLI tool to set up AccessLint GitHub Actions workflow

Awesome Lists containing this project

README

          

# create-accesslint

Easy setup for AccessLint GitHub Actions workflow - get accessibility feedback directly in your pull requests.

## Quick Start

```bash
npx create-accesslint
```

Or install globally:

```bash
npm install -g create-accesslint
create-accesslint
```

## What it does

This CLI tool creates a GitHub Actions workflow that:

- 🎯 **Reviews pull requests** - Adds inline comments on accessibility issues
- 🚀 **Zero configuration** - Uses GitHub OIDC, no tokens required
- âš¡ **Smart scanning** - Only checks changed files
- 🔧 **Multi-framework** - Supports HTML, React, Vue, Next.js

## Interactive Setup

The generator will ask you:

1. **Workflow name** - Customize the GitHub Actions workflow name
2. **Project type** - Auto-detects React/Vue/Next.js from package.json
3. **File patterns** - Smart defaults based on your framework choice
4. **Push triggers** - Option to run on pushes to main branch

## Framework Detection

| Framework | File Patterns | Auto-detected from |
|-----------|---------------|-------------------|
| HTML/Static | `**/*.{html,htm}` | Default |
| React/TypeScript | `**/*.{jsx,tsx}` | `react`, `@types/react` |
| Vue.js | `**/*.{vue,html}` | `vue`, `@vue/cli` |
| Next.js | `**/*.{jsx,tsx,html}` | `next` |
| Custom | Your choice | Manual selection |

## Generated Workflow

Creates `.github/workflows/accesslint.yml` with:

```yaml
name: 'AccessLint - Accessibility Check'

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write
id-token: write

jobs:
accesslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: accesslint/actions@v1.1.0
with:
mode: review
file-patterns: '**/*.{jsx,tsx}'
```

## Next Steps

After running the generator:

1. **Commit and push** your changes
2. **Create a pull request** to test the workflow
3. **AccessLint will automatically review** accessibility in your code changes

## Development

```bash
git clone https://github.com/accesslint/create-accesslint
cd create-accesslint
npm install
npm link

# Test in a project
cd /path/to/your/project
npx create-accesslint
```

## License

MIT