style: npm run p:w .

Summary:
Which is essentially `npx prettier --write .`

Also fix `jshint` (possible) FP, wrong chars.

Signed-off-by: Yongmin Hong <revi@omglol.email>

Test Plan: `npm run p:w .` and verify no changes made.

Reviewers: O1 revi & automations, revi

Reviewed By: O1 revi & automations, revi

Differential Revision: https://issuetracker.revi.xyz/D217
This commit is contained in:
revi 2024-06-08 19:05:22 +09:00
parent aca8c5967b
commit 04798b45fd
Signed by: revi
GPG key ID: 1EB4F6CEEA100E94
9 changed files with 122 additions and 64 deletions

View file

@ -16,7 +16,12 @@
}, },
"jshint": { "jshint": {
"type": "jshint", "type": "jshint",
"include": "(\\.js$)" "include": [
"(\\.cjs$)",
"(\\.js$)",
"(\\.mjs$)"
],
"jshint.jshintrc": ".jshint.json"
}, },
"json": { "json": {
"type": "json", "type": "json",

View file

@ -3,45 +3,44 @@
version: 2 version: 2
updates: updates:
# Maintain dependencies for Docker # Maintain dependencies for Docker
- package-ecosystem: "docker" - package-ecosystem: 'docker'
assignees: assignees:
- "revi" - 'revi'
# Dockerfiles are stored in `container/lighthouse-ci-server/. # Dockerfiles are stored in `container/lighthouse-ci-server/.
directory: "container/lighthouse-ci-server" directory: 'container/lighthouse-ci-server'
schedule: schedule:
interval: "weekly" interval: 'weekly'
day: "monday" day: 'monday'
time: "10:00" time: '10:00'
timezone: "Asia/Seoul" timezone: 'Asia/Seoul'
target-branch: "master" target-branch: 'master'
labels: [] labels: []
# Maintain dependencies for GitHub Actions # Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions" - package-ecosystem: 'github-actions'
assignees: assignees:
- "revi" - 'revi'
# Workflow files stored in the default location of `.github/workflows`. # Workflow files stored in the default location of `.github/workflows`.
# You don't need to specify `/.github/workflows` for `directory`. # You don't need to specify `/.github/workflows` for `directory`.
# You can use `directory: "/"`. # You can use `directory: "/"`.
directory: "/" directory: '/'
schedule: schedule:
interval: "weekly" interval: 'weekly'
day: "monday" day: 'monday'
time: "10:00" time: '10:00'
timezone: "Asia/Seoul" timezone: 'Asia/Seoul'
target-branch: "master" target-branch: 'master'
labels: [] labels: []
# Maintain dependencies for NPM # Maintain dependencies for NPM
- package-ecosystem: "npm" - package-ecosystem: 'npm'
assignees: assignees:
- "revi" - 'revi'
# npm packages are stored in the default location of `package.json`. # npm packages are stored in the default location of `package.json`.
directory: "/" directory: '/'
schedule: schedule:
interval: "weekly" interval: 'weekly'
day: "monday" day: 'monday'
time: "10:00" time: '10:00'
timezone: "Asia/Seoul" timezone: 'Asia/Seoul'
target-branch: "master" target-branch: 'master'
labels: [] labels: []

View file

@ -1,4 +1,4 @@
name: "Build container images" name: 'Build container images'
on: on:
push: push:
paths: paths:
@ -16,27 +16,27 @@ env:
jobs: jobs:
container-build: container-build:
name: "Build and publish containers to GitHub Container Registry" name: 'Build and publish containers to GitHub Container Registry'
permissions: permissions:
contents: read contents: read
packages: write packages: write
attestations: write attestations: write
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "Checkout the repository" - name: 'Checkout the repository'
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: "Log in to the Container registry" - name: 'Log in to the Container registry'
uses: docker/login-action@v3.2.0 uses: docker/login-action@v3.2.0
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: "Extract metadata (tags, labels) for Docker" - name: 'Extract metadata (tags, labels) for Docker'
id: meta id: meta
uses: docker/metadata-action@v5.5.1 uses: docker/metadata-action@v5.5.1
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: "Build and push Docker image" - name: 'Build and push Docker image'
id: push id: push
uses: docker/build-push-action@v5.3.0 uses: docker/build-push-action@v5.3.0
with: with:

View file

@ -1,4 +1,4 @@
name: "PHP Syntax Check" name: 'PHP Syntax Check'
on: on:
push: push:
paths: paths:

4
.jshint.json Normal file
View file

@ -0,0 +1,4 @@
{
"esversion": 8,
"node": true
}

View file

@ -1,3 +1,3 @@
# [Dont be an asshole, and dont be tolerant of assholes.](https://asshole.fyi/) # [Don't be an asshole, and don't be tolerant of assholes.](https://asshole.fyi/)
That simple. That simple.

View file

@ -7,7 +7,7 @@
"prettier": "^3.3.1" "prettier": "^3.3.1"
}, },
"scripts": { "scripts": {
"pcheck": "prettier --check .", "p:c": "prettier --check .",
"pwrite": "prettier --write ." "p:w": "prettier --write ."
} }
} }

