chore: add lint autofix CI job (#9604)

This commit is contained in:
Sébastien Lorber 2023-12-01 20:09:04 +01:00 committed by GitHub
parent 209b035399
commit 7650829e91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 588 additions and 542 deletions

43
.github/workflows/lint-autofix.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Lint AutoFix
on:
pull_request:
branches:
- main
- docusaurus-v**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-autofix:
name: Lint AutoFix
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Installation
run: yarn
- name: AutoFix Format
run: yarn format
- name: AutoFix JS
run: yarn lint:js:fix
- name: AutoFix Style
run: yarn lint:style:fix
- name: AutoFix Spelling
run: yarn lint:spelling:fix
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'refactor: apply lint autofix'

View file

@ -1,8 +1,5 @@
{
"*.{js,jsx,ts,tsx,mjs}": ["eslint --fix"],
"*.css": ["stylelint --allow-empty-input --fix"],
"*": [
"prettier --ignore-unknown --write",
"cspell --no-must-find-files --no-progress"
]
"*": ["prettier --ignore-unknown --write"]
}

View file

@ -24,5 +24,5 @@ website/versioned_sidebars/*.json
examples/
website/static/katex/katex.min.css
website/changelog/_swizzle_theme_tests
website/changelog
website/_dogfooding/_swizzle_theme_tests

View file

@ -51,8 +51,11 @@
"lint": "yarn lint:js && yarn lint:style && yarn lint:spelling",
"lint:ci": "yarn lint:js --quiet && yarn lint:style && yarn lint:spelling",
"lint:js": "eslint --cache --report-unused-disable-directives \"**/*.{js,jsx,ts,tsx,mjs}\"",
"lint:spelling": "cspell \"**\" --no-progress",
"lint:js:fix": "yarn lint:js --fix",
"lint:spelling": "cspell \"**\" --no-progress --show-context --show-suggestions",
"lint:spelling:fix": "yarn rimraf project-words.txt && echo \"# Project Words - DO NOT TOUCH - This is updated through CI\" >> project-words.txt && yarn -s lint:spelling --words-only --unique --no-exit-code --no-summary \"**\" | sort --ignore-case >> project-words.txt",
"lint:style": "stylelint \"**/*.css\"",
"lint:style:fix": "yarn lint:style --fix",
"lerna": "lerna",
"test": "jest",
"test:build:website": "./admin/scripts/test-release.sh",
@ -80,7 +83,7 @@
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"cross-env": "^7.0.3",
"cspell": "^6.31.2",
"cspell": "^8.1.0",
"eslint": "^8.45.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",

View file

@ -6,6 +6,7 @@
*/
import React, {useCallback, useMemo, useRef, useState} from 'react';
import {createPortal} from 'react-dom';
import {DocSearchButton, useDocSearchKeyboardEvents} from '@docsearch/react';
import Head from '@docusaurus/Head';
import Link from '@docusaurus/Link';
@ -20,7 +21,6 @@ import {
} from '@docusaurus/theme-search-algolia/client';
import Translate from '@docusaurus/Translate';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import {createPortal} from 'react-dom';
import translations from '@theme/SearchTranslations';
import type {AutocompleteState} from '@algolia/autocomplete-core';

View file

@ -1,347 +1,323 @@
# Project Words - DO NOT TOUCH - This is updated through CI
abernathyca
adriaan
agan
Adriaan
Agan
alexbdebrie
alexey
Alexey
algoliasearch
anonymized
Anshul
anshul
août
APFS
apfs
apos
appinstalled
applanga
Applanga
architecting
astro
Astro
atrule
autoconverted
Autoconverted
Autogen
autogen
autogenerating
autohide
autolinks
backport
backticks
bartosz
Autolinks
Bartosz
beforeinstallprompt
bhatt
blocklist
Bhatt
Blockquotes
blockquotes
Bokmål
browserslist
browserstack
Buble
buble
builtins
Buble's
bunx
caabernathy
cacheable
callouts
callstack
Callstack
camelcase
candillon
Candillon
cdabcdab
cdpath
Cena
cena
Changefreq
changefreq
Chedeau
chedeau
cheng
clément
clsx
codegen
codeql
Clément
codesandbox
codespaces
Codespaces
commonmark
contravariance
corejs
crawlable
creativecommons
csapo
cssnano
csvg
Csapo
Csvg
Customizability
customizability
Dabit
dabit
daishi
Daishi
Datagit
datagit
datamap
datas
dbaeumer
décembre
Datagit's
dedup
deduplicated
déja
deps
devcontainers
devs
devspace
devto
dmitry
docgen
Dmitry
docsearch
docsify
Docsify
Docu
docu
docusuarus
docz
doesn
Docz
Dogfood
dogfood
Dogfooding
dogfooding
dojocat
Dojocat
Dyte
dyte
Déja
easyops
Endi
endi
Endi's
Endilie
endilie
endiliey
entrypoints
errnametoolong
esbenp
esbuild
eslintcache
estree
ERRNAMETOOLONG
evaluable
Execa
execa
externalwaiting
failfast
Fargate
fbid
février
fienny
FBID
Fienny
flac
flightcontrol
formik
fouc
Flightcontrol
Flightcontrol's
Formik
FOUC
froms
funboxteam
février
gabrielcsapo
gantt
getopts
gifs
gitgraph
gitpod
globbing
globby
goss
goyal
gruntfuggly
Gifs
Goss
Goyal
Gtag
gtag
hahaha
hamel
hardcoding
hastscript
Hamel
Hasura
hasura
heavener
héctor
héllô
heuristical
Heavener
Hideable
hideable
hola
horiz
hostman
Hostman
hoverable
husain
ianad
Husain
Héctor
héllô
IANAD
idempotency
Iframes
immer
Immer
Infima
infima
Infima's
inlines
intelli
Intelli
intellij
interactiveness
Interpolatable
interpolatable
investec
jakepartusch
jamstack
Investec
janvier
javadoc
jiti
jmarcey
jodyheavener
joshcena
jscodeshift
jssdk
juillet
kaszubowski
Kaszubowski
Katex
katex
kato
keyscan
Kato
Keytar
keytar
kinsta
knapen
koyeb
kubernetes
lamana
Kinsta
Knapen
Koyeb
Koyeb's
Lamana
Lifecycles
lifecycles
lighthouserc
Linkify
linkify
localizable
Localizable
lockb
longpaths
lorber
lowercased
Lorber
Lorber's
LQIP
lqip
lunrjs
mapbox
marcey
Marcey
Marcey's
Markprompt
markprompt
marocchino
massoud
Massoud
mathjax
maxlynch
maxresdefault
MDAST
mdast
mdwn
mdxa
mdxast
mdxhast
MDXA
MDXAST
MDXHAST
Mdxjs
mdxjs
Meilisearch
meilisearch
metadatum
metastring
metrica
metrika
Metrika
Microdata
microdata
microlink
middlewares
Mindmap
mindmap
minifier
mkcert
mkdir
mkdirs
mkdn
mkdocs
mkdown
Moesif
moesif
msapplication
nabors
nakagawa
Nabors
Nakagawa
nand
Navigations
navigations
navlink
netrc
nextra
Nextra
ngryman
nisarag
Nisarag
noflash
noicon
noindex
nojekyll
noninteractive
noreply
npmjs
npmrc
nprogress
ntfs
nuxt
oshannessy
onboarded
openapi
Nuxt
opensearch
opensearchdescription
opensource
optimizt
optind
Orta
orta
Outerbounds
outerbounds
overrideable
OShannessy
pageview
Palenight
palenight
paletton
palo
Paletton
Palo
Paraiso
paraiso
pathinfo
pathnames
paularmstrong
pbcopy
pcss
peaceiris
philpl
Photoshop
photoshop
picocolors
picomatch
Pipeable
playbtn
Pluggable
pluggable
Plushie
plushie
plushies
pnpm
posthog
preactjs
Precache
precache
precached
precaching
preconfigured
preconnect
prefetch
prefetching
preloads
prepended
preprocess
preprocessors
prerendered
prerendering
println
prismjs
producthunt
Profilo
profilo
protobuf
Protobuf
protobuffet
prpl
pyltsyn
qjpuv
qovery
PRPL
Pyltsyn
QJPUV
Qovery
quasis
quddus
quddús
Quddus
Quddús
Quickwit
quickwit
quotify
rachelnabors
ramón
Ramón
reactjs
rearchitecture
recrawl
redirections
redoc
Redoc
redocusaurus
redwoodjs
refactorings
regexes
Rehype
rehype
renderable
reponame
reqs
requireindex
REPONAME
Retrocompatibility
retrocompatibility
Retrocompatible
retrocompatible
rmiz
roadmap
rocketvalidator
rtcts
rtlcss
saurus
scaleway
Scaleway
searchbar
Sebastien
sebastien
sébastien
sebastienlorber
sensical
serializers
setaf
setext
Shiki
shiki
shortcodes
showinfo
sida
simen
Sida
Simen
slorber
sluggified
sluggifies
sluggify
Solana
solana
spâce
stackblitz
stackblitzrc
strikethrough
Strikethrough
strikethroughs
styl
stylelint
stylelintrc
subdir
@ -355,71 +331,67 @@ subsetting
subsubcategory
subsubfolder
subsubsection
Subsubsubfolder
subsubsubfolder
sucipto
Sucipto
sunsetting
Supabase
supabase
SVGR
svgr
swizzlable
teik
Sébastien
Teik
templating
thanos
therox
Thanos
Therox
toolset
toplevel
transifex
Transifex
transpiles
Treeified
treeified
treeifies
treeify
treosh
Triaging
triaging
tses
TSES
twoslash
typecheck
typechecks
typedoc
Typesense
typesense
unavatar
unflat
unist
Unavatar
unlinkable
Unlisteds
unlisteds
Unlocalized
unlocalized
unmatch
unnormalized
unoptimized
unprefixed
unswizzle
unversioned
upvotes
urlset
userland
vannicatte
vercel
verifymethod
Vannicatte
Vetter
vetter
vfile
vicenti
vieira
viet
viewports
vinnik
Vicenti
Vieira
Viet
Vinnik
vjeux
waivable
WCAG
wcag
webfactory
webp
webpackbar
webstorm
wolcott
writeups
xclip
xplorer
xsoar
yacop
Wolcott
Xplorer
XSOAR
Yacop
Yangshun
yangshun
yangshunz
zhou
Zhou
zoomable
zpao

709
yarn.lock

File diff suppressed because it is too large Load diff