From f9aacf7ebed11d2451cbdf0412d65d7126a6fda2 Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 30 Sep 2022 02:33:57 +0000 Subject: [PATCH] ci: lint code to MediaWiki standards Check commit and GitHub actions for more details --- .commitlintrc.json | 4 +-- .stylelintrc.json | 28 +++++++++--------- .svgo.config.js | 6 ++-- .versionrc.json | 32 ++++++++++----------- resources/skins.citizen.search/typeahead.js | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index 7a4907e0..2894c68c 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -1,3 +1,3 @@ { - "extends": ["@commitlint/config-conventional"] -} \ No newline at end of file + "extends": [ "@commitlint/config-conventional" ] +} diff --git a/.stylelintrc.json b/.stylelintrc.json index 04df02c9..d505de0c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,14 +1,14 @@ -{ - "extends": [ - "stylelint-config-idiomatic-order", - "stylelint-config-wikimedia" - ], - "rules": { - "font-weight-notation": null, - "selector-max-id": null, - "no-descending-specificity": null, - "declaration-no-important": null, - "unit-disallowed-list": null, - "declaration-property-unit-disallowed-list": null - } -} \ No newline at end of file +{ + "extends": [ + "stylelint-config-idiomatic-order", + "stylelint-config-wikimedia" + ], + "rules": { + "font-weight-notation": null, + "selector-max-id": null, + "no-descending-specificity": null, + "declaration-no-important": null, + "unit-disallowed-list": null, + "declaration-property-unit-disallowed-list": null + } +} diff --git a/.svgo.config.js b/.svgo.config.js index 35ef455c..0ba5d8a9 100644 --- a/.svgo.config.js +++ b/.svgo.config.js @@ -49,7 +49,7 @@ module.exports = { // On non-unix systems the linebreaks will be normalized to LF (unix) only at git commit, // assuming `core.autocrlf` is 'true' (default) or 'input'. js2svg: { - indent: "\t", - pretty: true, + indent: '\t', + pretty: true } -} \ No newline at end of file +}; diff --git a/.versionrc.json b/.versionrc.json index 944db3b0..39cc0e4b 100644 --- a/.versionrc.json +++ b/.versionrc.json @@ -1,16 +1,16 @@ -{ - "bumpFiles": [ - { - "filename": "skin.json", - "type": "json" - }, - { - "filename": "package.json", - "type": "json" - }, - { - "filename": "package-lock.json", - "type": "json" - } - ] -} \ No newline at end of file +{ + "bumpFiles": [ + { + "filename": "skin.json", + "type": "json" + }, + { + "filename": "package.json", + "type": "json" + }, + { + "filename": "package-lock.json", + "type": "json" + } + ] +} diff --git a/resources/skins.citizen.search/typeahead.js b/resources/skins.citizen.search/typeahead.js index f5b771d1..804ded1f 100644 --- a/resources/skins.citizen.search/typeahead.js +++ b/resources/skins.citizen.search/typeahead.js @@ -169,7 +169,7 @@ function getSuggestions( searchQuery ) { matchedTitle = cleanup( matchedTitle ); // eslint thinks it is an array - // eslint-disable-next-line no-restricted-syntax + return !( title.includes( matchedTitle ) || matchedTitle.includes( title ) ); };