Skip to content

Commit c54b94b

Browse files
committed
Multiple
1 parent 5205944 commit c54b94b

File tree

2 files changed

+48
-9
lines changed

2 files changed

+48
-9
lines changed

lint.sh

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,59 @@ done
1414
if $SHOULD_FIX
1515
then
1616
echo "Fixing Linting and Formatting Issues"
17-
NPM_LINT_COMMAND="npm run lint:fix --silent"
17+
# NPM_LINT_COMMAND="npm run lint:fix --silent"
18+
ESLINT_FLAGS="--fix"
1819
NEWLINE_FLAGS="--fix"
1920
BLACK_FLAGS=""
2021
else
21-
NPM_LINT_COMMAND="npm run lint --silent"
22+
# NPM_LINT_COMMAND="npm run lint --silent"
23+
ESLINT_FLAGS=""
2224
NEWLINE_FLAGS=""
2325
BLACK_FLAGS="--check"
2426
fi
2527

26-
# ℹ️ Linting Javascript test/**/*.ts
27-
$TEST_COMPOSE run --rm --build \
28-
-v "$(pwd)/.github":/usr/src/test/github \
29-
-v "$(pwd)/docs":/usr/src/test/docs \
30-
-v "$(pwd)/example":/usr/src/test/example \
31-
test-runner -c "$NPM_LINT_COMMAND"
28+
# # ℹ️ Linting Javascript test/**/*.ts
29+
# $TEST_COMPOSE run --rm --build \
30+
# -v "$(pwd)/.github":/usr/src/test/github \
31+
# -v "$(pwd)/docs":/usr/src/test/docs \
32+
# -v "$(pwd)/example":/usr/src/test/example \
33+
# test-runner -c "$NPM_LINT_COMMAND"
34+
35+
# ℹ️ Linting Javascript test/**/*.cjs,js,json,mjs,ts
36+
if $SHOULD_FIX
37+
then
38+
$RUN_TEST_RUNNER_CMD "
39+
npx prettier \"**/*.{cjs,js,json,mjs,ts}\" --write \
40+
--log-level error
41+
"
42+
fi
43+
$RUN_TEST_RUNNER_CMD "
44+
npx eslint . --ext .cjs,.js,.json,.mjs,.ts $ESLINT_FLAGS
45+
"
46+
47+
# ℹ️ Linting Markdown **/*.md
48+
if $SHOULD_FIX
49+
then
50+
$RUN_TEST_RUNNER_CMD "
51+
npx prettier \"../**/*.md\" --write \
52+
--log-level error \
53+
--config ./.prettierrc.json
54+
"
55+
fi
56+
57+
# ℹ️ Linting YML **/*.yml
58+
if $SHOULD_FIX
59+
then
60+
$RUN_TEST_RUNNER_CMD "
61+
npx prettier \"../**/*.yml\" --write \
62+
--log-level error \
63+
--config ./.prettierrc.json
64+
"
65+
fi
66+
$RUN_TEST_RUNNER_CMD "
67+
npx eslint .. --ext .yml $ESLINT_FLAGS \
68+
--config ./.eslintrc.json
69+
"
3270

3371
# ℹ️ Linting Shell Scripts (**/*.sh) - https://github.com/koalaman/shellcheck#from-your-terminal
3472
find . -type d -name node_modules -prune -false -o -name "*.sh" -print0 \

test/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"wikimedia/language/es2019",
66
"@wmde/wikimedia-typescript"
77
],
8-
"ignorePatterns": [ "**/results/result.json" ],
8+
"ignorePatterns": [ "**/results/result.json", "!.github", "!example" ],
99
"parserOptions": {
1010
"sourceType": "module",
1111
"allowImportExportEverywhere": true,
@@ -31,6 +31,7 @@
3131
"files": [ "*.yaml", "*.yml" ],
3232
"parser": "yaml-eslint-parser",
3333
"rules": {
34+
"spaced-comment": 0,
3435
"yml/no-empty-mapping-value": 1
3536
}
3637
}

0 commit comments

Comments
 (0)