Update xo to v1.1.1

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2025-05-24 19:14:40 +03:00
parent 839e2a68b6
commit 8329997242
7 changed files with 1574 additions and 2204 deletions

3662
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -53,11 +53,13 @@
},
"devDependencies": {
"autoprefixer": "^10.4.21",
"eslint": "^9.29.0",
"eslint-plugin-compat": "^6.0.2",
"globals": "^16.2.0",
"postcss": "^8.5.6",
"postcss-cli": "^11.0.1",
"prettier": "^3.6.2",
"xo": "^0.60.0"
"xo": "^1.1.1"
},
"browserslist": [
">= 0.5%",
@@ -73,50 +75,5 @@
"printWidth": 100,
"singleQuote": false,
"trailingComma": "es5"
},
"xo": {
"parserOptions": {
"sourceType": "script"
},
"envs": [
"browser",
"jquery"
],
"extends": [
"plugin:compat/recommended"
],
"prettier": true,
"space": 2,
"ignores": [
"**/vendor/**"
],
"rules": {
"camelcase": [
"error",
{
"properties": "never"
}
],
"capitalized-comments": "off",
"new-cap": [
"error",
{
"properties": false
}
],
"no-alert": "off",
"no-console": "error",
"prefer-arrow-callback": "error",
"spaced-comment": "off",
"strict": "error",
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-document-cookie": "off",
"unicorn/no-negated-condition": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-string-slice": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/switch-case-braces": "off"
}
}
}

View File

@@ -92,7 +92,6 @@ $(() => {
});
});
// eslint-disable-next-line no-unused-vars
function initTable() {
table = $("#clientsTable").DataTable({
processing: true,

View File

@@ -99,7 +99,6 @@ function hideSuggestDomains() {
$("#suggest_domains").slideUp("fast");
}
// eslint-disable-next-line no-unused-vars
function initTable() {
table = $("#domainsTable").DataTable({
processing: true,

View File

@@ -170,7 +170,6 @@ function setTypeIcon(type) {
return `<i class='fa fa-fw ${iconClass}' title='${title}\nClick for details about this list'></i> `;
}
// eslint-disable-next-line no-unused-vars
function initTable() {
table = $("#listsTable").DataTable({
processing: true,

View File

@@ -38,6 +38,7 @@ $.extend($.fn.dataTableExt.oSort, {
cidr = m[3].split("/");
if (cidr.length === 2) {
m.pop();
// eslint-disable-next-line unicorn/prefer-spread
m = m.concat(cidr);
}

63
xo.config.js Normal file
View File

@@ -0,0 +1,63 @@
"use strict";
const globals = require("globals");
const { defineConfig } = require("eslint/config");
const compatPlugin = require("eslint-plugin-compat");
module.exports = defineConfig([
{
extends: [compatPlugin.configs["flat/recommended"]],
languageOptions: {
sourceType: "script",
globals: {
...globals.browser,
...globals.jquery,
},
},
prettier: true,
space: 2,
ignores: ["**/vendor/**"],
rules: {
"@stylistic/spaced-comment": "off",
camelcase: [
"error",
{
properties: "never",
},
],
"capitalized-comments": "off",
"new-cap": [
"error",
{
properties: false,
},
],
"no-alert": "off",
"no-console": "error",
// This should be removed later
"no-implicit-globals": "off",
"no-negated-condition": "off",
"promise/prefer-await-to-then": "off",
"prefer-arrow-callback": "error",
"prefer-destructuring": [
// This should be enabled later
"off",
{
object: true,
array: false,
},
],
// This should be reverted to "error" later
strict: ["error", "global"],
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-document-cookie": "off",
"unicorn/no-negated-condition": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-string-slice": "off",
"unicorn/prefer-string-raw": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/switch-case-braces": "off",
},
},
]);