Add function-paren-newline ESLint rule; align config code style (#1000)

* unify indentation in config.default.php

* add eslint rule `function-paren-newline`

* fix `function-param-newline` lint rule
This commit is contained in:
Thomas Rupprecht 2022-12-04 11:33:25 +01:00 committed by GitHub
parent 282f4b45ac
commit d4a9861751
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -3,6 +3,7 @@
"extends": [ "plugin:editorconfig/all" ], "extends": [ "plugin:editorconfig/all" ],
"plugins": [ "editorconfig" ], "plugins": [ "editorconfig" ],
"rules": { "rules": {
"function-paren-newline": "error",
"prefer-arrow-callback": "error", "prefer-arrow-callback": "error",
"no-var": "error", "no-var": "error",
"quotes": [ "quotes": [

View File

@ -25,9 +25,8 @@ ready(() => {
document.getElementById('dashboard-fullscreen') document.getElementById('dashboard-fullscreen')
?.addEventListener('click', (event) => { ?.addEventListener('click', (event) => {
event.preventDefault(); event.preventDefault();
document.querySelectorAll( const removeElementsSelector = '#navbar-collapse-1,.navbar-nav,.navbar-toggler,#footer,#fullscreen-button';
'#navbar-collapse-1,.navbar-nav,.navbar-toggler,#footer,#fullscreen-button' document.querySelectorAll(removeElementsSelector).forEach((element) => {
).forEach((element) => {
element.parentNode.removeChild(element); element.parentNode.removeChild(element);
}); });