-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR to start introducing Linter V2! Primary improvements from this linter: Better parsing of MDX (fewer false positives) More flexibility And suggested autofixes! (see auto-generated PR comment below for how that works) Turning this on for only a small portion of the repo at first to avoid an avalanche of alerts, will slowly expand from there. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
dbbbc20
commit d9a1a61
Showing
11 changed files
with
125 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: '[Docs] Lint v2' | ||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/docs-lint-v2.yml' | ||
- 'supa-mdx-lint.config.toml' | ||
- 'apps/docs/content/**' | ||
|
||
env: | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
||
jobs: | ||
supa-mdx-lint: | ||
name: supa-mdx-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
sparse-checkout: | | ||
supa-mdx-lint.config.toml | ||
apps/docs/content | ||
- name: cache cargo | ||
id: cache-cargo | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
key: 9fd8c8fa7487a3d454a676e6e3d7409af34fc715 | ||
- name: install linter | ||
if: steps.cache-cargo.outputs.cache-hit != 'true' | ||
run: cargo install --locked --git https://github.com/supabase-community/supa-mdx-lint --rev 9fd8c8fa7487a3d454a676e6e3d7409af34fc715 | ||
- name: install reviewdog | ||
uses: reviewdog/action-setup@3f401fe1d58fe77e10d665ab713057375e39b887 # v1.3.0 | ||
with: | ||
reviewdog_version: v0.20.2 | ||
- name: run linter | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
set -o pipefail | ||
supa-mdx-lint apps/docs/content/guides/getting-started --format rdf | reviewdog -f=rdjsonl -reporter=github-pr-review |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
ignore_patterns = ["**/_*.mdx"] | ||
|
||
# Heading should be sentence case | ||
[Rule001HeadingCase] | ||
# Words that may be uppercased even if they are not the first word in the sentence. | ||
# Can also specify a regex that is compatible with the [Rust regex crate](https://docs.rs/regex/latest/regex/). | ||
may_uppercase = [ | ||
"[A-Z]{3,5}", | ||
"Android", | ||
"Angular", | ||
"Apple", | ||
"Auth", | ||
"Content Delivery Network", | ||
"Dart", | ||
"Edge Functions", | ||
"Flutter", | ||
"GoTrue", | ||
"Google", | ||
"GraphQL", | ||
"Ionic Angular", | ||
"Ionic React", | ||
"Ionic Vue", | ||
"JavaScript", | ||
"Kotlin", | ||
"Next.js", | ||
"Nuxt", | ||
"OpenAI", | ||
"Postgres", | ||
"PostgreSQL", | ||
"PostgREST", | ||
"React", | ||
"React Native", | ||
"RedwoodJS", | ||
"Row Level Security", | ||
"Server-Side Auth", | ||
"Single Sign-On", | ||
"SolidJS", | ||
"Supabase", | ||
"Svelte", | ||
"SvelteKit", | ||
"Swift", | ||
"SwiftUI", | ||
"Xcode", | ||
"Vue", | ||
] | ||
# Words that may be lowercased even if they are the first word in the sentence. | ||
# Can also specify a regex that is compatible with the [Rust regex crate](https://docs.rs/regex/latest/regex/). | ||
may_lowercase = [] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.