Skip to content

Commit

Permalink
Fix JS whitespace CS (#9327)
Browse files Browse the repository at this point in the history
* fix "no-extra-semi"

* fix "object-curly-spacing"

* fix "block-spacing"

* fix "padded-blocks"

* fix "space-before-blocks"

* fix "space-before-function-paren"

* fix "operator-linebreak"

* fix "space-unary-ops"

* fix "space-infix-ops"

* fix most "brace-style"

* fix "curly"

* fix most "brace-style" II

* fix "no-multi-spaces"

* search regex: (?<=\n)( +)(?! ).*\n(?!\1)( +)(&&|\|\||\()

* search regex: (?<=\n)( +)(?! |\*/).*(?<!;)\n(?!\1)( +)(?! |\}|\]|\)|\.)

* fix mostly "brace-style" /w allowSingleLine: false

* fix cs

* search regex: (//|/\*).*\n\s+\{
  • Loading branch information
mvorisek authored Jan 30, 2024
1 parent 8d74e52 commit ecd2796
Show file tree
Hide file tree
Showing 21 changed files with 5,838 additions and 5,268 deletions.
14 changes: 2 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'/plugins/jqueryui/js',
],
rules: {
'brace-style': ['error', '1tbs'],
'class-methods-use-this': 'off',
'comma-dangle': ['error', {
arrays: 'always-multiline',
Expand Down Expand Up @@ -104,11 +105,9 @@ module.exports = {
// TODO
'array-callback-return': 'off', // (7 matches)
'block-scoped-var': 'off', // (391 matches)
'block-spacing': 'off', // (7 matches)
'brace-style': 'off', // (1139 matches)
'brace-style': 'off', // eslint-disable-line no-dupe-keys -- (69 remaining non-autofixable matches)
'camelcase': 'off', // (1886 matches)
'comma-dangle': 'off', // eslint-disable-line no-dupe-keys -- (131 matches)
'curly': 'off', // eslint-disable-line no-dupe-keys -- (1211 matches)
'dot-notation': 'off', // (36 matches)
'eqeqeq': 'off', // (921 matches)
'function-call-argument-newline': 'off', // (20 matches)
Expand All @@ -128,14 +127,12 @@ module.exports = {
'no-empty': 'off', // (15 matches)
'no-eval': 'off', // (2 matches)
'no-extend-native': 'off', // (3 matches)
'no-extra-semi': 'off', // (122 matches)
'no-fallthrough': 'off', // (10 matches)
'no-implied-eval': 'off', // (1 match)
'no-loop-func': 'off', // (5 matches)
'no-mixed-operators': 'off', // (8 matches)
'no-multi-assign': 'off', // (18 matches)
'no-multiple-empty-lines': 'off', // (85 matches)
'no-multi-spaces': 'off', // eslint-disable-line no-dupe-keys -- (69 matches)
'nonblock-statement-body-position': 'off', // (1158 matches)
'no-redeclare': 'off', // (37 matches)
'no-regex-spaces': 'off', // (1 match)
Expand All @@ -152,24 +149,17 @@ module.exports = {
'no-var': 'off', // eslint-disable-line no-dupe-keys -- (986 matches)
'no-whitespace-before-property': 'off', // (1 match)
'object-curly-newline': 'off', // (82 matches)
'object-curly-spacing': 'off', // (667 matches)
'object-property-newline': 'off', // (40 matches)
'one-var': 'off', // eslint-disable-line no-dupe-keys -- (489 matches)
'one-var-declaration-per-line': 'off', // (501 matches)
'operator-assignment': 'off', // (4 matches)
'operator-linebreak': 'off', // (14 matches)
'padded-blocks': 'off', // (7 matches)
'padding-line-between-statements': 'off', // eslint-disable-line no-dupe-keys -- (301 matches)
'prefer-arrow-callback': 'off', // (423 matches)
'prefer-rest-params': 'off', // eslint-disable-line no-dupe-keys -- (3 matches)
'prefer-spread': 'off', // eslint-disable-line no-dupe-keys -- (2 matches)
'quote-props': 'off', // (86 matches)
'radix': 'off', // (12 matches)
'space-before-blocks': 'off', // (13 matches)
'space-before-function-paren': 'off', // (1409 matches)
'spaced-comment': 'off', // eslint-disable-line no-dupe-keys -- (47 matches)
'space-infix-ops': 'off', // (485 matches)
'space-unary-ops': 'off', // (7 matches)
'unicorn/better-regex': 'off', // (42 matches)
'unicorn/consistent-function-scoping': 'off', // (19 matches)
'unicorn/empty-brace-spaces': 'off', // (5 matches)
Expand Down
13 changes: 6 additions & 7 deletions installer/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
+-----------------------------------------------------------------------+
*/

function toggleblock(id, link)
{
function toggleblock(id, link) {
var block = document.getElementById(id);

return false;
}


function addhostfield()
{
function addhostfield() {
var container = document.getElementById('defaulthostlist');
var row = document.createElement('div');
var input = document.createElement('input');
Expand All @@ -31,7 +29,9 @@ function addhostfield()
input.name = '_imap_host[]';
input.size = '30';
link.href = '#';
link.onclick = function() { removehostfield(this.parentNode); return false; };
link.onclick = function () {
removehostfield(this.parentNode); return false;
};
link.className = 'removelink';
link.innerHTML = 'remove';

Expand All @@ -41,8 +41,7 @@ function addhostfield()
}


function removehostfield(row)
{
function removehostfield(row) {
var container = document.getElementById('defaulthostlist');
container.removeChild(row);
}
Loading

0 comments on commit ecd2796

Please sign in to comment.