diff --git a/package.json b/package.json index eb20f5fa4d..a9a4d0e617 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,21 @@ "doc": "docs" }, "xo": { + "ignores": [ + "./phpbb/adm/style/admin.js", + "./phpbb/adm/style/ajax.js", + "./phpbb/adm/style/permissions.js", + "./phpbb/adm/style/tooltip.js", + "./phpbb/assets/cookieconsent/*.js", + "./phpbb/assets/javascript/core.js", + "./phpbb/assets/javascript/editor.js", + "./phpbb/assets/javascript/installer.js", + "./phpbb/assets/javascript/plupload.js", + "./phpbb/assets/javascript/jquery*.js", + "./phpbb/assets/plupload/*.js", + "./phpbb/styles/prosilver/template/ajax.js", + "./phpbb/styles/prosilver/template/forum_fn.js" + ], "rules": { "quotes": [ "error", @@ -25,14 +40,14 @@ "error", "always" ], - "multiline-comment-style": "off", - "computed-property-spacing": "off", - "space-in-parens": "off", - "capitalized-comments": "off", "object-curly-spacing": [ "error", "always" ], + "multiline-comment-style": "off", + "computed-property-spacing": "off", + "space-in-parens": "off", + "capitalized-comments": "off", "no-lonely-if": "off" }, "env": [ diff --git a/phpBB/adm/style/admin.js b/phpBB/adm/style/admin.js index 5fdd07356c..948987fddb 100644 --- a/phpBB/adm/style/admin.js +++ b/phpBB/adm/style/admin.js @@ -1,3 +1,5 @@ +/* global phpbb */ + /** * phpBB3 ACP functions */ diff --git a/phpBB/adm/style/permissions.js b/phpBB/adm/style/permissions.js index dc9951a7a2..04b3fc5c5f 100644 --- a/phpBB/adm/style/permissions.js +++ b/phpBB/adm/style/permissions.js @@ -1,3 +1,5 @@ +/* global phpbb */ + /** * Hide and show all checkboxes * status = true (show boxes), false (hide boxes) diff --git a/phpBB/adm/style/timezone.js b/phpBB/adm/style/timezone.js index b5e27c907c..9959ecce92 100644 --- a/phpBB/adm/style/timezone.js +++ b/phpBB/adm/style/timezone.js @@ -1,13 +1,13 @@ -(function($) { // Avoid conflicts with other libraries +/* global phpbb */ -"use strict"; +(function ($) { // Avoid conflicts with other libraries + 'use strict'; -$('#tz_date').change(function() { - phpbb.timezoneSwitchDate(false); -}); - -$(document).ready( - phpbb.timezoneEnableDateSelection -); + $('#tz_date').change(() => { + phpbb.timezoneSwitchDate(false); + }); + $(document).ready( + phpbb.timezoneEnableDateSelection, + ); })(jQuery); // Avoid conflicts with other libraries diff --git a/phpBB/adm/style/tooltip.js b/phpBB/adm/style/tooltip.js index 9afd398e00..562bc99dc3 100644 --- a/phpBB/adm/style/tooltip.js +++ b/phpBB/adm/style/tooltip.js @@ -1,3 +1,5 @@ +/* global phpbb */ + /* javascript for Bubble Tooltips by Alessandro Fulciniti - http://pro.html.it - http://web-graphics.com diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js index 24cbc09f58..94063c2766 100644 --- a/phpBB/assets/javascript/editor.js +++ b/phpBB/assets/javascript/editor.js @@ -1,3 +1,5 @@ +/* global phpbb */ + /** * bbCode control by subBlue design [ www.subBlue.com ] * Includes unixsafe colour palette selector by SHS` diff --git a/phpBB/styles/prosilver/template/timezone.js b/phpBB/styles/prosilver/template/timezone.js index 44ec1b0979..97d5034d19 100644 --- a/phpBB/styles/prosilver/template/timezone.js +++ b/phpBB/styles/prosilver/template/timezone.js @@ -1,20 +1,18 @@ /* global phpbb */ -(function($) { // Avoid conflicts with other libraries +(function ($) { // Avoid conflicts with other libraries + 'use strict'; -'use strict'; + $('#tz_date').change(() => { + phpbb.timezoneSwitchDate(false); + }); -$('#tz_date').change(function() { - phpbb.timezoneSwitchDate(false); -}); - -$('#tz_select_date_suggest').click(function(){ - phpbb.timezonePreselectSelect(true); -}); - -$(function () { - phpbb.timezoneEnableDateSelection(); - phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('timezone-preselect') === 'true'); -}); + $('#tz_select_date_suggest').click(() => { + phpbb.timezonePreselectSelect(true); + }); + $(() => { + phpbb.timezoneEnableDateSelection(); + phpbb.timezonePreselectSelect($('#tz_select_date_suggest').attr('timezone-preselect') === 'true'); + }); })(jQuery); // Avoid conflicts with other libraries