mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Add eslint settings to vscode config (#17680)
* Add eslint settings to vscode config * Lint vscode settings as json5 * A tiny bit better argument parsing, oops
This commit is contained in:
@@ -24,7 +24,7 @@ jobs:
|
||||
bash tools/ci/install_dreamchecker.sh
|
||||
- name: Run Linters
|
||||
run: |
|
||||
find . -name "*.json" -not -path "*/node_modules/*" -print0 | xargs -0 python3 ./tools/ci/json_verifier.py
|
||||
tools/ci/check_json.sh
|
||||
tools/ci/build_tgui.sh
|
||||
tools/ci/check_grep.sh
|
||||
python3 tools/ci/check_line_endings.py
|
||||
|
||||
Vendored
+16
-1
@@ -4,5 +4,20 @@
|
||||
},
|
||||
"gitlens.advanced.blame.customArguments": [
|
||||
"--ignore-revs-file", "${workspaceRoot}/.git-blame-ignore-revs"
|
||||
]
|
||||
],
|
||||
// ESLint settings:
|
||||
"eslint.workingDirectories": [
|
||||
"tgui/"
|
||||
],
|
||||
"eslint.rules.customizations": [
|
||||
// We really want to fail the CI builds on styling errors,
|
||||
// but it's better to show them as yellow squigglies in IDE
|
||||
// and thus differentiate from the red typescript ones which
|
||||
// are actually hard errors.
|
||||
{ "rule": "*", "severity": "warn" }
|
||||
],
|
||||
"eslint.format.enable": true,
|
||||
"[javascript]": {
|
||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||
},
|
||||
}
|
||||
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# We probably could validate literally everything as json5, but let's be cautions for no good reason here.
|
||||
find .vscode/ -name "*.json" -print0 | xargs -0 python3 tools/ci/json_verifier.py -5
|
||||
find . -name "*.json" -not -path "*/node_modules/*" -and -not -path "./.vscode/*" -print0 | xargs -0 python3 tools/ci/json_verifier.py
|
||||
@@ -7,4 +7,5 @@ source ~/.nvm/nvm.sh
|
||||
nvm install $NODE_VERSION
|
||||
nvm use $NODE_VERSION
|
||||
npm install --global yarn
|
||||
python3 -m pip install json5
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import sys
|
||||
import json
|
||||
if sys.argv[1:2] == ["-5"]:
|
||||
import json5 as json
|
||||
sys.argv.pop(1)
|
||||
else:
|
||||
import json
|
||||
|
||||
if len(sys.argv) <= 1:
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user