build: Update eslint-config-wikimedia to 0.28.2 and autofix

Change-Id: I6f9731d42bceb5ff4e2c9733a567c72e359abcbd
This commit is contained in:
Ed Sanders 2024-06-14 13:07:36 +01:00
parent dd5a18c1fc
commit fddb47b128
10 changed files with 333 additions and 207 deletions

476
package-lock.json generated
View file

@ -15,7 +15,7 @@
"@wikimedia/codex": "1.6.1",
"@wikimedia/mw-node-qunit": "7.2.0",
"@wikimedia/types-wikimedia": "0.3.4",
"eslint-config-wikimedia": "0.27.0",
"eslint-config-wikimedia": "0.28.2",
"grunt-banana-checker": "0.13.0",
"jest": "27.4.7",
"stylelint-config-wikimedia": "0.16.1",
@ -705,11 +705,14 @@
}
},
"node_modules/@es-joy/jsdoccomment": {
"version": "0.42.0",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.42.0.tgz",
"integrity": "sha512-R1w57YlVA6+YE01wch3GPYn6bCsrOV3YW/5oGGE2tmX6JcL9Nr+b5IikrjMPF+v9CV3ay+obImEdsDhovhJrzw==",
"version": "0.43.1",
"resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.1.tgz",
"integrity": "sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==",
"dev": true,
"dependencies": {
"@types/eslint": "^8.56.5",
"@types/estree": "^1.0.5",
"@typescript-eslint/types": "^7.2.0",
"comment-parser": "1.4.1",
"esquery": "^1.5.0",
"jsdoc-type-pratt-parser": "~4.0.0"
@ -1784,6 +1787,22 @@
"integrity": "sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==",
"dev": true
},
"node_modules/@types/eslint": {
"version": "8.56.10",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz",
"integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==",
"dev": true,
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
}
},
"node_modules/@types/estree": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
"integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
"dev": true
},
"node_modules/@types/fs-extra": {
"version": "9.0.13",
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
@ -1965,12 +1984,6 @@
"@types/node": "*"
}
},
"node_modules/@types/semver": {
"version": "7.5.8",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
"dev": true
},
"node_modules/@types/sizzle": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.8.tgz",
@ -2057,16 +2070,16 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.13.0.tgz",
"integrity": "sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/visitor-keys": "5.62.0"
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@ -2074,12 +2087,12 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.13.0.tgz",
"integrity": "sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@ -2087,21 +2100,22 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.13.0.tgz",
"integrity": "sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/visitor-keys": "5.62.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/visitor-keys": "7.13.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"semver": "^7.3.7",
"tsutils": "^3.21.0"
"minimatch": "^9.0.4",
"semver": "^7.6.0",
"ts-api-utils": "^1.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@ -2113,65 +2127,75 @@
}
}
},
"node_modules/@typescript-eslint/utils": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
"integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.62.0",
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/typescript-estree": "5.62.0",
"eslint-scope": "^5.1.1",
"semver": "^7.3.7"
"balanced-match": "^1.0.0"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
"version": "9.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/@typescript-eslint/utils": {
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.13.0.tgz",
"integrity": "sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "7.13.0",
"@typescript-eslint/types": "7.13.0",
"@typescript-eslint/typescript-estree": "7.13.0"
},
"engines": {
"node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"dependencies": {
"esrecurse": "^4.3.0",
"estraverse": "^4.1.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"engines": {
"node": ">=4.0"
"eslint": "^8.56.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
"version": "7.13.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.13.0.tgz",
"integrity": "sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"eslint-visitor-keys": "^3.3.0"
"@typescript-eslint/types": "7.13.0",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || >=20.0.0"
},
"funding": {
"type": "opencollective",
@ -3192,9 +3216,9 @@
}
},
"node_modules/browserslist-config-wikimedia": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.6.1.tgz",
"integrity": "sha512-F3O+12ud7ZwBaiB/RZIMGDgz3nEuXz8RhtdPB4Lkd/WVP5Vy77EqBWRMz4vJ64x8LTTH3BOaHCD2ZuUcgShqyQ==",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/browserslist-config-wikimedia/-/browserslist-config-wikimedia-0.7.0.tgz",
"integrity": "sha512-CTa0lv78dXKEgrYsOLCkqO+9UUS3CV9MWEOYHcymgEvx4mYxB80sCoKRCR7wW2SOMNxjaP9hohrZripjnKuRTA==",
"dev": true
},
"node_modules/bs-logger": {
@ -3269,15 +3293,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/builtins": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz",
"integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==",
"dev": true,
"dependencies": {
"semver": "^7.0.0"
}
},
"node_modules/cac": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/cac/-/cac-3.0.4.tgz",
@ -4631,6 +4646,19 @@
"once": "^1.4.0"
}
},
"node_modules/enhanced-resolve": {
"version": "5.17.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz",
"integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
@ -4750,9 +4778,9 @@
}
},
"node_modules/eslint-compat-utils": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.0.tgz",
"integrity": "sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==",
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.5.1.tgz",
"integrity": "sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==",
"dev": true,
"dependencies": {
"semver": "^7.5.4"
@ -4765,28 +4793,28 @@
}
},
"node_modules/eslint-config-wikimedia": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.27.0.tgz",
"integrity": "sha512-KkZ54+MUnggz17C/RCEMXQSpiiqZRF7p9fjrz4phaaeKlTrjg0B+QbM5zcDWcjGiAWaJUptHaH17+RZldadkUw==",
"version": "0.28.2",
"resolved": "https://registry.npmjs.org/eslint-config-wikimedia/-/eslint-config-wikimedia-0.28.2.tgz",
"integrity": "sha512-5+rdnT7wH1gpKAO6tHYThg78eMhZMruJzvqku3Y5iaEY/A7kSKLFpA/vOj/snys9fKjDHC9BXmArQh+agkOoJQ==",
"dev": true,
"dependencies": {
"browserslist-config-wikimedia": "^0.6.1",
"browserslist-config-wikimedia": "^0.7.0",
"eslint": "^8.57.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-es-x": "^7.6.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "48.2.1",
"eslint-plugin-json-es": "^1.5.7",
"eslint-plugin-mediawiki": "^0.6.0",
"eslint-plugin-mocha": "^10.4.1",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-no-jquery": "^2.7.0",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jsdoc": "48.2.5",
"eslint-plugin-json-es": "^1.6.0",
"eslint-plugin-mediawiki": "^0.7.0",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-n": "^17.7.0",
"eslint-plugin-no-jquery": "^3.0.1",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-vue": "^9.23.0",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-vue": "^9.26.0",
"eslint-plugin-wdio": "^8.24.12",
"eslint-plugin-yml": "^1.13.2"
"eslint-plugin-yml": "^1.14.0"
}
},
"node_modules/eslint-plugin-compat": {
@ -4811,39 +4839,40 @@
}
},
"node_modules/eslint-plugin-es-x": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.6.0.tgz",
"integrity": "sha512-I0AmeNgevgaTR7y2lrVCJmGYF0rjoznpDvqV/kIkZSZbZ8Rw3eu4cGlvBBULScfkSOCzqKbff5LR4CNrV7mZHA==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.7.0.tgz",
"integrity": "sha512-aP3qj8BwiEDPttxQkZdI221DLKq9sI/qHolE2YSQL1/9+xk7dTV+tB1Fz8/IaCA+lnLA1bDEnvaS2LKs0k2Uig==",
"dev": true,
"funding": [
"https://github.com/sponsors/ota-meshi",
"https://opencollective.com/eslint"
],
"dependencies": {
"@eslint-community/eslint-utils": "^4.1.2",
"@eslint-community/regexpp": "^4.6.0",
"eslint-compat-utils": "^0.5.0"
"eslint-compat-utils": "^0.5.1"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ota-meshi"
},
"peerDependencies": {
"eslint": ">=8"
}
},
"node_modules/eslint-plugin-jest": {
"version": "27.9.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz",
"integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==",
"version": "28.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.6.0.tgz",
"integrity": "sha512-YG28E1/MIKwnz+e2H7VwYPzHUYU4aMa19w0yGcwXnnmJH6EfgHahTJ2un3IyraUxNfnz/KUhJAFXNNwWPo12tg==",
"dev": true,
"dependencies": {
"@typescript-eslint/utils": "^5.10.0"
"@typescript-eslint/utils": "^6.0.0 || ^7.0.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
"node": "^16.10.0 || ^18.12.0 || >=20.0.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
"eslint": "^7.0.0 || ^8.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0",
"eslint": "^7.0.0 || ^8.0.0 || ^9.0.0",
"jest": "*"
},
"peerDependenciesMeta": {
@ -4856,19 +4885,19 @@
}
},
"node_modules/eslint-plugin-jsdoc": {
"version": "48.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.1.tgz",
"integrity": "sha512-iUvbcyDZSO/9xSuRv2HQBw++8VkV/pt3UWtX9cpPH0l7GKPq78QC/6+PmyQHHvNZaTjAce6QVciEbnc6J/zH5g==",
"version": "48.2.5",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.5.tgz",
"integrity": "sha512-ZeTfKV474W1N9niWfawpwsXGu+ZoMXu4417eBROX31d7ZuOk8zyG66SO77DpJ2+A9Wa2scw/jRqBPnnQo7VbcQ==",
"dev": true,
"dependencies": {
"@es-joy/jsdoccomment": "~0.42.0",
"@es-joy/jsdoccomment": "~0.43.0",
"are-docs-informative": "^0.0.2",
"comment-parser": "1.4.1",
"debug": "^4.3.4",
"escape-string-regexp": "^4.0.0",
"esquery": "^1.5.0",
"is-builtin-module": "^3.2.1",
"semver": "^7.6.0",
"semver": "^7.6.1",
"spdx-expression-parse": "^4.0.0"
},
"engines": {
@ -4904,9 +4933,9 @@
}
},
"node_modules/eslint-plugin-mediawiki": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.6.0.tgz",
"integrity": "sha512-a2Zm18N5nPyflBajM2ZWATxucIpYPEmOSjFzUR1OBH3hAL0GY9fx1mpezEwzqAQ862d+kPkolgQOzktnZe8nKA==",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-mediawiki/-/eslint-plugin-mediawiki-0.7.0.tgz",
"integrity": "sha512-1Y2nsFDPp96xOZCB5ivZAgqYe9i6w2u64VoCIaAzPyZnd/2h8VQR3CtD+u4Yk/KrpbKq9AAJjrs5LS8VAz6KOA==",
"dev": true,
"dependencies": {
"eslint-plugin-vue": "^9.23.0",
@ -4934,40 +4963,73 @@
}
},
"node_modules/eslint-plugin-n": {
"version": "16.6.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz",
"integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==",
"version": "17.9.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.9.0.tgz",
"integrity": "sha512-CPSaXDXdrT4nsrOrO4mT4VB6FMUkoySRkHWuuJJHVqsIEjIeZgMY1H7AzSwPbDScikBmLN82KeM1u7ixV7PzGg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"builtins": "^5.0.1",
"enhanced-resolve": "^5.17.0",
"eslint-plugin-es-x": "^7.5.0",
"get-tsconfig": "^4.7.0",
"globals": "^13.24.0",
"globals": "^15.0.0",
"ignore": "^5.2.4",
"is-builtin-module": "^3.2.1",
"is-core-module": "^2.12.1",
"minimatch": "^3.1.2",
"resolve": "^1.22.2",
"minimatch": "^9.0.0",
"semver": "^7.5.3"
},
"engines": {
"node": ">=16.0.0"
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://github.com/sponsors/mysticatea"
"url": "https://opencollective.com/eslint"
},
"peerDependencies": {
"eslint": ">=7.0.0"
"eslint": ">=8.23.0"
}
},
"node_modules/eslint-plugin-n/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/eslint-plugin-n/node_modules/globals": {
"version": "15.4.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-15.4.0.tgz",
"integrity": "sha512-unnwvMZpv0eDUyjNyh9DH/yxUaRYrEjW/qK4QcdrHg3oO11igUQrCSgODHEqxlKg8v2CD2Sd7UkqqEBoz5U7TQ==",
"dev": true,
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-plugin-n/node_modules/minimatch": {
"version": "9.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz",
"integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/eslint-plugin-no-jquery": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-2.7.0.tgz",
"integrity": "sha512-Aeg7dA6GTH1AcWLlBtWNzOU9efK5KpNi7b0EhBO0o0M+awyzguUUo8gF6hXGjQ9n5h8/uRtYv9zOqQkeC5CG0w==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-no-jquery/-/eslint-plugin-no-jquery-3.0.1.tgz",
"integrity": "sha512-GrzdjIxox/3x8hpSwpxiMuEQFipiJHTGiVsp0T1TI6GH+KVSbXa4z/56xTV1WiIe66u3iRgvCIipu9CRthecpQ==",
"dev": true,
"peerDependencies": {
"eslint": ">=2.3.0"
"eslint": ">=8.0.0"
}
},
"node_modules/eslint-plugin-qunit": {
@ -4993,17 +5055,17 @@
}
},
"node_modules/eslint-plugin-unicorn": {
"version": "51.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz",
"integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==",
"version": "53.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-53.0.0.tgz",
"integrity": "sha512-kuTcNo9IwwUCfyHGwQFOK/HjJAYzbODHN3wP0PgqbW+jbXqpNWxNVpVhj2tO9SixBwuAdmal8rVcWKBxwFnGuw==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.22.20",
"@babel/helper-validator-identifier": "^7.24.5",
"@eslint-community/eslint-utils": "^4.4.0",
"@eslint/eslintrc": "^2.1.4",
"@eslint/eslintrc": "^3.0.2",
"ci-info": "^4.0.0",
"clean-regexp": "^1.0.0",
"core-js-compat": "^3.34.0",
"core-js-compat": "^3.37.0",
"esquery": "^1.5.0",
"indent-string": "^4.0.0",
"is-builtin-module": "^3.2.1",
@ -5012,11 +5074,11 @@
"read-pkg-up": "^7.0.1",
"regexp-tree": "^0.1.27",
"regjsparser": "^0.10.0",
"semver": "^7.5.4",
"semver": "^7.6.1",
"strip-indent": "^3.0.0"
},
"engines": {
"node": ">=16"
"node": ">=18.18"
},
"funding": {
"url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1"
@ -5025,6 +5087,82 @@
"eslint": ">=8.56.0"
}
},
"node_modules/eslint-plugin-unicorn/node_modules/@eslint/eslintrc": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz",
"integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==",
"dev": true,
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
"espree": "^10.0.1",
"globals": "^14.0.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
"js-yaml": "^4.1.0",
"minimatch": "^3.1.2",
"strip-json-comments": "^3.1.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-plugin-unicorn/node_modules/eslint-visitor-keys": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz",
"integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==",
"dev": true,
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-plugin-unicorn/node_modules/espree": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.0.1.tgz",
"integrity": "sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==",
"dev": true,
"dependencies": {
"acorn": "^8.11.3",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^4.0.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-plugin-unicorn/node_modules/globals": {
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz",
"integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==",
"dev": true,
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint-plugin-unicorn/node_modules/semver": {
"version": "7.6.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
"integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/eslint-plugin-vue": {
"version": "9.26.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.26.0.tgz",
@ -11930,6 +12068,15 @@
"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
"dev": true
},
"node_modules/tapable": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
"dev": true,
"engines": {
"node": ">=6"
}
},
"node_modules/tar-fs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
@ -12137,6 +12284,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ts-api-utils": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
"integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==",
"dev": true,
"engines": {
"node": ">=16"
},
"peerDependencies": {
"typescript": ">=4.2.0"
}
},
"node_modules/ts-jest": {
"version": "27.1.3",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-27.1.3.tgz",
@ -12219,27 +12378,6 @@
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
},
"node_modules/tsutils": {
"version": "3.21.0",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
"integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
"dev": true,
"dependencies": {
"tslib": "^1.8.1"
},
"engines": {
"node": ">= 6"
},
"peerDependencies": {
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
}
},
"node_modules/tsutils/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
"node_modules/tunnel-agent": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
@ -12519,9 +12657,9 @@
}
},
"node_modules/vue-eslint-parser": {
"version": "9.4.2",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.2.tgz",
"integrity": "sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==",
"version": "9.4.3",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.3.tgz",
"integrity": "sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==",
"dev": true,
"dependencies": {
"debug": "^4.3.4",

View file

@ -23,7 +23,7 @@
"@wikimedia/codex": "1.6.1",
"@wikimedia/mw-node-qunit": "7.2.0",
"@wikimedia/types-wikimedia": "0.3.4",
"eslint-config-wikimedia": "0.27.0",
"eslint-config-wikimedia": "0.28.2",
"grunt-banana-checker": "0.13.0",
"jest": "27.4.7",
"stylelint-config-wikimedia": "0.16.1",

View file

@ -1,17 +1,15 @@
{
"root": true,
"env": {
"browser": true,
"commonjs": true
},
"extends": [
"wikimedia/client-es6",
"wikimedia/client",
"wikimedia/jquery",
"wikimedia/mediawiki"
],
"parserOptions": {
"sourceType": "commonjs"
},
"rules": {
"jsdoc/no-undefined-types": "off",
"no-implicit-globals": "off",
"max-len": "off"
}
}

View file

@ -19,9 +19,9 @@
function initRelatedArticlesModule( container ) {
$.when(
mw.loader.using( 'ext.relatedArticles.readMore' )
).then( function (
).then( (
/** @type {Function} */ require
) {
) => {
require( 'ext.relatedArticles.readMore' ).init(
container
);
@ -37,7 +37,7 @@
return;
}
// eslint-disable-next-line compat/compat
const observer = /** @type {IntersectionObserver} */( new IntersectionObserver( function ( entries ) {
const observer = /** @type {IntersectionObserver} */( new IntersectionObserver( ( ( entries ) => {
if ( !entries[ 0 ].isIntersecting ) {
return;
}
@ -46,7 +46,7 @@
observer.disconnect();
// @ts-ignore
initRelatedArticlesModule( readMore );
}, {
} ), {
rootMargin: '-100% 0% 0% 0%'
} ) );
observer.observe( readMore );

View file

@ -9,8 +9,7 @@
* @param {Codex.ListTitleObject[]} options.cards
* @return {string}
*/
const RelatedArticles = ( options ) => {
return [
const RelatedArticles = ( options ) => [
`<div class="read-more-container ${ ( options.isContainerSmall ) ? 'read-more-container-small' : 'read-more-container-large' }">`,
`<aside class="noprint">`,
( options.heading ) ?
@ -35,6 +34,5 @@ const RelatedArticles = ( options ) => {
`</aside>`,
`</div>`
].join( '\n' );
};
module.exports = RelatedArticles;

View file

@ -24,7 +24,7 @@ const LIMIT = mw.config.get( 'wgRelatedArticlesCardLimit', 3 );
* @return {Codex.ListTitleObject[]}
*/
function getCards( pages ) {
return pages.map( function ( page ) {
return pages.map( ( page ) => {
const result = {
id: page.title,
label: page.title,

View file

@ -45,7 +45,7 @@ describe( 'ext.relatedArticles.readMore.bootstrap', () => {
it( 'renders with small container and custom heading', () => {
const element = document.createElement( 'div' );
render( [], element, 'Hello world', function ( options ) {
render( [], element, 'Hello world', ( options ) => {
const app = createApp( options );
return app;
}, true );
@ -79,7 +79,7 @@ describe( 'ext.relatedArticles.readMore.bootstrap', () => {
description: 'Page props desc'
}
}
], element, '', function ( options ) {
], element, '', ( options ) => {
const app = createApp( options );
app.use( plugin );
return app;

View file

@ -31,7 +31,7 @@
const gateway = new RelatedPagesGateway( this.api, 'Foo', null, true );
this.sandbox.stub( this.api, 'get' ).returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function ( results ) {
return gateway.getForCurrentPage( 1 ).then( ( results ) => {
assert.true( Array.isArray( results ), 'Results must be an array' );
assert.strictEqual( results[ 0 ].title, 'Oh noes' );
} );
@ -41,7 +41,7 @@
const gateway = new RelatedPagesGateway( this.api, 'Foo', null, true );
this.sandbox.stub( this.api, 'get' ).returns( $.Deferred().resolve( emptyRelatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function ( results ) {
return gateway.getForCurrentPage( 1 ).then( ( results ) => {
assert.true( Array.isArray( results ), 'Results must be an array' );
assert.strictEqual( results.length, 0 );
} );
@ -51,7 +51,7 @@
const gateway = new RelatedPagesGateway( this.api, 'Foo', [], false ),
spy = this.sandbox.stub( this.api, 'get' ).returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function ( results ) {
return gateway.getForCurrentPage( 1 ).then( ( results ) => {
assert.true( Array.isArray( results ), 'Results must be an array' );
assert.false( spy.called, 'API is not invoked' );
assert.strictEqual( results.length, 0 );
@ -62,7 +62,7 @@
const gateway = new RelatedPagesGateway( this.api, 'Foo', [ { title: 1 } ], false );
this.sandbox.stub( this.api, 'get' ).returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function ( results ) {
return gateway.getForCurrentPage( 1 ).then( ( results ) => {
assert.strictEqual( results.length, 1,
'API still hit despite cirrus being disabled.' );
} );
@ -74,7 +74,7 @@
stub = this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 20 ).then( function () {
return gateway.getForCurrentPage( 20 ).then( () => {
assert.strictEqual( stub.args[ 0 ][ 0 ].titles.length, lotsaRelatedPages.length );
} );
} );
@ -85,7 +85,7 @@
stub = this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 2 ).then( function () {
return gateway.getForCurrentPage( 2 ).then( () => {
assert.strictEqual( stub.args[ 0 ][ 0 ].titles.length, 2 );
} );
} );
@ -96,7 +96,7 @@
this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function ( results ) {
return gateway.getForCurrentPage( 1 ).then( ( results ) => {
assert.true( Array.isArray( results ), 'Results must be an array' );
assert.strictEqual( results.length, 1, 'API is invoked to source articles.' );
} );
@ -113,7 +113,7 @@
const spy = this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
return gateway.getForCurrentPage( 1 ).then( function () {
return gateway.getForCurrentPage( 1 ).then( () => {
const parameters = spy.lastCall.args[ 0 ];
assert.strictEqual(

View file

@ -35,19 +35,11 @@ class ReadMorePage extends Page {
}
readMoreCodeIsLoaded() {
browser.waitUntil( async () => {
return await browser.execute( async ( status ) => {
return await mw && mw.loader && mw.loader.getState( 'ext.relatedArticles.readMore' ) === status;
}, 'ready' );
}, 2000, 'Related pages did not load' );
browser.waitUntil( async () => await browser.execute( async ( status ) => await mw && mw.loader && mw.loader.getState( 'ext.relatedArticles.readMore' ) === status, 'ready' ), 2000, 'Related pages did not load' );
}
resourceLoaderModuleStatus( moduleName, moduleStatus ) {
return browser.waitUntil( async () => {
return await browser.execute( async ( module ) => {
return await mw && mw.loader && mw.loader.getState( module.name ) === module.status;
}, { status: moduleStatus, name: moduleName } );
}, 10000, 'Related pages did not load' );
return browser.waitUntil( async () => await browser.execute( async ( module ) => await mw && mw.loader && mw.loader.getState( module.name ) === module.status, { status: moduleStatus, name: moduleName } ), 10000, 'Related pages did not load' );
}
seeReadMore() {

View file

@ -4,7 +4,7 @@ const assert = require( 'assert' ),
Api = require( 'wdio-mediawiki/Api' ),
ReadMorePage = require( '../pageobjects/readmore.page' );
describe( 'ReadMore', function () {
describe( 'ReadMore', () => {
let bot;
before( async () => {
@ -14,13 +14,13 @@ describe( 'ReadMore', function () {
const name = 'Related Articles 1';
// eslint-disable-next-line mocha/no-sibling-hooks
before( async function () {
before( async () => {
// Create page needed for the tests
const content = '{{#related:related_articles_2}}';
await bot.edit( name, content );
} );
it( 'ReadMore is present in Minerva @daily', async function () {
it( 'ReadMore is present in Minerva @daily', async () => {
await ReadMorePage.openMobile( name );
assert( await ReadMorePage.seeReadMore() );
} );