Skip to content

Commit c693116

Browse files
committed
Project maintenance
* Update npm dependencies to latest * Upgrade node to 18 * Update linter config to latest WMF config * Disable some failing rules * Fix CI errors caused by old sonar scanner image * Fix tsc/linter issues * Automated code formatting * Disable broken codehealth integration Change-Id: I12830ba40723b0ba32cc3671dba2131561801f88 Bug: T366040 Bug: T349118 Bug: T367272
1 parent 5e7d387 commit c693116

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+9314
-8382
lines changed

.eslintrc.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
"eslint:recommended",
44
"plugin:@typescript-eslint/eslint-recommended",
55
"plugin:@typescript-eslint/recommended",
6-
"wikimedia/server",
7-
"wikimedia/node",
8-
"wikimedia/language/es2017"
6+
"wikimedia/server"
97
],
108
"plugins": ["json", "jsdoc"],
119
"parser": "@typescript-eslint/parser",
12-
"parserOptions": {
13-
"ecmaVersion": 2017,
14-
"sourceType": "module"
15-
},
1610
"rules": {
1711
"camelcase": [
1812
"error",
@@ -27,7 +21,12 @@
2721
"args": "none"
2822
}
2923
],
30-
"space-in-parens": ["error", "never"],
24+
"@typescript-eslint/no-unused-vars": [
25+
"error",
26+
{
27+
"args": "none"
28+
}
29+
],
3130
"computed-property-spacing": "off",
3231
"no-multi-spaces": "off",
3332
"prefer-const": "error",
@@ -39,7 +38,9 @@
3938
"@typescript-eslint/no-var-requires": "off",
4039
"@typescript-eslint/no-explicit-any": "off",
4140
"@typescript-eslint/explicit-function-return-type": "off",
42-
"@typescript-eslint/camelcase": "off"
41+
"@typescript-eslint/camelcase": "off",
42+
"es-x/no-optional-chaining": "off",
43+
"es-x/no-class-fields": "off"
4344
},
4445
"settings": {
4546
"node": {

.pipeline/blubber.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
version: v4
2-
base: docker-registry.wikimedia.org/nodejs12-slim
2+
base: docker-registry.wikimedia.org/nodejs18-slim
33
lives:
44
in: /srv/service
55
runs:
66
environment: { APP_BASE_PATH: /srv/service }
77

88
variants:
99
all-dependencies:
10-
base: docker-registry.wikimedia.org/nodejs12-devel
10+
base: docker-registry.wikimedia.org/nodejs18-devel
1111
copies: [local]
12-
apt: { packages: [git, build-essential, python, pkg-config] }
12+
apt: { packages: [git, build-essential, python3, pkg-config] }
1313
node: { requirements: [package.json, package-lock.json] }
1414
runs: { environment: { LINK: g++ } }
1515
build:
@@ -33,7 +33,7 @@ variants:
3333
destination: /srv/service/dist
3434
node: { env: production }
3535
production:
36-
base: docker-registry.wikimedia.org/nodejs12-slim
36+
base: docker-registry.wikimedia.org/nodejs18-slim
3737
node: { requirements: [] }
3838
includes: [prep]
3939
apt: { packages: [ca-certificates] }
@@ -43,7 +43,7 @@ variants:
4343
environment:
4444
GOOGLE_APPLICATION_CREDENTIALS: /etc/mediawiki-services-push-notifications/google-application-credentials.json
4545
codehealth:
46-
base: docker-registry.wikimedia.org/releng/sonar-scanner:1.0.1
46+
base: docker-registry.wikimedia.org/releng/sonar-scanner:4.6.0.2311-s3
4747
copies: [all-dependencies]
4848
runs:
4949
environment: { SONAR_API_KEY: "SONAR_API_KEY" }

.pipeline/config.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@ pipelines:
88
run:
99
image: '${built.imageID}'
1010
arguments: [test]
11-
- name: codehealth_built
12-
build: codehealth
13-
- name: coverage
14-
run:
15-
image: '${codehealth_built.imageID}'
16-
env:
17-
SONAR_BRANCH_TARGET: ${ZUUL_BRANCH}
18-
SONAR_BRANCH_NAME: '${ZUUL_CHANGE}-${ZUUL_PATCHSET}'
19-
credentials:
20-
- id: SONAR_API_KEY
21-
name: SONAR_API_KEY
11+
# - name: codehealth_built
12+
# build: codehealth
13+
# - name: coverage
14+
# run:
15+
# image: '${codehealth_built.imageID}'
16+
# env:
17+
# SONAR_BRANCH_TARGET: ${ZUUL_BRANCH}
18+
# SONAR_BRANCH_NAME: '${ZUUL_CHANGE}-${ZUUL_PATCHSET}'
19+
# credentials:
20+
# - id: SONAR_API_KEY
21+
# name: SONAR_API_KEY
2222
publish:
2323
blubberfile: blubber.yaml
2424
stages:
25-
- name: codehealth_built
26-
build: codehealth
27-
- name: coverage
28-
run:
29-
image: '${codehealth_built.imageID}'
30-
env:
31-
SONAR_BRANCH_NAME: ${ZUUL_BRANCH}
32-
credentials:
33-
- id: SONAR_API_KEY
34-
name: SONAR_API_KEY
25+
# - name: codehealth_built
26+
# build: codehealth
27+
# - name: coverage
28+
# run:
29+
# image: '${codehealth_built.imageID}'
30+
# env:
31+
# SONAR_BRANCH_NAME: ${ZUUL_BRANCH}
32+
# credentials:
33+
# - id: SONAR_API_KEY
34+
# name: SONAR_API_KEY
3535
- name: publish
3636
build: production
3737
publish:

0 commit comments

Comments
 (0)