View file

@ -1,28 +1,50 @@
/** No betafeatures button */ /** No betafeatures button */
#pt-betafeatures { display: none; } #pt-betafeatures {
display: none;
}
/** no ULS button */ /** no ULS button */
#pt-uls { display: none; } #pt-uls {
display: none;
}
/* I won't logout unless in preferences which is typed manually */ /* I won't logout unless in preferences which is typed manually */
#pt-logout { display: none; } #pt-logout {
#pt-preferences { display: none; } display: none;
}
#pt-preferences {
display: none;
}
/** Set custom color for redirect page */ /** Set custom color for redirect page */
.mw-redirect { color: #FAAFBE;}.mw-redirect:visited { color: #FAAFBE;}.mw-redirect:hover { color: #FAAFBE;}.mw-redirect:active { color: #FAAFBE;} .mw-redirect {
color: #faafbe;
}
.mw-redirect:visited {
color: #faafbe;
}
.mw-redirect:hover {
color: #faafbe;
}
.mw-redirect:active {
color: #faafbe;
}
/** No MediaViewer button on File: namespace pages */ /** No MediaViewer button on File: namespace pages */
.mw-mmv-filepage-buttons { display: none } .mw-mmv-filepage-buttons {
display: none;
}
/* Make protected pages' edit box shown in light pink. (http://www.color-hex.com/color/ffb6c1) /* Make protected pages' edit box shown in light pink. (http://www.color-hex.com/color/ffb6c1)
*/ */
.mw-textarea-protected, .ns-8 textarea { .mw-textarea-protected,
background: #FFB6C1; .ns-8 textarea {
background: #ffb6c1;
} }
/* Make semi-protected pages' edit box shown in yellow. */ /* Make semi-protected pages' edit box shown in yellow. */
.mw-textarea-sprotected { .mw-textarea-sprotected {
background: #FFFFDB; background: #ffffdb;
} }
/* Edit summaries /* Edit summaries
@ -35,8 +57,12 @@ .comment {
/* Quick hack to force the Search tab on [[Special:Contribs]] open. /* Quick hack to force the Search tab on [[Special:Contribs]] open.
Credit: Volker E. (WMF) & Stwalkerster Credit: Volker E. (WMF) & Stwalkerster
[[Special:Permalink/19431311#Reverting the new "collapsed search interface" on Special:Contribs|Tech]] */ [[Special:Permalink/19431311#Reverting the new "collapsed search interface" on Special:Contribs|Tech]] */
.mw-special-Contributions .oo-ui-fieldsetLayout-group.mw-collapsible-content { display: block !important; } .mw-special-Contributions .oo-ui-fieldsetLayout-group.mw-collapsible-content {
.mw-special-Contributions .oo-ui-fieldsetLayout-header { display: none !important; } display: block !important;
}
.mw-special-Contributions .oo-ui-fieldsetLayout-header {
display: none !important;
}
/* Colorize diff size /* Colorize diff size
(Green for + and red for -) */ (Green for + and red for -) */
@ -49,6 +75,12 @@ .mw-plusminus-neg {
/* Get rid of 'partial' block. Uselessness 100% guaranteed. /* Get rid of 'partial' block. Uselessness 100% guaranteed.
TODO: Fix this (MW update broke this) */ TODO: Fix this (MW update broke this) */
.mw-block-restriction {display: none;} /* Kills partial block target list */ .mw-block-restriction {
.mw-block-editing-restriction {display: none;} /* Kill Partial switch */ display: none;
.mw-block-page-restrictions { display: none; } /* Kill radio box */ } /* Kills partial block target list */
.mw-block-editing-restriction {
display: none;
} /* Kill Partial switch */
.mw-block-page-restrictions {
display: none;
} /* Kill radio box */

View file

@ -1,5 +1,7 @@
// enwiki purgetab // enwiki purgetab
mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-purgetab.js&oldid=951989513&action=raw&ctype=text/javascript'); mw.loader.load(
'//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-purgetab.js&oldid=951989513&action=raw&ctype=text/javascript',
);
/* Automate purge confirmation dialog */ /* Automate purge confirmation dialog */
if (mw.config.get('wgAction') === 'purge') { if (mw.config.get('wgAction') === 'purge') {
@ -11,40 +13,56 @@ if ( mw.config.get( 'wgAction' ) === 'purge' ) {
* @see https://meta.wikimedia.org/wiki/StewardScript * @see https://meta.wikimedia.org/wiki/StewardScript
* @update-token [[File:pathoschild/stewardscript.js]] * @update-token [[File:pathoschild/stewardscript.js]]
*/ */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js'); mw.loader.load(
'//tools-static.wmflabs.org/meta/scripts/pathoschild.stewardscript.js',
);
// Display users rights (Temporary, might work on my own rewrite of this or find another one) // Display users rights (Temporary, might work on my own rewrite of this or find another one)
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&oldid=653248315&action=raw&ctype=text/javascript'); mw.loader.load(
'//en.wikipedia.org/w/index.php?title=User:Splarka/sysopdectector.js&oldid=653248315&action=raw&ctype=text/javascript',
);
// No MediaViewer // No MediaViewer
mw.config.set("wgMediaViewerOnClick", false); mw.config.set('wgMediaViewerOnClick', false);
/** /**
* Ajax sysop * Ajax sysop
* @see https://meta.wikimedia.org/wiki/Ajax_sysop * @see https://meta.wikimedia.org/wiki/Ajax_sysop
* @update-token [[File:pathoschild/ajaxsysop.js]] * @update-token [[File:pathoschild/ajaxsysop.js]]
*/ */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js'); mw.loader.load(
'//tools-static.wmflabs.org/meta/scripts/pathoschild.ajaxsysop.js',
);
/** /**
* Forces left-to-right layout and editing on RTL wikis. * Forces left-to-right layout and editing on RTL wikis.
* @see https://meta.wikimedia.org/wiki/Force_ltr * @see https://meta.wikimedia.org/wiki/Force_ltr
* @update-token [[File:pathoschild/forceltr.js]] * @update-token [[File:pathoschild/forceltr.js]]
*/ */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js'); mw.loader.load(
'//tools-static.wmflabs.org/meta/scripts/pathoschild.forceltr.js',
);
// Change language to English if it is not // Change language to English if it is not
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:-revi/lang-to-en.js&action=raw&ctype=text/javascript'); mw.loader.load(
'//meta.wikimedia.org/w/index.php?title=User:-revi/lang-to-en.js&action=raw&ctype=text/javascript',
);
// IRTC1015's permalink-collector // IRTC1015's permalink-collector
mw.loader.load('//ko.wikipedia.org/w/index.php?title=User:IRTC1015/copyReasonLink.js&oldid=20823911&action=raw&ctype=text/javascript'); mw.loader.load(
'//ko.wikipedia.org/w/index.php?title=User:IRTC1015/copyReasonLink.js&oldid=20823911&action=raw&ctype=text/javascript',
);
// Display lists aka StewardLinks // Display lists aka StewardLinks
mw.loader.load('//meta.wikimedia.org/w/index.php?oldid=20169009&action=raw&ctype=text/javascript'); mw.loader.load(
'//meta.wikimedia.org/w/index.php?oldid=20169009&action=raw&ctype=text/javascript',
);
/** /**
* TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor. * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor.
* @see https://meta.wikimedia.org/wiki/TemplateScript * @see https://meta.wikimedia.org/wiki/TemplateScript
* @update-token [[File:Pathoschild/templatescript.js]] * @update-token [[File:Pathoschild/templatescript.js]]
*/ */
mw.loader.load('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js'); mw.loader.load(
'//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js',
);