Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to unts org #73

Merged
merged 4 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "rx-ts/eslint"
"repo": "un-ts/eslint"
}
],
"commit": false,
Expand Down
5 changes: 5 additions & 0 deletions .changeset/real-ghosts-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"eslint-plugin-markup": minor
---

chore!: update node engine setting, drop node `<12.20.0`
8 changes: 8 additions & 0 deletions .changeset/twelve-carrots-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"eslint-plugin-htm": patch
"eslint-plugin-markup": patch
"eslint-plugin-utils": patch
---

- chore: migrate to unts org
- chore: add donate field, bump deps
13 changes: 11 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
github: [JounQin]
open_collective: rxts
github:
- JounQin
- 1stG
- rxts
- unts
patreon: 1stG
open_collective: unts
custom:
- https://opencollective.com/1stG
- https://opencollective.com/rxts
- https://afdian.net/@JounQin
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,3 @@ jobs:

- name: Codecov
uses: codecov/codecov-action@v3

- name: Codacy Coverage
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh)
env:
CODACY_ACCOUNT_TOKEN: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pkg-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 16
cache: yarn

- name: Package Size Report
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 16
cache: yarn

- name: Install Dependencies
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/vercel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Vercel Deploy

on:
push:
branches:
- main
pull_request:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check Branch
id: branch
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo "::set-output name=args::--prod"
echo "::set-output name=comment::false"

- name: Deploy
uses: amondnet/vercel-action@v25
with:
vercel-args: ${{ steps.branch.outputs.args }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-comment: ${{ steps.branch.outputs.comment != 'false' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.*cache
*.tsbuildinfo
.type-coverage
.vercel
coverage
dist
lib
node_modules
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
node_modules
**/test/fixtures
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# CHANGELOG

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

- [eslint-plugin-htm](./packages/htm/CHANGELOG.md)
- [eslint-plugin-markup](./packages/markup/CHANGELOG.md)
- [eslint-plugin-react-enhanced](./packages/react-enhanced/CHANGELOG.md)
- [eslint-plugin-utils](./packages/utils/CHANGELOG.md)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 RxTS
Copyright (c) 2021 UnTS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
# @rxts/eslint
# @unts/eslint

[![GitHub Actions](https://github.com/rx-ts/eslint/workflows/CI/badge.svg)](https://github.com/rx-ts/eslint/actions/workflows/ci.yml)
[![Codacy Grade](https://img.shields.io/codacy/grade/41541a8ad8544f7d8df7b7df002f38c8)](https://www.codacy.com/gh/rx-ts/eslint)
[![Codecov](https://img.shields.io/codecov/c/gh/rx-ts/eslint)](https://codecov.io/gh/rx-ts/eslint)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Frx-ts%2Feslint%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![GitHub release](https://img.shields.io/github/release/rx-ts/eslint)](https://github.com/rx-ts/eslint/releases)
[![David Dev](https://img.shields.io/david/dev/rx-ts/eslint.svg)](https://david-dm.org/rx-ts/eslint?type=dev)
[![GitHub Actions](https://github.com/un-ts/eslint/workflows/CI/badge.svg)](https://github.com/un-ts/eslint/actions/workflows/ci.yml)
[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/un-ts/eslint.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/un-ts/eslint/context:javascript)
[![Codecov](https://img.shields.io/codecov/c/gh/un-ts/eslint)](https://codecov.io/gh/un-ts/eslint)
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Feslint%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
[![GitHub release](https://img.shields.io/github/release/un-ts/eslint)](https://github.com/un-ts/eslint/releases)

[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/)
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/atlassian/changesets)

> Incredible ESLint plugins, make ESLint greater.
> Incredible ESLint plugins, make ESLint greater

## Packages

This repository is a monorepo managed by [changesets][] what means we actually publish several packages to npm from same codebase, including:

| Package | Description | Version | (Peer) Dependencies |
| ---------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`eslint-plugin-htm`](/packages/htm) | An incredible ESLint plugin for HTML based on HTMLHint | [![npm](https://img.shields.io/npm/v/eslint-plugin-htm.svg)](https://www.npmjs.com/package/eslint-plugin-htm) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-htm) | [![David Peer](https://img.shields.io/david/peer/rx-ts/eslint.svg?path=packages/htm)](https://david-dm.org/rx-ts/eslint?path=packages/htm&type=peer) [![David](https://img.shields.io/david/rx-ts/eslint.svg?path=packages/htm)](https://david-dm.org/rx-ts/eslint?path=packages/htm) |
| [`eslint-plugin-markup`](/packages/markup) | An incredible ESLint plugin for all markup languages based on markuplint | [![npm](https://img.shields.io/npm/v/eslint-plugin-markup.svg)](https://www.npmjs.com/package/eslint-plugin-markup) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-markup) | [![David Peer](https://img.shields.io/david/peer/rx-ts/eslint.svg?path=packages/markup)](https://david-dm.org/rx-ts/eslint?path=packages/markup&type=peer) [![David](https://img.shields.io/david/rx-ts/eslint.svg?path=packages/markup)](https://david-dm.org/rx-ts/eslint?path=packages/markup) |
| [`eslint-plugin-react-enhanced`](/packages/react-enhanced) | An incredible ESLint plugin for @react-enhanced | [![npm](https://img.shields.io/npm/v/eslint-plugin-react-enhanced.svg)](https://www.npmjs.com/package/eslint-plugin-react-enhanced) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-react-enhanced) | [![David Peer](https://img.shields.io/david/peer/rx-ts/eslint.svg?path=packages/react-enhanced)](https://david-dm.org/rx-ts/eslint?path=packages/react-enhanced&type=peer) [![David](https://img.shields.io/david/rx-ts/eslint.svg?path=packages/react-enhanced)](https://david-dm.org/rx-ts/eslint?path=packages/react-enhanced) |
| [`eslint-plugin-utils`](/packages/utils) | Utilities for ESLint plugins and custom rules | [![npm](https://img.shields.io/npm/v/eslint-plugin-utils.svg)](https://www.npmjs.com/package/eslint-plugin-utils) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-utils) | [![David Peer](https://img.shields.io/david/peer/rx-ts/eslint.svg?path=packages/utils)](https://david-dm.org/rx-ts/eslint?path=packages/utils&type=peer) [![David](https://img.shields.io/david/rx-ts/eslint.svg?path=packages/utils)](https://david-dm.org/rx-ts/eslint?path=packages/utils) |
| Package | Description | Version |
| ---------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [`eslint-plugin-htm`](/packages/htm) | An incredible ESLint plugin for HTML based on HTMLHint | [![npm](https://img.shields.io/npm/v/eslint-plugin-htm.svg)](https://www.npmjs.com/package/eslint-plugin-htm) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-htm) |
| [`eslint-plugin-markup`](/packages/markup) | An incredible ESLint plugin for all markup languages based on markuplint | [![npm](https://img.shields.io/npm/v/eslint-plugin-markup.svg)](https://www.npmjs.com/package/eslint-plugin-markup) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-markup) |
| [`eslint-plugin-react-enhanced`](/packages/react-enhanced) | An incredible ESLint plugin for @react-enhanced | [![npm](https://img.shields.io/npm/v/eslint-plugin-react-enhanced.svg)](https://www.npmjs.com/package/eslint-plugin-react-enhanced) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-react-enhanced) |
| [`eslint-plugin-utils`](/packages/utils) | Utilities for ESLint plugins and custom rules | [![npm](https://img.shields.io/npm/v/eslint-plugin-utils.svg)](https://www.npmjs.com/package/eslint-plugin-utils) [![View changelog](https://img.shields.io/badge/changelog-explore-brightgreen)](https://changelogs.xyz/eslint-plugin-utils) |

## Sponsors

| 1stG | RxTS | UnTS |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

## Backers

| 1stG | RxTS | UnTS |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

Expand Down
61 changes: 61 additions & 0 deletions docs/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { lazy, Suspense } from 'react'
import {
Route,
BrowserRouter as Router,
Routes,
useParams,
} from 'react-router-dom'

import './global.css'
import 'github-markdown-css'

const Readme = () => {
const { name } = useParams<{ name: string }>()
const Readme = lazy(() =>
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
name ? import(`../packages/${name}/README.md`) : import('../README.md'),
)
return (
<Suspense>
<Readme />
</Suspense>
)
}

const Changelog = () => {
const { name } = useParams<{ name: string }>()
const Changelog = lazy(() =>
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
name
? import(`../packages/${name}/CHANGELOG.md`)
: import('../CHANGELOG.md'),
)
return (
<Suspense>
<Changelog />
</Suspense>
)
}

export const App = () => (
<Router>
<Routes>
<Route
path="/CHANGELOG.md"
element={<Changelog />}
/>
<Route
path="/packages/:name"
element={<Readme />}
/>
<Route
path="/packages/:name/CHANGELOG.md"
element={<Changelog />}
/>
<Route
path="/"
element={<Readme />}
/>
</Routes>
</Router>
)
11 changes: 11 additions & 0 deletions docs/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@media (prefers-color-scheme: dark) {
:root {
background-color: #0d1117;
}
}

body {
max-width: 1200px;
margin: 0 auto;
padding: 20px 40px;
}
11 changes: 11 additions & 0 deletions docs/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createRoot } from 'react-dom/client'

import { App } from './App'

const app = document.querySelector('#app')!

app.classList.add('markdown-body')

const root = createRoot(app)

root.render(<App />)
6 changes: 6 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.lib",
"compilerOptions": {
"baseUrl": "."
}
}
54 changes: 40 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "@rxts/eslint",
"name": "@unts/eslint",
"version": "0.0.0",
"description": "Incredible ESLint plugins, make ESLint greater.",
"repository": "git+https://github.com/rx-ts/eslint.git",
"author": "JounQin <admin@1stg.me>",
"description": "Incredible ESLint plugins, make ESLint greater",
"repository": "git+https://github.com/un-ts/eslint.git",
"author": "JounQin (https://www.1stG.me) <admin@1stg.me>",
"license": "MIT",
"private": true,
"workspaces": [
Expand All @@ -14,42 +14,68 @@
"build:r": "r -f es2015",
"build:ts": "tsc -b",
"clean": "rimraf packages/*/{lib,*.tsbuildinfo}",
"dev": "yarn docs:dev",
"docs:build": "w -e docs -p --publicPath /",
"docs:dev": "w -e docs --publicPath /",
"docs:preview": "sirv dist",
"lint": "run-p lint:*",
"lint:es": "eslint . --cache -f friendly --max-warnings 10",
"lint:ts": "tsc -p tsconfig.base.json --noEmit",
"prepare": "simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
"prerelease": "yarn build",
"release": "changeset publish",
"serve": "yarn docs:preview",
"test": "jest",
"typecov": "type-coverage"
"typecov": "type-coverage",
"vercel-build": "yarn docs:build"
},
"devDependencies": {
"@1stg/lib-config": "^6.3.0",
"@1stg/lib-config": "^7.2.6",
"@changesets/changelog-github": "^0.4.5",
"@changesets/cli": "^2.23.0",
"@markuplint/rule-textlint": "^2.5.2",
"@types/eslint": "^8.4.3",
"@markuplint/rule-textlint": "^2.5.3",
"@pkgr/webpack": "^3.1.2",
"@pkgr/webpack-mdx": "^2.0.3",
"@types/eslint": "^8.4.5",
"@types/htmlhint": "^1.1.2",
"@types/jest": "^28.1.3",
"@types/node": "^18.0.0",
"@types/jest": "^28.1.4",
"@types/node": "^18.0.3",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"@types/web": "^0.0.69",
"github-markdown-css": "^5.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"sirv-cli": "^2.0.2",
"textlint-rule-max-comma": "^2.0.2",
"ts-jest": "^28.0.5",
"ts-node": "^10.8.1",
"type-coverage": "^2.21.1",
"ts-node": "^10.8.2",
"type-coverage": "^2.21.2",
"typescript": "^4.7.4"
},
"commitlint": {
"extends": "@1stg"
},
"eslintConfig": {
"root": true,
"extends": "@1stg"
"extends": "@1stg",
"overrides": [
{
"files": "docs/**/*.tsx",
"rules": {
"react/react-in-jsx-scope": "off"
}
}
]
},
"eslintIgnore": [
"coverage",
"dist",
"**/lib",
"**/test/fixtures",
"**/CHANGELOG.md"
"**/CHANGELOG.md",
"!/.*.js"
],
"jest": {
"preset": "ts-jest",
Expand Down
Loading