wikimedia/toolhub: main (log #959573)

sourcepatches

This run took 84 seconds.

$ date
--- stdout ---
Sat Mar 18 23:37:04 UTC 2023

--- end ---
$ git clone file:///srv/git/wikimedia-toolhub.git repo --depth=1 -b main
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/main
--- stdout ---
f2bda22c2c079d75fd16858400cacc8dc2fdd588 refs/heads/main

--- end ---
$ /usr/bin/npm audit --json --legacy-peer-deps
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "@apollographql/graphql-upload-8-fork": {
      "name": "@apollographql/graphql-upload-8-fork",
      "severity": "high",
      "isDirect": false,
      "via": [
        "busboy"
      ],
      "effects": [
        "apollo-server-core"
      ],
      "range": "*",
      "nodes": [
        "node_modules/@apollographql/graphql-upload-8-fork"
      ],
      "fixAvailable": true
    },
    "@sideway/formula": {
      "name": "@sideway/formula",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1091026,
          "name": "@sideway/formula",
          "dependency": "@sideway/formula",
          "title": "@sideway/formula contains Regular Expression Denial of Service (ReDoS) Vulnerability",
          "url": "https://github.com/advisories/GHSA-c2jc-4fpr-4vhg",
          "severity": "moderate",
          "cwe": [
            "CWE-1333"
          ],
          "cvss": {
            "score": 5.5,
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
          },
          "range": "<3.0.1"
        }
      ],
      "effects": [],
      "range": "3.0.0",
      "nodes": [
        "node_modules/@sideway/formula"
      ],
      "fixAvailable": true
    },
    "@vue/cli": {
      "name": "@vue/cli",
      "severity": "high",
      "isDirect": true,
      "via": [
        "download-git-repo"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/@vue/cli"
      ],
      "fixAvailable": false
    },
    "@vue/cli-plugin-unit-mocha": {
      "name": "@vue/cli-plugin-unit-mocha",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "mocha"
      ],
      "effects": [],
      "range": ">=5.0.0-alpha.0",
      "nodes": [
        "node_modules/@vue/cli-plugin-unit-mocha"
      ],
      "fixAvailable": {
        "name": "@vue/cli-plugin-unit-mocha",
        "version": "4.5.19",
        "isSemVerMajor": true
      }
    },
    "@vue/cli-ui": {
      "name": "@vue/cli-ui",
      "severity": "high",
      "isDirect": false,
      "via": [
        "apollo-server-express"
      ],
      "effects": [],
      "range": "5.0.0-alpha.0 - 5.0.6",
      "nodes": [
        "node_modules/@vue/cli-ui"
      ],
      "fixAvailable": true
    },
    "ansi-regex": {
      "name": "ansi-regex",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1091188,
          "name": "ansi-regex",
          "dependency": "ansi-regex",
          "title": "Inefficient Regular Expression Complexity in chalk/ansi-regex",
          "url": "https://github.com/advisories/GHSA-93q8-gq69-wqmw",
          "severity": "high",
          "cwe": [
            "CWE-697",
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=3.0.0 <3.0.1"
        },
        {
          "source": 1091189,
          "name": "ansi-regex",
          "dependency": "ansi-regex",
          "title": "Inefficient Regular Expression Complexity in chalk/ansi-regex",
          "url": "https://github.com/advisories/GHSA-93q8-gq69-wqmw",
          "severity": "high",
          "cwe": [
            "CWE-697",
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=4.0.0 <4.1.1"
        },
        {
          "source": 1091190,
          "name": "ansi-regex",
          "dependency": "ansi-regex",
          "title": "Inefficient Regular Expression Complexity in chalk/ansi-regex",
          "url": "https://github.com/advisories/GHSA-93q8-gq69-wqmw",
          "severity": "high",
          "cwe": [
            "CWE-697",
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=5.0.0 <5.0.1"
        }
      ],
      "effects": [],
      "range": "3.0.0 || 4.0.0 - 4.1.0 || 5.0.0",
      "nodes": [
        "node_modules/ansi-regex",
        "node_modules/inquirer/node_modules/ansi-regex",
        "node_modules/log-update/node_modules/ansi-regex",
        "node_modules/mocha/node_modules/ansi-regex",
        "node_modules/nyc/node_modules/ansi-regex",
        "node_modules/wide-align/node_modules/ansi-regex"
      ],
      "fixAvailable": true
    },
    "apollo-server-core": {
      "name": "apollo-server-core",
      "severity": "high",
      "isDirect": false,
      "via": [
        "@apollographql/graphql-upload-8-fork"
      ],
      "effects": [
        "apollo-server-express"
      ],
      "range": "2.21.0-alpha.0 - 2.26.1",
      "nodes": [
        "node_modules/apollo-server-core"
      ],
      "fixAvailable": true
    },
    "apollo-server-express": {
      "name": "apollo-server-express",
      "severity": "high",
      "isDirect": false,
      "via": [
        "apollo-server-core"
      ],
      "effects": [
        "@vue/cli-ui"
      ],
      "range": "2.0.1 || 2.21.0-alpha.0 - 2.26.1",
      "nodes": [
        "node_modules/apollo-server-express"
      ],
      "fixAvailable": true
    },
    "async": {
      "name": "async",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1088666,
          "name": "async",
          "dependency": "async",
          "title": "Prototype Pollution in async",
          "url": "https://github.com/advisories/GHSA-fwr7-v2mv-hh25",
          "severity": "high",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 7.8,
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
          },
          "range": ">=2.0.0 <2.6.4"
        }
      ],
      "effects": [],
      "range": "2.0.0 - 2.6.3",
      "nodes": [
        "node_modules/portfinder/node_modules/async"
      ],
      "fixAvailable": true
    },
    "busboy": {
      "name": "busboy",
      "severity": "high",
      "isDirect": false,
      "via": [
        "dicer"
      ],
      "effects": [
        "@apollographql/graphql-upload-8-fork"
      ],
      "range": "<=0.3.1",
      "nodes": [
        "node_modules/busboy"
      ],
      "fixAvailable": true
    },
    "cacheable-request": {
      "name": "cacheable-request",
      "severity": "high",
      "isDirect": false,
      "via": [
        "http-cache-semantics"
      ],
      "effects": [
        "got"
      ],
      "range": "0.1.0 - 2.1.4",
      "nodes": [
        "node_modules/cacheable-request"
      ],
      "fixAvailable": false
    },
    "decode-uri-component": {
      "name": "decode-uri-component",
      "severity": "low",
      "isDirect": false,
      "via": [
        {
          "source": 1088828,
          "name": "decode-uri-component",
          "dependency": "decode-uri-component",
          "title": "decode-uri-component vulnerable to Denial of Service (DoS)",
          "url": "https://github.com/advisories/GHSA-w573-4hg7-7wgq",
          "severity": "low",
          "cwe": [
            "CWE-20"
          ],
          "cvss": {
            "score": 0,
            "vectorString": null
          },
          "range": "<0.2.1"
        }
      ],
      "effects": [],
      "range": "<0.2.1",
      "nodes": [
        "node_modules/decode-uri-component"
      ],
      "fixAvailable": true
    },
    "dicer": {
      "name": "dicer",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1088997,
          "name": "dicer",
          "dependency": "dicer",
          "title": "Crash in HeaderParser in dicer",
          "url": "https://github.com/advisories/GHSA-wm7h-9275-46v2",
          "severity": "high",
          "cwe": [
            "CWE-248"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": "<=0.3.1"
        }
      ],
      "effects": [
        "busboy"
      ],
      "range": "*",
      "nodes": [
        "node_modules/dicer"
      ],
      "fixAvailable": true
    },
    "download": {
      "name": "download",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "got"
      ],
      "effects": [
        "download-git-repo"
      ],
      "range": ">=4.0.0",
      "nodes": [
        "node_modules/download"
      ],
      "fixAvailable": false
    },
    "download-git-repo": {
      "name": "download-git-repo",
      "severity": "high",
      "isDirect": false,
      "via": [
        "download",
        "git-clone"
      ],
      "effects": [
        "@vue/cli"
      ],
      "range": "*",
      "nodes": [
        "node_modules/download-git-repo"
      ],
      "fixAvailable": false
    },
    "ejs": {
      "name": "ejs",
      "severity": "critical",
      "isDirect": false,
      "via": [
        {
          "source": 1089270,
          "name": "ejs",
          "dependency": "ejs",
          "title": "ejs template injection vulnerability",
          "url": "https://github.com/advisories/GHSA-phwq-j96m-2c2q",
          "severity": "critical",
          "cwe": [
            "CWE-74"
          ],
          "cvss": {
            "score": 9.8,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": "<3.1.7"
        }
      ],
      "effects": [],
      "range": "<3.1.7",
      "nodes": [
        "node_modules/ejs"
      ],
      "fixAvailable": true
    },
    "git-clone": {
      "name": "git-clone",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1089535,
          "name": "git-clone",
          "dependency": "git-clone",
          "title": "Command injection in git-clone",
          "url": "https://github.com/advisories/GHSA-8jmw-wjr8-2x66",
          "severity": "high",
          "cwe": [
            "CWE-77",
            "CWE-88"
          ],
          "cvss": {
            "score": 8.1,
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": "<=0.2.0"
        }
      ],
      "effects": [
        "download-git-repo"
      ],
      "range": "*",
      "nodes": [
        "node_modules/git-clone"
      ],
      "fixAvailable": false
    },
    "got": {
      "name": "got",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1088948,
          "name": "got",
          "dependency": "got",
          "title": "Got allows a redirect to a UNIX socket",
          "url": "https://github.com/advisories/GHSA-pfrx-2q88-qq97",
          "severity": "moderate",
          "cwe": [],
          "cvss": {
            "score": 5.3,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
          },
          "range": "<11.8.5"
        },
        "cacheable-request"
      ],
      "effects": [
        "download"
      ],
      "range": "<=11.8.3",
      "nodes": [
        "node_modules/got"
      ],
      "fixAvailable": false
    },
    "http-cache-semantics": {
      "name": "http-cache-semantics",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1090532,
          "name": "http-cache-semantics",
          "dependency": "http-cache-semantics",
          "title": "http-cache-semantics vulnerable to Regular Expression Denial of Service",
          "url": "https://github.com/advisories/GHSA-rc47-6667-2j5j",
          "severity": "high",
          "cwe": [
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": "<4.1.1"
        }
      ],
      "effects": [
        "cacheable-request"
      ],
      "range": "<4.1.1",
      "nodes": [
        "node_modules/http-cache-semantics"
      ],
      "fixAvailable": false
    },
    "json-pointer": {
      "name": "json-pointer",
      "severity": "critical",
      "isDirect": true,
      "via": [
        {
          "source": 1088901,
          "name": "json-pointer",
          "dependency": "json-pointer",
          "title": "Prototype Pollution in json-pointer",
          "url": "https://github.com/advisories/GHSA-v5vg-g7rq-363w",
          "severity": "moderate",
          "cwe": [
            "CWE-843",
            "CWE-1321"
          ],
          "cvss": {
            "score": 5.6,
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
          },
          "range": "<=0.6.1"
        },
        {
          "source": 1089151,
          "name": "json-pointer",
          "dependency": "json-pointer",
          "title": "json-pointer vulnerable to Prototype Pollution",
          "url": "https://github.com/advisories/GHSA-6xrf-q977-5vgc",
          "severity": "critical",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 9.8,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": "<0.6.2"
        }
      ],
      "effects": [],
      "range": "<=0.6.1",
      "nodes": [
        "node_modules/json-pointer"
      ],
      "fixAvailable": true
    },
    "json5": {
      "name": "json5",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1091147,
          "name": "json5",
          "dependency": "json5",
          "title": "Prototype Pollution in JSON5 via Parse Method",
          "url": "https://github.com/advisories/GHSA-9c47-m6qq-7p4h",
          "severity": "high",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 7.1,
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H"
          },
          "range": "<1.0.2"
        },
        {
          "source": 1091148,
          "name": "json5",
          "dependency": "json5",
          "title": "Prototype Pollution in JSON5 via Parse Method",
          "url": "https://github.com/advisories/GHSA-9c47-m6qq-7p4h",
          "severity": "high",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 7.1,
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H"
          },
          "range": ">=2.0.0 <2.2.2"
        }
      ],
      "effects": [],
      "range": "<1.0.2 || >=2.0.0 <2.2.2",
      "nodes": [
        "node_modules/json5",
        "node_modules/loader-utils/node_modules/json5"
      ],
      "fixAvailable": true
    },
    "loader-utils": {
      "name": "loader-utils",
      "severity": "critical",
      "isDirect": false,
      "via": [
        {
          "source": 1091186,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "Prototype pollution in webpack loader-utils",
          "url": "https://github.com/advisories/GHSA-76p3-8jx3-jpfq",
          "severity": "critical",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 9.8,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": "<1.4.1"
        },
        {
          "source": 1091187,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "Prototype pollution in webpack loader-utils",
          "url": "https://github.com/advisories/GHSA-76p3-8jx3-jpfq",
          "severity": "critical",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 9.8,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": ">=2.0.0 <2.0.3"
        },
        {
          "source": 1091247,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) via url variable",
          "url": "https://github.com/advisories/GHSA-3rfm-jhwj-7488",
          "severity": "high",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=2.0.0 <2.0.4"
        },
        {
          "source": 1091248,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) via url variable",
          "url": "https://github.com/advisories/GHSA-3rfm-jhwj-7488",
          "severity": "high",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=1.0.0 <1.4.2"
        },
        {
          "source": 1091250,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS)",
          "url": "https://github.com/advisories/GHSA-hhq3-ff78-jv3g",
          "severity": "high",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=2.0.0 <2.0.4"
        },
        {
          "source": 1091251,
          "name": "loader-utils",
          "dependency": "loader-utils",
          "title": "loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS)",
          "url": "https://github.com/advisories/GHSA-hhq3-ff78-jv3g",
          "severity": "high",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=1.0.0 <1.4.2"
        }
      ],
      "effects": [],
      "range": "<=1.4.1 || 2.0.0 - 2.0.3",
      "nodes": [
        "node_modules/loader-utils",
        "node_modules/null-loader/node_modules/loader-utils",
        "node_modules/thread-loader/node_modules/loader-utils",
        "node_modules/vue-loader/node_modules/loader-utils",
        "node_modules/vuetify-loader/node_modules/loader-utils"
      ],
      "fixAvailable": true
    },
    "marked": {
      "name": "marked",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1089485,
          "name": "marked",
          "dependency": "marked",
          "title": "Inefficient Regular Expression Complexity in marked",
          "url": "https://github.com/advisories/GHSA-5v2h-r2cx-5xgj",
          "severity": "high",
          "cwe": [
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": "<4.0.10"
        },
        {
          "source": 1089486,
          "name": "marked",
          "dependency": "marked",
          "title": "Inefficient Regular Expression Complexity in marked",
          "url": "https://github.com/advisories/GHSA-rrrm-qjm4-v8hf",
          "severity": "high",
          "cwe": [
            "CWE-400",
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": "<4.0.10"
        }
      ],
      "effects": [
        "rapidoc"
      ],
      "range": "<=4.0.9",
      "nodes": [
        "node_modules/marked"
      ],
      "fixAvailable": true
    },
    "minimatch": {
      "name": "minimatch",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1091174,
          "name": "minimatch",
          "dependency": "minimatch",
          "title": "minimatch ReDoS vulnerability",
          "url": "https://github.com/advisories/GHSA-f8q6-p94x-37v3",
          "severity": "high",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": "<3.0.5"
        }
      ],
      "effects": [
        "mocha"
      ],
      "range": "<3.0.5",
      "nodes": [
        "node_modules/minimatch"
      ],
      "fixAvailable": {
        "name": "@vue/cli-plugin-unit-mocha",
        "version": "4.5.19",
        "isSemVerMajor": true
      }
    },
    "minimist": {
      "name": "minimist",
      "severity": "critical",
      "isDirect": false,
      "via": [
        {
          "source": 1091173,
          "name": "minimist",
          "dependency": "minimist",
          "title": "Prototype Pollution in minimist",
          "url": "https://github.com/advisories/GHSA-xvch-5gv4-984h",
          "severity": "critical",
          "cwe": [
            "CWE-1321"
          ],
          "cvss": {
            "score": 9.8,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
          },
          "range": ">=1.0.0 <1.2.6"
        }
      ],
      "effects": [],
      "range": "1.0.0 - 1.2.5",
      "nodes": [
        "node_modules/minimist"
      ],
      "fixAvailable": true
    },
    "mocha": {
      "name": "mocha",
      "severity": "high",
      "isDirect": true,
      "via": [
        "minimatch",
        "nanoid"
      ],
      "effects": [
        "@vue/cli-plugin-unit-mocha"
      ],
      "range": "5.1.0 - 9.2.1",
      "nodes": [
        "node_modules/@vue/cli-plugin-unit-mocha/node_modules/mocha",
        "node_modules/mocha"
      ],
      "fixAvailable": {
        "name": "@vue/cli-plugin-unit-mocha",
        "version": "4.5.19",
        "isSemVerMajor": true
      }
    },
    "moment": {
      "name": "moment",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1090141,
          "name": "moment",
          "dependency": "moment",
          "title": "Moment.js vulnerable to Inefficient Regular Expression Complexity",
          "url": "https://github.com/advisories/GHSA-wc69-rhjr-hc9g",
          "severity": "high",
          "cwe": [
            "CWE-400",
            "CWE-1333"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=2.18.0 <2.29.4"
        },
        {
          "source": 1090142,
          "name": "moment",
          "dependency": "moment",
          "title": "Path Traversal: 'dir/../../filename' in moment.locale",
          "url": "https://github.com/advisories/GHSA-8hfj-j24r-96c4",
          "severity": "high",
          "cwe": [
            "CWE-22",
            "CWE-27"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
          },
          "range": "<2.29.2"
        }
      ],
      "effects": [],
      "range": "<=2.29.3",
      "nodes": [
        "node_modules/moment"
      ],
      "fixAvailable": true
    },
    "nanoid": {
      "name": "nanoid",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1089011,
          "name": "nanoid",
          "dependency": "nanoid",
          "title": "Exposure of Sensitive Information to an Unauthorized Actor in nanoid",
          "url": "https://github.com/advisories/GHSA-qrpm-p2h7-hrv2",
          "severity": "moderate",
          "cwe": [
            "CWE-200"
          ],
          "cvss": {
            "score": 5.5,
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
          },
          "range": ">=3.0.0 <3.1.31"
        }
      ],
      "effects": [
        "mocha"
      ],
      "range": "3.0.0 - 3.1.30",
      "nodes": [
        "node_modules/@vue/cli-plugin-unit-mocha/node_modules/nanoid"
      ],
      "fixAvailable": {
        "name": "@vue/cli-plugin-unit-mocha",
        "version": "4.5.19",
        "isSemVerMajor": true
      }
    },
    "node-forge": {
      "name": "node-forge",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1088746,
          "name": "node-forge",
          "dependency": "node-forge",
          "title": "Improper Verification of Cryptographic Signature in `node-forge`",
          "url": "https://github.com/advisories/GHSA-2r2c-g63r-vccr",
          "severity": "moderate",
          "cwe": [
            "CWE-347"
          ],
          "cvss": {
            "score": 5.3,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
          },
          "range": "<1.3.0"
        },
        {
          "source": 1091350,
          "name": "node-forge",
          "dependency": "node-forge",
          "title": "Improper Verification of Cryptographic Signature in node-forge",
          "url": "https://github.com/advisories/GHSA-cfm4-qjh2-4765",
          "severity": "high",
          "cwe": [
            "CWE-347"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
          },
          "range": "<1.3.0"
        },
        {
          "source": 1091351,
          "name": "node-forge",
          "dependency": "node-forge",
          "title": "Improper Verification of Cryptographic Signature in node-forge",
          "url": "https://github.com/advisories/GHSA-x4jg-mjrx-434g",
          "severity": "high",
          "cwe": [
            "CWE-347"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
          },
          "range": "<1.3.0"
        }
      ],
      "effects": [],
      "range": "<=1.2.1",
      "nodes": [
        "node_modules/node-forge"
      ],
      "fixAvailable": true
    },
    "prismjs": {
      "name": "prismjs",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1090424,
          "name": "prismjs",
          "dependency": "prismjs",
          "title": "Cross-site Scripting in Prism",
          "url": "https://github.com/advisories/GHSA-3949-f494-cm99",
          "severity": "high",
          "cwe": [
            "CWE-79"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:L/A:L"
          },
          "range": ">=1.14.0 <1.27.0"
        }
      ],
      "effects": [],
      "range": "1.14.0 - 1.26.0",
      "nodes": [
        "node_modules/prismjs"
      ],
      "fixAvailable": true
    },
    "rapidoc": {
      "name": "rapidoc",
      "severity": "high",
      "isDirect": true,
      "via": [
        "marked"
      ],
      "effects": [],
      "range": "<=9.1.3 || 9.1.5",
      "nodes": [
        "node_modules/rapidoc"
      ],
      "fixAvailable": true
    },
    "shelljs": {
      "name": "shelljs",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1088208,
          "name": "shelljs",
          "dependency": "shelljs",
          "title": "Improper Privilege Management in shelljs",
          "url": "https://github.com/advisories/GHSA-64g7-mvw6-v9qj",
          "severity": "moderate",
          "cwe": [
            "CWE-269"
          ],
          "cvss": {
            "score": 0,
            "vectorString": null
          },
          "range": "<0.8.5"
        },
        {
          "source": 1090457,
          "name": "shelljs",
          "dependency": "shelljs",
          "title": "Improper Privilege Management in shelljs",
          "url": "https://github.com/advisories/GHSA-4rq4-32rv-6wp6",
          "severity": "high",
          "cwe": [
            "CWE-269"
          ],
          "cvss": {
            "score": 7.1,
            "vectorString": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H"
          },
          "range": "<0.8.5"
        }
      ],
      "effects": [],
      "range": "<=0.8.4",
      "nodes": [
        "node_modules/shelljs"
      ],
      "fixAvailable": true
    },
    "terser": {
      "name": "terser",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1091356,
          "name": "terser",
          "dependency": "terser",
          "title": "Terser insecure use of regular expressions leads to ReDoS",
          "url": "https://github.com/advisories/GHSA-4wf5-vphf-c2xc",
          "severity": "high",
          "cwe": [],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
          },
          "range": ">=5.0.0 <5.14.2"
        }
      ],
      "effects": [],
      "range": "5.0.0 - 5.14.1",
      "nodes": [
        "node_modules/terser"
      ],
      "fixAvailable": true
    },
    "vuetify": {
      "name": "vuetify",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        {
          "source": 1089240,
          "name": "vuetify",
          "dependency": "vuetify",
          "title": "Vuetify Cross-site Scripting vulnerability",
          "url": "https://github.com/advisories/GHSA-q4q5-c5cv-2p68",
          "severity": "moderate",
          "cwe": [
            "CWE-79"
          ],
          "cvss": {
            "score": 5.4,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
          },
          "range": ">=2.0.0-beta.4 <2.6.10"
        }
      ],
      "effects": [],
      "range": "2.0.0-beta.4 - 2.6.9",
      "nodes": [
        "node_modules/vuetify"
      ],
      "fixAvailable": true
    },
    "webpack": {
      "name": "webpack",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1091367,
          "name": "webpack",
          "dependency": "webpack",
          "title": "Cross-realm object access in Webpack 5",
          "url": "https://github.com/advisories/GHSA-hc6q-2mpp-qw7j",
          "severity": "high",
          "cwe": [],
          "cvss": {
            "score": 7.6,
            "vectorString": "CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:H"
          },
          "range": ">=5.0.0 <5.76.0"
        }
      ],
      "effects": [],
      "range": "5.0.0 - 5.75.0",
      "nodes": [
        "node_modules/webpack"
      ],
      "fixAvailable": true
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 1,
      "moderate": 5,
      "high": 25,
      "critical": 4,
      "total": 35
    },
    "dependencies": {
      "prod": 68,
      "dev": 2087,
      "optional": 3,
      "peer": 3,
      "peerOptional": 0,
      "total": 2154
    }
  }
}

--- end ---
Upgrading n:eslint from ^8.10.0 -> 8.31.0
Upgrading n:eslint-config-wikimedia from ^0.22.1 -> 0.24.0
Upgrading n:grunt-banana-checker from ^0.9.0 -> 0.10.0
Upgrading n:stylelint from ^14.5.3 -> 14.14.0
Upgrading n:stylelint-config-wikimedia from ^0.12.2 -> 0.14.0
$ /usr/bin/npm install
--- stderr ---
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated subscriptions-transport-ws@0.9.19: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead
npm WARN deprecated core-js@2.6.12: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
--- stdout ---

added 2167 packages, and audited 2168 packages in 25s

189 packages are looking for funding
  run `npm fund` for details

35 vulnerabilities (1 low, 5 moderate, 25 high, 4 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
$ ./node_modules/.bin/eslint . --fix
--- stdout ---

/src/repo/vue/src/components/auditlog/EventTimestamp.vue
  3:6  error  Filters are deprecated  vue/no-deprecated-filter

/src/repo/vue/src/components/auditlog/LogEvent.js
  265:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/auditlog/LogEvent.spec.js
   69:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
   94:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  119:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  167:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  194:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  198:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  228:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at
  232:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at

/src/repo/vue/src/components/common/CommentDialog.vue
   95:17  warning  The "input" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  107:16  warning  The "save" event has been triggered but not declared on `emits` option   vue/require-explicit-emits

/src/repo/vue/src/components/common/ConfirmDeleteDialog.vue
  69:17  warning  The "input" event has been triggered but not declared on `emits` option   vue/require-explicit-emits
  75:16  warning  The "delete" event has been triggered but not declared on `emits` option  vue/require-explicit-emits

/src/repo/vue/src/components/common/DatePicker.vue
  75:3   error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
  91:16  warning  The "input" event has been triggered but not declared on `emits` option  vue/require-explicit-emits

/src/repo/vue/src/components/common/I18nHtml.spec.js
  32:12  error  ES2022 'Array.prototype.at' method is forbidden  es-x/no-array-string-prototype-at

/src/repo/vue/src/components/common/InputWidget.vue
  240:3   error    ES2018 'Promise.prototype.finally' method is forbidden                   es-x/no-promise-prototype-finally
  290:21  error    ES2020 'import()' syntax is forbidden                                    es-x/no-dynamic-import
  340:52  error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
  366:3   error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
  369:3   error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
  382:17  warning  The "input" event has been triggered but not declared on `emits` option  vue/require-explicit-emits

/src/repo/vue/src/components/common/ItemDialog.vue
   84:18  error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
   90:13  error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  110:16  warning  The "update:items" event has been triggered but not declared on `emits` option      vue/require-explicit-emits
  114:24  error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  117:16  warning  The "update:item-edit" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  149:7   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  150:7   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties

/src/repo/vue/src/components/common/Revisions.vue
   85:9   error    Filters are deprecated                                                              vue/no-deprecated-filter
   88:9   error    Filters are deprecated                                                              vue/no-deprecated-filter
  202:16  warning  The "update-revisions" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  214:6   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  229:6   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  250:7   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  267:5   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  282:5   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  295:5   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties
  309:5   error    ES2018 rest/spread properties are forbidden                                         es-x/no-rest-spread-properties

/src/repo/vue/src/components/diff/DiffPath.vue
  5:5  error  `<template v-for>` key should be placed on the `<template>` tag  vue/no-v-for-template-key-on-child

/src/repo/vue/src/components/lists/CreateEditList.vue
  118:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  156:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  159:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  176:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/lists/CreateListDialog.vue
   85:3   error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
   92:17  warning  The "input" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  131:3   error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties
  134:22  error    ES2018 rest/spread properties are forbidden                              es-x/no-rest-spread-properties

/src/repo/vue/src/components/lists/ListCard.vue
  166:16  warning  The "delete-list" event has been triggered but not declared on `emits` option  vue/require-explicit-emits

/src/repo/vue/src/components/lists/ListInfo.vue
   99:15  error    Filters are deprecated                                                               vue/no-deprecated-filter
  190:16  warning  The "copy-to-clipboard" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  193:16  warning  The "delete-list" event has been triggered but not declared on `emits` option        vue/require-explicit-emits

/src/repo/vue/src/components/lists/Lists.vue
  11:12  error  The `$listeners` is deprecated  vue/no-deprecated-dollar-listeners-api

/src/repo/vue/src/components/locale/SelectLocale.vue
  96:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  97:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/oauth/AuthorizedApps.vue
  101:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/oauth/ClientApps.vue
  120:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  136:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/oauth/RegisterApp.vue
  165:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  191:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  206:21  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/search/FilterList.vue
  167:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/search/Filters.vue
  244:17  warning  The "change" event has been triggered but not declared on `emits` option  vue/require-explicit-emits

/src/repo/vue/src/components/search/SearchBar.vue
   90:3   error    ES2018 rest/spread properties are forbidden                               es-x/no-rest-spread-properties
  102:21  error    ES2018 rest/spread properties are forbidden                               es-x/no-rest-spread-properties
  139:16  warning  The "search" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  144:16  warning  The "search" event has been triggered but not declared on `emits` option  vue/require-explicit-emits
  155:4   error    ES2018 'Promise.prototype.finally' method is forbidden                    es-x/no-promise-prototype-finally

/src/repo/vue/src/components/tools/CreateNewTool.vue
   65:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
   66:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
   67:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  192:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  197:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/tools/EditAnnotations.vue
  328:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  629:26  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  711:7   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  712:7   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/tools/EditTool.vue
  334:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  335:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  704:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  745:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  775:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  788:15  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  821:29  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  821:44  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/tools/FavoriteButton.vue
  59:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/tools/RegisterToolUrl.vue
   72:10  error  Filters are deprecated                                  vue/no-deprecated-filter
  128:3   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  178:6   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  179:24  error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  184:4   error  ES2018 'Promise.prototype.finally' method is forbidden  es-x/no-promise-prototype-finally

/src/repo/vue/src/components/tools/ToolInfo.vue
  217:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/tools/ToolMenu.vue
  125:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  157:22  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/user/AuthToken.vue
  64:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  67:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/components/user/Status.vue
  113:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/helpers/object.js
  16:34  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/plugins/notify/component.vue
  30:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  34:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/router/index.js
   7:30  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
   8:23  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
   9:25  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  10:30  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  11:30  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  12:33  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  13:37  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  14:25  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  15:27  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  16:33  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  17:24  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  18:21  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  19:30  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  20:23  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  21:29  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  22:22  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  23:27  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  24:33  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import
  25:24  error  ES2020 'import()' syntax is forbidden  es-x/no-dynamic-import

/src/repo/vue/src/store/api.js
  78:14  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/store/api.spec.js
   80:40  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  104:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  121:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  140:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/auditlogs.spec.js
   89:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  105:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  115:51  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/crawler.js
  11:27  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/crawler.spec.js
  103:32  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  119:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  149:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  165:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  187:52  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  199:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  213:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  236:52  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  248:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  260:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  288:52  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  301:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  317:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/favorites.spec.js
   70:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
   88:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  106:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  126:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  143:32  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  162:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  184:34  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  200:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  214:39  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/groups.spec.js
   95:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  113:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  139:42  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  170:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  207:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  237:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/lists.spec.js
   31:4   error  ES2018 rest/spread properties are forbidden       es-x/no-rest-spread-properties
   50:4   error  ES2018 rest/spread properties are forbidden       es-x/no-rest-spread-properties
  166:39  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  184:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  205:40  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  223:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  245:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  269:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  294:42  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  313:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  333:44  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  352:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  372:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  393:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  418:28  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  437:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  456:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  474:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  493:32  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  511:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  535:50  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  551:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  581:35  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  609:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  627:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  652:47  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  670:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  699:41  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  716:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  743:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  758:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  784:34  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  799:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  824:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  839:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  863:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/locale.js
   63:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
   64:3   error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  150:15  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/store/oauth.spec.js
   91:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  109:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  133:34  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  154:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  177:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  196:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  219:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  233:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  253:40  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  270:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  290:43  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  308:48  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/recentchanges.spec.js
   96:39  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  114:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/search.spec.js
  135:37  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  148:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  168:37  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  181:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  201:39  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  214:37  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  230:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  250:39  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  263:37  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  281:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/tools.spec.js
   56:3   error  ES2018 rest/spread properties are forbidden       es-x/no-rest-spread-properties
   57:3   error  ES2018 rest/spread properties are forbidden       es-x/no-rest-spread-properties
  221:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  239:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  260:37  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  278:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  298:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  316:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  336:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  360:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  386:28  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  405:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  430:35  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  449:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  474:50  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  490:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  521:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  539:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  565:47  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  583:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  612:41  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  629:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  656:45  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  671:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  697:34  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  712:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  737:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  752:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  776:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/ui.spec.js
  59:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  75:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/store/user.spec.js
   87:34  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  111:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  125:42  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  160:30  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  176:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  187:31  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  200:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  233:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  260:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  277:29  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  311:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  329:25  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  354:36  error  ES2017 async function declarations are forbidden  es-x/no-async-functions
  379:38  error  ES2017 async function declarations are forbidden  es-x/no-async-functions

/src/repo/vue/src/views/AddRemoveTools.vue
  56:15  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ApiDocs.vue
  51:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  52:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  55:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/AuditLogs.vue
  192:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/CrawlerHistory.vue
   43:10  error  Filters are deprecated                                  vue/no-deprecated-filter
  208:3   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  269:4   error  ES2018 'Promise.prototype.finally' method is forbidden  es-x/no-promise-prototype-finally
  277:4   error  ES2018 'Promise.prototype.finally' method is forbidden  es-x/no-promise-prototype-finally
  289:8   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  290:8   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties

/src/repo/vue/src/views/DeveloperSettings.vue
  62:15  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/EditToolOrAnnotations.vue
  64:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  93:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  94:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/Favorites.vue
  57:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/Home.vue
  112:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  115:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  118:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ListHistory.vue
  74:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ListRevisionsDiff.vue
  101:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  119:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ListView.vue
  69:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  72:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  73:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/Members.vue
   99:10  error  Filters are deprecated                                  vue/no-deprecated-filter
  278:3   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  279:3   error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  331:4   error  ES2018 'Promise.prototype.finally' method is forbidden  es-x/no-promise-prototype-finally

/src/repo/vue/src/views/MyLists.vue
  67:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/PublishedLists.vue
   92:3  error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
   95:3  error  ES2018 rest/spread properties are forbidden             es-x/no-rest-spread-properties
  122:4  error  ES2018 'Promise.prototype.finally' method is forbidden  es-x/no-promise-prototype-finally

/src/repo/vue/src/views/RecentChanges.vue
  209:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/Search.vue
  95:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ToolHistory.vue
  74:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ToolRevisionsDiff.vue
   98:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  116:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

/src/repo/vue/src/views/ToolView.vue
  60:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  69:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties
  70:3  error  ES2018 rest/spread properties are forbidden  es-x/no-rest-spread-properties

✖ 306 problems (290 errors, 16 warnings)


--- end ---
$ ./node_modules/.bin/eslint . -f json
--- stdout ---
[{"filePath":"/src/repo/.jsonschema-tools.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/contrib/demo-server/docker-compose.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/contrib/oauth-client-example/docker-compose.oauth.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/contrib/prometheus/docker-compose.prometheus.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/contrib/prometheus/prometheus.yml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/docker-compose.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/1.0.0.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/1.1.1.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/1.2.0.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/1.2.1.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/1.2.2.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/jsonschema/toolinfo/current.yaml","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/package-lock.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/package.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/tests/jsonschema/repository.test.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"no-process-exit","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/crawler/tests/crawler_happy_path.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/crawler/tests/crawler_missing_run_1.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/crawler/tests/crawler_missing_run_2.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/lists/tests/toolinfo_fixture.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/toolinfo/test/toolinfo_fixture.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/toolinfo/test/view_annotations.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/toolhub/apps/toolinfo/test/view_fixture.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue.config.js","messages":[],"suppressedMessages":[{"ruleId":"no-console","severity":2,"message":"Unexpected console statement.","line":43,"column":3,"nodeType":"MemberExpression","messageId":"unexpected","endLine":43,"endColumn":14,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]},{"ruleId":"no-process-exit","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/App.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/bcl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/bn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/cy.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/da.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/dag.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/de-formal.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/de.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/diq.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/en-gb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/en.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/es.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/fi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/fr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/he.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/hi.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/hu.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/it.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/ja.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/ko.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/lb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/lmo.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/mk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/ms.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/nb.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/om.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/pt-br.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/qqq.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/ru.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/scn.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/sl.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/sv.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/te.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/tr.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/uk.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/zh-hans.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/assets/locales/i18n/zh-hant.json","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/auditlog/EventIcon.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/auditlog/EventTimestamp.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":3,"column":6,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":3,"endColumn":46}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<dd class=\"log-event-timestamp\">\n\t\t{{ log.timestamp | moment( \"utc\", \"LT ll\" ) }}\n\t</dd>\n</template>\n\n<script>\nexport default {\n\tname: 'EventTimestamp',\n\tprops: {\n\t\t/**\n\t\t * Log event to render.\n\t\t */\n\t\tlog: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/auditlog/LogEvent.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":265,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":265,"endColumn":41}],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'msgKey' dynamic key is used'","line":37,"column":14,"nodeType":"CallExpression","endLine":37,"endColumn":30,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"import i18n from '@/plugins/i18n';\nimport { mapGetters } from 'vuex';\nimport EventIcon from '@/components/auditlog/EventIcon';\nimport EventTimestamp from '@/components/auditlog/EventTimestamp';\nimport UserLink from '@/components/auditlog/UserLink';\n\n/**\n * Generate a list of nodes to output based on message interpolation.\n *\n * This is a hacky way to get our Banana-i18n integration to work similar to\n * the <i18n> component from vue-i18n. The `$t()` function always treats\n * message arguments as plain text. This is actually a really good thing for\n * avoiding XSS and similar issues from untrusted input. It makes templating\n * complex things like an audit log message tricky however.\n *\n * This builder takes inspiration from <i18n> and emits an array of values to\n * be added to the DOM. These values can be plain strings or VNode objects\n * that Vue knows how to render as HTML. The list is computed by first getting\n * the localized message _without_ expanding its parameter placeholders. That\n * localized stirng is then split on the placeholders to produce something\n * like `['string', 'placeholder', 'string', 'placeholder', 'string']`. The\n * code then walks this array and for each element emits either the output of\n * `wrap('string')` or the provided argument matching the placeholder\n * position. This output is suitable for use as the children array for\n * a VNode.\n *\n * @param {Object} log - Log event being rendered\n * @param {Object[]} msgArgs - Arguments to interpolate into message\n * @param {Function} wrap - Function to generate wrapper elements for text\n * @param {boolean} rtl - Is the current locale RTL?\n * @return {Object[]} List of nodes to emit for rendering\n */\nexport function buildNodes( log, msgArgs, wrap, rtl ) {\n\tconst action = log.action.replace( ' ', '-' );\n\tconst msgKey = 'auditlog-entry-' + log.target.type + '-' + action;\n\t// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys\n\tconst msg = i18n.t( msgKey );\n\tconst msgParts = msg.split( /(\\$\\d+) ?/ );\n\tif ( rtl ) {\n\t\t// Flip array when in an RTL locale so that our re-wrapping maintains\n\t\t// RTL order when rendered as HTML. Note that this would not be\n\t\t// necessary if we emitted the text nodes raw instead of wrapping them\n\t\t// in <dd> nodes.\n\t\tmsgParts.reverse();\n\t}\n\tconst placeholderRegex = /\\$(\\d+)/;\n\tconst children = msgParts.map( ( elm ) => {\n\t\tconst m = elm.match( placeholderRegex );\n\t\tif ( m !== null ) {\n\t\t\tconst idx = parseInt( m[ 1 ], 10 ) - 1;\n\t\t\treturn msgArgs[ idx ];\n\t\t} else if ( elm ) {\n\t\t\treturn wrap( elm, { class: 'log-event-text' } );\n\t\t}\n\t\treturn null;\n\t} );\n\n\tif ( log.message ) {\n\t\tchildren.push( wrap(\n\t\t\t[ '(', log.message, ')' ],\n\t\t\t{ class: 'log-event-message' }\n\t\t) );\n\t}\n\treturn children;\n}\n\n/**\n * Render components to display a LogEvent.\n *\n * @param {Function} createElement - Vue's createElement factory\n * @return {Object} root component to render\n */\nexport function render( createElement ) {\n\t/**\n\t * Emit a <router-link>.\n\t *\n\t * @param {Object} props - Component props\n\t * @param {string} label - Link text\n\t * @return {Object}\n\t */\n\tconst link = function ( props, label ) {\n\t\treturn createElement( 'router-link', { props }, [ label ] );\n\t};\n\n\t/**\n\t * Emit a node describing a user.\n\t *\n\t * @param {Object} user_ - User information\n\t * @param {number} user_.id - User id\n\t * @param {string} user_.username - User username\n\t * @param {boolean} showTalk - Display link to user_'s Talk page\n\t * @return {Object}\n\t */\n\tconst user = function ( user_, showTalk = false ) {\n\t\t// Be defensive unpacking user when dealing with legacy records in dev\n\t\t// and test environments.\n\t\tconst id = user_ && user_.id || null;\n\t\tconst username = user_ && user_.username || null;\n\t\treturn createElement( 'UserLink',\n\t\t\t{ props: { user: { id, username }, showTalk } },\n\t\t\t[ username ]\n\t\t);\n\t};\n\n\t/**\n\t * Emit a <dd> node.\n\t *\n\t * @param {Object[]} children - child nodes for the <dd>\n\t * @param {?Object} parameters - extra parameters for node\n\t * @return {Object}\n\t */\n\tconst dd = function ( children, parameters = {} ) {\n\t\treturn createElement( 'dd', parameters, children );\n\t};\n\n\tconst target = this.log.target;\n\tconst params = this.log.params || {};\n\tconst msgArgs = [ user( this.log.user, true ) ];\n\n\tif ( target.type === 'tool' ) {\n\t\tmsgArgs.push( dd( [\n\t\t\t'\"',\n\t\t\tlink(\n\t\t\t\t{ to: { name: 'tools-view', params: { name: target.label } } },\n\t\t\t\ttarget.label\n\t\t\t),\n\t\t\t'\"'\n\t\t], { class: 'log-event-tool' } ) );\n\t}\n\tif ( target.type === 'toollist' ) {\n\t\tmsgArgs.push( dd( [\n\t\t\t'\"',\n\t\t\tlink(\n\t\t\t\t{ to: { name: 'lists-view', params: { id: target.id } } },\n\t\t\t\ttarget.label\n\t\t\t),\n\t\t\t'\"'\n\t\t], { class: 'log-event-toollist' } ) );\n\t}\n\tif ( target.type === 'url' ) {\n\t\tmsgArgs.push( dd( [\n\t\t\t'\"',\n\t\t\tcreateElement( 'a',\n\t\t\t\t{ attrs: { href: target.label, target: '_blank' } },\n\t\t\t\t[ target.label ]\n\t\t\t),\n\t\t\t'\"'\n\t\t], { class: 'log-event-url' } ) );\n\t}\n\tif ( target.type === 'user' ) {\n\t\tmsgArgs.push( user( { id: target.id, username: target.label } ) );\n\t}\n\tif ( target.type === 'group' ) {\n\t\tmsgArgs.push( user( params.user ) );\n\t\tmsgArgs.push( dd( [\n\t\t\t'\"',\n\t\t\tlink(\n\t\t\t\t{ to: { name: 'members', query: { groups_id: target.id } } },\n\t\t\t\t[ target.label ]\n\t\t\t),\n\t\t\t'\"'\n\t\t], { class: 'log-event-group' } ) );\n\t}\n\tif ( target.type === 'version' ) {\n\t\tif ( 'tool_name' in params ) {\n\t\t\tmsgArgs.push( dd( [\n\t\t\t\tlink(\n\t\t\t\t\t{\n\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\tname: 'tools-revision',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tname: params.tool_name,\n\t\t\t\t\t\t\t\trevId: String( target.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t[ target.id ]\n\t\t\t\t)\n\t\t\t], { class: 'log-event-version' } ) );\n\t\t\tmsgArgs.push( dd( [\n\t\t\t\t'\"',\n\t\t\t\tlink(\n\t\t\t\t\t{\n\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\tname: 'tools-view',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tname: params.tool_name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t[ params.tool_name ]\n\t\t\t\t),\n\t\t\t\t'\"'\n\t\t\t], { class: 'log-event-tool' } ) );\n\t\t\tmsgArgs.push( dd(\n\t\t\t\t[ i18n.t( 'auditlogs-targettype-tool' ) ],\n\t\t\t\t{ class: 'log-event-text' }\n\t\t\t) );\n\n\t\t} else if ( 'toollist' in params ) {\n\t\t\tmsgArgs.push( dd( [\n\t\t\t\tlink(\n\t\t\t\t\t{\n\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\tname: 'lists-revision',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tid: params.toollist.id,\n\t\t\t\t\t\t\t\trevId: String( target.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t[ target.id ]\n\t\t\t\t)\n\t\t\t], { class: 'log-event-version' } ) );\n\t\t\tmsgArgs.push( dd( [\n\t\t\t\t'\"',\n\t\t\t\tlink(\n\t\t\t\t\t{\n\t\t\t\t\t\tto: {\n\t\t\t\t\t\t\tname: 'lists-view',\n\t\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t\tid: params.toollist.id\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t[ params.toollist.title ]\n\t\t\t\t),\n\t\t\t\t'\"'\n\t\t\t], { class: 'log-event-toollist' } ) );\n\t\t\tmsgArgs.push( dd(\n\t\t\t\t[ i18n.t( 'auditlogs-targettype-toollist' ) ],\n\t\t\t\t{ class: 'log-event-text' }\n\t\t\t) );\n\t\t}\n\t}\n\n\treturn createElement(\n\t\t'dl',\n\t\t{ class: 'log-event row elevation-2 ma-1 mb-2 pa-4' },\n\t\t[\n\t\t\tcreateElement( 'EventIcon', { props: { log: this.log } } ),\n\t\t\tcreateElement( 'EventTimestamp', { props: { log: this.log } } ),\n\t\t\t...buildNodes( this.log, msgArgs, dd, this.isRTL )\n\t\t]\n\t);\n}\n\nexport default {\n\tname: 'LogEvent',\n\tcomponents: {\n\t\tEventIcon,\n\t\tEventTimestamp,\n\t\tUserLink\n\t},\n\tprops: {\n\t\t/**\n\t\t * Log event to render.\n\t\t */\n\t\tlog: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t}\n\t},\n\tcomputed: {\n\t\t...mapGetters( 'locale', [ 'isRTL' ] )\n\t},\n\trender\n};\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/auditlog/LogEvent.spec.js","messages":[{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":69,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":69,"endColumn":20},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":94,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":94,"endColumn":20},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":119,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":119,"endColumn":19},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":167,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":167,"endColumn":21},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":194,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":194,"endColumn":24},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":198,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":198,"endColumn":20},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":228,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":228,"endColumn":24},{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":232,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":232,"endColumn":20}],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'sinon' is defined but never used.","line":5,"column":8,"nodeType":"Identifier","messageId":"unusedVar","endLine":5,"endColumn":13,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":34,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":34,"endColumn":39,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":37,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":37,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":41,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":41,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":8,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/* eslint-disable no-unused-expressions */\n/* eslint-disable no-unused-vars */\n'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n\nimport { shallowMount } from '@vue/test-utils';\n\nimport EventIcon from '@/components/auditlog/EventIcon';\nimport EventTimestamp from '@/components/auditlog/EventTimestamp';\nimport UserLink from '@/components/auditlog/UserLink';\nimport LogEvent from './LogEvent';\n\ndescribe( 'components/auditlog', () => {\n\tdescribe( 'LogEvent', () => {\n\t\tconst buildWrapper = function ( event ) {\n\t\t\treturn shallowMount(\n\t\t\t\tLogEvent, {\n\t\t\t\t\tpropsData: { log: event },\n\t\t\t\t\tcomputed: { isRTL: () => true }\n\t\t\t\t}\n\t\t\t);\n\t\t};\n\n\t\tconst expectCommonStructure = function ( wrapper, event ) {\n\t\t\texpect( wrapper ).to.be.an( 'object' );\n\t\t\texpect( wrapper.classes() ).to.contain( 'log-event' );\n\t\t\texpect( wrapper.classes() ).to.contain( 'row' );\n\n\t\t\tconst icon = wrapper.findComponent( EventIcon );\n\t\t\texpect( icon.exists() ).to.be.true;\n\n\t\t\tconst timestamp = wrapper.findComponent( EventTimestamp );\n\t\t\texpect( timestamp.exists() ).to.be.true;\n\n\t\t\tif ( event.user !== null ) {\n\t\t\t\tconst userlink = wrapper.findComponent( UserLink );\n\t\t\t\texpect( userlink.exists() ).to.be.true;\n\t\t\t\texpect( userlink.html() ).to.contain( event.user.username );\n\t\t\t}\n\t\t};\n\n\t\tit( 'tool-updated', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 1132,\n\t\t\t\ttimestamp: '2021-06-11T23:04:46.956231Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'tool',\n\t\t\t\t\tid: 'test-20210514',\n\t\t\t\t\tlabel: 'test-20210514'\n\t\t\t\t},\n\t\t\t\taction: 'updated',\n\t\t\t\tparams: {},\n\t\t\t\tmessage: '+developer_docs'\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst tools = wrapper.findAll( '.log-event-tool' );\n\t\t\texpect( tools ).to.have.lengthOf( 1 );\n\t\t\texpect( tools.at( 0 ).html() ).to.contain( event.target.label );\n\t\t} );\n\t\tit( 'toollist-updated', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 9729,\n\t\t\t\ttimestamp: '2022-02-24T16:10:27.282777Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'toollist',\n\t\t\t\t\tid: 20,\n\t\t\t\t\tlabel: 'foo'\n\t\t\t\t},\n\t\t\t\taction: 'updated',\n\t\t\t\tparams: {},\n\t\t\t\tmessage: 'change title to create diff'\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst lists = wrapper.findAll( '.log-event-toollist' );\n\t\t\texpect( lists ).to.have.lengthOf( 1 );\n\t\t\texpect( lists.at( 0 ).html() ).to.contain( event.target.label );\n\t\t} );\n\t\tit( 'url-created', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 9698,\n\t\t\t\ttimestamp: '2022-02-15T01:07:59.939958Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'url',\n\t\t\t\t\tid: 150,\n\t\t\t\t\tlabel: 'https://example.org/'\n\t\t\t\t},\n\t\t\t\taction: 'created',\n\t\t\t\tparams: {},\n\t\t\t\tmessage: null\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst urls = wrapper.findAll( '.log-event-url' );\n\t\t\texpect( urls ).to.have.lengthOf( 1 );\n\t\t\texpect( urls.at( 0 ).html() ).to.contain( event.target.label );\n\t\t} );\n\t\tit( 'user-created', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 4367,\n\t\t\t\ttimestamp: '2021-10-13T01:48:40.705503Z',\n\t\t\t\tuser: null,\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'user',\n\t\t\t\t\tid: 4,\n\t\t\t\t\tlabel: 'Toolhub'\n\t\t\t\t},\n\t\t\t\taction: 'created',\n\t\t\t\tparams: {},\n\t\t\t\tmessage: null\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\t\t} );\n\t\tit( 'group-added-to', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 9701,\n\t\t\t\ttimestamp: '2022-02-15T23:47:01.608010Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'group',\n\t\t\t\t\tid: 1,\n\t\t\t\t\tlabel: 'Administrators'\n\t\t\t\t},\n\t\t\t\taction: 'added to',\n\t\t\t\tparams: {\n\t\t\t\t\tuser: {\n\t\t\t\t\t\tid: 2,\n\t\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmessage: null\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst groups = wrapper.findAll( '.log-event-group' );\n\t\t\texpect( groups ).to.have.lengthOf( 1 );\n\t\t\texpect( groups.at( 0 ).html() ).to.contain( event.target.label );\n\t\t} );\n\t\tit( 'version-patrolled-tool', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 9697,\n\t\t\t\ttimestamp: '2022-02-14T03:12:25.268690Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'version',\n\t\t\t\t\tid: 3798,\n\t\t\t\t\tlabel: ''\n\t\t\t\t},\n\t\t\t\taction: 'patrolled',\n\t\t\t\tparams: {\n\t\t\t\t\ttool_name: 'person-test-01'\n\t\t\t\t},\n\t\t\t\tmessage: null\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst revisions = wrapper.findAll( '.log-event-version' );\n\t\t\texpect( revisions ).to.have.lengthOf( 1 );\n\t\t\texpect( revisions.at( 0 ).html() ).to.contain( event.target.id );\n\n\t\t\tconst tools = wrapper.findAll( '.log-event-tool' );\n\t\t\texpect( tools ).to.have.lengthOf( 1 );\n\t\t\texpect( tools.at( 0 ).html() ).to.contain( event.params.tool_name );\n\t\t} );\n\t\tit( 'version-patrolled-toollist', () => {\n\t\t\tconst event = {\n\t\t\t\tid: 9697,\n\t\t\t\ttimestamp: '2022-02-14T03:12:25.268690Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'BDavis (WMF)'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'version',\n\t\t\t\t\tid: 3798,\n\t\t\t\t\tlabel: ''\n\t\t\t\t},\n\t\t\t\taction: 'patrolled',\n\t\t\t\tparams: {\n\t\t\t\t\ttoollist: {\n\t\t\t\t\t\tid: 1234,\n\t\t\t\t\t\ttitle: 'test-list-a'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmessage: null\n\t\t\t};\n\t\t\tconst wrapper = buildWrapper( event );\n\n\t\t\texpectCommonStructure( wrapper, event );\n\n\t\t\tconst revisions = wrapper.findAll( '.log-event-version' );\n\t\t\texpect( revisions ).to.have.lengthOf( 1 );\n\t\t\texpect( revisions.at( 0 ).html() ).to.contain( event.target.id );\n\n\t\t\tconst lists = wrapper.findAll( '.log-event-toollist' );\n\t\t\texpect( lists ).to.have.lengthOf( 1 );\n\t\t\texpect( lists.at( 0 ).html() ).to.contain( event.params.toollist.title );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/auditlog/UserLink.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/chart/LineChart.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/chart/LineChart.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'sinon' is defined but never used.","line":4,"column":8,"nodeType":"Identifier","messageId":"unusedVar","endLine":4,"endColumn":13,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/AgreeTerms.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/CommentDialog.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"input\" event has been triggered but not declared on `emits` option.","line":95,"column":17,"nodeType":"Literal","messageId":"missing","endLine":95,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1500,1500],"text":"\nemits: ['input'],"},"desc":"Add the `emits` option with array syntax and define \"input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1500,1500],"text":"\nemits: {'input': null},"},"desc":"Add the `emits` option with object syntax and define \"input\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"save\" event has been triggered but not declared on `emits` option.","line":107,"column":16,"nodeType":"Literal","messageId":"missing","endLine":107,"endColumn":22,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"save","emitsKind":"`emits` option"},"fix":{"range":[1500,1500],"text":"\nemits: ['save'],"},"desc":"Add the `emits` option with array syntax and define \"save\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"save","emitsKind":"`emits` option"},"fix":{"range":[1500,1500],"text":"\nemits: {'save': null},"},"desc":"Add the `emits` option with object syntax and define \"save\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-dialog\n\t\t\tv-model=\"show\"\n\t\t\tpersistent\n\t\t\tmax-width=\"600px\"\n\t\t\t@keydown.esc=\"show = false\"\n\t\t>\n\t\t\t<v-card>\n\t\t\t\t<v-card-title>\n\t\t\t\t\t<span class=\"text-h5\">{{ $t( 'editsummary' ) }}</span>\n\t\t\t\t</v-card-title>\n\n\t\t\t\t<v-card-text>\n\t\t\t\t\t<v-container>\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t<v-text-field\n\t\t\t\t\t\t\t\tref=\"comment\"\n\t\t\t\t\t\t\t\tv-model=\"comment\"\n\t\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t\t\t:rules=\"requiredRule\"\n\t\t\t\t\t\t\t\tautofocus\n\t\t\t\t\t\t\t\t@keydown.enter=\"saveComment\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<template #label>\n\t\t\t\t\t\t\t\t\t<InputLabel :label=\"$t( 'describechanges' )\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</v-text-field>\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t<AgreeTerms />\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t</v-container>\n\t\t\t\t</v-card-text>\n\n\t\t\t\t<v-card-actions>\n\t\t\t\t\t<v-spacer />\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\t@click=\"show = false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-cancel\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t\t</v-btn>\n\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tdark\n\t\t\t\t\t\t@click=\"saveComment\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-card-actions>\n\t\t\t</v-card>\n\t\t</v-dialog>\n\t</v-container>\n</template>\n\n<script>\nimport AgreeTerms from '@/components/common/AgreeTerms';\nimport InputLabel from '@/components/common/InputLabel';\n\nexport default {\n\tname: 'CommentDialog',\n\tcomponents: {\n\t\tAgreeTerms,\n\t\tInputLabel\n\t},\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tcomment: null\n\t\t};\n\t},\n\tcomputed: {\n\t\tshow: {\n\t\t\tget() {\n\t\t\t\treturn this.value;\n\t\t\t},\n\t\t\tset( value ) {\n\t\t\t\tthis.$emit( 'input', value );\n\t\t\t}\n\t\t},\n\t\trequiredRule() { return [ ( v ) => !!v || this.$t( 'required-field' ) ]; }\n\t},\n\tmethods: {\n\t\tsaveComment() {\n\t\t\tif ( !this.comment ) {\n\t\t\t\tthis.$refs.comment.validate( true );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.$emit( 'save', this.comment );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/CommonsImage.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/ConfirmDeleteDialog.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"input\" event has been triggered but not declared on `emits` option.","line":69,"column":17,"nodeType":"Literal","messageId":"missing","endLine":69,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1035,1035],"text":"\nemits: ['input'],"},"desc":"Add the `emits` option with array syntax and define \"input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1035,1035],"text":"\nemits: {'input': null},"},"desc":"Add the `emits` option with object syntax and define \"input\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"delete\" event has been triggered but not declared on `emits` option.","line":75,"column":16,"nodeType":"Literal","messageId":"missing","endLine":75,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"delete","emitsKind":"`emits` option"},"fix":{"range":[1035,1035],"text":"\nemits: ['delete'],"},"desc":"Add the `emits` option with array syntax and define \"delete\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"delete","emitsKind":"`emits` option"},"fix":{"range":[1035,1035],"text":"\nemits: {'delete': null},"},"desc":"Add the `emits` option with object syntax and define \"delete\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-dialog\n\t\t\tv-model=\"show\"\n\t\t\tpersistent\n\t\t\tmax-width=\"600px\"\n\t\t\t@keydown.esc=\"show = false\"\n\t\t>\n\t\t\t<v-card>\n\t\t\t\t<v-card-title>\n\t\t\t\t\t<span class=\"text-h5\">{{ $t( 'confirmdelete-dialog-title' ) }}</span>\n\t\t\t\t</v-card-title>\n\n\t\t\t\t<v-card-text>\n\t\t\t\t\t<v-container>\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t{{ $t( 'confirmdelete-dialog-subtitle' ) }}\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t</v-container>\n\t\t\t\t</v-card-text>\n\n\t\t\t\t<v-card-actions>\n\t\t\t\t\t<v-spacer />\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\t@click=\"show = false\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-cancel\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t\t</v-btn>\n\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"error base100--text\"\n\t\t\t\t\t\tdark\n\t\t\t\t\t\t@click=\"confirmDelete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'delete' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-card-actions>\n\t\t\t</v-card>\n\t\t</v-dialog>\n\t</v-container>\n</template>\n\n<script>\nexport default {\n\tname: 'ConfirmDeleteDialog',\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: Boolean,\n\t\t\trequired: false\n\t\t}\n\t},\n\tcomputed: {\n\t\tshow: {\n\t\t\tget() {\n\t\t\t\treturn this.value;\n\t\t\t},\n\t\t\tset( value ) {\n\t\t\t\tthis.$emit( 'input', value );\n\t\t\t}\n\t\t}\n\t},\n\tmethods: {\n\t\tconfirmDelete() {\n\t\t\tthis.$emit( 'delete' );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/DatePicker.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":75,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":75,"endColumn":40},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"input\" event has been triggered but not declared on `emits` option.","line":91,"column":16,"nodeType":"Literal","messageId":"missing","endLine":91,"endColumn":23,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1138,1138],"text":"\nemits: ['input'],"},"desc":"Add the `emits` option with array syntax and define \"input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1138,1138],"text":"\nemits: {'input': null},"},"desc":"Add the `emits` option with object syntax and define \"input\" event."}]}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-menu\n\t\tv-model=\"menu\"\n\t\t:close-on-content-click=\"false\"\n\t\ttransition=\"scale-transition\"\n\t\toffset-y\n\t\tmin-width=\"auto\"\n\t\tleft\n\t>\n\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t<v-text-field\n\t\t\t\t:value=\"formattedDate\"\n\t\t\t\t:label=\"label\"\n\t\t\t\tprepend-icon=\"mdi-calendar\"\n\t\t\t\treadonly\n\t\t\t\tv-bind=\"attrs\"\n\t\t\t\tv-on=\"on\"\n\t\t\t/>\n\t\t</template>\n\t\t<v-date-picker\n\t\t\t:value=\"date\"\n\t\t\tno-title\n\t\t\tscrollable\n\t\t\tcolor=\"primary\"\n\t\t\t:locale=\"locale\"\n\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t@input=\"emit\"\n\t\t/>\n\t</v-menu>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\n\nexport default {\n\tname: 'DatePicker',\n\tprops: {\n\t\t/**\n\t\t * Initial value in YYYY-MM-DD(THH:mm:SS) format.\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t\trequired: false\n\t\t},\n\t\t/**\n\t\t * Moment format string for display of selected date.\n\t\t */\n\t\tdisplayFormat: {\n\t\t\ttype: String,\n\t\t\tdefault: 'll',\n\t\t\trequired: false\n\t\t},\n\t\t/**\n\t\t * Input label.\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t\trequired: false\n\t\t},\n\t\t/**\n\t\t * Output suffix, often a time string like 'T00:00Z'.\n\t\t */\n\t\tsuffix: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t\trequired: false\n\t\t}\n\t},\n\tdata: () => ( {\n\t\tmenu: false\n\t} ),\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'locale' ] ),\n\t\tdate() {\n\t\t\treturn this.value ? this.value.substring( 0, 10 ) : this.value;\n\t\t},\n\t\tfirstDayOfWeek() {\n\t\t\treturn this.$moment.localeData( this.locale ).firstDayOfWeek();\n\t\t},\n\t\tformattedDate() {\n\t\t\treturn this.date ?\n\t\t\t\tthis.$moment.utc( this.date ).format( this.displayFormat ) :\n\t\t\t\t'';\n\t\t}\n\t},\n\tmethods: {\n\t\temit( data ) {\n\t\t\tconst date = data ? data + this.suffix : data;\n\t\t\tthis.$emit( 'input', date );\n\t\t\tthis.menu = false;\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/I18nHtml.js","messages":[],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'msgKey' dynamic key is used'","line":22,"column":14,"nodeType":"CallExpression","endLine":22,"endColumn":30,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/I18nHtml.spec.js","messages":[{"ruleId":"es-x/no-array-string-prototype-at","severity":2,"message":"ES2022 'Array.prototype.at' method is forbidden.","line":32,"column":12,"nodeType":"MemberExpression","messageId":"forbidden","endLine":32,"endColumn":20}],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'sinon' is defined but never used.","line":4,"column":8,"nodeType":"Identifier","messageId":"unusedVar","endLine":4,"endColumn":13,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/* eslint-disable no-unused-vars */\n'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n\nimport { shallowMount } from '@vue/test-utils';\n\nimport I18nHtml from './I18nHtml';\n\ndescribe( 'components/common', () => {\n\tdescribe( 'I18nHtml', () => {\n\t\tit( 'should render', () => {\n\t\t\tconst wrapper = shallowMount(\n\t\t\t\tI18nHtml, {\n\t\t\t\t\tpropsData: {\n\t\t\t\t\t\tmsg: 'footer-content-license',\n\t\t\t\t\t\ttag: 'p'\n\t\t\t\t\t},\n\t\t\t\t\tslots: {\n\t\t\t\t\t\tdefault: [ ' ', '<a href=\"/test\">test</a>', ' ' ]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\texpect( wrapper ).to.be.an( 'object' );\n\t\t\texpect( wrapper.element.tagName ).to.equal( 'P' );\n\t\t\tconst links = wrapper.findAll( 'a' );\n\t\t\texpect( links.length ).to.equal( 1 );\n\t\t\texpect( links.at( 0 ).html() ).to.contain( 'test' );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/InputLabel.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/InputWidget.vue","messages":[{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":240,"column":3,"nodeType":"MemberExpression","messageId":"forbidden","endLine":240,"endColumn":64},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":290,"column":21,"nodeType":"ImportExpression","messageId":"forbidden","endLine":290,"endColumn":63},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":340,"column":52,"nodeType":"SpreadElement","messageId":"forbidden","endLine":340,"endColumn":67},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":366,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":368,"endColumn":6},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":369,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":369,"endColumn":46},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"input\" event has been triggered but not declared on `emits` option.","line":382,"column":17,"nodeType":"Literal","messageId":"missing","endLine":382,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[7531,7531],"text":"\nemits: ['input'],"},"desc":"Add the `emits` option with array syntax and define \"input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[7531,7531],"text":"\nemits: {'input': null},"},"desc":"Add the `emits` option with object syntax and define \"input\" event."}]}],"suppressedMessages":[],"errorCount":5,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<div v-frag>\n\t\t<v-text-field\n\t\t\tv-if=\"widget === 'text'\"\n\t\t\tv-model=\"model\"\n\t\t\t:required=\"ui.required\"\n\t\t\t:rules=\"validationRules\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\t:counter=\"schema.maxLength\"\n\t\t\tclearable\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t</v-text-field>\n\t\t<v-textarea\n\t\t\tv-else-if=\"widget === 'multiline'\"\n\t\t\tv-model=\"model\"\n\t\t\t:required=\"ui.required\"\n\t\t\t:rules=\"validationRules\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\t:counter=\"schema.maxLength\"\n\t\t\trows=\"1\"\n\t\t\tauto-grow\n\t\t\tclearable\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t</v-textarea>\n\t\t<v-autocomplete\n\t\t\tv-else-if=\"widget === 'select'\"\n\t\t\tv-model=\"model\"\n\t\t\t:label=\"ui.label\"\n\t\t\t:rules=\"validationRules\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\t:items=\"ui.select.items()\"\n\t\t\t:multiple=\"ui.multiple || false\"\n\t\t\t:deletable-chips=\"ui.multiple || false\"\n\t\t\t:small-chips=\"ui.multiple || false\"\n\t\t\t:clearable=\"ui.multiple ? false : true\"\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t</v-autocomplete>\n\t\t<v-combobox\n\t\t\tv-else-if=\"widget === 'multi-select'\"\n\t\t\tv-model=\"model\"\n\t\t\t:rules=\"validationRules\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\tmultiple\n\t\t\tno-filter\n\t\t\tdeletable-chips\n\t\t\tsmall-chips\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t</v-combobox>\n\t\t<v-combobox\n\t\t\tv-else-if=\"widget === 'multi-select-tool'\"\n\t\t\tv-model=\"model\"\n\t\t\tv-model:search-input=\"toolAutoComplete\"\n\t\t\t:loading=\"toolAutoCompleteLoading\"\n\t\t\t:menu-props=\"menuProps\"\n\t\t\t:items=\"getToolAutoCompleteResultsArr()\"\n\t\t\t:rules=\"validationRules\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\thide-selected\n\t\t\tmultiple\n\t\t\tno-filter\n\t\t\tdeletable-chips\n\t\t\tsmall-chips\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t\t<template #item=\"data\">\n\t\t\t\t<v-list-item-content class=\"autocomplete\">\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t<dl class=\"row ma-0\">\n\t\t\t\t\t\t\t<dt class=\"me-4\">{{ toolAutoCompleteResults[data.item][0] }}</dt>\n\t\t\t\t\t\t\t<dd class=\"desc grey--text text--darken-1\">\n\t\t\t\t\t\t\t\t{{ toolAutoCompleteResults[data.item][1] }}\n\t\t\t\t\t\t\t</dd>\n\t\t\t\t\t\t</dl>\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</template>\n\n\t\t\t<template v-if=\"!toolAutoCompleteLoading\" #no-data>\n\t\t\t\t<v-list-item>\n\t\t\t\t\t<v-list-item-content>\n\t\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t\t{{ $t( 'tool-not-found', [ toolAutoComplete ] ) }}\n\t\t\t\t\t\t</v-list-item-title>\n\t\t\t\t\t</v-list-item-content>\n\t\t\t\t</v-list-item>\n\t\t\t</template>\n\t\t</v-combobox>\n\t\t<template v-else-if=\"widget === 'authors' || widget === 'url-multilingual'\">\n\t\t\t<v-combobox\n\t\t\t\tv-model=\"model\"\n\t\t\t\t:hint=\"schema.description\"\n\t\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t\t:append-icon=\"ui.appendIcon\"\n\t\t\t\tmultiple\n\t\t\t\tno-filter\n\t\t\t\treadonly\n\t\t\t\t:disabled=\"ui.disabled\"\n\t\t\t\t@click:append=\"showItemDialog( null, null )\"\n\t\t\t\t@click=\"showItemDialog( null, null )\"\n\t\t\t\t@update:error=\"emitIsValid\"\n\t\t\t>\n\t\t\t\t<template #label>\n\t\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t\t</template>\n\t\t\t\t<template #selection=\"{ item, index, parent }\">\n\t\t\t\t\t<v-chip\n\t\t\t\t\t\tclass=\"ma-2\"\n\t\t\t\t\t\tclose\n\t\t\t\t\t\t:disabled=\"ui.disabled\"\n\t\t\t\t\t\t@click:close=\"parent.selectItem( item )\"\n\t\t\t\t\t\t@click=\"showItemDialog( item, index )\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span v-if=\"widget === 'authors'\">\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-else-if=\"widget === 'url-multilingual'\">\n\t\t\t\t\t\t\t{{ `${getLocaleText( item.language )}: ` }}{{ item.url }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</v-chip>\n\t\t\t\t</template>\n\t\t\t</v-combobox>\n\t\t\t<ItemDialog\n\t\t\t\tv-model:items=\"model\"\n\t\t\t\tv-model:item-edit=\"itemEdit\"\n\t\t\t\t:ui-schema=\"ui.items\"\n\t\t\t\t:schema=\"schema.items\"\n\t\t\t/>\n\t\t</template>\n\t\t<v-checkbox\n\t\t\tv-else-if=\"widget === 'checkbox'\"\n\t\t\tv-model=\"model\"\n\t\t\t:hint=\"schema.description\"\n\t\t\t:persistent-hint=\"ui.persistentHint\"\n\t\t\t:prepend-icon=\"ui.icon\"\n\t\t\t:disabled=\"ui.disabled\"\n\t\t\t@update:error=\"emitIsValid\"\n\t\t>\n\t\t\t<template #label>\n\t\t\t\t<InputLabel :label=\"ui.label\" :required=\"ui.required\" />\n\t\t\t</template>\n\t\t</v-checkbox>\n\t\t<pre v-else>\n\t\t\t{{ schema }}\n\t\t</pre>\n\t</div>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport patternRegexRule from '@/plugins/pattern-regex';\nimport InputLabel from '@/components/common/InputLabel';\nimport { isValidHttpUrl } from '@/helpers/validation';\n\nexport const methods = {\n\t/**\n\t * Initialize our model based on our value and schema.\n\t */\n\tinitModel() {\n\t\tif ( this.value ) {\n\t\t\tif (\n\t\t\t\tthis.schema.type === 'object' &&\n\t\t\t\tObject.keys( this.value ).length > 0\n\t\t\t) {\n\t\t\t\tthis.model = this.value;\n\t\t\t} else if (\n\t\t\t\tthis.schema.type === 'array' &&\n\t\t\t\tthis.value.length > 0\n\t\t\t) {\n\t\t\t\tthis.model = this.value;\n\t\t\t} else if (\n\t\t\t\tthis.schema.type === 'boolean' &&\n\t\t\t\tthis.value !== null\n\t\t\t) {\n\t\t\t\tthis.model = this.value;\n\t\t\t} else if (\n\t\t\t\tthis.schema.type === 'string' ||\n\t\t\t\tthis.schema.type === 'number' ||\n\t\t\t\tthis.schema.type === 'integer'\n\t\t\t) {\n\t\t\t\tthis.model = this.value;\n\t\t\t} else {\n\t\t\t\tthis.model = this.initBlankValue();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.model = this.initBlankValue();\n\t\t}\n\t},\n\n\tinitBlankValue() {\n\t\tswitch ( this.schema.type ) {\n\t\t\tcase 'object':\n\t\t\t\treturn {};\n\t\t\tcase 'array':\n\t\t\t\treturn [];\n\t\t\tcase 'boolean':\n\t\t\t\treturn false;\n\t\t\tcase 'number':\n\t\t\tcase 'integer':\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t},\n\tperformToolAutoComplete( v ) {\n\t\tthis.toolAutoCompleteLoading = true;\n\t\tthis.$store.dispatch( 'search/autoCompleteTools', v ).finally(\n\t\t\t() => {\n\t\t\t\tthis.toolAutoCompleteLoading = false;\n\t\t\t}\n\t\t);\n\t},\n\tgetToolAutoCompleteResultsArr() {\n\t\treturn this.toolAutoCompleteResults ?\n\t\t\tObject.keys( this.toolAutoCompleteResults ) :\n\t\t\t[];\n\t},\n\t/**\n\t * Populate and open the showItemDialog.\n\t *\n\t * @param {?Object} item - item representing an entry in array field.\n\t * @param {?number} index - Author position in the authors array.\n\t */\n\tshowItemDialog( item, index ) {\n\t\tthis.itemEdit.item = item;\n\t\tthis.itemEdit.index = index;\n\n\t\tif ( !item && this.widget === 'url-multilingual' ) {\n\t\t\tthis.itemEdit.item = { language: this.$i18n.locale, url: null };\n\t\t}\n\n\t\tthis.itemEdit.itemDialogOpen = true;\n\t},\n\tgetLocaleText( code ) {\n\t\tthis.localeSelect.some(\n\t\t\t( locale ) => {\n\t\t\t\tif ( locale.value === code ) {\n\t\t\t\t\tcode = locale.text;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t);\n\t\treturn code;\n\t},\n\temitIsValid( val ) {\n\t\tthis.$emit( 'is-valid', val );\n\t}\n};\n\nexport default {\n\tname: 'InputWidget',\n\tcomponents: {\n\t\tInputLabel,\n\t\t// Import via function to work around circular dependency between\n\t\t// ItemDialog and InputWidget components.\n\t\tItemDialog: () => import( '@/components/common/ItemDialog' )\n\t},\n\tprops: {\n\t\tschema: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true\n\t\t},\n\t\tuiSchema: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {}\n\t\t},\n\t\tvalue: {\n\t\t\ttype: [ String, Number, Boolean, Array, Object ],\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata: () => ( {\n\t\tmodel: null,\n\t\ttoolAutoCompleteLoading: false,\n\t\titemEdit: {\n\t\t\tindex: null,\n\t\t\titem: null,\n\t\t\titemDialogOpen: false\n\t\t},\n\t\ttoolAutoComplete: null\n\t} ),\n\tcomputed: {\n\t\t/**\n\t\t * Get our UI helper data.\n\t\t *\n\t\t * @return {Object}\n\t\t */\n\t\tui() {\n\t\t\treturn this.schema[ 'x-ui' ] || this.uiSchema;\n\t\t},\n\t\twidget() {\n\t\t\tif ( this.ui.widget ) {\n\t\t\t\treturn this.ui.widget;\n\t\t\t}\n\t\t\tif ( this.schema.type === 'string' ) {\n\t\t\t\tif ( this.schema.enum ) {\n\t\t\t\t\treturn 'select';\n\t\t\t\t}\n\t\t\t\treturn this.schema.maxLength > 2047 ? 'multiline' : 'text';\n\t\t\t}\n\t\t\treturn this.schema.type;\n\t\t},\n\t\tmenuProps() {\n\t\t\tconst contentClass = { contentClass: 'autocomplete-menu__content' };\n\t\t\treturn !this.toolAutoComplete ? { value: false, ...contentClass } : contentClass;\n\t\t},\n\t\tvalidationRules() {\n\t\t\tconst schema = this.schema;\n\t\t\tconst ui = this.ui;\n\t\t\tconst rules = [];\n\t\t\tif ( schema.maxLength ) {\n\t\t\t\trules.push(\n\t\t\t\t\t( v ) => ( v || '' ).length <= schema.maxLength ||\n\t\t\t\t\t\tthis.$t( 'charslimit', [ schema.maxLength ] )\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( schema.pattern ) {\n\t\t\t\trules.push( ...patternRegexRule( schema.pattern ) );\n\t\t\t}\n\t\t\tif ( schema.format === 'uri' ) {\n\t\t\t\trules.push(\n\t\t\t\t\t( v ) => !v ? true : isValidHttpUrl( v ) ||\n\t\t\t\t\tthis.$t( 'urlinvalid' )\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( ui.required === true ) {\n\t\t\t\trules.push( ( v ) => !!v || this.$t( 'required-field' ) );\n\t\t\t}\n\t\t\treturn rules;\n\t\t},\n\t\t...mapState( 'search', {\n\t\t\ttoolAutoCompleteResults: 'toolAutoCompleteResults'\n\t\t} ),\n\t\t...mapState( 'locale', [ 'localeSelect' ] )\n\t},\n\tmethods,\n\twatch: {\n\t\ttoolAutoComplete: {\n\t\t\thandler( val ) {\n\t\t\t\tif ( val && val !== this.model ) {\n\t\t\t\t\tthis.performToolAutoComplete( val );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tmodel: {\n\t\t\thandler( newVal ) {\n\t\t\t\tthis.$emit( 'input', newVal );\n\t\t\t},\n\t\t\tdeep: true,\n\t\t\timmediate: true\n\t\t},\n\t\tvalue: {\n\t\t\thandler( newVal, oldVal ) {\n\t\t\t\tif ( JSON.stringify( oldVal ) !== JSON.stringify( newVal ) ) {\n\t\t\t\t\tthis.initModel();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.initModel();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/ItemDialog.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":84,"column":18,"nodeType":"SpreadElement","messageId":"forbidden","endLine":84,"endColumn":48},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":90,"column":13,"nodeType":"SpreadElement","messageId":"forbidden","endLine":90,"endColumn":29},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update:items\" event has been triggered but not declared on `emits` option.","line":110,"column":16,"nodeType":"Literal","messageId":"missing","endLine":110,"endColumn":30,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update:items","emitsKind":"`emits` option"},"fix":{"range":[1493,1493],"text":"\nemits: ['update:items'],"},"desc":"Add the `emits` option with array syntax and define \"update:items\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update:items","emitsKind":"`emits` option"},"fix":{"range":[1493,1493],"text":"\nemits: {'update:items': null},"},"desc":"Add the `emits` option with object syntax and define \"update:items\" event."}]},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":114,"column":24,"nodeType":"SpreadElement","messageId":"forbidden","endLine":114,"endColumn":54},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update:item-edit\" event has been triggered but not declared on `emits` option.","line":117,"column":16,"nodeType":"Literal","messageId":"missing","endLine":117,"endColumn":34,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update:item-edit","emitsKind":"`emits` option"},"fix":{"range":[1493,1493],"text":"\nemits: ['update:item-edit'],"},"desc":"Add the `emits` option with array syntax and define \"update:item-edit\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update:item-edit","emitsKind":"`emits` option"},"fix":{"range":[1493,1493],"text":"\nemits: {'update:item-edit': null},"},"desc":"Add the `emits` option with object syntax and define \"update:item-edit\" event."}]},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":149,"column":7,"nodeType":"SpreadElement","messageId":"forbidden","endLine":149,"endColumn":25},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":150,"column":7,"nodeType":"SpreadElement","messageId":"forbidden","endLine":150,"endColumn":21}],"suppressedMessages":[],"errorCount":5,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-row justify=\"center\">\n\t\t<v-dialog\n\t\t\tv-model=\"itemEditComputed.itemDialogOpen\"\n\t\t\tpersistent\n\t\t\tmax-width=\"600px\"\n\t\t>\n\t\t\t<v-card>\n\t\t\t\t<v-form\n\t\t\t\t\tref=\"itemform\"\n\t\t\t\t\tv-model=\"valid\"\n\t\t\t\t\t:disabled=\"!$can( 'add', 'toolinfo/annotations' )\"\n\t\t\t\t>\n\t\t\t\t\t<v-card-text>\n\t\t\t\t\t\t<v-container>\n\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in uiSchema\"\n\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\tv-model=\"itemFields[ id ]\"\n\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-container>\n\t\t\t\t\t</v-card-text>\n\t\t\t\t\t<v-card-actions>\n\t\t\t\t\t\t<v-spacer />\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tclass=\"pa-4 mb-4\"\n\t\t\t\t\t\t\t@click=\"cancel\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tclass=\"pa-4 mb-4\"\n\t\t\t\t\t\t\t:disabled=\"!valid || !$can( 'add', 'toolinfo/annotations' )\"\n\t\t\t\t\t\t\t@click=\"addItem\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'add' ) }}\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-card-actions>\n\t\t\t\t</v-form>\n\t\t\t</v-card>\n\t\t</v-dialog>\n\t</v-row>\n</template>\n\n<script>\n\nimport InputWidget from '@/components/common/InputWidget';\n\nexport default {\n\tname: 'ItemDialog',\n\tcomponents: {\n\t\tInputWidget\n\t},\n\tprops: {\n\t\tschema: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true\n\t\t},\n\t\tuiSchema: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {}\n\t\t},\n\t\titems: {\n\t\t\ttype: [ Array ],\n\t\t\tdefault: null\n\t\t},\n\t\titemEdit: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {}\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\titemFields: { ...this.buildEmptyItemFields() },\n\t\t\tvalid: false\n\t\t};\n\t},\n\tcomputed: {\n\t\titemEditComputed() {\n\t\t\treturn { ...this.itemEdit };\n\t\t}\n\t},\n\tmethods: {\n\t\taddItem() {\n\t\t\tlet replaced = false;\n\t\t\tconst items = [ ...this.items ];\n\t\t\titems.some( ( _, index ) => {\n\t\t\t\tif ( index === this.itemEdit.index ) {\n\t\t\t\t\titems[ index ] = this.cleanItemFields();\n\t\t\t\t\treplaced = true;\n\t\t\t\t\treturn replaced;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\tif ( !replaced ) {\n\t\t\t\titems.push( this.cleanItemFields() );\n\t\t\t}\n\n\t\t\tthis.$emit( 'update:items', items );\n\t\t\tthis.cancel();\n\t\t},\n\t\tcancel() {\n\t\t\tthis.itemFields = { ...this.buildEmptyItemFields() };\n\n\t\t\tthis.$refs.itemform.reset();\n\t\t\tthis.$emit( 'update:item-edit', {\n\t\t\t\titemDialogOpen: false,\n\t\t\t\titem: null\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Remove null fields.\n\t\t *\n\t\t * @return {Object}\n\t\t */\n\t\tcleanItemFields() {\n\t\t\treturn Object.keys( this.itemFields )\n\t\t\t\t.reduce( ( obj, key ) => {\n\t\t\t\t\tif ( this.itemFields[ key ] ) {\n\t\t\t\t\t\tobj[ key ] = this.itemFields[ key ];\n\t\t\t\t\t}\n\t\t\t\t\treturn obj;\n\t\t\t\t}, {} );\n\t\t},\n\t\tbuildEmptyItemFields() {\n\t\t\tconst emptyItemFields = {};\n\t\t\tObject.keys( this.uiSchema ).forEach( ( key ) => {\n\t\t\t\temptyItemFields[ key ] = null;\n\t\t\t} );\n\t\t\treturn emptyItemFields;\n\t\t}\n\t},\n\twatch: {\n\t\titemEdit: {\n\t\t\thandler( newVal ) {\n\t\t\t\tif ( newVal.item && !( newVal.item instanceof Event ) ) {\n\t\t\t\t\tthis.itemFields = {\n\t\t\t\t\t\t...this.itemFields,\n\t\t\t\t\t\t...newVal.item\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true,\n\t\t\timmediate: true\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/Revisions.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":85,"column":9,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":85,"endColumn":49},{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":88,"column":9,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":88,"endColumn":49},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"update-revisions\" event has been triggered but not declared on `emits` option.","line":202,"column":16,"nodeType":"Literal","messageId":"missing","endLine":202,"endColumn":34,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"update-revisions","emitsKind":"`emits` option"},"fix":{"range":[4357,4357],"text":"\nemits: ['update-revisions'],"},"desc":"Add the `emits` option with array syntax and define \"update-revisions\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"update-revisions","emitsKind":"`emits` option"},"fix":{"range":[4357,4357],"text":"\nemits: {'update-revisions': null},"},"desc":"Add the `emits` option with object syntax and define \"update-revisions\" event."}]},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":214,"column":6,"nodeType":"SpreadElement","messageId":"forbidden","endLine":214,"endColumn":40},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":229,"column":6,"nodeType":"SpreadElement","messageId":"forbidden","endLine":229,"endColumn":40},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":250,"column":7,"nodeType":"SpreadElement","messageId":"forbidden","endLine":250,"endColumn":54},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":267,"column":5,"nodeType":"SpreadElement","messageId":"forbidden","endLine":267,"endColumn":39},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":282,"column":5,"nodeType":"SpreadElement","messageId":"forbidden","endLine":282,"endColumn":39},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":295,"column":5,"nodeType":"SpreadElement","messageId":"forbidden","endLine":295,"endColumn":39},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":309,"column":5,"nodeType":"SpreadElement","messageId":"forbidden","endLine":309,"endColumn":39}],"suppressedMessages":[],"errorCount":9,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<div>\n\t\t<v-row v-if=\"!aggregate\">\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<v-btn\n\t\t\t\t\tclass=\"mb-1 mt-2\"\n\t\t\t\t\t:to=\"getDiffRouterObject()\"\n\t\t\t\t\t:disabled=\"!( selectedRevisions.length === 2 )\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-compare-horizontal\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'comparetwoselectedrevisions' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<dl v-for=\"rev in revisions\"\n\t\t\t:key=\"rev.id\"\n\t\t\tclass=\"row pa-2\"\n\t\t\t:class=\"{ 'rev-suppressed': rev.suppressed }\"\n\t\t>\n\t\t\t<dd v-if=\"!aggregate\" class=\"me-1\">\n\t\t\t\t<v-checkbox\n\t\t\t\t\tv-model=\"checkbox[rev.id]\"\n\t\t\t\t\tclass=\"ma-0\"\n\t\t\t\t\thide-details\n\t\t\t\t\t:disabled=\"!$can( 'view', rev )\"\n\t\t\t\t\t@change=\"selectRevision( $event, rev )\"\n\t\t\t\t/>\n\t\t\t</dd>\n\n\t\t\t<dd v-if=\"aggregate\"\n\t\t\t\tclass=\"me-1 mt-1\"\n\t\t\t>\n\t\t\t\t<template v-if=\"rev.content_type === 'tool'\">\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t\t\t:aria-label=\"$t( 'tool' )\"\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-tools\n\t\t\t\t\t</v-icon>\n\t\t\t\t</template>\n\t\t\t\t<template v-else-if=\"rev.content_type === 'toollist'\">\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t\t\t:aria-label=\"$t( 'toollist' )\"\n\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-view-list\n\t\t\t\t\t</v-icon>\n\t\t\t\t</template>\n\t\t\t</dd>\n\n\t\t\t<template v-if=\"$can( 'patrol', 'reversion/version' )\">\n\t\t\t\t<dd class=\"me-1 mt-1\">\n\t\t\t\t\t<template v-if=\"!rev.patrolled\">\n\t\t\t\t\t\t<v-icon class=\"error--text\"\n\t\t\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t\t\t\t:aria-label=\"$t( 'unpatrolled' )\"\n\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-exclamation-thick\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<v-icon class=\"success--text\"\n\t\t\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t\t\t\t:aria-label=\"$t( 'patrolled' )\"\n\t\t\t\t\t\t\trole=\"img\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-check-bold\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</template>\n\t\t\t\t</dd>\n\t\t\t</template>\n\n\t\t\t<dd class=\"me-2 mt-1 rev-timestamp\">\n\t\t\t\t<router-link\n\t\t\t\t\tv-if=\"$can( 'view', rev )\"\n\t\t\t\t\t:to=\"getRevisionRouterObject( rev )\"\n\t\t\t\t>\n\t\t\t\t\t{{ rev.timestamp | moment( \"utc\", \"LT ll\" ) }}\n\t\t\t\t</router-link>\n\t\t\t\t<span v-else>\n\t\t\t\t\t{{ rev.timestamp | moment( \"utc\", \"LT ll\" ) }}\n\t\t\t\t</span>\n\t\t\t</dd>\n\n\t\t\t<dd\n\t\t\t\tv-if=\"aggregate\"\n\t\t\t\tclass=\"me-2 mt-1 rev-title\"\n\t\t\t>\n\t\t\t\t<router-link\n\t\t\t\t\t:to=\"getDetailRouterObject( rev )\"\n\t\t\t\t>\n\t\t\t\t\t{{ rev.content_title }}\n\t\t\t\t</router-link>\n\t\t\t</dd>\n\n\t\t\t<template v-if=\"$can( 'view', rev )\">\n\t\t\t\t<dd class=\"me-1 mt-1 rev-user\">\n\t\t\t\t\t<a\n\t\t\t\t\t\t:href=\"`http://meta.wikimedia.org/wiki/User:${rev.user.username}`\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t>{{ rev.user.username }}</a>\n\t\t\t\t</dd>\n\t\t\t\t<dd class=\"me-1 mt-1 rev-user-talk\">\n\t\t\t\t\t(<a\n\t\t\t\t\t\t:href=\"`http://meta.wikimedia.org/wiki/User_talk:${rev.user.username}`\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t>{{ $t( 'talk' ) }}</a>)\n\t\t\t\t</dd>\n\t\t\t</template>\n\t\t\t<template v-else>\n\t\t\t\t<dd class=\"me-1 mt-1 rev-user\">\n\t\t\t\t\t{{ rev.user.username }}\n\t\t\t\t</dd>\n\t\t\t\t<dd class=\"me-1 mt-1 rev-user-talk\" />\n\t\t\t</template>\n\n\t\t\t<dd class=\"me-1 mt-1 rev-comment\" dir=\"auto\">\n\t\t\t\t<i>({{ rev.comment }})</i>\n\t\t\t</dd>\n\n\t\t\t<template v-if=\"$can( 'change', rev )\">\n\t\t\t\t<dd\n\t\t\t\t\tv-if=\"!!rev.parent_id\"\n\t\t\t\t\tclass=\"me-1 mt-1\"\n\t\t\t\t>\n\t\t\t\t\t[<a @click=\"undoChangesBetweenRevisions( rev )\">{{ $t( 'undo' ) }}</a>]\n\t\t\t\t</dd>\n\n\t\t\t\t<dd\n\t\t\t\t\tv-if=\"!!rev.child_id\"\n\t\t\t\t\tclass=\"me-1 mt-1\"\n\t\t\t\t>\n\t\t\t\t\t[<a @click=\"restoreToRevision( rev )\">{{ $t( 'revert' ) }}</a>]\n\t\t\t\t</dd>\n\t\t\t</template>\n\n\t\t\t<template v-if=\"$can( 'change', 'reversion/version' )\">\n\t\t\t\t<dd class=\"me-1 mt-1\">\n\t\t\t\t\t<template v-if=\"rev.suppressed\">\n\t\t\t\t\t\t[<a @click=\"suppress( rev, 'reveal' )\">{{ $t( 'reveal' ) }}</a>]\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else-if=\"!!rev.child_id\">\n\t\t\t\t\t\t[<a @click=\"suppress( rev, 'hide' )\">{{ $t( 'hide' ) }}</a>]\n\t\t\t\t\t</template>\n\t\t\t\t</dd>\n\t\t\t</template>\n\n\t\t\t<template v-if=\"$can( 'patrol', 'reversion/version' )\">\n\t\t\t\t<dd class=\"me-1 mt-1\">\n\t\t\t\t\t<template v-if=\"!rev.patrolled\">\n\t\t\t\t\t\t[<a @click=\"patrol( rev )\">{{ $t( 'markaspatrolled' ) }}</a>]\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t[<span>{{ $t( 'patrolled' ) }}</span>]\n\t\t\t\t\t</template>\n\t\t\t\t</dd>\n\t\t\t</template>\n\t\t</dl>\n\t</div>\n</template>\n\n<script>\nconst TOOL = 'tool';\nconst LIST = 'toollist';\n\nexport default {\n\tname: 'Revisions',\n\tprops: {\n\t\t/**\n\t\t * Array of tool and/or toollist revisions\n\t\t */\n\t\trevisions: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t},\n\t\t/**\n\t\t * Revision arrays can be of tool type, toollist type or an aggregate\n\t\t * of both.\n\t\t */\n\t\taggregate: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tselectedRevisions: [],\n\t\t\tselectedRev: {},\n\t\t\totherSelectedRev: {},\n\t\t\tcheckbox: {}\n\t\t};\n\t},\n\tmethods: {\n\t\tupdateRevisions() {\n\t\t\tthis.$emit( 'update-revisions' );\n\t\t},\n\t\tgetRevisionRouterObject( rev ) {\n\t\t\tlet routeName;\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\trouteName = 'tools-revision';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\trouteName = 'lists-revision';\n\t\t\t}\n\t\t\treturn ( {\n\t\t\t\tname: routeName,\n\t\t\t\tparams: {\n\t\t\t\t\t...this.getUniqueIdentifier( rev ),\n\t\t\t\t\trevId: rev.id\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\tgetDetailRouterObject( rev ) {\n\t\t\tlet routeName;\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\trouteName = 'tools-view';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\trouteName = 'lists-view';\n\t\t\t}\n\t\t\treturn ( {\n\t\t\t\tname: routeName,\n\t\t\t\tparams: {\n\t\t\t\t\t...this.getUniqueIdentifier( rev )\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\tgetDiffRouterObject() {\n\t\t\tif ( this.selectedRevisions.length !== 2 ) {\n\t\t\t\treturn {};\n\t\t\t} else {\n\n\t\t\t\tconst content_type = this.selectedRev.content_type;\n\t\t\t\tlet routeName;\n\n\t\t\t\tif ( content_type === TOOL ) {\n\t\t\t\t\trouteName = 'tools-diff';\n\t\t\t\t} else if ( content_type === LIST ) {\n\t\t\t\t\trouteName = 'lists-diff';\n\t\t\t\t}\n\n\t\t\t\treturn ( {\n\t\t\t\t\tname: routeName,\n\t\t\t\t\tparams: {\n\t\t\t\t\t\t...this.getUniqueIdentifier( this.selectedRev ),\n\t\t\t\t\t\trevId: this.selectedRev.id,\n\t\t\t\t\t\totherRevId: this.otherSelectedRev.id\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\tundoChangesBetweenRevisions( rev ) {\n\t\t\tlet vuexMethod;\n\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\tvuexMethod = 'tools/undoChangesBetweenRevisions';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\tvuexMethod = 'lists/undoChangesBetweenRevisions';\n\t\t\t}\n\n\t\t\tthis.$store.dispatch( vuexMethod, {\n\t\t\t\t...this.getUniqueIdentifier( rev ),\n\t\t\t\trevId: rev.id,\n\t\t\t\tprevRevId: rev.parent_id\n\t\t\t} ).then( this.updateRevisions );\n\n\t\t},\n\t\trestoreToRevision( rev ) {\n\t\t\tlet vuexMethod;\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\tvuexMethod = 'tools/restoreToolToRevision';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\tvuexMethod = 'lists/restoreListToRevision';\n\t\t\t}\n\n\t\t\tthis.$store.dispatch( vuexMethod, {\n\t\t\t\t...this.getUniqueIdentifier( rev ),\n\t\t\t\trevId: rev.id\n\t\t\t} ).then( this.updateRevisions );\n\t\t},\n\t\tsuppress( rev, action ) {\n\t\t\tlet vuexMethod;\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\tvuexMethod = 'tools/hideRevealRevision';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\tvuexMethod = 'lists/hideRevealRevision';\n\t\t\t}\n\n\t\t\tthis.$store.dispatch( vuexMethod, {\n\t\t\t\t...this.getUniqueIdentifier( rev ),\n\t\t\t\trevId: rev.id,\n\t\t\t\taction: action\n\t\t\t} ).then( this.updateRevisions );\n\t\t},\n\t\tpatrol( rev ) {\n\t\t\tlet vuexMethod;\n\t\t\tif ( rev.content_type === TOOL ) {\n\t\t\t\tvuexMethod = 'tools/markRevisionAsPatrolled';\n\t\t\t} else if ( rev.content_type === LIST ) {\n\t\t\t\tvuexMethod = 'lists/markRevisionAsPatrolled';\n\t\t\t}\n\n\t\t\tthis.$store.dispatch( vuexMethod, {\n\t\t\t\t...this.getUniqueIdentifier( rev ),\n\t\t\t\trevId: rev.id\n\t\t\t} ).then( this.updateRevisions );\n\t\t},\n\t\t/**\n\t\t * Selects Two revisions of the same type for comparison.\n\t\t *\n\t\t * @param {Event} event\n\t\t * @param {Object} revSelected\n\t\t */\n\t\tselectRevision( event, revSelected ) {\n\t\t\tif ( event ) {\n\t\t\t\tif ( this.selectedRevisions.length > 1 ) {\n\t\t\t\t\tconst revToBeRemoved = this.selectedRevisions[ 0 ];\n\t\t\t\t\tthis.checkbox[ revToBeRemoved.id ] = false;\n\t\t\t\t\tthis.selectedRevisions.shift();\n\t\t\t\t}\n\t\t\t\tthis.selectedRevisions.push( revSelected );\n\t\t\t} else {\n\t\t\t\tthis.checkbox[ revSelected.id ] = false;\n\t\t\t\tconst index = this.selectedRevisions.indexOf( revSelected );\n\t\t\t\tthis.selectedRevisions.splice( index, 1 );\n\t\t\t}\n\t\t\tthis.selectedRevisions.sort(\n\t\t\t\tfunction ( a, b ) { return a.id - b.id; }\n\t\t\t);\n\t\t\tthis.selectedRev = this.selectedRevisions[ 0 ] || 0;\n\t\t\tthis.otherSelectedRev = this.selectedRevisions[ 1 ] || 0;\n\n\t\t},\n\t\tgetUniqueIdentifier( rev ) {\n\t\t\tif ( rev.content_type === 'tool' ) {\n\t\t\t\treturn { name: rev.content_id };\n\t\t\t} else if ( rev.content_type === 'toollist' ) {\n\t\t\t\treturn { id: rev.content_id };\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/common/ScrollTop.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/diff/DiffPath.vue","messages":[{"ruleId":"vue/no-v-for-template-key-on-child","severity":2,"message":"`<template v-for>` key should be placed on the `<template>` tag.","line":5,"column":5,"nodeType":"VAttribute","messageId":"vForTemplateKeyPlacement","endLine":5,"endColumn":15}],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'key' dynamic key is used'","line":40,"column":12,"nodeType":"CallExpression","endLine":40,"endColumn":31,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<dl class=\"row diff-path\">\n\t\t<template v-for=\"( value, idx ) in path\">\n\t\t\t<dt\n\t\t\t\t:key=\"idx\"\n\t\t\t\tclass=\"me-1\"\n\t\t\t>\n\t\t\t\t{{ labelFor( value ) }}\n\t\t\t</dt>\n\t\t\t<!-- eslint-disable-next-line vue/require-v-for-key -->\n\t\t\t<dt v-if=\"idx !== path.length - 1\"\n\t\t\t\tclass=\"me-1\"\n\t\t\t>\n\t\t\t\t/\n\t\t\t</dt>\n\t\t</template>\n\t</dl>\n</template>\n\n<script>\nexport default {\n\tname: 'DiffPath',\n\tprops: {\n\t\tpath: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Compute a localized label for a property.\n\t\t *\n\t\t * @param {string|number} prop - Property (e.g. 'tool_type')\n\t\t * @return {string} Localized label for property\n\t\t */\n\t\tlabelFor( prop ) {\n\t\t\tif ( typeof prop === 'string' ) {\n\t\t\t\tconst key = prop.replace( /_/g, '' );\n\t\t\t\t// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys\n\t\t\t\treturn this.$i18n.t( key );\n\t\t\t}\n\t\t\treturn prop.toString();\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/diff/DiffValue.vue","messages":[],"suppressedMessages":[{"ruleId":"vue/require-prop-types","severity":1,"message":"Prop \"value\" should define at least its type.","line":43,"column":3,"nodeType":"Property","endLine":46,"endColumn":4,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/CreateEditList.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":118,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":118,"endColumn":52},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":156,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":156,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":159,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":159,"endColumn":38},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":176,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":176,"endColumn":38}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"schema\">\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t<template v-if=\"listId\">\n\t\t\t\t\t\t{{ $t( 'lists-editlist' ) }}\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t{{ $t( 'lists-createnewlist' ) }}\n\t\t\t\t\t</template>\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-form ref=\"createlistform\" v-model=\"valid\">\n\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t<v-col\n\t\t\t\t\tcols=\"12\"\n\t\t\t\t\tclass=\"pe-4\"\n\t\t\t\t>\n\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\tv-for=\"( uischema, id ) in layout\"\n\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\tv-model=\"listinfo[ id ]\"\n\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t</v-row>\n\t\t\t\t</v-col>\n\t\t\t</v-row>\n\t\t</v-form>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<template v-if=\"listId\">\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"ma-4 pa-4\"\n\t\t\t\t\t\t@click=\"cancelEdit\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-cancel\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tclass=\"pa-4\"\n\t\t\t\t\t\t:disabled=\"!valid || !$can( 'change', 'lists/toollist' )\"\n\t\t\t\t\t\t@click=\"commentDialog = true\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t</template>\n\n\t\t\t\t<template v-else>\n\t\t\t\t\t<AgreeTerms />\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tclass=\"pa-4\"\n\t\t\t\t\t\t:disabled=\"!valid || !$can( 'add', 'lists/toollist' )\"\n\t\t\t\t\t\t@click=\"createList\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $t( 'lists-createnewlist' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t</template>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<CommentDialog v-if=\"listId\"\n\t\t\tv-model=\"commentDialog\"\n\t\t\t@save=\"editList\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapActions } from 'vuex';\nimport InputWidget from '@/components/common/InputWidget';\nimport CommentDialog from '@/components/common/CommentDialog';\nimport AgreeTerms from '@/components/common/AgreeTerms';\n\nexport default {\n\tname: 'CreateEditList',\n\tcomponents: {\n\t\tInputWidget,\n\t\tCommentDialog,\n\t\tAgreeTerms\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tlistId: this.$route.params.id,\n\t\t\tvalid: false,\n\t\t\tlistinfo: {\n\t\t\t\ttitle: null,\n\t\t\t\tdescription: null,\n\t\t\t\ticon: null,\n\t\t\t\ttools: [],\n\t\t\t\tpublished: false\n\t\t\t},\n\t\t\tcommentDialog: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'listCreated', 'list' ] ),\n\n\t\tlayout() {\n\t\t\treturn {\n\t\t\t\ttitle: {\n\t\t\t\t\ticon: 'mdi-pencil-outline',\n\t\t\t\t\tlabel: this.$t( 'title' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tdescription: {\n\t\t\t\t\ticon: 'mdi-note-text-outline',\n\t\t\t\t\tlabel: this.$t( 'description' )\n\t\t\t\t},\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'mdi-view-list',\n\t\t\t\t\tlabel: this.$t( 'icon' )\n\t\t\t\t},\n\t\t\t\ttools: {\n\t\t\t\t\twidget: 'multi-select-tool',\n\t\t\t\t\ticon: 'mdi-tools',\n\t\t\t\t\tlabel: this.$t( 'lists-create-tools' )\n\t\t\t\t},\n\t\t\t\tpublished: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\tlabel: this.$t( 'lists-create-published' )\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\tasyncComputed: {\n\t\tschema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'lists_create' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\n\t\tcreateList() {\n\t\t\tconst newlist = { ...this.listinfo };\n\n\t\t\tnewlist.comment = this.$t(\n\t\t\t\t'lists-create-comment', [ newlist.title ]\n\t\t\t);\n\n\t\t\tthis.$store.dispatch( 'lists/createNewList', newlist ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( this.listCreated ) {\n\t\t\t\t\t\tthis.$refs.createlistform.reset();\n\t\t\t\t\t\tthis.$router.push( { name: 'lists' } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\teditList( comment ) {\n\t\t\tconst newlist = { ...this.listinfo };\n\t\t\tnewlist.comment = comment;\n\n\t\t\tthis.$store.dispatch( 'lists/editList', newlist ).then(\n\t\t\t\t() => {\n\t\t\t\t\tthis.$router.back();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tthis.commentDialog = false;\n\t\t},\n\t\tcancelEdit() {\n\t\t\tthis.$router.back();\n\t\t},\n\t\tgetListInfo( id ) {\n\t\t\tthis.$store.dispatch( 'lists/getListById', id ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( this.list ) {\n\t\t\t\t\t\tthis.listinfo = JSON.parse( JSON.stringify( this.list ) );\n\t\t\t\t\t\tthis.listinfo.tools = [];\n\n\t\t\t\t\t\tthis.list.tools.forEach( ( tool ) => {\n\t\t\t\t\t\t\tthis.listinfo.tools.push( tool.name );\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\tmounted() {\n\t\tif ( this.listId ) {\n\t\t\tthis.getListInfo( this.listId );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/CreateListDialog.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":85,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":85,"endColumn":44},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"input\" event has been triggered but not declared on `emits` option.","line":92,"column":17,"nodeType":"Literal","messageId":"missing","endLine":92,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1386,1386],"text":"\nemits: ['input'],"},"desc":"Add the `emits` option with array syntax and define \"input\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"input","emitsKind":"`emits` option"},"fix":{"range":[1386,1386],"text":"\nemits: {'input': null},"},"desc":"Add the `emits` option with object syntax and define \"input\" event."}]},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":131,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":131,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":134,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":134,"endColumn":38}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-dialog\n\t\tv-if=\"schema\"\n\t\tv-model=\"show\"\n\t\tmax-width=\"600px\"\n\t>\n\t\t<v-card class=\"px-6 py-4\">\n\t\t\t<v-form ref=\"createlistform\" v-model=\"valid\">\n\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t<v-col\n\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\tclass=\"pe-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in layout\"\n\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\tv-model=\"listinfo[ id ]\"\n\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-form>\n\t\t\t<AgreeTerms />\n\t\t\t<v-card-actions>\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tclass=\"pa-4\"\n\t\t\t\t\t:disabled=\"!valid || !$can( 'add', 'lists/toollist' )\"\n\t\t\t\t\t@click=\"createList\"\n\t\t\t\t\t@click.stop=\"show = false\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'lists-createnewlist' ) }}\n\t\t\t\t</v-btn>\n\t\t\t\t<v-btn color=\"primary\"\n\t\t\t\t\ttext\n\t\t\t\t\t@click.stop=\"show = false\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'close' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-card-actions>\n\t\t</v-card>\n\t</v-dialog>\n</template>\n\n<script>\nimport { mapState, mapActions } from 'vuex';\nimport InputWidget from '@/components/common/InputWidget';\nimport AgreeTerms from '@/components/common/AgreeTerms';\n\nexport default {\n\tname: 'CreateListDialog',\n\tcomponents: {\n\t\tAgreeTerms,\n\t\tInputWidget\n\t},\n\tprops: {\n\t\tvalue: {\n\t\t\ttype: Boolean\n\t\t},\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tvalid: false,\n\t\t\tlistinfo: {\n\t\t\t\ttitle: null,\n\t\t\t\tdescription: null,\n\t\t\t\ticon: null,\n\t\t\t\ttools: [],\n\t\t\t\tpublished: false\n\t\t\t}\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'listCreated' ] ),\n\n\t\tshow: {\n\t\t\tget() {\n\t\t\t\treturn this.value;\n\t\t\t},\n\t\t\tset( value ) {\n\t\t\t\tthis.$emit( 'input', value );\n\t\t\t}\n\t\t},\n\t\tlayout() {\n\t\t\treturn {\n\t\t\t\ttitle: {\n\t\t\t\t\ticon: 'mdi-pencil-outline',\n\t\t\t\t\tlabel: this.$t( 'title' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tdescription: {\n\t\t\t\t\ticon: 'mdi-note-text-outline',\n\t\t\t\t\tlabel: this.$t( 'description' )\n\t\t\t\t},\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'mdi-view-list',\n\t\t\t\t\tlabel: this.$t( 'icon' )\n\t\t\t\t},\n\t\t\t\ttools: {\n\t\t\t\t\twidget: 'multi-select-tool',\n\t\t\t\t\ticon: 'mdi-tools',\n\t\t\t\t\tlabel: this.$t( 'lists-create-tools' )\n\t\t\t\t},\n\t\t\t\tpublished: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\tlabel: this.$t( 'lists-create-published' )\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\tasyncComputed: {\n\t\tschema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'lists_create' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\n\t\tcreateList() {\n\t\t\tconst newlist = { ...this.listinfo };\n\n\t\t\tnewlist.comment = this.$t(\n\t\t\t\t'lists-create-comment', [ newlist.title ]\n\t\t\t);\n\n\t\t\tthis.$store.dispatch( 'lists/createNewList', newlist ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( this.listCreated ) {\n\t\t\t\t\t\tthis.$refs.createlistform.reset();\n\t\t\t\t\t\tthis.$store.dispatch( 'lists/getMyLists', { page: 1, pageSize: 10 } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.listinfo.tools.push( this.tool.name );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/FeatureButton.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/ListCard.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"delete-list\" event has been triggered but not declared on `emits` option.","line":166,"column":16,"nodeType":"Literal","messageId":"missing","endLine":166,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"delete-list","emitsKind":"`emits` option"},"fix":{"range":[3002,3002],"text":"\nemits: ['delete-list'],"},"desc":"Add the `emits` option with array syntax and define \"delete-list\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"delete-list","emitsKind":"`emits` option"},"fix":{"range":[3002,3002],"text":"\nemits: {'delete-list': null},"},"desc":"Add the `emits` option with object syntax and define \"delete-list\" event."}]}],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container class=\"pa-0\">\n\t\t<v-card\n\t\t\tclass=\"mx-auto\"\n\t\t\toutlined\n\t\t\televation=\"1\"\n\t\t>\n\t\t\t<v-row class=\"box-header\" no-gutters>\n\t\t\t\t<CommonsImage\n\t\t\t\t\tclass=\"my-2 mx-2\"\n\t\t\t\t\t:commons-url=\"list.icon\"\n\t\t\t\t\t:size=\"40\"\n\t\t\t\t/>\n\t\t\t\t<v-col>\n\t\t\t\t\t<h2 class=\"text-h6 my-4\">\n\t\t\t\t\t\t{{ list.title }}\n\t\t\t\t\t</h2>\n\t\t\t\t</v-col>\n\n\t\t\t\t<v-col cols=\"auto\" class=\"list-action\">\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"my-3\"\n\t\t\t\t\t\ticon\n\t\t\t\t\t\t:to=\"{ name: 'lists-view', params: { id: list.id } }\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon size=\"30\" color=\"base20\">\n\t\t\t\t\t\t\tmdi-link-variant\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\n\t\t\t\t<v-col v-if=\"list.description\"\n\t\t\t\t\tcols=\"auto\"\n\t\t\t\t\tclass=\"list-action\"\n\t\t\t\t>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"my-3\"\n\t\t\t\t\t\ticon\n\t\t\t\t\t\t@click=\"listInfo = !listInfo\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon size=\"30\" color=\"base20\">\n\t\t\t\t\t\t\tmdi-information-outline\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\t\t\t\t<v-col v-if=\"path === 'lists'\"\n\t\t\t\t\tcols=\"auto\"\n\t\t\t\t\tclass=\"list-action\"\n\t\t\t\t>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"my-3\"\n\t\t\t\t\t\ticon\n\t\t\t\t\t\t:to=\"{ name: 'lists-edit', params: { id: list.id } }\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon size=\"30\" color=\"primary\">\n\t\t\t\t\t\t\tmdi-pencil\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\t\t\t\t<v-col v-if=\"path === 'lists'\"\n\t\t\t\t\tcols=\"auto\"\n\t\t\t\t\tclass=\"list-action\"\n\t\t\t\t>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"my-3\"\n\t\t\t\t\t\ticon\n\t\t\t\t\t\t@click=\"confirmDeleteDialog = true\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon size=\"30\" color=\"error\">\n\t\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\t\t\t</v-row>\n\t\t\t<v-alert\n\t\t\t\tclass=\"ma-2\"\n\t\t\t\t:value=\"listInfo\"\n\t\t\t\tcolor=\"accent\"\n\t\t\t\tdismissible\n\t\t\t\t@input=\"closeListInfo\"\n\t\t\t>\n\t\t\t\t{{ list.description }}\n\t\t\t</v-alert>\n\t\t\t<v-sheet>\n\t\t\t\t<v-card\n\t\t\t\t\tv-if=\"list.tools.length === 0\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\televation=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<v-card-title class=\"pa-0\">{{ $t( 'lists-listempty' ) }}</v-card-title>\n\t\t\t\t</v-card>\n\t\t\t\t<v-slide-group\n\t\t\t\t\tv-else\n\t\t\t\t\tshow-arrows=\"always\"\n\t\t\t\t>\n\t\t\t\t\t<v-slide-item\n\t\t\t\t\t\tv-for=\"( tool, idx ) in list.tools\"\n\t\t\t\t\t\t:key=\"`tool.title-${idx}`\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-card\n\t\t\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\t\t\twidth=\"220\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToolCard :tool=\"tool\" />\n\t\t\t\t\t\t</v-card>\n\t\t\t\t\t</v-slide-item>\n\t\t\t\t</v-slide-group>\n\t\t\t\t<v-card v-if=\"listFooter\"\n\t\t\t\t\tclass=\"text-body-2 rounded-0 elevation-0\"\n\t\t\t\t>\n\t\t\t\t\t<v-divider />\n\t\t\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t\t\t<h3 class=\"font-weight-light\">\n\t\t\t\t\t\t\t{{ $t( 'listinfo', [\n\t\t\t\t\t\t\t\tlist.created_by.username,\n\t\t\t\t\t\t\t\tformatDate( list.created_date )\n\t\t\t\t\t\t\t] ) }}\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-card>\n\t\t\t</v-sheet>\n\t\t</v-card>\n\t\t<ConfirmDeleteDialog v-if=\"list.id\"\n\t\t\tv-model=\"confirmDeleteDialog\"\n\t\t\t@delete=\"deleteList\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport ToolCard from '@/components/tools/ToolCard';\nimport CommonsImage from '@/components/common/CommonsImage';\nimport ConfirmDeleteDialog from '@/components/common/ConfirmDeleteDialog';\n\nexport default {\n\tcomponents: {\n\t\tToolCard,\n\t\tCommonsImage,\n\t\tConfirmDeleteDialog\n\t},\n\tprops: {\n\t\tlist: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t\trequired: true\n\t\t},\n\t\tlistFooter: {\n\t\t\ttype: Boolean\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tconfirmDeleteDialog: false,\n\t\t\tlistInfo: false,\n\t\t\tpath: null\n\t\t};\n\t},\n\tmethods: {\n\t\tcloseListInfo() {\n\t\t\tthis.listInfo = false;\n\t\t},\n\t\tformatDate( date ) {\n\t\t\treturn this.$moment.utc( date ).format( 'lll' );\n\t\t},\n\t\tdeleteList() {\n\t\t\tthis.$emit( 'delete-list', this.list.id );\n\t\t\tthis.confirmDeleteDialog = false;\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.path = this.$route.name;\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/ListInfo.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":99,"column":15,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":99,"endColumn":50},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"copy-to-clipboard\" event has been triggered but not declared on `emits` option.","line":190,"column":16,"nodeType":"Literal","messageId":"missing","endLine":190,"endColumn":35,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"copy-to-clipboard","emitsKind":"`emits` option"},"fix":{"range":[3758,3758],"text":"\nemits: ['copy-to-clipboard'],"},"desc":"Add the `emits` option with array syntax and define \"copy-to-clipboard\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"copy-to-clipboard","emitsKind":"`emits` option"},"fix":{"range":[3758,3758],"text":"\nemits: {'copy-to-clipboard': null},"},"desc":"Add the `emits` option with object syntax and define \"copy-to-clipboard\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"delete-list\" event has been triggered but not declared on `emits` option.","line":193,"column":16,"nodeType":"Literal","messageId":"missing","endLine":193,"endColumn":29,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"delete-list","emitsKind":"`emits` option"},"fix":{"range":[3758,3758],"text":"\nemits: ['delete-list'],"},"desc":"Add the `emits` option with array syntax and define \"delete-list\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"delete-list","emitsKind":"`emits` option"},"fix":{"range":[3758,3758],"text":"\nemits: {'delete-list': null},"},"desc":"Add the `emits` option with object syntax and define \"delete-list\" event."}]}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"list\">\n\t\t<v-app-bar\n\t\t\tv-if=\"!revId\"\n\t\t\tcolor=\"base100\"\n\t\t\tdense\n\t\t\tflat\n\t\t\tclass=\"list-app-bar\"\n\t\t>\n\t\t\t<v-spacer />\n\t\t\t<v-btn\n\t\t\t\tv-if=\"$can( 'change', list )\"\n\t\t\t\t:to=\"{ name: 'lists-edit', params: { id: list.id } }\"\n\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t>\n\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\tmdi-pencil\n\t\t\t\t</v-icon>\n\t\t\t\t{{ $t( 'lists-editlist' ) }}\n\t\t\t</v-btn>\n\n\t\t\t<v-btn\n\t\t\t\tv-if=\"$can( 'delete', list )\"\n\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\tclass=\"ms-4\"\n\t\t\t\tcolor=\"error\"\n\t\t\t\t@click=\"confirmDeleteDialog = true\"\n\t\t\t>\n\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\tmdi-delete\n\t\t\t\t</v-icon>\n\t\t\t\t{{ $t( 'delete' ) }}\n\t\t\t</v-btn>\n\t\t\t<FeatureButton v-if=\"list.published\" :list=\"list\" />\n\t\t\t<v-btn\n\t\t\t\t:to=\"{ name: 'lists-history', params: { id: list.id } }\"\n\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\tclass=\"ms-4\"\n\t\t\t>\n\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\tmdi-history\n\t\t\t\t</v-icon>\n\t\t\t\t{{ $t( 'viewhistory' ) }}\n\t\t\t</v-btn>\n\t\t</v-app-bar>\n\t\t<v-card\n\t\t\televation=\"0\"\n\t\t\tclass=\"list-card__card\"\n\t\t>\n\t\t\t<v-card-title class=\"px-0\">\n\t\t\t\t<CommonsImage\n\t\t\t\t\t:commons-url=\"list.icon\"\n\t\t\t\t\t:size=\"50\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t/>\n\t\t\t\t<h2 class=\"list-card__title text-h4 me-2\">\n\t\t\t\t\t{{ list.title }}\n\t\t\t\t</h2>\n\t\t\t\t<v-chip\n\t\t\t\t\tv-if=\"list.featured\"\n\t\t\t\t\tcolor=\"yellow30\"\n\t\t\t\t\ttext-color=\"base100\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon size=\"15\" class=\"me-1\">\n\t\t\t\t\t\tmdi-star\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'listinfo-featuredlist' ) }}\n\t\t\t\t</v-chip>\n\t\t\t</v-card-title>\n\t\t\t<v-card-text>\n\t\t\t\t<v-row>\n\t\t\t\t\t<v-col cols=\"12\" class=\"px-0\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"text--primary text-subtitle-1\"\n\t\t\t\t\t\t\tdir=\"auto\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ list.description }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\n\t\t\t\t<v-row>\n\t\t\t\t\t<v-col\n\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\tmd=\"6\"\n\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<dl class=\"list-card__authors row pt-1 text-subtitle-1\">\n\t\t\t\t\t\t\t<dt class=\"me-1\">{{ $t( 'authors' ) }}:</dt>\n\t\t\t\t\t\t\t<dd class=\"line-clamp\">{{ list.created_by.username }}</dd>\n\t\t\t\t\t\t</dl>\n\t\t\t\t\t</v-col>\n\n\t\t\t\t\t<v-col md=\"6\" cols=\"12\">\n\t\t\t\t\t\t<dl class=\"row pt-1 text-subtitle-1\">\n\t\t\t\t\t\t\t<dt class=\"me-1\">{{ $t( 'datecreated' ) }}:</dt>\n\t\t\t\t\t\t\t<dd>{{ list.created_date | moment( 'lll' ) }}</dd>\n\t\t\t\t\t\t</dl>\n\t\t\t\t\t</v-col>\n\n\t\t\t\t\t<v-col\n\t\t\t\t\t\tlg=\"4\"\n\t\t\t\t\t\tmd=\"12\"\n\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\tclass=\"py-1 px-0 text-md-end\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\ttext\n\t\t\t\t\t\t\ttransparent\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t\t\t\t@click=\"copyToClipboard\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\t\t\tmdi-link-variant\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'listinfo-copylink' ) }}\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\n\t\t\t\t<v-row v-if=\"showClipboardMsg\">\n\t\t\t\t\t<v-col class=\"py-1 px-0 text-md-end\">\n\t\t\t\t\t\t{{ $t( 'copiedtoclipboard' ) }}\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-card-text>\n\t\t</v-card>\n\n\t\t<v-divider />\n\n\t\t<v-row class=\"my-2\">\n\t\t\t<v-col v-for=\"tool in list.tools\"\n\t\t\t\t:key=\"tool.name\"\n\t\t\t\tclass=\"lists pa-0\"\n\t\t\t>\n\t\t\t\t<v-card\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\tmin-width=\"210\"\n\t\t\t\t>\n\t\t\t\t\t<ToolCard :tool=\"tool\" />\n\t\t\t\t</v-card>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<ConfirmDeleteDialog v-if=\"list.id\"\n\t\t\tv-model=\"confirmDeleteDialog\"\n\t\t\t@delete=\"deleteList\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport CommonsImage from '@/components/common/CommonsImage';\nimport FeatureButton from '@/components/lists/FeatureButton';\nimport ToolCard from '@/components/tools/ToolCard';\nimport ConfirmDeleteDialog from '@/components/common/ConfirmDeleteDialog';\n\nexport default {\n\tname: 'ListInfo',\n\tcomponents: {\n\t\tCommonsImage,\n\t\tFeatureButton,\n\t\tToolCard,\n\t\tConfirmDeleteDialog\n\n\t},\n\tprops: {\n\t\tlist: {\n\t\t\ttype: Object,\n\t\t\tdefault: null\n\t\t},\n\t\trevId: {\n\t\t\ttype: [ String, Number ],\n\t\t\tdefault: null\n\t\t},\n\t\tshowClipboardMsg: {\n\t\t\ttype: Boolean\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tconfirmDeleteDialog: false\n\t\t};\n\t},\n\tmethods: {\n\t\tcopyToClipboard() {\n\t\t\tthis.$emit( 'copy-to-clipboard' );\n\t\t},\n\t\tdeleteList() {\n\t\t\tthis.$emit( 'delete-list' );\n\t\t\tthis.confirmDeleteDialog = false;\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/lists/Lists.vue","messages":[{"ruleId":"vue/no-deprecated-dollar-listeners-api","severity":2,"message":"The `$listeners` is deprecated.","line":11,"column":12,"nodeType":"Identifier","messageId":"deprecated","endLine":11,"endColumn":22}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col v-for=\"list in lists.results\"\n\t\t\t\t:key=\"list.id\"\n\t\t\t\tclass=\"lists px-0 pb-0\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<ListCard :list=\"list\"\n\t\t\t\t\t:list-footer=\"listFooter\"\n\t\t\t\t\tv-on=\"$listeners\" />\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport ListCard from '@/components/lists/ListCard';\n\nexport default {\n\tname: 'Lists',\n\tcomponents: {\n\t\tListCard\n\t},\n\tprops: {\n\t\tlists: {\n\t\t\ttype: Object,\n\t\t\tdefault: null\n\t\t},\n\t\tlistFooter: {\n\t\t\ttype: Boolean\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/locale/SelectLocale.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":96,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":96,"endColumn":53},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":97,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":97,"endColumn":49}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-dialog\n\t\tv-model=\"dialog\"\n\t\tscrollable\n\t\ttransition=\"dialog-bottom-transition\"\n\t\twidth=\"300\"\n\t\tcontent-class=\"locale-select\"\n\t>\n\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t<v-btn\n\t\t\t\tclass=\"ma-1 transparent elevation-0\"\n\t\t\t\tdark\n\t\t\t\tv-bind=\"attrs\"\n\t\t\t\tv-on=\"on\"\n\t\t\t>\n\t\t\t\t<v-icon\n\t\t\t\t\t:title=\"localeAutonym\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t>\n\t\t\t\t\tmdi-translate\n\t\t\t\t</v-icon>\n\t\t\t\t<span v-if=\"$vuetify.breakpoint.mdAndUp\">\n\t\t\t\t\t{{ localeAutonym }}\n\t\t\t\t</span>\n\t\t\t</v-btn>\n\t\t</template>\n\t\t<v-card>\n\t\t\t<v-toolbar\n\t\t\t\tdark\n\t\t\t\tcolor=\"secondary\"\n\t\t\t>\n\t\t\t\t<v-text-field\n\t\t\t\t\tv-model=\"searchString\"\n\t\t\t\t\t:label=\"$t( 'locale-select' )\"\n\t\t\t\t\tclearable\n\t\t\t\t\tsingle-line\n\t\t\t\t\t@input=\"onSearch\"\n\t\t\t\t\t@click:clear=\"onClear\"\n\t\t\t\t>\n\t\t\t\t\t<template #prepend>\n\t\t\t\t\t\t<v-icon>mdi-magnify</v-icon>\n\t\t\t\t\t</template>\n\t\t\t\t</v-text-field>\n\t\t\t\t<v-spacer />\n\t\t\t\t<v-btn\n\t\t\t\t\ticon\n\t\t\t\t\t@click=\"dialog = false\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon>mdi-close-box-outline</v-icon>\n\t\t\t\t</v-btn>\n\t\t\t</v-toolbar>\n\t\t\t<v-card-text\n\t\t\t\tclass=\"selectlocale-body\"\n\t\t\t>\n\t\t\t\t<v-list>\n\t\t\t\t\t<v-list-item\n\t\t\t\t\t\tv-for=\"( autonym, code ) in filteredLocales || localeMap\"\n\t\t\t\t\t\t:key=\"code\"\n\t\t\t\t\t\tselectable\n\t\t\t\t\t\tlink\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-list-item-content\n\t\t\t\t\t\t\t@click=\"setLocale( code )\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<dl class=\"row mx-0\">\n\t\t\t\t\t\t\t\t<dt class=\"me-1\">{{ autonym }}</dt>\n\t\t\t\t\t\t\t\t<dd>({{ code }})</dd>\n\t\t\t\t\t\t\t</dl>\n\t\t\t\t\t\t</v-list-item-content>\n\t\t\t\t\t</v-list-item>\n\t\t\t\t</v-list>\n\t\t\t</v-card-text>\n\t\t\t<v-toolbar>\n\t\t\t\t<v-btn\n\t\t\t\t\tclass=\"ma-1 transparent elevation-0\"\n\t\t\t\t\thref=\"https://translatewiki.net/w/i.php?title=Special:Translate&group=toolhub\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'helptranslate' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-toolbar>\n\t\t</v-card>\n\t</v-dialog>\n</template>\n\n<script>\nimport { mapGetters, mapState } from 'vuex';\n\nexport default {\n\tname: 'SelectLocale',\n\tdata: () => ( {\n\t\tdialog: false,\n\t\tsearchString: '',\n\t\tfilteredLocales: null\n\t} ),\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'locale', 'localeMap' ] ),\n\t\t...mapGetters( 'locale', [ 'localeAutonym' ] )\n\t},\n\tmethods: {\n\t\tsetLocale( code ) {\n\t\t\tthis.$store.dispatch(\n\t\t\t\t'locale/setLocale', { locale: code, vm: this }\n\t\t\t);\n\t\t\tthis.dialog = false;\n\t\t},\n\t\tonSearch() {\n\t\t\tif ( !this.searchString ) {\n\t\t\t\tthis.filteredLocales = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst query = new RegExp(\n\t\t\t\tthis.searchString.replace( /[.*+?^${}()|[\\]\\\\]/g, '\\\\$&' ),\n\t\t\t\t'iu'\n\t\t\t);\n\t\t\tthis.filteredLocales = {};\n\t\t\tObject.keys( this.localeMap ).forEach( ( key ) => {\n\t\t\t\tif (\n\t\t\t\t\tquery.test( key ) ||\n\t\t\t\t\tquery.test( this.localeMap[ key ] )\n\t\t\t\t) {\n\t\t\t\t\tthis.filteredLocales[ key ] = this.localeMap[ key ];\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\tonClear() {\n\t\t\tthis.searchString = '';\n\t\t\tthis.onSearch();\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/oauth/AuthorizedApps.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":101,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":101,"endColumn":68}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row v-if=\"loaded\">\n\t\t\t<v-col\n\t\t\t\tcols=\"12\"\n\t\t\t\tclass=\"text-h6 text--secondary\"\n\t\t\t>\n\t\t\t\t<template\n\t\t\t\t\tv-if=\"!$can( 'add', 'oauth2_provider/application' )\"\n\t\t\t\t>\n\t\t\t\t\t<span>{{ $t( 'developersettings-nologintext' ) }}</span>\n\t\t\t\t</template>\n\n\t\t\t\t<template\n\t\t\t\t\tv-else\n\t\t\t\t>\n\t\t\t\t\t<span v-if=\"numAuthorizedApps === 0\">\n\t\t\t\t\t\t{{ $t( 'developersettings-noauthorizedappsfoundtext' ) }}\n\t\t\t\t\t</span>\n\t\t\t\t</template>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-for=\"app in authorizedApps\"\n\t\t\t:key=\"app.id\"\n\t\t\tclass=\"elevation-2 ma-1 mb-4\"\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<dl\n\t\t\t\t\tclass=\"row ma-1 pa-1\"\n\t\t\t\t>\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'appname' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.application.name }}</dd>\n\t\t\t\t</dl>\n\n\t\t\t\t<dl\n\t\t\t\t\tclass=\"row ma-1 pa-1\"\n\t\t\t\t>\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'clientid' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.application.client_id }}</dd>\n\t\t\t\t</dl>\n\n\t\t\t\t<dl\n\t\t\t\t\tclass=\"row ma-1 pa-1\"\n\t\t\t\t>\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'createdby' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.application.user.username }}</dd>\n\t\t\t\t</dl>\n\n\t\t\t\t<dl\n\t\t\t\t\tclass=\"row ma-1 pa-1\"\n\t\t\t\t>\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'redirecturl' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.application.redirect_url }}</dd>\n\t\t\t\t</dl>\n\t\t\t</v-col>\n\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"error base100--text\"\n\t\t\t\t\t@click=\"deleteAuthorizedApp( app.id )\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'delete' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"pages > 1\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"pages\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\n\nexport default {\n\tname: 'AuthorizedApps',\n\tdata() {\n\t\treturn {\n\t\t\tloaded: false,\n\t\t\titemsPerPage: 10,\n\t\t\tpage: 1\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'oauth', [ 'authorizedApps', 'numAuthorizedApps' ] ),\n\t\tpages() {\n\t\t\treturn Math.ceil( this.numAuthorizedApps / this.itemsPerPage );\n\t\t}\n\t},\n\tmethods: {\n\t\tlistAuthorizedApps() {\n\t\t\tthis.$store.dispatch(\n\t\t\t\t'oauth/listAuthorizedApps', this.page\n\t\t\t).then( () => {\n\t\t\t\tthis.loaded = true;\n\t\t\t} );\n\t\t},\n\t\tdeleteAuthorizedApp( id ) {\n\t\t\treturn this.$store.dispatch( 'oauth/deleteAuthorizedApp', id );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tthis.page = num;\n\t\t\tthis.listAuthorizedApps();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.listAuthorizedApps();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/oauth/ClientApps.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":120,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":120,"endColumn":60},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":136,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":136,"endColumn":49}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"schema\">\n\t\t<v-row v-if=\"loaded && numClientApps === 0\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t{{ $t( 'developersettings-noclientappsfoundtext' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-for=\"app in clientApps\"\n\t\t\t:key=\"app.client_id\"\n\t\t\tclass=\"elevation-2 ma-1 mb-4\"\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<dl class=\"row ma-1 pa-1\">\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'appname' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.name }}</dd>\n\t\t\t\t</dl>\n\t\t\t\t<dl class=\"row ma-1 pa-1\">\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'clientid' ) }}</dt>\n\t\t\t\t\t<dd class=\"app-client-id\">{{ app.client_id }}</dd>\n\t\t\t\t</dl>\n\t\t\t\t<dl class=\"row ma-1 pa-1\">\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'createdby' ) }}</dt>\n\t\t\t\t\t<dd>{{ app.user.username }}</dd>\n\t\t\t\t</dl>\n\t\t\t\t<dl class=\"row ma-1 pa-1\">\n\t\t\t\t\t<template v-if=\"$can( 'change', app )\">\n\t\t\t\t\t\t<dt class=\"me-2 mt-5 font-weight-bold\">\n\t\t\t\t\t\t\t{{ $t( 'redirecturl' ) }}\n\t\t\t\t\t\t</dt>\n\t\t\t\t\t\t<dd class=\"flex\">\n\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\tv-model=\"redirectUrls[ app.client_id ]\"\n\t\t\t\t\t\t\t\t:schema=\"schema.properties.redirect_url\"\n\t\t\t\t\t\t\t\t:ui-schema=\"layout.redirect_url\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">\n\t\t\t\t\t\t\t{{ $t( 'redirecturl' ) }}\n\t\t\t\t\t\t</dt>\n\t\t\t\t\t\t<dd>{{ app.redirect_url }}</dd>\n\t\t\t\t\t</template>\n\t\t\t\t</dl>\n\t\t\t</v-col>\n\t\t\t<v-col v-if=\"$can( 'change', app )\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t@click=\"updateClientApp( app )\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-pencil\n\t\t\t\t\t</v-icon>\n\n\t\t\t\t\t{{ $t( 'update' ) }}\n\t\t\t\t</v-btn>\n\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"error base100--text\"\n\t\t\t\t\t@click=\"deleteClientApp( app.client_id )\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'delete' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row v-if=\"pages > 1\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"pages\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapState } from 'vuex';\nimport InputWidget from '@/components/common/InputWidget';\n\nexport default {\n\tname: 'ClientApps',\n\tcomponents: {\n\t\tInputWidget\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tloaded: false,\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10,\n\t\t\tredirectUrls: {},\n\t\t\tlayout: {\n\t\t\t\tredirect_url: {\n\t\t\t\t\ticon: '',\n\t\t\t\t\tlabel: '',\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'oauth', [ 'clientApps', 'numClientApps' ] ),\n\t\tpages() {\n\t\t\treturn Math.ceil( this.numClientApps / this.itemsPerPage );\n\t\t}\n\t},\n\tasyncComputed: {\n\t\tschema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema(\n\t\t\t\t\t'oauth_applications_partial_update'\n\t\t\t\t);\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\n\t\tlistClientApps() {\n\t\t\tthis.$store.dispatch( 'oauth/listClientApps', this.page ).then(\n\t\t\t\t() => {\n\t\t\t\t\tthis.loaded = true;\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tupdateClientApp( app ) {\n\t\t\tthis.$store.dispatch( 'oauth/updateClientApp', {\n\t\t\t\tclientId: app.client_id,\n\t\t\t\tredirectUrl: this.redirectUrls[ app.client_id ]\n\t\t\t} );\n\t\t},\n\t\tdeleteClientApp( clientId ) {\n\t\t\tthis.$store.dispatch( 'oauth/deleteClientApp', clientId );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tthis.page = num;\n\t\t\tthis.listClientApps();\n\t\t}\n\t},\n\twatch: {\n\t\tclientApps: {\n\t\t\thandler( newVal ) {\n\t\t\t\tthis.redirectUrls = {};\n\t\t\t\tnewVal.forEach( ( app ) => {\n\t\t\t\t\tthis.redirectUrls[ app.client_id ] = app.redirect_url;\n\t\t\t\t} );\n\t\t\t},\n\t\t\timmediate: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.listClientApps();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/oauth/RegisterApp.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":165,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":165,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":191,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":191,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":206,"column":21,"nodeType":"SpreadElement","messageId":"forbidden","endLine":206,"endColumn":36}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"schema\">\n\t\t<v-row v-if=\"isAppCreated\">\n\t\t\t<v-col\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-alert text\n\t\t\t\t\tcolor=\"secondary\"\n\t\t\t\t\tdismissible\n\t\t\t\t\t@input=\"closeAppDetailsAlert\"\n\t\t\t\t>\n\t\t\t\t\t<v-row>\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"3\"\n\t\t\t\t\t\t\tclass=\"py-1 mt-1 font-weight-bold\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'clientid' ) }}\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"6\"\n\t\t\t\t\t\t\tcols=\"5\"\n\t\t\t\t\t\t\tclass=\"py-1 mt-1 app-client-id\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ clientAppCreated.client_id }}\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"2\"\n\t\t\t\t\t\t\tclass=\"py-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-btn class=\"text-none\"\n\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t\ttile\n\t\t\t\t\t\t\t\t:aria-label=\"$t( 'clicktocopy' )\"\n\t\t\t\t\t\t\t\t@click=\"copyToClipboard(\n\t\t\t\t\t\t\t\t\t'id',\n\t\t\t\t\t\t\t\t\tclientAppCreated.client_id\n\t\t\t\t\t\t\t\t)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\tplain\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tmdi-content-copy\n\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"2\"\n\t\t\t\t\t\t\tclass=\"py-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p ref=\"app-id-clipboard\" class=\"font-weight-bold\" />\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t</v-row>\n\n\t\t\t\t\t<v-row class=\"py-0\">\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"3\"\n\t\t\t\t\t\t\tclass=\"py-1 mt-1 font-weight-bold\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'clientsecret' ) }}\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"6\"\n\t\t\t\t\t\t\tcols=\"5\"\n\t\t\t\t\t\t\tclass=\"py-1 mt-1 app-client-secret\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ clientAppCreated.client_secret }}\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"2\"\n\t\t\t\t\t\t\tclass=\"py-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-btn class=\"text-none\"\n\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t\ttile\n\t\t\t\t\t\t\t\t:aria-label=\"$t( 'clicktocopy' )\"\n\t\t\t\t\t\t\t\t@click=\"copyToClipboard(\n\t\t\t\t\t\t\t\t\t'secret',\n\t\t\t\t\t\t\t\t\tclientAppCreated.client_secret\n\t\t\t\t\t\t\t\t)\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\tplain\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tmdi-content-copy\n\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t<v-col lg=\"2\"\n\t\t\t\t\t\t\tcols=\"2\"\n\t\t\t\t\t\t\tclass=\"py-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p ref=\"app-secret-clipboard\"\n\t\t\t\t\t\t\t\tclass=\"font-weight-bold\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t</v-row>\n\t\t\t\t</v-alert>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row v-else>\n\t\t\t<v-form\n\t\t\t\tref=\"form\"\n\t\t\t\tv-model=\"valid\"\n\t\t\t\tclass=\"flex\"\n\t\t\t>\n\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t<v-col\n\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\tclass=\"pe-4\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in layout\"\n\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\tv-model=\"appinfo[ id ]\"\n\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-form>\n\t\t\t<v-col cols=\"12\" lg=\"8\">\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tclass=\"pa-4\"\n\t\t\t\t\t:disabled=\"!valid || !$can( 'add', 'oauth2_provider/application' )\"\n\t\t\t\t\t@click=\"registerApp\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'registeroauthapp' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapState } from 'vuex';\nimport InputWidget from '@/components/common/InputWidget';\n\nexport default {\n\tname: 'RegisterApp',\n\tcomponents: {\n\t\tInputWidget\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tvalid: false,\n\t\t\tappinfo: {\n\t\t\t\tname: null,\n\t\t\t\tredirect_url: null\n\t\t\t},\n\t\t\tisAppCreated: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'oauth', [ 'clientAppCreated' ] ),\n\n\t\tlayout() {\n\t\t\treturn {\n\t\t\t\tname: {\n\t\t\t\t\ticon: 'mdi-pencil-outline',\n\t\t\t\t\tlabel: this.$t( 'appname' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tredirect_url: {\n\t\t\t\t\ticon: 'mdi-link-variant',\n\t\t\t\t\tlabel: this.$t( 'authcallbackurl' ),\n\t\t\t\t\trequired: true\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\tasyncComputed: {\n\t\tschema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'oauth_applications_create' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\n\t\tcopyToClipboard( item, value ) {\n\t\t\tconst refs = this.$refs,\n\t\t\t\tappClipboard = item === 'id' ? 'app-id-clipboard' : 'app-secret-clipboard',\n\t\t\t\tmessage = this.$t( 'copiedtoclipboard' );\n\n\t\t\tthis.$copyText( value ).then( function () {\n\t\t\t\trefs[ appClipboard ].innerText = message;\n\t\t\t\tsetTimeout( function () {\n\t\t\t\t\trefs[ appClipboard ].innerText = '';\n\t\t\t\t}, 20000 );\n\t\t\t} );\n\t\t},\n\t\tregisterApp() {\n\t\t\tconst newapp = { ...this.appinfo };\n\t\t\tthis.$store.dispatch( 'oauth/registerApp', newapp ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( this.clientAppCreated ) {\n\t\t\t\t\t\tthis.isAppCreated = true;\n\t\t\t\t\t\tthis.$refs.form.reset();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tcloseAppDetailsAlert() {\n\t\t\tthis.isAppCreated = false;\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/search/FilterList.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":167,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":167,"endColumn":43}],"suppressedMessages":[{"ruleId":"vue/no-unused-properties","severity":2,"message":"'model' of data found, but never used.","line":163,"column":3,"nodeType":"Identifier","messageId":"unused","endLine":163,"endColumn":8,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-card\n\t\t:outlined=\"outlined\"\n\t\tclass=\"d-flex flex-column\"\n\t\tmax-height=\"100%\"\n\t>\n\t\t<slot name=\"header\" />\n\t\t<v-card-text\n\t\t\tclass=\"px-0 flex-grow-1 overflow-auto\"\n\t\t>\n\t\t\t<v-list\n\t\t\t\tdense\n\t\t\t\tshaped\n\t\t\t>\n\t\t\t\t<v-list-item-group\n\t\t\t\t\tv-model=\"value\"\n\t\t\t\t\t:multiple=\"facet.multi\"\n\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t@change=\"updateModel\"\n\t\t\t\t>\n\t\t\t\t\t<v-list-item\n\t\t\t\t\t\tv-for=\"bucket in facet.buckets\"\n\t\t\t\t\t\t:key=\"bucket.key\"\n\t\t\t\t\t\t:value=\"bucket.key\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-list-item-content>\n\t\t\t\t\t\t\t{{ renderBucketKey( bucket.key ) }}\n\t\t\t\t\t\t</v-list-item-content>\n\t\t\t\t\t\t<v-list-item-action>\n\t\t\t\t\t\t\t<v-chip outlined>\n\t\t\t\t\t\t\t\t{{ bucket.doc_count }}\n\t\t\t\t\t\t\t</v-chip>\n\t\t\t\t\t\t</v-list-item-action>\n\t\t\t\t\t</v-list-item>\n\t\t\t\t</v-list-item-group>\n\t\t\t</v-list>\n\t\t</v-card-text>\n\t\t<v-card-actions class=\"flex-grow-0\">\n\t\t\t<v-btn\n\t\t\t\tv-if=\"facet.selected.length > 0\"\n\t\t\t\tblock\n\t\t\t\t@click=\"clearSelected\"\n\t\t\t>\n\t\t\t\t<v-icon left>mdi-backspace-outline</v-icon>\n\t\t\t\t{{ $t( 'search-filter-clear-selected' ) }}\n\t\t\t</v-btn>\n\t\t</v-card-actions>\n\t\t<slot name=\"footer\" />\n\t</v-card>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport { ensureArray } from '@/helpers/array';\nimport { forWikiLabel, localizeEnum } from '@/helpers/tools';\n\nexport const methods = {\n\t/**\n\t * Get display string for a given bucket value.\n\t *\n\t * @param {string} value\n\t * @return {string}\n\t */\n\trenderBucketKey( value ) {\n\t\tif ( value === this.facet.missingValue ) {\n\t\t\treturn this.$i18n.t( 'search-filter-missing-value' );\n\t\t}\n\t\tswitch ( this.facet.name ) {\n\t\t\tcase 'audiences':\n\t\t\tcase 'content_types':\n\t\t\tcase 'origin':\n\t\t\tcase 'subject_domains':\n\t\t\tcase 'tasks':\n\t\t\tcase 'tool_type':\n\t\t\t\treturn localizeEnum( this.facet.name, value );\n\n\t\t\tcase 'ui_language':\n\t\t\t\treturn this.$i18n.t(\n\t\t\t\t\t'search-filter-ui-language-value',\n\t\t\t\t\t[ this.localeMap[ value ] || value, value ]\n\t\t\t\t);\n\n\t\t\tcase 'wiki':\n\t\t\t\treturn forWikiLabel( value );\n\n\t\t\tdefault:\n\t\t\t\treturn value;\n\t\t}\n\t},\n\n\t/**\n\t * Build search filters for a term facet.\n\t *\n\t * @param {Object} facet\n\t * @param {Array<string>} selected\n\t * @return {string[][]} List of [key, value] query string parameters\n\t */\n\tbuildTermFilters( facet, selected ) {\n\t\treturn selected.map( ( term ) => {\n\t\t\tif ( term === facet.missingValue ) {\n\t\t\t\treturn [ facet.missingParam, 1 ];\n\t\t\t}\n\t\t\treturn [ facet.param, term ];\n\t\t} );\n\t},\n\n\t/**\n\t * Build a list of search filters based on selected facet values.\n\t *\n\t * @return {string[][]} List of [key, value] query string parameters\n\t */\n\tbuildFilters() {\n\t\tconst fname = this.facet.name;\n\t\tconst ftype = this.facet.type;\n\t\tconst selected = ensureArray( this.value );\n\t\tlet filters = [];\n\t\tswitch ( ftype ) {\n\t\t\tcase 'terms':\n\t\t\t\tfilters = filters.concat(\n\t\t\t\t\tthis.buildTermFilters( this.facet, selected )\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new TypeError(\n\t\t\t\t\t`Unknown type '${ftype}' for facet '${fname}'`\n\t\t\t\t);\n\t\t}\n\t\treturn filters.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) );\n\t},\n\n\t/**\n\t * Handle a change event from a list item group by emitting a new\n\t * 'change' event with a payload of query params.\n\t *\n\t * @fires change\n\t */\n\tupdateModel() {\n\t\tthis.$emit( 'change', this.buildFilters() );\n\t},\n\n\tclearSelected() {\n\t\tthis.value = this.facet.multi ? [] : null;\n\t\tthis.updateModel();\n\t}\n};\n\nexport default {\n\tname: 'FilterList',\n\tmodel: {\n\t\tprop: 'model',\n\t\tevent: 'change'\n\t},\n\tprops: {\n\t\tfacet: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => {},\n\t\t\trequired: true\n\t\t},\n\t\toutlined: Boolean\n\t},\n\tdata: () => ( {\n\t\t// eslint-disable-next-line vue/no-unused-properties\n\t\tmodel: undefined,\n\t\tvalue: undefined\n\t} ),\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'localeMap' ] )\n\t},\n\tmethods: methods,\n\twatch: {\n\t\tfacet: {\n\t\t\tdeep: true,\n\t\t\timmediate: true,\n\t\t\thandler( facet ) {\n\t\t\t\t// Set selection state\n\t\t\t\tthis.value = facet.multi ?\n\t\t\t\t\t( facet.selected || null ) :\n\t\t\t\t\t( facet.selected[ 0 ] || null );\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/search/Filters.vue","messages":[{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"change\" event has been triggered but not declared on `emits` option.","line":244,"column":17,"nodeType":"Literal","messageId":"missing","endLine":244,"endColumn":25,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"change","emitsKind":"`emits` option"},"fix":{"range":[4322,4322],"text":"\nemits: ['change'],"},"desc":"Add the `emits` option with array syntax and define \"change\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"change","emitsKind":"`emits` option"},"fix":{"range":[4322,4322],"text":"\nemits: {'change': null},"},"desc":"Add the `emits` option with object syntax and define \"change\" event."}]}],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'this.getl10nTitleKey(facet)' dynamic key is used'","line":169,"column":10,"nodeType":"CallExpression","endLine":169,"endColumn":55,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-row\n\t\tv-if=\"$vuetify.breakpoint.mdAndUp\"\n\t\tno-gutters\n\t\tdense\n\t>\n\t\t<v-col\n\t\t\tv-for=\"facet in displayedFacets\"\n\t\t\t:key=\"facet.name\"\n\t\t\tmd=\"12\"\n\t\t\tcols=\"6\"\n\t\t>\n\t\t\t<FilterList\n\t\t\t\tv-model=\"value[ facet.name ]\"\n\t\t\t\t:facet=\"facet\"\n\t\t\t\tclass=\"mb-2\"\n\t\t\t\toutlined\n\t\t\t>\n\t\t\t\t<template #header>\n\t\t\t\t\t<v-card-title class=\"text-h6 accent flex-grow-0\">\n\t\t\t\t\t\t<v-badge\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t:value=\"facet.selected.length > 0\"\n\t\t\t\t\t\t\t:content=\"facet.selected.length\"\n\t\t\t\t\t\t\tcolor=\"base20\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ renderFacetTitle( facet ) }}\n\t\t\t\t\t\t</v-badge>\n\t\t\t\t\t</v-card-title>\n\t\t\t\t</template>\n\t\t\t</FilterList>\n\t\t</v-col>\n\t</v-row>\n\n\t<v-slide-group\n\t\tv-else\n\t\tv-model=\"slide\"\n\t\tshow-arrows\n\t\tclass=\"compact-arrows\"\n\t>\n\t\t<v-slide-item\n\t\t\tv-for=\"facet in displayedFacets\"\n\t\t\t:key=\"facet.name\"\n\t\t>\n\t\t\t<v-dialog\n\t\t\t\tv-model=\"dialogs[ facet.name ]\"\n\t\t\t\tfullscreen\n\t\t\t\thide-overlay\n\t\t\t\ttransition=\"dialog-bottom-transition\"\n\t\t\t>\n\t\t\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"mx-1 my-1\"\n\t\t\t\t\t\tcolor=\"white\"\n\t\t\t\t\t\televation=\"2\"\n\t\t\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t\t\tv-on=\"on\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-badge\n\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t:value=\"facet.selected.length > 0\"\n\t\t\t\t\t\t\t:content=\"facet.selected.length\"\n\t\t\t\t\t\t\tcolor=\"base20\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ renderFacetTitle( facet ) }}\n\t\t\t\t\t\t</v-badge>\n\t\t\t\t\t\t<v-icon right>mdi-menu-down</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</template>\n\t\t\t\t<FilterList\n\t\t\t\t\tv-model=\"value[ facet.name ]\"\n\t\t\t\t\t:facet=\"facet\"\n\t\t\t\t>\n\t\t\t\t\t<template #header>\n\t\t\t\t\t\t<v-toolbar\n\t\t\t\t\t\t\tclass=\"flex-grow-0\"\n\t\t\t\t\t\t\tcolor=\"accent\"\n\t\t\t\t\t\t\tflat\n\t\t\t\t\t\t\ttile\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-toolbar-title class=\"text-h6\">\n\t\t\t\t\t\t\t\t{{ renderFacetTitle( facet ) }}\n\t\t\t\t\t\t\t</v-toolbar-title>\n\t\t\t\t\t\t\t<v-spacer />\n\t\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\t\ticon\n\t\t\t\t\t\t\t\t@click=\"dialogs[ facet.name ] = false\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<v-icon>mdi-close-box-outline</v-icon>\n\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t</v-toolbar>\n\t\t\t\t\t</template>\n\t\t\t\t</FilterList>\n\t\t\t</v-dialog>\n\t\t</v-slide-item>\n\t</v-slide-group>\n</template>\n\n<script>\nimport _ from 'lodash';\n\nimport { ensureArray } from '@/helpers/array';\nimport FilterList from '@/components/search/FilterList';\n\nexport const methods = {\n\t/**\n\t * Decide if a facet should be rendered or not.\n\t *\n\t * @param {Object} facet\n\t * @return {boolean}\n\t */\n\tshouldShowFacet( facet ) {\n\t\treturn facet.buckets.length > 0 &&\n\t\t\t!( // Hide facets that are empty for all results\n\t\t\t\tfacet.buckets.length === 1 &&\n\t\t\t\tfacet.buckets[ 0 ].key === facet.missingValue &&\n\t\t\t\tfacet.selected.length === 0\n\t\t\t);\n\t},\n\n\t/**\n\t * Order a list of facet descriptions.\n\t *\n\t * @param {Object[]} facets\n\t * @return {Object[]}\n\t */\n\torderFacetList( facets ) {\n\t\tconst desiredOrder = [\n\t\t\t'tool_type',\n\t\t\t'wiki',\n\t\t\t'audiences',\n\t\t\t'content_types',\n\t\t\t'tasks',\n\t\t\t'subject_domains',\n\t\t\t'ui_language',\n\t\t\t'author',\n\t\t\t'keywords',\n\t\t\t'license',\n\t\t\t'origin'\n\t\t];\n\t\tconst unorderedFacets = [ ...facets ];\n\t\tconst orderedFacets = [];\n\n\t\tdesiredOrder.forEach( ( name ) => {\n\t\t\t// Pop all matching name from facets array\n\t\t\tconst named = _.remove( unorderedFacets, ( val ) => {\n\t\t\t\treturn val.name === name;\n\t\t\t} );\n\t\t\tif ( named && named.length === 1 ) {\n\t\t\t\torderedFacets.push( named[ 0 ] );\n\t\t\t}\n\t\t} );\n\n\t\t// Concat any remaining unordered facets to the ordered list.\n\t\t// Finally sort everything by currently selected value length.\n\t\treturn [ ...orderedFacets, ...unorderedFacets ].sort( ( a, b ) => {\n\t\t\treturn b.selected.length - a.selected.length;\n\t\t} );\n\t},\n\n\t/**\n\t * Get title display string for a given facet.\n\t *\n\t * @param {Object} facet\n\t * @return {string}\n\t */\n\trenderFacetTitle( facet ) {\n\t\t// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys\n\t\treturn this.$i18n.t( this.getl10nTitleKey( facet ) );\n\t},\n\n\t/**\n\t * Get a localization message key for the given facet's title.\n\t *\n\t * @param {Object} facet\n\t * @return {string}\n\t */\n\tgetl10nTitleKey( facet ) {\n\t\tswitch ( facet.name ) {\n\t\t\tcase 'audiences':\n\t\t\tcase 'author':\n\t\t\tcase 'content_types':\n\t\t\tcase 'keywords':\n\t\t\tcase 'license':\n\t\t\tcase 'origin':\n\t\t\tcase 'subject_domains':\n\t\t\tcase 'tasks':\n\t\t\tcase 'tool_type':\n\t\t\tcase 'ui_language':\n\t\t\tcase 'wiki':\n\t\t\t\treturn 'search-filter-' + facet.name.replace( /_/g, '-' );\n\t\t\tdefault:\n\t\t\t\treturn facet.name;\n\t\t}\n\t}\n};\n\nexport default {\n\tname: 'Filters',\n\tcomponents: {\n\t\tFilterList\n\t},\n\tprops: {\n\t\tfacets: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata: () => ( {\n\t\tdialogs: {},\n\t\tslide: undefined,\n\t\tvalue: {}\n\t} ),\n\tcomputed: {\n\t\t/**\n\t\t * Computed ordered list of facets that should be displayed.\n\t\t *\n\t\t * @return {Object[]}\n\t\t */\n\t\tdisplayedFacets() {\n\t\t\treturn this.orderFacetList( this.facets ).filter(\n\t\t\t\t( facet ) => this.shouldShowFacet( facet )\n\t\t\t);\n\t\t}\n\t},\n\tmethods: methods,\n\twatch: {\n\t\t/**\n\t\t * Emit a 'change' event with a payload of query params when our state\n\t\t * changes.\n\t\t *\n\t\t * @fires change\n\t\t */\n\t\tvalue: {\n\t\t\tdeep: true,\n\t\t\thandler( data ) {\n\t\t\t\tconst filters = [];\n\t\t\t\tfor ( const name in data ) {\n\t\t\t\t\tfilters.push( ...ensureArray( data[ name ] ) );\n\t\t\t\t}\n\t\t\t\tconst params = filters.filter( ( val ) => val !== null )\n\t\t\t\t\t.sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) );\n\t\t\t\tthis.$emit( 'change', params );\n\t\t\t}\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/search/SearchBar.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":90,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":93,"endColumn":6},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":102,"column":21,"nodeType":"SpreadElement","messageId":"forbidden","endLine":102,"endColumn":36},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"search\" event has been triggered but not declared on `emits` option.","line":139,"column":16,"nodeType":"Literal","messageId":"missing","endLine":139,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"search","emitsKind":"`emits` option"},"fix":{"range":[1666,1666],"text":"\nemits: ['search'],"},"desc":"Add the `emits` option with array syntax and define \"search\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"search","emitsKind":"`emits` option"},"fix":{"range":[1666,1666],"text":"\nemits: {'search': null},"},"desc":"Add the `emits` option with object syntax and define \"search\" event."}]},{"ruleId":"vue/require-explicit-emits","severity":1,"message":"The \"search\" event has been triggered but not declared on `emits` option.","line":144,"column":16,"nodeType":"Literal","messageId":"missing","endLine":144,"endColumn":24,"suggestions":[{"messageId":"addArrayEmitsOption","data":{"name":"search","emitsKind":"`emits` option"},"fix":{"range":[1666,1666],"text":"\nemits: ['search'],"},"desc":"Add the `emits` option with array syntax and define \"search\" event."},{"messageId":"addObjectEmitsOption","data":{"name":"search","emitsKind":"`emits` option"},"fix":{"range":[1666,1666],"text":"\nemits: {'search': null},"},"desc":"Add the `emits` option with object syntax and define \"search\" event."}]},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":155,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":155,"endColumn":53}],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'`${this.target}-not-found`' dynamic key is used'","line":111,"column":11,"nodeType":"CallExpression","endLine":111,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":3,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-combobox\n\t\tref=\"combobox\"\n\t\tv-model=\"query\"\n\t\tv-model:search-input=\"query\"\n\t\tclass=\"searchbar\"\n\t\t:label=\"label\"\n\t\t:loading=\"loading || autoCompleteLoading\"\n\t\t:menu-props=\"menuProps\"\n\t\t:items=\"getAutoCompleteItems()\"\n\t\tsolo\n\t\tno-filter\n\t\tclearable\n\t\thide-details\n\t\t:hide-no-data=\"hideOnNoData\"\n\t\t@keydown.enter=\"onEnterKey\"\n\t\t@keyup.enter=\"onEnterKey\"\n\t\t@click:clear=\"onClear\"\n\t\t@change=\"routeToView\"\n\t>\n\t\t<template #append>\n\t\t\t<v-btn\n\t\t\t\ticon\n\t\t\t\t@click=\"onSearch\"\n\t\t\t>\n\t\t\t\t<v-icon\n\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t\t:aria-label=\"$t( 'search' )\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\tcolor=\"base20\"\n\t\t\t\t\tsize=\"30\"\n\t\t\t\t>\n\t\t\t\t\tmdi-magnify\n\t\t\t\t</v-icon>\n\t\t\t</v-btn>\n\t\t</template>\n\t\t<template #item=\"data\">\n\t\t\t<v-list-item-content class=\"autocomplete\">\n\t\t\t\t<v-list-item-title>\n\t\t\t\t\t<dl class=\"row ma-0\">\n\t\t\t\t\t\t<dt class=\"me-4\">{{ autoCompleteResults[data.item][0] }}</dt>\n\t\t\t\t\t\t<dd class=\"desc grey--text text--darken-1\">\n\t\t\t\t\t\t\t{{ autoCompleteResults[data.item][1] }}\n\t\t\t\t\t\t</dd>\n\t\t\t\t\t</dl>\n\t\t\t\t</v-list-item-title>\n\t\t\t</v-list-item-content>\n\t\t</template>\n\t\t<template v-if=\"!autoCompleteLoading\" #no-data>\n\t\t\t<v-list-item>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ noDataMessage }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\t\t</template>\n\t</v-combobox>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\n\nimport { EventBus } from '@/helpers/event-bus';\n\nconst LIST = 'list';\nconst TOOL = 'tool';\n\nexport default {\n\tname: 'SearchBar',\n\tprops: {\n\t\tloading: {\n\t\t\ttype: Boolean\n\t\t},\n\t\ttarget: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tvalidator: function ( value ) {\n\t\t\t\treturn [ LIST, TOOL ].indexOf( value ) !== -1;\n\t\t\t}\n\t\t}\n\t},\n\tdata: () => ( {\n\t\tquery: '',\n\t\tautoCompleteLoading: false,\n\t\thideOnNoData: true,\n\t\tlastEnterPath: null\n\t} ),\n\tcomputed: {\n\t\t...mapState( 'search', [\n\t\t\t'toolAutoCompleteResults',\n\t\t\t'listAutoCompleteResults'\n\t\t] ),\n\t\tautoCompleteResults() {\n\t\t\treturn this.target === TOOL ?\n\t\t\t\tthis.toolAutoCompleteResults :\n\t\t\t\tthis.listAutoCompleteResults;\n\t\t},\n\t\tmenuProps() {\n\t\t\tconst contentClass = { contentClass: 'autocomplete-menu__content' };\n\t\t\treturn !this.query ?\n\t\t\t\t{ value: false, ...contentClass } : contentClass;\n\t\t},\n\t\tlabel() {\n\t\t\treturn this.target === TOOL ?\n\t\t\t\tthis.$t( 'tools-search-label' ) :\n\t\t\t\tthis.$t( 'lists-search-label' );\n\t\t},\n\t\tnoDataMessage() {\n\t\t\t// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys\n\t\t\treturn this.$t( `${this.target}-not-found`, [ this.query ] );\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Handle enter key keyup & keydown events.\n\t\t *\n\t\t * @param {Object} event - key event\n\t\t */\n\t\tonEnterKey( event ) {\n\t\t\tconst path = this.$route.path;\n\t\t\tif ( event.type === 'keyup' && path === this.lastEnterPath ) {\n\t\t\t\t// Only trigger an actual search if other navigation has not\n\t\t\t\t// fired since the matching keydown event. This works around\n\t\t\t\t// the keyup event firing after we have already handled an\n\t\t\t\t// autocomplete result selection done via keyboard navigation.\n\t\t\t\tthis.onSearch( event );\n\t\t\t} else if ( event.type === 'keydown' ) {\n\t\t\t\t// Track path for comparison when handling the keyup event.\n\t\t\t\tthis.lastEnterPath = path;\n\t\t\t}\n\t\t},\n\t\tonSearch() {\n\t\t\tthis.hideOnNoData = true;\n\t\t\tconst vuexMethod = this.target === TOOL ?\n\t\t\t\t'search/onToolsAutoCompleteResults' :\n\t\t\t\t'search/onListsAutoCompleteResults';\n\t\t\tthis.$store.commit( vuexMethod, {} );\n\t\t\tthis.$emit( 'search', this.query );\n\t\t},\n\t\tonClear( e ) {\n\t\t\te.preventDefault();\n\t\t\tthis.query = '';\n\t\t\tthis.$emit( 'search', this.query );\n\t\t},\n\t\tperformAutoComplete( query ) {\n\t\t\tif ( !query ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideOnNoData = false;\n\t\t\tthis.autoCompleteLoading = true;\n\t\t\tconst vuexMethod = this.target === TOOL ?\n\t\t\t\t'search/autoCompleteTools' :\n\t\t\t\t'search/autoCompleteLists';\n\t\t\tthis.$store.dispatch( vuexMethod, query ).finally( () => {\n\t\t\t\tthis.autoCompleteLoading = false;\n\t\t\t} );\n\t\t},\n\t\trouteToView( id ) {\n\t\t\tif ( id === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst params = {};\n\t\t\tlet routeName;\n\t\t\tif ( this.target === TOOL ) {\n\t\t\t\tparams.name = id;\n\t\t\t\trouteName = 'tools-view';\n\t\t\t} else if ( this.target === LIST ) {\n\t\t\t\tparams.id = id;\n\t\t\t\trouteName = 'lists-view';\n\t\t\t}\n\n\t\t\tthis.$refs.combobox.reset();\n\t\t\tthis.$router.push( { name: routeName, params } );\n\t\t},\n\t\tgetAutoCompleteItems() {\n\t\t\treturn this.autoCompleteResults ?\n\t\t\t\tObject.keys( this.autoCompleteResults ) :\n\t\t\t\t[];\n\t\t}\n\t},\n\twatch: {\n\t\tquery: 'performAutoComplete'\n\t},\n\tcreated() {\n\t\t// Register event handlers for Search.vue to use to modify our state\n\t\tEventBus.$on( 'searchQueryChange', ( query ) => {\n\t\t\tthis.query = query;\n\t\t} );\n\t\tEventBus.$on( 'searchQueryClear', () => {\n\t\t\tthis.query = '';\n\t\t\tif ( this.$refs.combobox ) {\n\t\t\t\tthis.$refs.combobox.reset();\n\t\t\t}\n\t\t} );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/search/Sort.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/AuthorDetails.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/CreateNewTool.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":65,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":65,"endColumn":43},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":66,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":66,"endColumn":46},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":67,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":67,"endColumn":45},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":192,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":192,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":197,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":197,"endColumn":38}],"suppressedMessages":[],"errorCount":5,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"schema\">\n\t\t<v-form\n\t\t\tref=\"createtoolform\"\n\t\t\tv-model=\"valid\"\n\t\t\t:disabled=\"!$can( 'add', 'toolinfo/tool' )\"\n\t\t>\n\t\t\t<v-col\n\t\t\t\tv-for=\"( uischema, id ) in layout\"\n\t\t\t\t:key=\"id\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<InputWidget\n\t\t\t\t\tv-model=\"toolinfo[ id ]\"\n\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<AgreeTerms />\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tclass=\"pa-4 mb-4\"\n\t\t\t\t\t:disabled=\"!valid || !$can( 'add', 'toolinfo/tool' )\"\n\t\t\t\t\t@click=\"createTool\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'createnewtool' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-form>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapActions } from 'vuex';\n\nimport { localizeEnum } from '@/helpers/tools';\nimport InputWidget from '@/components/common/InputWidget';\nimport AgreeTerms from '@/components/common/AgreeTerms';\n\nexport default {\n\tname: 'CreateNewTool',\n\tcomponents: {\n\t\tAgreeTerms,\n\t\tInputWidget\n\t},\n\tdata() {\n\t\treturn {\n\t\t\ttoolinfo: {\n\t\t\t\tname: null,\n\t\t\t\ttitle: null,\n\t\t\t\tdescription: null,\n\t\t\t\turl: null,\n\t\t\t\tauthor: [],\n\t\t\t\ttool_type: null,\n\t\t\t\tlicense: null,\n\t\t\t\trepository: null,\n\t\t\t\tbugtracker_url: null,\n\t\t\t\tuser_docs_url: []\n\t\t\t},\n\t\t\tvalid: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'user', [ 'toolCreated' ] ),\n\t\t...mapState( 'locale', [ 'localeSelect' ] ),\n\t\t...mapState( 'tools', [ 'spdxLicenses' ] ),\n\n\t\t_toolCreated() {\n\t\t\treturn this.toolCreated;\n\t\t},\n\n\t\tlayout() {\n\t\t\treturn {\n\t\t\t\tname: {\n\t\t\t\t\ticon: 'mdi-identifier',\n\t\t\t\t\tlabel: this.$t( 'name' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\ticon: 'mdi-pencil-outline',\n\t\t\t\t\tlabel: this.$t( 'title' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tdescription: {\n\t\t\t\t\ticon: 'mdi-note-text-outline',\n\t\t\t\t\tlabel: this.$t( 'description' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\turl: {\n\t\t\t\t\ticon: 'mdi-link-variant',\n\t\t\t\t\tlabel: this.$t( 'url' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tauthor: {\n\t\t\t\t\twidget: 'authors',\n\t\t\t\t\ticon: 'mdi-account-multiple-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'authors' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\ticon: 'mdi-account-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'name' ),\n\t\t\t\t\t\t\trequired: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\twiki_username: {\n\t\t\t\t\t\t\ticon: 'mdi-card-account-details-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'wiki-username' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdeveloper_username: {\n\t\t\t\t\t\t\ticon: 'mdi-card-account-details-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'developer-username' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\temail: {\n\t\t\t\t\t\t\ticon: 'mdi-email-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'email' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttool_type: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => this.schema.properties.tool_type.enum.map(\n\t\t\t\t\t\t\t( x ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttext: localizeEnum( 'tool_type', x ),\n\t\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\ticon: 'mdi-toolbox-outline',\n\t\t\t\t\tlabel: this.$t( 'tooltype' )\n\t\t\t\t},\n\t\t\t\tlicense: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => this.spdxLicenses.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: `${x.name} (${x.id})`,\n\t\t\t\t\t\t\t\tvalue: x.id\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\ticon: 'mdi-license',\n\t\t\t\t\tlabel: this.$t( 'license' )\n\t\t\t\t},\n\t\t\t\trepository: {\n\t\t\t\t\ticon: 'mdi-source-branch',\n\t\t\t\t\tlabel: this.$t( 'repository' )\n\t\t\t\t},\n\t\t\t\tbugtracker_url: {\n\t\t\t\t\ticon: 'mdi-bug-outline',\n\t\t\t\t\tlabel: this.$t( 'bugtrackerurl' )\n\t\t\t\t},\n\t\t\t\tuser_docs_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-file-document-multiple-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'userdocsurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-file-document-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\tasyncComputed: {\n\t\tschema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'tools_create' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\t\tgetSpdxLicenses() {\n\t\t\tthis.$store.dispatch( 'tools/getSpdxLicenses' );\n\t\t},\n\t\tcreateTool() {\n\t\t\tconst newtool = { ...this.toolinfo };\n\t\t\tnewtool.user_docs_url = newtool.user_docs_url.filter( ( u ) => {\n\t\t\t\treturn u.url !== undefined && u.url !== null && u.url !== '';\n\t\t\t} );\n\t\t\tnewtool.comment = this.$t(\n\t\t\t\t'toolcreationcomment', [ newtool.title ]\n\t\t\t);\n\t\t\tthis.$store.dispatch( 'tools/createTool', newtool );\n\t\t}\n\t},\n\twatch: {\n\t\t_toolCreated() {\n\t\t\tthis.$refs.createtoolform.reset();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getSpdxLicenses();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/EditAnnotations.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":328,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":328,"endColumn":46},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":629,"column":26,"nodeType":"SpreadElement","messageId":"forbidden","endLine":629,"endColumn":51},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":711,"column":7,"nodeType":"SpreadElement","messageId":"forbidden","endLine":711,"endColumn":32},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":712,"column":7,"nodeType":"SpreadElement","messageId":"forbidden","endLine":712,"endColumn":21}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!-- eslint-disable vue/no-mutating-props -- events handled locally -->\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col md=\"7\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'tools-edit-annotations-title', [ value.name ] ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"2\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\tv-if=\"value.name\"\n\t\t\t\t\t:to=\"{ name: 'tools-view', params: { name: value.name } }\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tleft\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-cancel\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tblock\n\t\t\t\t\t:disabled=\"!valid || $can( 'change', value )\"\n\t\t\t\t\t@click=\"commentDialog = true\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tleft\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-form v-model=\"valid\">\n\t\t\t\t\t<v-stepper\n\t\t\t\t\t\tv-model=\"step\"\n\t\t\t\t\t\tnon-linear\n\t\t\t\t\t\tvertical\n\t\t\t\t\t\t:elevation=\"0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.basic ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'basicinfo' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"1\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in basicInfoLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t\t<div class=\"text-h6\">\n\t\t\t\t\t\t\t\t\t\t{{ $t( 'thistoolis' ) }}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in toolStatusLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"2\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.attributes ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'attributes' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"2\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in attributesLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"3\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.usage ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'usage' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"3\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\" cols=\"12\">\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in usageLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"4\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.contributing ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'contributing' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"4\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\" cols=\"12\">\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in contributingLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"5\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.moreInfo ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'moreinfo' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"5\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in moreInfoLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schema.properties[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\t\t\t\t\t</v-stepper>\n\t\t\t\t</v-form>\n\t\t\t\t<v-row class=\"justify-space-between mt-4\">\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t:disabled=\"step === minStep\"\n\t\t\t\t\t\t\t@click=\"stepBack\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === false\"\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'back' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === true\"\n\t\t\t\t\t\t\t\trigth\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-right\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col v-if=\"step < maxStep\"\n\t\t\t\t\t\tcols=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t@click=\"stepContinue\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === true\"\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'continue' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === false\"\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-right\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col v-else\n\t\t\t\t\t\tcols=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t:disabled=\"!valid || $can( 'change', value )\"\n\t\t\t\t\t\t\t@click=\"commentDialog = true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<CommentDialog v-model=\"commentDialog\" @save=\"publishChanges\" />\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport _ from 'lodash';\n\nimport { localizeEnum } from '@/helpers/tools';\nimport InputWidget from '@/components/common/InputWidget';\nimport CommentDialog from '@/components/common/CommentDialog';\n\nexport default {\n\tname: 'EditAnnotations',\n\tcomponents: {\n\t\tInputWidget,\n\t\tCommentDialog\n\t},\n\tprops: {\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tschema: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tlinks: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tstep: 1,\n\t\t\tminStep: 1,\n\t\t\tmaxStep: 5,\n\t\t\tvalue: _.cloneDeep( this.tool ),\n\t\t\tinitialValue: null,\n\t\t\tcommentDialog: false,\n\t\t\tvalid: false,\n\t\t\tvalidityPerField: {}\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'localeSelect' ] ),\n\t\tbasicInfoLayout() {\n\t\t\treturn {\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'mdi-tools',\n\t\t\t\t\tlabel: this.$t( 'icon' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.icon )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\ttoolStatusLayout() {\n\t\t\treturn {\n\t\t\t\texperimental: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\ticon: 'mdi-alert-outline',\n\t\t\t\t\tlabel: this.$t( 'experimental' ),\n\t\t\t\t\tpersistentHint: true,\n\t\t\t\t\tdisabled: this.value.experimental\n\t\t\t\t},\n\t\t\t\tdeprecated: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\ticon: 'mdi-cancel',\n\t\t\t\t\tlabel: this.$t( 'deprecated' ),\n\t\t\t\t\tpersistentHint: true,\n\t\t\t\t\tdisabled: this.value.experimental\n\t\t\t\t},\n\t\t\t\treplaced_by: {\n\t\t\t\t\ticon: 'mdi-find-replace',\n\t\t\t\t\tlabel: this.$t( 'replacedby' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.replaced_by )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tattributesLayout() {\n\t\t\tconst props = this.schema.properties;\n\t\t\treturn {\n\t\t\t\ttool_type: {\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.tool_type.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'tool_type', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\ticon: 'mdi-toolbox-outline',\n\t\t\t\t\tlabel: this.$t( 'tooltype' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.tool_type )\n\t\t\t\t},\n\t\t\t\tfor_wikis: {\n\t\t\t\t\twidget: 'multi-select',\n\t\t\t\t\ticon: 'mdi-wikipedia',\n\t\t\t\t\tlabel: this.$t( 'forwikis' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.for_wikis )\n\t\t\t\t},\n\t\t\t\taudiences: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.audiences.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'audiences', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-account-group-outline',\n\t\t\t\t\tlabel: this.$t( 'audiences' )\n\t\t\t\t},\n\t\t\t\tcontent_types: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.content_types.items.enum.map(\n\t\t\t\t\t\t\t( x ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttext: localizeEnum( 'content_types', x ),\n\t\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-book-open-page-variant-outline',\n\t\t\t\t\tlabel: this.$t( 'contenttypes' )\n\t\t\t\t},\n\t\t\t\ttasks: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.tasks.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'tasks', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-checkbox-multiple-marked-outline',\n\t\t\t\t\tlabel: this.$t( 'tasks' )\n\t\t\t\t},\n\t\t\t\tsubject_domains: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.subject_domains.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'subject_domains', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-domain',\n\t\t\t\t\tlabel: this.$t( 'subjectdomains' )\n\t\t\t\t},\n\t\t\t\tavailable_ui_languages: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-tablet-dashboard',\n\t\t\t\t\tlabel: this.$t( 'availableuilanguages' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.available_ui_languages )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tusageLayout() {\n\t\t\treturn {\n\t\t\t\tapi_url: {\n\t\t\t\t\ticon: 'mdi-api',\n\t\t\t\t\tlabel: this.$t( 'apiurl' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.api_url )\n\t\t\t\t},\n\t\t\t\tuser_docs_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-file-document-multiple-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'userdocsurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-file-document-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.user_docs_url )\n\t\t\t\t},\n\t\t\t\tfeedback_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-comment-processing-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'feedbackurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-comment-processing-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.feedback_url )\n\t\t\t\t},\n\t\t\t\tprivacy_policy_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-shield-lock-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'privacypolicyurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-shield-lock-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.privacy_policy_url )\n\t\t\t\t},\n\t\t\t\tbugtracker_url: {\n\t\t\t\t\ticon: 'mdi-bug-outline',\n\t\t\t\t\tlabel: this.$t( 'bugtrackerurl' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.bugtracker_url )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tcontributingLayout() {\n\t\t\treturn {\n\t\t\t\ttranslate_url: {\n\t\t\t\t\ticon: 'mdi-translate',\n\t\t\t\t\tlabel: this.$t( 'translateurl' ),\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.translate_url )\n\t\t\t\t},\n\t\t\t\tdeveloper_docs_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-code-tags',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'developerdocsurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-code-tags',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tdisabled: !_.isEmpty( this.value.developer_docs_url )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tmoreInfoLayout() {\n\t\t\treturn {\n\t\t\t\twikidata_qid: {\n\t\t\t\t\ticon: 'mdi-identifier',\n\t\t\t\t\tlabel: this.$t( 'wikidataqid' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tstepIsValid() {\n\t\t\tconst valid = {\n\t\t\t\tbasic: true,\n\t\t\t\tattributes: true,\n\t\t\t\tusage: true,\n\t\t\t\tcontributing: true,\n\t\t\t\tmoreInfo: true\n\t\t\t};\n\n\t\t\tObject.keys( this.basicInfoLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.basic = false;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tObject.keys( this.toolStatusLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.basic = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.attributesLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.attributes = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.usageLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.usage = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.contributingLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.contributing = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.moreInfoLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.moreInfo = false;\n\t\t\t\t}\n\t\t\t} );\n\t\t\treturn valid;\n\t\t}\n\t},\n\tmethods: {\n\t\tstepBack() {\n\t\t\tthis.step = Math.max( this.step - 1, this.minStep );\n\t\t},\n\t\tstepContinue() {\n\t\t\tthis.step = Math.min( this.step + 1, this.maxStep );\n\t\t},\n\t\tstoreValidity( bool, field ) {\n\t\t\t// validityPerField is dynamically built and therefore not reactive\n\t\t\t// if the properties are added the usual way i.e a[\"key\"] = value.\n\t\t\t// This syntax does the same thing except that it also makes\n\t\t\t// the added properties reactive.\n\t\t\tthis.$set( this.validityPerField, field, !bool );\n\t\t},\n\t\tpublishChanges( comment ) {\n\t\t\tconst annotations = { ...this.value.annotations };\n\n\t\t\tannotations.comment = comment;\n\n\t\t\tthis.links.forEach( ( field ) => {\n\t\t\t\tif ( annotations[ field ] ) {\n\t\t\t\t\tannotations[ field ] = annotations[ field ].filter( ( u ) => {\n\t\t\t\t\t\treturn u.url !== undefined &&\n\t\t\t\t\t\t\tu.url !== null &&\n\t\t\t\t\t\t\tu.url !== '';\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( annotations ).forEach( ( field ) => {\n\t\t\t\t// Overwrite edited annotations field with the initial value\n\t\t\t\t// of the annotations field if the field already exists in\n\t\t\t\t// core toolinfo record.\n\t\t\t\tif ( !_.isEmpty( this.initialValue[ field ] ) ) {\n\t\t\t\t\tannotations[ field ] = this.initialValue.annotations[ field ];\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\ttypeof this.initialValue[ field ] === 'boolean' &&\n\t\t\t\t\tthis.initialValue[ field ]\n\t\t\t\t) {\n\t\t\t\t\tannotations[ field ] = this.initialValue.annotations[ field ];\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst annotations_changed = !_.isEqual(\n\t\t\t\tannotations,\n\t\t\t\tthis.initialValue.annotations\n\t\t\t);\n\n\t\t\t// Set response to resolved promise so we can always chain it\n\t\t\t// with `.then` whether annotations_changed is true or false.\n\t\t\tlet response = Promise.resolve();\n\n\t\t\tif ( annotations_changed ) {\n\t\t\t\tresponse = this.$store.dispatch(\n\t\t\t\t\t'tools/editAnnotations',\n\t\t\t\t\t{ annotations, name: this.value.name }\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tresponse.then( () => {\n\t\t\t\tthis.$router.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'tools-view',\n\t\t\t\t\t\tparams: { name: this.value.name }\n\t\t\t\t\t}\n\t\t\t\t).catch( () => {} );\n\t\t\t} );\n\n\t\t\tthis.commentDialog = false;\n\t\t}\n\t},\n\twatch: {\n\t\tvalue: {\n\t\t\thandler( newVal ) {\n\t\t\t\tif ( !this.initialValue && newVal.name ) {\n\t\t\t\t\tnewVal = JSON.parse( JSON.stringify( newVal ) );\n\t\t\t\t\tthis.initialValue = newVal;\n\n\t\t\t\t\tconst annotations = {};\n\n\t\t\t\t\tObject.keys( newVal.annotations ).forEach( ( field ) => {\n\n\t\t\t\t\t\tif ( !_.isEmpty( newVal[ field ] ) ) {\n\t\t\t\t\t\t\tannotations[ field ] = newVal[ field ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\ttypeof newVal[ field ] === 'boolean' &&\n\t\t\t\t\t\t\tnewVal[ field ]\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tannotations[ field ] = newVal[ field ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\tthis.value.annotations = {\n\t\t\t\t\t\t...this.value.annotations,\n\t\t\t\t\t\t...annotations\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true,\n\t\t\timmediate: true\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/EditTool.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":334,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":334,"endColumn":46},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":335,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":335,"endColumn":45},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":704,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":704,"endColumn":50},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":745,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":745,"endColumn":35},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":775,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":775,"endColumn":36},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":788,"column":15,"nodeType":"SpreadElement","messageId":"forbidden","endLine":788,"endColumn":25},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":821,"column":29,"nodeType":"SpreadElement","messageId":"forbidden","endLine":821,"endColumn":42},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":821,"column":44,"nodeType":"SpreadElement","messageId":"forbidden","endLine":821,"endColumn":53}],"suppressedMessages":[],"errorCount":8,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<!-- eslint-disable vue/no-mutating-props -- events handled locally -->\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col md=\"6\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'tools-edit-core-title', [ value.name ] ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"2\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\tv-if=\"value.name\"\n\t\t\t\t\t:to=\"{ name: 'tools-view', params: { name: value.name } }\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tleft\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-cancel\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'cancel' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"4\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tblock\n\t\t\t\t\t:disabled=\"!valid || !$can( 'change', value )\"\n\t\t\t\t\t@click=\"commentDialog = true\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tleft\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-form v-model=\"valid\">\n\t\t\t\t\t<v-stepper\n\t\t\t\t\t\tv-model=\"step\"\n\t\t\t\t\t\tnon-linear\n\t\t\t\t\t\tvertical\n\t\t\t\t\t\t:elevation=\"0\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.basic ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'basicinfo' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"1\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in basicInfoLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t\t<div class=\"text-h6\">\n\t\t\t\t\t\t\t\t\t\t{{ $t( 'thistoolis' ) }}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in toolStatusLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"2\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.attributes ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'attributes' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"2\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in attributesLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value.annotations[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"3\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.usage ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'usage' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"3\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in usageLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"4\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.contributing ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'contributing' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"4\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t\t\t\t<v-row class=\"cols\">\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in contributingLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\n\t\t\t\t\t\t<v-stepper-step\n\t\t\t\t\t\t\tstep=\"5\"\n\t\t\t\t\t\t\teditable\n\t\t\t\t\t\t\t:rules=\"[ () => stepIsValid.moreInfo ]\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'moreinfo' ) }}\n\t\t\t\t\t\t</v-stepper-step>\n\t\t\t\t\t\t<v-stepper-content step=\"5\">\n\t\t\t\t\t\t\t<v-row dense class=\"my-4\">\n\t\t\t\t\t\t\t\t<v-col md=\"12\"\n\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t\t\t\t<v-col\n\t\t\t\t\t\t\t\t\t\t\tv-for=\"( uischema, id ) in moreInfoLayout\"\n\t\t\t\t\t\t\t\t\t\t\t:key=\"id\"\n\t\t\t\t\t\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<InputWidget\n\t\t\t\t\t\t\t\t\t\t\t\tv-model=\"value[ id ]\"\n\t\t\t\t\t\t\t\t\t\t\t\t:schema=\"schemaFor( id )\"\n\t\t\t\t\t\t\t\t\t\t\t\t:ui-schema=\"uischema\"\n\t\t\t\t\t\t\t\t\t\t\t\t@is-valid=\"storeValidity( $event, id )\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t</v-stepper-content>\n\t\t\t\t\t</v-stepper>\n\t\t\t\t</v-form>\n\n\t\t\t\t<v-row class=\"justify-space-between mt-4\">\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t:disabled=\"step === minStep\"\n\t\t\t\t\t\t\t@click=\"stepBack\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === false\"\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'back' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === true\"\n\t\t\t\t\t\t\t\trigth\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-right\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\n\t\t\t\t\t<v-col v-if=\"step < maxStep\"\n\t\t\t\t\t\tcols=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t@click=\"stepContinue\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === true\"\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'continue' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tv-if=\"$vuetify.rtl === false\"\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-chevron-right\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col v-else\n\t\t\t\t\t\tcols=\"6\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t:disabled=\"!valid || !$can( 'change', value )\"\n\t\t\t\t\t\t\t@click=\"commentDialog = true\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-content-save-edit\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'publishchanges' ) }}\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<CommentDialog v-model=\"commentDialog\" @save=\"publishChanges\" />\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapActions } from 'vuex';\nimport _ from 'lodash';\n\nimport { asTool } from '@/helpers/casl';\nimport { localizeEnum } from '@/helpers/tools';\nimport InputWidget from '@/components/common/InputWidget';\nimport CommentDialog from '@/components/common/CommentDialog';\n\nexport default {\n\tname: 'EditTool',\n\tcomponents: {\n\t\tInputWidget,\n\t\tCommentDialog\n\t},\n\tprops: {\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\ttoolSchema: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tannotationsSchema: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tlinks: {\n\t\t\ttype: Array,\n\t\t\trequired: true\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tstep: 1,\n\t\t\tminStep: 1,\n\t\t\tmaxStep: 5,\n\t\t\tvalue: _.cloneDeep( this.tool ),\n\t\t\tinitialValue: null,\n\t\t\tcommentDialog: false,\n\t\t\tvalid: false,\n\t\t\tvalidityPerField: {}\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'localeSelect' ] ),\n\t\t...mapState( 'tools', [ 'spdxLicenses' ] ),\n\t\tbasicInfoLayout() {\n\t\t\treturn {\n\t\t\t\ticon: {\n\t\t\t\t\ticon: 'mdi-tools',\n\t\t\t\t\tlabel: this.$t( 'icon' )\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\ticon: 'mdi-pencil-outline',\n\t\t\t\t\tlabel: this.$t( 'title' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\tsubtitle: {\n\t\t\t\t\ticon: 'mdi-subtitles-outline',\n\t\t\t\t\tlabel: this.$t( 'subtitle' )\n\t\t\t\t},\n\t\t\t\tdescription: {\n\t\t\t\t\ticon: 'mdi-note-text-outline',\n\t\t\t\t\tlabel: this.$t( 'description' ),\n\t\t\t\t\trequired: true\n\t\t\t\t},\n\t\t\t\turl: {\n\t\t\t\t\ticon: 'mdi-link-variant',\n\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t},\n\t\t\t\tauthor: {\n\t\t\t\t\twidget: 'authors',\n\t\t\t\t\ticon: 'mdi-account-multiple-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'authors' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\tname: {\n\t\t\t\t\t\t\ticon: 'mdi-account-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'name' ),\n\t\t\t\t\t\t\trequired: true\n\t\t\t\t\t\t},\n\t\t\t\t\t\twiki_username: {\n\t\t\t\t\t\t\ticon: 'mdi-card-account-details-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'wiki-username' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdeveloper_username: {\n\t\t\t\t\t\t\ticon: 'mdi-card-account-details-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'developer-username' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\temail: {\n\t\t\t\t\t\t\ticon: 'mdi-email-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'email' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\trepository: {\n\t\t\t\t\ticon: 'mdi-source-branch',\n\t\t\t\t\tlabel: this.$t( 'repository' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\ttoolStatusLayout() {\n\t\t\treturn {\n\t\t\t\texperimental: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\ticon: 'mdi-alert-outline',\n\t\t\t\t\tlabel: this.$t( 'experimental' ),\n\t\t\t\t\tpersistentHint: true\n\t\t\t\t},\n\t\t\t\tdeprecated: {\n\t\t\t\t\twidget: 'checkbox',\n\t\t\t\t\ticon: 'mdi-cancel',\n\t\t\t\t\tlabel: this.$t( 'deprecated' ),\n\t\t\t\t\tpersistentHint: true\n\t\t\t\t},\n\t\t\t\treplaced_by: {\n\t\t\t\t\ticon: 'mdi-find-replace',\n\t\t\t\t\tlabel: this.$t( 'replacedby' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tattributesLayout() {\n\t\t\tconst props = this.annotationsSchema.properties;\n\t\t\treturn {\n\t\t\t\ttool_type: {\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.tool_type.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'tool_type', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\ticon: 'mdi-toolbox-outline',\n\t\t\t\t\tlabel: this.$t( 'tooltype' )\n\t\t\t\t},\n\t\t\t\tfor_wikis: {\n\t\t\t\t\twidget: 'multi-select',\n\t\t\t\t\ticon: 'mdi-wikipedia',\n\t\t\t\t\tlabel: this.$t( 'forwikis' )\n\t\t\t\t},\n\t\t\t\taudiences: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.audiences.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'audiences', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-account-group-outline',\n\t\t\t\t\tlabel: this.$t( 'audiences' )\n\t\t\t\t},\n\t\t\t\tcontent_types: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.content_types.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'content_types', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-book-open-page-variant-outline',\n\t\t\t\t\tlabel: this.$t( 'contenttypes' )\n\t\t\t\t},\n\t\t\t\ttasks: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.tasks.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'tasks', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-checkbox-multiple-marked-outline',\n\t\t\t\t\tlabel: this.$t( 'tasks' )\n\t\t\t\t},\n\t\t\t\tsubject_domains: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => props.subject_domains.items.enum.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: localizeEnum( 'subject_domains', x ),\n\t\t\t\t\t\t\t\tvalue: x\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-domain',\n\t\t\t\t\tlabel: this.$t( 'subjectdomains' )\n\t\t\t\t},\n\t\t\t\tavailable_ui_languages: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t},\n\t\t\t\t\tmultiple: true,\n\t\t\t\t\ticon: 'mdi-tablet-dashboard',\n\t\t\t\t\tlabel: this.$t( 'availableuilanguages' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tusageLayout() {\n\t\t\treturn {\n\t\t\t\turl_alternates: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-link-variant',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'urlalternates' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-link-variant',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tapi_url: {\n\t\t\t\t\ticon: 'mdi-api',\n\t\t\t\t\tlabel: this.$t( 'apiurl' )\n\t\t\t\t},\n\t\t\t\tuser_docs_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-file-document-multiple-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'userdocsurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-file-document-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfeedback_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-comment-processing-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'feedbackurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-comment-processing-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tprivacy_policy_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-shield-lock-outline',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'privacypolicyurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-shield-lock-outline',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tbugtracker_url: {\n\t\t\t\t\ticon: 'mdi-bug-outline',\n\t\t\t\t\tlabel: this.$t( 'bugtrackerurl' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tcontributingLayout() {\n\t\t\treturn {\n\t\t\t\tlicense: {\n\t\t\t\t\twidget: 'select',\n\t\t\t\t\tselect: {\n\t\t\t\t\t\titems: () => this.spdxLicenses.map( ( x ) => {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttext: `${x.name} (${x.id})`,\n\t\t\t\t\t\t\t\tvalue: x.id\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} )\n\t\t\t\t\t},\n\t\t\t\t\ticon: 'mdi-license',\n\t\t\t\t\tlabel: this.$t( 'license' )\n\t\t\t\t},\n\t\t\t\ttranslate_url: {\n\t\t\t\t\ticon: 'mdi-translate',\n\t\t\t\t\tlabel: this.$t( 'translateurl' )\n\t\t\t\t},\n\t\t\t\ttechnology_used: {\n\t\t\t\t\twidget: 'multi-select',\n\t\t\t\t\ticon: 'mdi-cog-outline',\n\t\t\t\t\tlabel: this.$t( 'technologyused' )\n\t\t\t\t},\n\t\t\t\tdeveloper_docs_url: {\n\t\t\t\t\twidget: 'url-multilingual',\n\t\t\t\t\ticon: 'mdi-code-tags',\n\t\t\t\t\tappendIcon: 'mdi-plus',\n\t\t\t\t\tlabel: this.$t( 'developerdocsurl' ),\n\t\t\t\t\titems: {\n\t\t\t\t\t\turl: {\n\t\t\t\t\t\t\ticon: 'mdi-code-tags',\n\t\t\t\t\t\t\tlabel: this.$t( 'url' )\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlanguage: {\n\t\t\t\t\t\t\twidget: 'select',\n\t\t\t\t\t\t\tselect: {\n\t\t\t\t\t\t\t\titems: () => this.localeSelect\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ticon: 'mdi-web',\n\t\t\t\t\t\t\tlabel: this.$t( 'language' )\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tmoreInfoLayout() {\n\t\t\treturn {\n\t\t\t\topenhub_id: {\n\t\t\t\t\ticon: 'mdi-duck',\n\t\t\t\t\tlabel: this.$t( 'openhubid' )\n\t\t\t\t},\n\t\t\t\tbot_username: {\n\t\t\t\t\ticon: 'mdi-robot-outline',\n\t\t\t\t\tlabel: this.$t( 'botusername' )\n\t\t\t\t},\n\t\t\t\tsponsor: {\n\t\t\t\t\twidget: 'multi-select',\n\t\t\t\t\ticon: 'mdi-account-group-outline',\n\t\t\t\t\tlabel: this.$t( 'sponsor' )\n\t\t\t\t},\n\t\t\t\twikidata_qid: {\n\t\t\t\t\ticon: 'mdi-identifier',\n\t\t\t\t\tlabel: this.$t( 'wikidataqid' )\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\tstepIsValid() {\n\t\t\tconst valid = {\n\t\t\t\tbasic: true,\n\t\t\t\tattributes: true,\n\t\t\t\tusage: true,\n\t\t\t\tcontributing: true,\n\t\t\t\tmoreInfo: true\n\t\t\t};\n\n\t\t\tObject.keys( this.basicInfoLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.basic = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.attributesLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.attributes = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.usageLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.usage = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.contributingLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.contributing = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tObject.keys( this.moreInfoLayout ).forEach( ( field ) => {\n\t\t\t\tif ( this.validityPerField[ field ] === false ) {\n\t\t\t\t\tvalid.moreInfo = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn valid;\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'tools', [ 'getSpdxLicenses' ] ),\n\t\tstepBack() {\n\t\t\tthis.step = Math.max( this.step - 1, this.minStep );\n\t\t},\n\t\tstepContinue() {\n\t\t\tthis.step = Math.min( this.step + 1, this.maxStep );\n\t\t},\n\t\tschemaFor( id ) {\n\t\t\treturn this.toolSchema.properties[ id ] ||\n\t\t\t\tthis.annotationsSchema.properties[ id ];\n\t\t},\n\t\t/**\n\t\t * Save the current valid status of a field in a reactive manner.\n\t\t *\n\t\t * @param {boolean} isValid - Is the field valid?\n\t\t * @param {string} field - field name\n\t\t */\n\t\tstoreValidity( isValid, field ) {\n\t\t\t// validityPerField is dynamically built and therefore not reactive\n\t\t\t// if the properties are added the usual way i.e a[\"key\"] = value.\n\t\t\t// This syntax does the same thing except that it also makes\n\t\t\t// the added properties reactive.\n\t\t\tthis.$set( this.validityPerField, field, !isValid );\n\t\t},\n\t\thasAnnotationOverride( toolinfo, field ) {\n\t\t\tconst coreValue = toolinfo[ field ];\n\t\t\tconst annotationValue = toolinfo.annotations[ field ];\n\t\t\treturn (\n\t\t\t\t_.isEmpty( coreValue ) &&\n\t\t\t\t!_.isEmpty( annotationValue )\n\t\t\t) || (\n\t\t\t\t// Boolean values are tricker to check. Only override if the\n\t\t\t\t// core value is false and the annotation is true.\n\t\t\t\ttypeof coreValue === 'boolean' &&\n\t\t\t\ttypeof annotationValue === 'boolean' &&\n\t\t\t\tcoreValue === false &&\n\t\t\t\tannotationValue === true\n\t\t\t);\n\t\t},\n\t\tpublishChanges( comment ) {\n\t\t\tconst annotations = this.value.annotations;\n\t\t\tconst newtool = { ...this.value };\n\n\t\t\tthis.links.forEach( ( field ) => {\n\t\t\t\tnewtool[ field ] = newtool[ field ].filter( ( u ) => {\n\t\t\t\t\treturn u.url !== undefined &&\n\t\t\t\t\t\tu.url !== null &&\n\t\t\t\t\t\tu.url !== '';\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\tObject.keys( newtool ).forEach( ( field ) => {\n\t\t\t\t// Overwrite edited toolinfo field with the initial value of\n\t\t\t\t// field if the field was copied over from annotations\n\t\t\t\tif (\n\t\t\t\t\tthis.hasAnnotationOverride( this.initialValue, field ) &&\n\t\t\t\t\t_.isEqual(\n\t\t\t\t\t\tnewtool[ field ],\n\t\t\t\t\t\tthis.initialValue.annotations[ field ]\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tnewtool[ field ] = this.initialValue[ field ];\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tlet response = Promise.resolve();\n\n\t\t\tif ( !_.isEqual( annotations, this.initialValue.annotations ) ) {\n\t\t\t\t// Update annotations\n\t\t\t\tresponse = response.then( () => {\n\t\t\t\t\treturn this.$store.dispatch( 'tools/editAnnotations', {\n\t\t\t\t\t\tannotations: { ...annotations, comment },\n\t\t\t\t\t\tname: this.value.name\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tdelete newtool.annotations;\n\t\t\tdelete this.initialValue.annotations;\n\n\t\t\tif ( !_.isEqual( newtool, this.initialValue ) ) {\n\t\t\t\t// Update core tool info\n\t\t\t\tresponse = response.then( () => {\n\t\t\t\t\treturn this.$store.dispatch( 'tools/editTool', {\n\t\t\t\t\t\tinfo: { ...newtool, comment },\n\t\t\t\t\t\tname: this.value.name\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tresponse.then( () => {\n\t\t\t\tthis.$router.push( {\n\t\t\t\t\tname: 'tools-view',\n\t\t\t\t\tparams: { name: this.value.name }\n\t\t\t\t} ).catch( () => {} );\n\t\t\t} );\n\n\t\t\tthis.commentDialog = false;\n\t\t}\n\t},\n\twatch: {\n\t\tvalue: {\n\t\t\thandler( newVal ) {\n\t\t\t\tif ( !this.initialValue && newVal.name ) {\n\t\t\t\t\tnewVal = JSON.parse( JSON.stringify( newVal ) );\n\t\t\t\t\tthis.initialValue = newVal;\n\n\t\t\t\t\tconst fields = {};\n\n\t\t\t\t\tObject.keys( newVal ).forEach( ( field ) => {\n\t\t\t\t\t\tif ( this.hasAnnotationOverride( newVal, field ) ) {\n\t\t\t\t\t\t\tfields[ field ] = _.cloneDeep(\n\t\t\t\t\t\t\t\tnewVal.annotations[ field ]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\tthis.value = asTool( { ...this.value, ...fields } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true,\n\t\t\timmediate: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getSpdxLicenses();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/FavoriteButton.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":59,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":59,"endColumn":49}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-btn\n\t\tv-if=\"userAuthed && favorite\"\n\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\tclass=\"my-1 mx-2\"\n\t\tcolor=\"yellow50\"\n\t\t@click=\"removeFavorite\"\n\t>\n\t\t<v-icon class=\"me-2\">\n\t\t\tmdi-star\n\t\t</v-icon>\n\t\t{{ $t( 'favorited' ) }}\n\t</v-btn>\n\t<v-btn\n\t\tv-else-if=\"userAuthed\"\n\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\tclass=\"my-1 mx-2\"\n\t\t@click=\"addFavorite\"\n\t>\n\t\t<v-icon class=\"me-2\">\n\t\t\tmdi-star-outline\n\t\t</v-icon>\n\t\t{{ $t( 'favorite' ) }}\n\t</v-btn>\n</template>\n\n<script>\nimport { mapActions } from 'vuex';\n\nexport default {\n\tname: 'FavoriteButton',\n\tprops: {\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\tdefault: null\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tclicks: 0,\n\t\t\tuserAuthed: this.$can( 'add', 'lists/toollist' )\n\t\t};\n\t},\n\tasyncComputed: {\n\t\tfavorite: {\n\t\t\tget() {\n\t\t\t\tif ( this.userAuthed && this.tool ) {\n\t\t\t\t\treturn this.isFavorite( this.tool.name );\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\tdefault: false,\n\t\t\t// Each time the value of this.clicks changes, this property\n\t\t\t// will be recomputed and related state dynamically updated.\n\t\t\twatch: [ 'clicks' ]\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'favorites', [ 'isFavorite' ] ),\n\t\t/**\n\t\t * Add the current tool to the user's favorites.\n\t\t */\n\t\taddFavorite() {\n\t\t\tthis.$store.dispatch( 'favorites/addTool', this.tool.name ).then(\n\t\t\t\t() => { this.clicks++; }\n\t\t\t);\n\t\t},\n\t\t/**\n\t\t * Remove the current tool from the user's favorites.\n\t\t */\n\t\tremoveFavorite() {\n\t\t\tthis.$store.dispatch( 'favorites/removeTool', this.tool.name ).then(\n\t\t\t\t() => { this.clicks++; }\n\t\t\t);\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/RegisterToolUrl.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":72,"column":10,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":72,"endColumn":45},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":128,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":128,"endColumn":72},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":178,"column":6,"nodeType":"SpreadElement","messageId":"forbidden","endLine":179,"endColumn":43},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":179,"column":24,"nodeType":"SpreadElement","messageId":"forbidden","endLine":179,"endColumn":39},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":184,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":188,"endColumn":13}],"suppressedMessages":[],"errorCount":5,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tlg=\"10\"\n\t\t\t\tcols=\"8\"\n\t\t\t>\n\t\t\t\t<v-text-field\n\t\t\t\t\tref=\"url\"\n\t\t\t\t\tv-model=\"fileUrl\"\n\t\t\t\t\tprepend-icon=\"mdi-link-variant\"\n\t\t\t\t\t:rules=\"validationRules\"\n\t\t\t\t\trequired\n\t\t\t\t\t:disabled=\"!$can( 'add', 'crawler/url' )\"\n\t\t\t\t>\n\t\t\t\t\t<template #label>\n\t\t\t\t\t\t<InputLabel :label=\"$t( 'jsonfileurl' )\" required />\n\t\t\t\t\t</template>\n\t\t\t\t</v-text-field>\n\t\t\t</v-col>\n\t\t\t<v-col\n\t\t\t\tlg=\"2\"\n\t\t\t\tcols=\"4\"\n\t\t\t>\n\t\t\t\t<v-btn\n\t\t\t\t\tclass=\"mt-4\"\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t:disabled=\"!$can( 'add', 'crawler/url' )\"\n\t\t\t\t\t@click=\"registerUrl( fileUrl )\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'add' ) }}\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tright\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-checkbox-marked-circle\n\t\t\t\t\t</v-icon>\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-row v-if=\"$can( 'add', 'crawler/url' ) &&\n\t\t\t\t\tnumUserCreatedUrls === 0\"\n\t\t\t\t>\n\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t\t\t{{ $t( 'nourlsfounderror' ) }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\n\t\t\t\t<v-data-table\n\t\t\t\t\tv-if=\"numUserCreatedUrls > 0\"\n\t\t\t\t\tv-model:options=\"options\"\n\t\t\t\t\t:headers=\"headers\"\n\t\t\t\t\t:items=\"userCreatedUrls\"\n\t\t\t\t\t:server-items-length=\"numUserCreatedUrls\"\n\t\t\t\t\tclass=\"elevation-2\"\n\t\t\t\t\thide-default-footer\n\t\t\t\t\tmobile-breakpoint=\"0\"\n\t\t\t\t\t:loading=\"urlsLoading\"\n\t\t\t\t>\n\t\t\t\t\t<template #[`item.url`]=\"{ item }\">\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t:href=\"item.url\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>{{ item.url }}</a>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #[`item.created_date`]=\"{ item }\">\n\t\t\t\t\t\t{{ item.created_date | moment( 'lll' ) }}\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #[`item.btn_remove_url`]=\"{ item }\">\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tv-if=\"$can( 'delete', item )\"\n\t\t\t\t\t\t\tclass=\"mt-2 mb-2\"\n\t\t\t\t\t\t\tcolor=\"error\"\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t@click=\"unregisterUrl( item )\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-delete-circle\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</template>\n\t\t\t\t</v-data-table>\n\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numUserCreatedUrls > 0\"\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"Math.ceil( numUserCreatedUrls / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToNextPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport InputLabel from '@/components/common/InputLabel';\nimport { isValidHttpUrl } from '@/helpers/validation';\nimport { filterEmpty } from '@/helpers/object';\n\nexport default {\n\tname: 'RegisterToolUrl',\n\tcomponents: {\n\t\tInputLabel\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10,\n\t\t\tfileUrl: '',\n\t\t\turlsLoading: null,\n\t\t\tfilters: {\n\t\t\t\tordering: null\n\t\t\t},\n\t\t\toptions: {}\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'crawler', [ 'userCreatedUrls', 'numUserCreatedUrls' ] ),\n\t\theaders() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'jsonfileurl' ),\n\t\t\t\t\tvalue: 'url',\n\t\t\t\t\tsortable: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'datecreated' ),\n\t\t\t\t\tvalue: 'created_date',\n\t\t\t\t\tsortable: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'removeurl' ),\n\t\t\t\t\tvalue: 'btn_remove_url',\n\t\t\t\t\tsortable: false,\n\t\t\t\t\talign: 'right'\n\t\t\t\t}\n\t\t\t];\n\t\t},\n\t\tvalidationRules() {\n\t\t\tconst urlRule = ( v ) => !v ? true : isValidHttpUrl( v ) || this.$t( 'urlinvalid' );\n\t\t\tconst requiredRule = ( v ) => !!v || this.$t( 'required-field' );\n\t\t\treturn [ urlRule, requiredRule ];\n\t\t}\n\t},\n\tmethods: {\n\t\tregisterUrl( url ) {\n\t\t\tif ( !this.fileUrl || !isValidHttpUrl( this.fileUrl ) ) {\n\t\t\t\tthis.$refs.url.validate( true );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.$store.dispatch( 'crawler/registerUrl', url );\n\t\t\tthis.fileUrl = '';\n\t\t\tthis.$refs.url.reset();\n\t\t},\n\t\tunregisterUrl( url ) {\n\t\t\tthis.$store.dispatch( 'crawler/unregisterUrl', url );\n\t\t},\n\t\tgoToNextPage( page ) {\n\t\t\tthis.page = page;\n\t\t\tthis.getUrlsCreatedByUser();\n\t\t},\n\t\tsetRouteQueryParams() {\n\t\t\tthis.$router.push( {\n\t\t\t\tname: 'addremovetools',\n\t\t\t\tquery: {\n\t\t\t\t\ttab: 'urls',\n\t\t\t\t\t...filterEmpty( {\n\t\t\t\t\t\tpage: this.page, ...this.filters } ) }\n\t\t\t} ).catch( () => {} );\n\t\t},\n\t\tgetUrlsCreatedByUser() {\n\t\t\tthis.urlsLoading = true;\n\t\t\tthis.$store.dispatch( 'crawler/getUrlsCreatedByUser', {\n\t\t\t\tpage: this.page,\n\t\t\t\tfilters: this.filters\n\t\t\t} ).then( this.setRouteQueryParams )\n\t\t\t\t.finally( () => { this.urlsLoading = false; } );\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to filtered results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'ordering':\n\t\t\t\t\t\tthis.filters.ordering = value;\n\n\t\t\t\t\t\tif ( value[ 0 ] === '-' ) {\n\t\t\t\t\t\t\tthis.options.sortBy = [ value.replace( '-', '' ) ];\n\t\t\t\t\t\t\tthis.options.sortDesc = [ true ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.options.sortBy = [ value ];\n\t\t\t\t\t\t\tthis.options.sortDesc = [ false ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\twatch: {\n\t\toptions: {\n\t\t\thandler( _, oldVal ) {\n\t\t\t\tconst {\n\t\t\t\t\tsortBy,\n\t\t\t\t\tsortDesc\n\t\t\t\t} = this.options;\n\t\t\t\tif ( sortBy.length === 1 && sortDesc.length === 1 ) {\n\t\t\t\t\tif ( sortDesc[ 0 ] === false ) {\n\t\t\t\t\t\tthis.filters.ordering = sortBy[ 0 ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.filters.ordering = `-${sortBy[ 0 ]}`;\n\t\t\t\t\t}\n\t\t\t\t\tthis.getUrlsCreatedByUser();\n\t\t\t\t} else if ( oldVal.sortBy ) {\n\t\t\t\t\tthis.filters.ordering = null;\n\t\t\t\t\tthis.getUrlsCreatedByUser();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.loadStateFromQueryString();\n\t\tthis.$store.dispatch( 'user/getUserInfo' ).then(\n\t\t\t( user ) => {\n\t\t\t\tif ( user.is_authenticated ) {\n\t\t\t\t\tthis.getUrlsCreatedByUser();\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolCard.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolEditButton.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolImage.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolInfo.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":217,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":217,"endColumn":43}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"tool\">\n\t\t<v-app-bar\n\t\t\tv-if=\"!revId\"\n\t\t\tcolor=\"base100\"\n\t\t\tflat\n\t\t\theight=\"auto\"\n\t\t\tclass=\"tool-app-bar\"\n\t\t\t:class=\"{ 'tool-app-bar-xs': $vuetify.breakpoint.xs }\"\n\t\t>\n\t\t\t<ToolEditButton :tool=\"tool\" />\n\t\t\t<FavoriteButton :tool=\"tool\" />\n\t\t\t<v-btn\n\t\t\t\t:to=\"{ name: 'tools-history', params: { name: tool.name } }\"\n\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\tclass=\"my-1 mx-2\"\n\t\t\t>\n\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\tmdi-history\n\t\t\t\t</v-icon>\n\t\t\t\t{{ $t( 'viewhistory' ) }}\n\t\t\t</v-btn>\n\t\t\t<ToolMenu :tool=\"tool\" :smallicon=\"false\" />\n\t\t</v-app-bar>\n\n\t\t<v-row\n\t\t\tclass=\"mt-4\"\n\t\t\tno-gutters\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<dl class=\"d-flex align-center flex-nowrap\">\n\t\t\t\t\t<dt class=\"me-4\">\n\t\t\t\t\t\t<ToolImage :tool=\"tool\" />\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<h2 class=\"text-h3\">\n\t\t\t\t\t\t\t{{ tool.title }}\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tv-if=\"tool.subtitle\"\n\t\t\t\t\t\t\t\tclass=\"text-subtitle-1\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ tool.subtitle }}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t\t<div class=\"mt-4\" dir=\"auto\">\n\t\t\t\t\t{{ tool.description }}\n\t\t\t\t</div>\n\t\t\t\t<dl class=\"tool-info__authors row mx-0 mt-4 text-subtitle-1\">\n\t\t\t\t\t<dt class=\"me-2 my-1\">{{ $t( 'authors' ) }}:</dt>\n\t\t\t\t\t<dd\n\t\t\t\t\t\tv-for=\"( author, index ) in tool.author\"\n\t\t\t\t\t\t:key=\"author.name + index\"\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<AuthorDetails :author=\"author\" />\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t\t<div>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tclass=\"mt-4 me-3\"\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tdark\n\t\t\t\t\t\t:href=\"`${tool.url}`\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $t( 'browsetool' ) }}\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tright\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-link-variant\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tv-if=\"getDisplayedScalar( 'repository' )\"\n\t\t\t\t\t\toutlined\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tclass=\"mt-4\"\n\t\t\t\t\t\t:href=\"getDisplayedScalar( 'repository' )\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $t( 'sourcecode' ) }}\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tright\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-code-json\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</div>\n\n\t\t\t\t<v-alert\n\t\t\t\t\tv-if=\"getDisplayedScalar( 'experimental' ) ||\n\t\t\t\t\t\tgetDisplayedScalar( 'deprecated' )\"\n\t\t\t\t\tborder=\"left\"\n\t\t\t\t\ttype=\"error\"\n\t\t\t\t\televation=\"2\"\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tclass=\"mt-4\"\n\t\t\t\t>\n\t\t\t\t\t<template v-if=\"getDisplayedScalar( 'experimental' )\">\n\t\t\t\t\t\t{{ $t( 'tool-experimental-error' ) }}\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<template v-if=\"getDisplayedScalar( 'deprecated' )\">\n\t\t\t\t\t\t{{ $t( 'tool-deprecated-error' ) }}\n\t\t\t\t\t</template>\n\t\t\t\t</v-alert>\n\t\t\t\t<v-alert\n\t\t\t\t\tv-if=\"getDisplayedScalar( 'replaced_by' )\"\n\t\t\t\t\tborder=\"left\"\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tdark\n\t\t\t\t\televation=\"2\"\n\t\t\t\t\ttype=\"info\"\n\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\tclass=\"mt-4\"\n\t\t\t\t>\n\t\t\t\t\t{{ $t( 'tool-replacement-link',\n\t\t\t\t\t\t[ getDisplayedScalar( 'replaced_by' ) ] ) }}\n\t\t\t\t</v-alert>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tv-if=\"attributesSection.length\"\n\t\t\t\tmd=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<h3 class=\"text-h5 mt-4\">\n\t\t\t\t\t{{ $t( 'attributes' ) }}\n\t\t\t\t</h3>\n\t\t\t\t<ToolInfoSection :section=\"attributesSection\" />\n\t\t\t</v-col>\n\t\t\t<v-col\n\t\t\t\tv-if=\"usageSection.length\"\n\t\t\t\tmd=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<h3 class=\"text-h5 mt-4\">\n\t\t\t\t\t{{ $t( 'usage' ) }}\n\t\t\t\t</h3>\n\t\t\t\t<ToolInfoSection :section=\"usageSection\" />\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tv-if=\"contributingSection.length\"\n\t\t\t\tmd=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<h3 class=\"text-h5 mt-4\">\n\t\t\t\t\t{{ $t( 'contributing' ) }}\n\t\t\t\t</h3>\n\t\t\t\t<ToolInfoSection :section=\"contributingSection\" />\n\t\t\t</v-col>\n\t\t\t<v-col\n\t\t\t\tv-if=\"moreInfoSection.length\"\n\t\t\t\tmd=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<h3 class=\"text-h5 mt-4\">\n\t\t\t\t\t{{ $t( 'moreinfo' ) }}\n\t\t\t\t</h3>\n\t\t\t\t<ToolInfoSection :section=\"moreInfoSection\" />\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<ScrollTop />\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport _ from 'lodash';\n\nimport { ensureArray } from '@/helpers/array';\nimport { forWikiLabel, localizeEnum } from '@/helpers/tools';\n\nimport AuthorDetails from '@/components/tools/AuthorDetails';\nimport FavoriteButton from '@/components/tools/FavoriteButton';\nimport ScrollTop from '@/components/common/ScrollTop';\nimport ToolEditButton from '@/components/tools/ToolEditButton';\nimport ToolImage from '@/components/tools/ToolImage';\nimport ToolInfoSection from '@/components/tools/ToolInfoSection';\nimport ToolMenu from '@/components/tools/ToolMenu';\n\nexport default {\n\tname: 'ToolInfo',\n\tcomponents: {\n\t\tAuthorDetails,\n\t\tFavoriteButton,\n\t\tToolEditButton,\n\t\tToolInfoSection,\n\t\tScrollTop,\n\t\tToolImage,\n\t\tToolMenu\n\t},\n\tprops: {\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\tdefault: null\n\t\t},\n\t\trevId: {\n\t\t\ttype: [ String, Number ],\n\t\t\tdefault: null\n\t\t}\n\t},\n\tcomputed: {\n\t\t...mapState( 'locale', [ 'localeMap' ] ),\n\t\tattributesSection() {\n\t\t\tconst items = [\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'tooltype' ),\n\t\t\t\t\tparam: 'tool_type__term',\n\t\t\t\t\tterms: [ this.buildTerm(\n\t\t\t\t\t\t'tool_type',\n\t\t\t\t\t\tthis.getDisplayedScalar( 'tool_type' )\n\t\t\t\t\t) ].filter( ( e ) => e )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'forwikis' ),\n\t\t\t\t\tparam: 'wiki__term',\n\t\t\t\t\tterms: this.getDisplayedArray( 'for_wikis' ).map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'wiki' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'audiences' ),\n\t\t\t\t\tparam: 'audiences__term',\n\t\t\t\t\tterms: this.tool.annotations.audiences.map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'audiences' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'contenttypes' ),\n\t\t\t\t\tparam: 'content_types__term',\n\t\t\t\t\tterms: this.tool.annotations.content_types.map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'content_types' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'tasks' ),\n\t\t\t\t\tparam: 'tasks__term',\n\t\t\t\t\tterms: this.tool.annotations.tasks.map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'tasks' )\n\t\t\t\t\t)\n\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'subjectdomains' ),\n\t\t\t\t\tparam: 'subject_domains__term',\n\t\t\t\t\tterms: this.tool.annotations.subject_domains.map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'subject_domains' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'availableuilanguages' ),\n\t\t\t\t\tparam: 'ui_language__term',\n\t\t\t\t\tterms: this.getDisplayedArray( 'available_ui_languages' ).map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'ui_language' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'search-filter-keywords' ),\n\t\t\t\t\tparam: 'keywords__term',\n\t\t\t\t\tterms: ( this.tool.keywords || [] ).filter(\n\t\t\t\t\t\t( e ) => e\n\t\t\t\t\t).map(\n\t\t\t\t\t\t_.partial( this.buildTerm, 'keyword' )\n\t\t\t\t\t)\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'search-filter-origin' ),\n\t\t\t\t\tparam: 'origin__term',\n\t\t\t\t\tterms: [\n\t\t\t\t\t\tthis.buildTerm( 'origin', this.tool.origin )\n\t\t\t\t\t].filter( ( e ) => e )\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this.removeEmptyItems( items );\n\t\t},\n\t\tusageSection() {\n\t\t\tconst items = [\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'url' ),\n\t\t\t\t\thref: this.tool.url\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'urlalternates' ),\n\t\t\t\t\thref: this.tool.url_alternates\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'apidocumentation' ),\n\t\t\t\t\thref: this.getDisplayedScalar( 'api_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'howtouse' ),\n\t\t\t\t\thref: this.getDisplayedArray( 'user_docs_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'leavefeedback' ),\n\t\t\t\t\thref: this.getDisplayedArray( 'feedback_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'privacypolicy' ),\n\t\t\t\t\thref: this.getDisplayedArray( 'privacy_policy_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'bugtracker' ),\n\t\t\t\t\thref: this.getDisplayedScalar( 'bugtracker_url' )\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this.removeEmptyItems( items );\n\t\t},\n\t\tcontributingSection() {\n\t\t\tconst items = [\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'license' ),\n\t\t\t\t\tparam: 'license__term',\n\t\t\t\t\tterms: [\n\t\t\t\t\t\tthis.buildTerm( 'license', this.tool.license )\n\t\t\t\t\t].filter( ( e ) => e )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'repository' ),\n\t\t\t\t\thref: this.tool.repository\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'developerdocumentation' ),\n\t\t\t\t\thref: this.getDisplayedArray( 'developer_docs_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'helptranslate' ),\n\t\t\t\t\thref: this.getDisplayedScalar( 'translate_url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'technologyused' ),\n\t\t\t\t\tvalue: this.tool.technology_used\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this.removeEmptyItems( items );\n\t\t},\n\t\tmoreInfoSection() {\n\t\t\tconst items = [\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'sponsor' ),\n\t\t\t\t\tvalue: this.tool.sponsor\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'wikidataqid' ),\n\t\t\t\t\tvalue: this.tool.annotations.wikidata_qid,\n\t\t\t\t\thref: 'https://www.wikidata.org/wiki/' +\n\t\t\t\t\t\tencodeURIComponent( this.tool.annotations.wikidata_qid )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'openhubid' ),\n\t\t\t\t\tvalue: this.tool.openhub_id,\n\t\t\t\t\thref: 'https://openhub.net/p/' +\n\t\t\t\t\t\tencodeURIComponent( this.tool.openhub_id )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: this.$t( 'botusername' ),\n\t\t\t\t\tvalue: this.tool.bot_username,\n\t\t\t\t\thref: 'https://meta.wikimedia.org/wiki/Special:CentralAuth/' +\n\t\t\t\t\t\tencodeURIComponent( this.tool.bot_username )\n\t\t\t\t}\n\t\t\t];\n\t\t\treturn this.removeEmptyItems( items );\n\t\t}\n\t},\n\tmethods: {\n\t\t/**\n\t\t * Get the displayed value for an array typed toolinfo property.\n\t\t *\n\t\t * @param {string} field - toolinfo property name\n\t\t * @return {Array} Core or annotation value for the given field name\n\t\t */\n\t\tgetDisplayedArray( field ) {\n\t\t\tconst tool_val = ensureArray( this.tool[ field ] );\n\t\t\tconst ann_val = ensureArray( this.tool.annotations[ field ] );\n\t\t\treturn tool_val.length > 0 ? tool_val : ann_val;\n\t\t},\n\t\t/**\n\t\t * Get the displayed value for a toolinfo property.\n\t\t *\n\t\t * @param {string} field - toolinfo property name\n\t\t * @return {*} Core or annotation value for the given field name\n\t\t */\n\t\tgetDisplayedScalar( field ) {\n\t\t\treturn this.tool[ field ] || this.tool.annotations[ field ];\n\t\t},\n\t\t/**\n\t\t * Build a search term description object.\n\t\t *\n\t\t * @param {string} facet - facet name\n\t\t * @param {string} value - facet value\n\t\t * @return {Object}\n\t\t */\n\t\tbuildTerm( facet, value ) {\n\t\t\tif ( value === null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tlabel: this.localizeLabel( facet, value ),\n\t\t\t\tterm: value\n\t\t\t};\n\t\t},\n\t\t/**\n\t\t * Get a localized label for a given facet value.\n\t\t *\n\t\t * @param {string} facet - facet name\n\t\t * @param {string} value - facet value\n\t\t * @return {string}\n\t\t */\n\t\tlocalizeLabel( facet, value ) {\n\t\t\tswitch ( facet ) {\n\t\t\t\tcase 'ui_language':\n\t\t\t\t\treturn this.$i18n.t(\n\t\t\t\t\t\t'search-filter-ui-language-value',\n\t\t\t\t\t\t[ this.localeMap[ value ] || value, value ]\n\t\t\t\t\t);\n\t\t\t\tcase 'wiki':\n\t\t\t\t\treturn forWikiLabel( value );\n\t\t\t\tcase 'keyword':\n\t\t\t\tcase 'license':\n\t\t\t\t\treturn value;\n\t\t\t\tdefault:\n\t\t\t\t\treturn localizeEnum( facet, value );\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t * Filter values considered \"empty\" from a list.\n\t\t *\n\t\t * @param {Array} items - list to filter\n\t\t * @return {Array} list with empty values removed\n\t\t */\n\t\tremoveEmptyItems( items ) {\n\t\t\treturn items.filter( function ( item ) {\n\t\t\t\treturn (\n\t\t\t\t\titem.value &&\n\t\t\t\t\titem.value.length !== 0\n\t\t\t\t) || (\n\t\t\t\t\titem.value === undefined &&\n\t\t\t\t\titem.href &&\n\t\t\t\t\titem.href.length !== 0\n\t\t\t\t) || (\n\t\t\t\t\titem.terms &&\n\t\t\t\t\titem.terms.length !== 0\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolInfoSection.vue","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/tools/ToolMenu.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":125,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":125,"endColumn":40},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":157,"column":22,"nodeType":"SpreadElement","messageId":"forbidden","endLine":157,"endColumn":52}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<div>\n\t\t<v-menu\n\t\t\tleft\n\t\t\toffset-y\n\t\t\t:close-on-content-click=\"false\"\n\t\t>\n\t\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t\t<v-btn\n\t\t\t\t\tv-if=\"userAuthed\"\n\t\t\t\t\t:class=\"{ 'ms-2': !smallicon }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown || smallicon\"\n\t\t\t\t\t:icon=\"smallicon\"\n\t\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t\tv-on=\"on\"\n\t\t\t\t\t@click.prevent=\"getMyLists\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon>mdi-dots-vertical</v-icon>\n\t\t\t\t</v-btn>\n\t\t\t</template>\n\n\t\t\t<v-card\n\t\t\t\tclass=\"mx-auto\"\n\t\t\t\twidth=\"250px\"\n\t\t\t\ttile\n\t\t\t>\n\t\t\t\t<v-list nav\n\t\t\t\t\tdense\n\t\t\t\t\tclass=\"overflow-y-auto\"\n\t\t\t\t\tmax-height=\"250px\"\n\t\t\t\t>\n\t\t\t\t\t<v-subheader class=\"text-subtitle-1 primary--text\">\n\t\t\t\t\t\t{{ $t( 'lists' ) }}\n\t\t\t\t\t</v-subheader>\n\t\t\t\t\t<v-list-item-group\n\t\t\t\t\t\tv-model=\"selectedList\"\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-subheader v-if=\"!myLists.count\"\n\t\t\t\t\t\t\tclass=\"text-subtitle-2 font-weight-light\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'lists-nouserlists' ) }}\n\t\t\t\t\t\t</v-subheader>\n\t\t\t\t\t\t<v-list-item\n\t\t\t\t\t\t\tv-for=\"list in myLists.results\"\n\t\t\t\t\t\t\t:key=\"list.id\"\n\t\t\t\t\t\t\tclass=\"text-body-1\"\n\t\t\t\t\t\t\t@click=\"updateToolList( list )\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-list-item-content>\n\t\t\t\t\t\t\t\t<v-list-item-title>{{ list.title }}</v-list-item-title>\n\t\t\t\t\t\t\t</v-list-item-content>\n\t\t\t\t\t\t\t<v-list-item-icon v-if=\"listHasTool( list.id )\">\n\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\tsmall\n\t\t\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tmdi-check\n\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t</v-list-item-icon>\n\t\t\t\t\t\t</v-list-item>\n\t\t\t\t\t</v-list-item-group>\n\t\t\t\t</v-list>\n\t\t\t\t<v-divider />\n\t\t\t\t<v-list\n\t\t\t\t\tnav\n\t\t\t\t\tdense\n\t\t\t\t>\n\t\t\t\t\t<v-list-item-group\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-list-item\n\t\t\t\t\t\t\tv-for=\"( item, i ) in items\"\n\t\t\t\t\t\t\t:key=\"i\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t\t\t\t<v-icon> {{ item.icon }} </v-icon>\n\t\t\t\t\t\t\t</v-list-item-icon>\n\n\t\t\t\t\t\t\t<v-list-item-content>\n\t\t\t\t\t\t\t\t<v-list-item-title\n\t\t\t\t\t\t\t\t\t@click=\"showCreateListDialog = true\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.text }}\n\t\t\t\t\t\t\t\t</v-list-item-title>\n\t\t\t\t\t\t\t</v-list-item-content>\n\t\t\t\t\t\t</v-list-item>\n\t\t\t\t\t</v-list-item-group>\n\t\t\t\t</v-list>\n\t\t\t</v-card>\n\t\t</v-menu>\n\t\t<CreateListDialog v-model=\"showCreateListDialog\" :tool=\"tool\" />\n\t</div>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport CreateListDialog from '@/components/lists/CreateListDialog.vue';\n\nexport default {\n\tname: 'ToolMenu',\n\tcomponents: {\n\t\tCreateListDialog\n\t},\n\tprops: {\n\t\ttool: {\n\t\t\ttype: Object,\n\t\t\trequired: true\n\t\t},\n\t\tsmallicon: {\n\t\t\ttype: Boolean\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tuserAuthed: this.$can( 'add', 'lists/toollist' ),\n\t\t\tpage: 1,\n\t\t\tpageSize: 20,\n\t\t\tselectedList: null,\n\t\t\tshowCreateListDialog: false\n\t\t};\n\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'myLists' ] ),\n\n\t\titems() {\n\t\t\treturn {\n\t\t\t\tcreateList: {\n\t\t\t\t\ttext: this.$t( 'lists-createnewlist' ),\n\t\t\t\t\ticon: 'mdi-playlist-plus'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t},\n\tmethods: {\n\t\tgetMyLists() {\n\t\t\tthis.$store.dispatch( 'lists/getMyLists', { page: this.page, pageSize: this.pageSize } ).then(\n\t\t\t\t() => {\n\t\t\t\t\t// If the user has more than 20 lists, get all of them\n\t\t\t\t\tif ( this.myLists.count > this.pageSize ) {\n\t\t\t\t\t\tthis.pageSize = this.myLists.count;\n\t\t\t\t\t\tthis.getMyLists();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\tgetListById( id ) {\n\t\t\treturn this.myLists.results.find( ( list ) => list.id === id );\n\t\t},\n\t\tlistHasTool( listId ) {\n\t\t\tconst toolList = this.getListById( listId ).tools;\n\t\t\treturn Object.keys( toolList ).some( ( key ) =>\n\t\t\t\ttoolList[ key ].name === this.tool.name );\n\t\t},\n\t\tupdateToolList( list ) {\n\t\t\tconst newlist = { ...this.getListById( list.id ) };\n\t\t\tconst tools = [];\n\t\t\tnewlist.tools.forEach( ( tool ) => {\n\t\t\t\ttools.push( tool.name );\n\t\t\t} );\n\t\t\tnewlist.tools = tools;\n\t\t\tif ( !this.listHasTool( list.id ) ) {\n\t\t\t\tnewlist.tools.push( this.tool.name );\n\t\t\t\tnewlist.comment = 'Added tool to list';\n\t\t\t} else {\n\t\t\t\tconst index = newlist.tools.indexOf( this.tool.name );\n\t\t\t\tnewlist.tools.splice( index, 1 );\n\t\t\t\tnewlist.comment = 'Removed tool from list';\n\t\t\t}\n\t\t\tthis.$store.dispatch( 'lists/editList', newlist ).then(\n\t\t\t\t() => this.getMyLists() );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/user/AuthToken.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":64,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":64,"endColumn":41},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":67,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":67,"endColumn":49}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row\n\t\t\tv-if=\"loaded\"\n\t\t\tclass=\"elevation-2 ma-1 mb-4\"\n\t\t>\n\t\t\t<v-col\n\t\t\t\tv-if=\"authtoken !== null\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<dl\n\t\t\t\t\tclass=\"row ma-1 pa-1\"\n\t\t\t\t>\n\t\t\t\t\t<dt class=\"me-2 font-weight-bold\">{{ $t( 'authtoken-token' ) }}</dt>\n\t\t\t\t\t<dd>{{ authtoken }}</dd>\n\t\t\t\t</dl>\n\t\t\t</v-col>\n\n\t\t\t<v-col\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-btn\n\t\t\t\t\tv-if=\"authtoken !== null\"\n\t\t\t\t\tcolor=\"error base100--text\"\n\t\t\t\t\t@click=\"deleteAuthtoken\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'delete' ) }}\n\t\t\t\t</v-btn>\n\t\t\t\t<v-btn\n\t\t\t\t\tv-else\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t@click=\"newAuthtoken\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tdark\n\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-plus\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'authtoken-new' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapState } from 'vuex';\n\nexport default {\n\tname: 'AuthToken',\n\tdata() {\n\t\treturn {\n\t\t\tloaded: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'user', [ 'authtoken' ] )\n\t},\n\tmethods: {\n\t\t...mapActions( 'user', [ 'deleteAuthtoken' ] ),\n\t\tgetAuthtoken() {\n\t\t\tthis.$store.dispatch( 'user/getAuthtoken' ).then( () => {\n\t\t\t\tthis.loaded = true;\n\t\t\t} );\n\t\t},\n\t\tnewAuthtoken() {\n\t\t\tthis.deleteAuthtoken().then( () => {\n\t\t\t\tthis.$store.dispatch( 'user/newAuthtoken' );\n\t\t\t} );\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getAuthtoken();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/components/user/Status.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":113,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":113,"endColumn":36}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-menu\n\t\tv-if=\"user.is_authenticated\"\n\t\toffset-y\n\t>\n\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t<v-btn\n\t\t\t\tclass=\"ma-1 white--text\"\n\t\t\t\tcolor=\"secondary\"\n\t\t\t\tv-bind=\"attrs\"\n\t\t\t\tv-on=\"on\"\n\t\t\t>\n\t\t\t\t<v-icon\n\t\t\t\t\t:aria-label=\"$t( 'my-account' )\"\n\t\t\t\t\trole=\"img\"\n\t\t\t\t\taria-hidden=\"false\"\n\t\t\t\t>\n\t\t\t\t\tmdi-account-circle\n\t\t\t\t</v-icon>\n\t\t\t</v-btn>\n\t\t</template>\n\t\t<v-list\n\t\t\tdense\n\t\t\tnav\n\t\t>\n\t\t\t<v-list-item>\n\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t<v-icon>mdi-account-circle</v-icon>\n\t\t\t\t</v-list-item-icon>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ user.username }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\t\t\t<v-list-item\n\t\t\t\t:to=\"{ name: 'developersettings' }\"\n\t\t\t>\n\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t<v-icon>mdi-file-code</v-icon>\n\t\t\t\t</v-list-item-icon>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ $t( 'developersettings' ) }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\t\t\t<v-list-item\n\t\t\t\t:to=\"{ name: 'favorites' }\"\n\t\t\t>\n\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t<v-icon>mdi-star</v-icon>\n\t\t\t\t</v-list-item-icon>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ $t( 'favorites-pagetitle' ) }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\n\t\t\t<v-list-item\n\t\t\t\t:to=\"{ name: 'lists' }\"\n\t\t\t>\n\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t<v-icon>mdi-view-list</v-icon>\n\t\t\t\t</v-list-item-icon>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ $t( 'lists-yourlists' ) }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\t\t\t<v-divider />\n\n\t\t\t<v-list-item\n\t\t\t\thref=\"/user/logout/\"\n\t\t\t>\n\t\t\t\t<v-list-item-icon>\n\t\t\t\t\t<v-icon>mdi-logout</v-icon>\n\t\t\t\t</v-list-item-icon>\n\t\t\t\t<v-list-item-content>\n\t\t\t\t\t<v-list-item-title>\n\t\t\t\t\t\t{{ $t( \"logout\" ) }}\n\t\t\t\t\t</v-list-item-title>\n\t\t\t\t</v-list-item-content>\n\t\t\t</v-list-item>\n\t\t</v-list>\n\t</v-menu>\n\t<v-btn\n\t\tv-else\n\t\tclass=\"ma-1 white--text\"\n\t\tcolor=\"secondary\"\n\t\t:href=\"loginHref\"\n\t\t:disabled=\"loading\"\n\t\t:loading=\"loading\"\n\t\t@click=\"loading = true\"\n\t>\n\t\t{{ $t( \"login\" ) }}\n\t\t<v-icon>mdi-login</v-icon>\n\t</v-btn>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nexport default {\n\tname: 'UserStatus',\n\tdata() {\n\t\treturn {\n\t\t\tloading: false\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'user', [ 'user' ] ),\n\t\tloginHref() {\n\t\t\treturn '/user/login/?next=' + this.$route.path;\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/array.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/array.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":12,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":12,"endColumn":62,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":13,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":14,"endColumn":20,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":15,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":15,"endColumn":68,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/casl.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/casl.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":16,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":16,"endColumn":49,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '__caslSubjectType__'.","line":16,"column":12,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":16,"endColumn":37,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '__caslSubjectType__'.","line":17,"column":12,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":17,"endColumn":37,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":28,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":28,"endColumn":49,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '__caslSubjectType__'.","line":28,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":28,"endColumn":37,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '__caslSubjectType__'.","line":29,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":29,"endColumn":37,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/diff.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/diff.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":158,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":158,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":159,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":159,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":160,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":160,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":161,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":161,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":162,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":162,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/event-bus.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/metadata.js","messages":[],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'pagekey' dynamic key is used'","line":6,"column":19,"nodeType":"CallExpression","endLine":6,"endColumn":36,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'metaTitle' dynamic key is used'","line":12,"column":9,"nodeType":"CallExpression","endLine":12,"endColumn":36,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"''metadata-'+pagekey+'-description'' dynamic key is used'","line":17,"column":9,"nodeType":"CallExpression","endLine":17,"endColumn":57,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/metadata.spec.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/notifications.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/notifications.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":50,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":50,"endColumn":56,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":51,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":51,"endColumn":41,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":52,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":52,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":52,"column":12,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":52,"endColumn":24,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/object.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":16,"column":34,"nodeType":"SpreadElement","messageId":"forbidden","endLine":16,"endColumn":42}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"/**\n * Remove null and undefined values from an object.\n *\n * @param {Object} obj - object to filter\n * @return {Object} new object\n */\nexport function filterEmpty( obj ) {\n\tif ( arguments.length === 0 ) {\n\t\treturn {};\n\t}\n\tif ( obj === undefined || obj === null ) {\n\t\treturn {};\n\t}\n\treturn Object.keys( obj )\n\t\t.filter( ( key ) => obj[ key ] !== null && obj[ key ] !== undefined )\n\t\t.reduce( ( accum, key ) => ( { ...accum, [ key ]: obj[ key ] } ), {} );\n}\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/object.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":12,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":12,"endColumn":63,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":13,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":14,"endColumn":20,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":15,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":15,"endColumn":69,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":19,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":19,"endColumn":78,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/tools.js","messages":[],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"''search-filter-wiki-'+parts[0]' dynamic key is used'","line":36,"column":11,"nodeType":"CallExpression","endLine":36,"endColumn":55,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'prefix+cleanValue' dynamic key is used'","line":56,"column":9,"nodeType":"CallExpression","endLine":56,"endColumn":38,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/tools.spec.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/validation.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-vars","severity":2,"message":"'url' is assigned a value but never used.","line":17,"column":9,"nodeType":"Identifier","messageId":"unusedVar","endLine":17,"endColumn":12,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/helpers/validation.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":33,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":33,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":47,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":47,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/main.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/i18n/fallback.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/i18n/formatter.js","messages":[],"suppressedMessages":[{"ruleId":"no-console","severity":2,"message":"Unexpected console statement.","line":38,"column":5,"nodeType":"MemberExpression","messageId":"unexpected","endLine":38,"endColumn":17,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/i18n/index.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/notify/component.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":30,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":30,"endColumn":42},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":34,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":34,"endColumn":52}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container id=\"notifications\">\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-alert\n\t\t\t\t\tv-for=\"message in messages\"\n\t\t\t\t\t:key=\"message.id\"\n\t\t\t\t\t:type=\"message.type\"\n\t\t\t\t\t:prominent=\"message.prominent\"\n\t\t\t\t\t:dense=\"message.prominent\"\n\t\t\t\t\tborder=\"left\"\n\t\t\t\t\tclass=\"mx-auto\"\n\t\t\t\t\tdismissible\n\t\t\t\t\ttransition=\"fade-transition\"\n\t\t\t\t\t:close-label=\"$t( 'message-close' )\"\n\t\t\t\t\t@input=\"close( message )\"\n\t\t\t\t>\n\t\t\t\t\t{{ message.message }}\n\t\t\t\t</v-alert>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex';\n\nexport default {\n\tcomputed: {\n\t\t...mapState( 'notify', [ 'messages' ] )\n\t},\n\n\tmethods: {\n\t\t...mapMutations( 'notify', [ 'onClearMessage' ] ),\n\n\t\t/**\n\t\t * Remove a message.\n\t\t *\n\t\t * @param {Object} payload - Message object\n\t\t * @param {string} payload.id = Message id\n\t\t */\n\t\tclose( payload ) {\n\t\t\tthis.onClearMessage( payload.id );\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/notify/index.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/notify/index.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":23,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":23,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":32,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":32,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":41,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":41,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":50,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":50,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":59,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":59,"endColumn":54,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":73,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":73,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":74,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":74,"endColumn":59,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":75,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":75,"endColumn":52,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/notify/vuex.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/notify/vuex.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":24,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":24,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":46,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":46,"endColumn":49,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":52,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":52,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":71,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":71,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":85,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":85,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":99,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":99,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":113,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":113,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":125,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":125,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":152,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":152,"endColumn":63,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":159,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":159,"endColumn":63,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":173,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":173,"endColumn":51,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/pattern-regex.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/pattern-regex.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":16,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":16,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/swagger.js","messages":[],"suppressedMessages":[{"ruleId":"dot-notation","severity":2,"message":"[\"Accept\"] is better written in dot notation.","line":25,"column":20,"nodeType":"Literal","messageId":"useDot","endLine":25,"endColumn":28,"fix":{"range":[685,697],"text":".Accept"},"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/swagger.spec.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/plugins/vuetify.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/router/index.js","messages":[{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":7,"column":30,"nodeType":"ImportExpression","messageId":"forbidden","endLine":7,"endColumn":110},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":8,"column":23,"nodeType":"ImportExpression","messageId":"forbidden","endLine":8,"endColumn":88},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":9,"column":25,"nodeType":"ImportExpression","messageId":"forbidden","endLine":9,"endColumn":95},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":10,"column":30,"nodeType":"ImportExpression","messageId":"forbidden","endLine":10,"endColumn":110},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":11,"column":30,"nodeType":"ImportExpression","messageId":"forbidden","endLine":11,"endColumn":117},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":12,"column":33,"nodeType":"ImportExpression","messageId":"forbidden","endLine":12,"endColumn":119},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":13,"column":37,"nodeType":"ImportExpression","messageId":"forbidden","endLine":13,"endColumn":120},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":14,"column":25,"nodeType":"ImportExpression","messageId":"forbidden","endLine":14,"endColumn":95},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":15,"column":27,"nodeType":"ImportExpression","messageId":"forbidden","endLine":15,"endColumn":103},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":16,"column":33,"nodeType":"ImportExpression","messageId":"forbidden","endLine":16,"endColumn":112},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":17,"column":24,"nodeType":"ImportExpression","messageId":"forbidden","endLine":17,"endColumn":94},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":18,"column":21,"nodeType":"ImportExpression","messageId":"forbidden","endLine":18,"endColumn":85},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":19,"column":30,"nodeType":"ImportExpression","messageId":"forbidden","endLine":19,"endColumn":110},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":20,"column":23,"nodeType":"ImportExpression","messageId":"forbidden","endLine":20,"endColumn":89},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":21,"column":29,"nodeType":"ImportExpression","messageId":"forbidden","endLine":21,"endColumn":107},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":22,"column":22,"nodeType":"ImportExpression","messageId":"forbidden","endLine":22,"endColumn":86},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":23,"column":27,"nodeType":"ImportExpression","messageId":"forbidden","endLine":23,"endColumn":103},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":24,"column":33,"nodeType":"ImportExpression","messageId":"forbidden","endLine":24,"endColumn":112},{"ruleId":"es-x/no-dynamic-import","severity":2,"message":"ES2020 'import()' syntax is forbidden.","line":25,"column":24,"nodeType":"ImportExpression","messageId":"forbidden","endLine":25,"endColumn":94}],"suppressedMessages":[],"errorCount":19,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"import Vue from 'vue';\nimport VueRouter from 'vue-router';\nimport Home from '../views/Home.vue';\n\nVue.use( VueRouter );\n\nconst AddRemoveTools = () => import( /* webpackChunkName: \"addremovetools\" */ '../views/AddRemoveTools.vue' );\nconst ApiDocs = () => import( /* webpackChunkName: \"apidoc\" */ '../views/ApiDocs.vue' );\nconst AuditLogs = () => import( /* webpackChunkName: \"auditlogs\" */ '../views/AuditLogs.vue' );\nconst CrawlerHistory = () => import( /* webpackChunkName: \"crawlerhistory\" */ '../views/CrawlerHistory.vue' );\nconst CreateEditList = () => import( /* webpackChunkName: \"lists-edit\" */ '../components/lists/CreateEditList.vue' );\nconst DeveloperSettings = () => import( /* webpackChunkName: \"developersettings\" */ '../views/DeveloperSettings.vue' );\nconst EditToolOrAnnotations = () => import( /* webpackChunkName: \"tools-edit\" */ '../views/EditToolOrAnnotations.vue' );\nconst Favorites = () => import( /* webpackChunkName: \"favorites\" */ '../views/Favorites.vue' );\nconst ListHistory = () => import( /* webpackChunkName: \"lists-history\" */ '../views/ListHistory.vue' );\nconst ListRevisionsDiff = () => import( /* webpackChunkName: \"lists-diff\" */ '../views/ListRevisionsDiff.vue' );\nconst ListView = () => import( /* webpackChunkName: \"lists-view\" */ '../views/ListView.vue' );\nconst Lists = () => import( /* webpackChunkName: \"lists\" */ '../views/MyLists.vue' );\nconst PublishedLists = () => import( /* webpackChunkName: \"publishedlists\" */ '../views/PublishedLists.vue' );\nconst Members = () => import( /* webpackChunkName: \"members\" */ '../views/Members.vue' );\nconst RecentChanges = () => import( /* webpackChunkName: \"recentchanges\" */ '../views/RecentChanges.vue' );\nconst Search = () => import( /* webpackChunkName: \"search\" */ '../views/Search.vue' );\nconst ToolHistory = () => import( /* webpackChunkName: \"tools-history\" */ '../views/ToolHistory.vue' );\nconst ToolRevisionsDiff = () => import( /* webpackChunkName: \"tools-diff\" */ '../views/ToolRevisionsDiff.vue' );\nconst ToolView = () => import( /* webpackChunkName: \"tools-view\" */ '../views/ToolView.vue' );\n\nexport const routes = [\n\t{\n\t\tname: 'addremovetools',\n\t\tpath: '/add-or-remove-tools',\n\t\tcomponent: AddRemoveTools,\n\t\tmeta: {\n\t\t\ticon: 'mdi-folder-multiple-plus-outline'\n\t\t}\n\t},\n\t{\n\t\tname: 'publishedlists',\n\t\tpath: '/published-lists',\n\t\tcomponent: PublishedLists,\n\t\tmeta: {\n\t\t\ticon: 'mdi-view-list'\n\t\t}\n\t},\n\t{\n\t\tname: 'apidocs',\n\t\tpath: '/api-docs',\n\t\tcomponent: ApiDocs,\n\t\tmeta: {\n\t\t\ticon: 'mdi-api'\n\t\t}\n\t},\n\t{\n\t\tname: 'crawlerhistory',\n\t\tpath: '/crawler-history',\n\t\tcomponent: CrawlerHistory,\n\t\tmeta: {\n\t\t\ticon: 'mdi-history'\n\t\t}\n\t},\n\t{\n\t\tname: 'recentchanges',\n\t\tpath: '/recent',\n\t\tcomponent: RecentChanges,\n\t\tmeta: {\n\t\t\ticon: 'mdi-file-search-outline'\n\t\t}\n\t},\n\t{\n\t\tname: 'auditlogs',\n\t\tpath: '/audit-logs',\n\t\tcomponent: AuditLogs,\n\t\tmeta: {\n\t\t\ticon: 'mdi-data-matrix'\n\t\t}\n\t},\n\t{\n\t\tname: 'members',\n\t\tpath: '/members',\n\t\tcomponent: Members,\n\t\tmeta: {\n\t\t\ticon: 'mdi-account-group'\n\t\t}\n\t},\n\t{\n\t\tname: 'home',\n\t\tpath: '/',\n\t\tcomponent: Home\n\t},\n\t{\n\t\tname: 'tools-view',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})',\n\t\tcomponent: ToolView\n\t},\n\t{\n\t\tname: 'tools-edit',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})/edit',\n\t\tcomponent: EditToolOrAnnotations\n\t},\n\t{\n\t\tname: 'tools-edit-annotations',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})/edit-annotations',\n\t\tcomponent: EditToolOrAnnotations\n\t},\n\t{\n\t\tname: 'tools-history',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})/history',\n\t\tcomponent: ToolHistory\n\t},\n\t{\n\t\tname: 'tools-revision',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})/history/revision/:revId(\\\\d+)',\n\t\tcomponent: ToolView\n\t},\n\t{\n\t\tname: 'tools-diff',\n\t\tpath: '/tools/:name([\\\\w%-]{1,255})/history/revision/:revId(\\\\d+)/diff/:otherRevId(\\\\d+)',\n\t\tcomponent: ToolRevisionsDiff\n\t},\n\t{\n\t\tname: 'favorites',\n\t\tpath: '/favorites',\n\t\tcomponent: Favorites\n\t},\n\t{\n\t\tname: 'lists',\n\t\tpath: '/lists',\n\t\tcomponent: Lists\n\t},\n\t{\n\t\tname: 'lists-view',\n\t\tpath: '/lists/:id(\\\\d+)',\n\t\tcomponent: ListView\n\t},\n\t{\n\t\tname: 'lists-edit',\n\t\tpath: '/lists/:id(\\\\d+)/edit',\n\t\tcomponent: CreateEditList\n\t},\n\t{\n\t\tname: 'lists-create',\n\t\tpath: '/lists/create',\n\t\tcomponent: CreateEditList\n\t},\n\t{\n\t\tname: 'lists-history',\n\t\tpath: '/lists/:id(\\\\d+)/history',\n\t\tcomponent: ListHistory\n\t},\n\t{\n\t\tname: 'lists-revision',\n\t\tpath: '/lists/:id(\\\\d+)/history/revision/:revId(\\\\d+)',\n\t\tcomponent: ListView\n\t},\n\t{\n\t\tname: 'lists-diff',\n\t\tpath: '/lists/:id(\\\\d+)/history/revision/:revId(\\\\d+)/diff/:otherRevId(\\\\d+)',\n\t\tcomponent: ListRevisionsDiff\n\t},\n\t{\n\t\tname: 'developersettings',\n\t\tpath: '/developer-settings',\n\t\tcomponent: DeveloperSettings\n\t},\n\t{\n\t\tname: 'search',\n\t\tpath: '/search',\n\t\tcomponent: Search\n\t}\n];\n\n/**\n * Handle scrolling on navigation.\n *\n * @param {Object} to - Route being navigated to\n * @param {Object} from - Route being navigated from\n * @param {?Object} savedPosition - Popstate navigation prior position\n * @return {Object}\n */\nexport function scrollBehavior( to, from, savedPosition ) {\n\tif ( savedPosition ) {\n\t\treturn savedPosition;\n\t}\n\tif ( to.hash ) {\n\t\treturn { selector: to.hash };\n\t}\n\treturn { x: 0, y: 0 };\n}\n\nexport default new VueRouter( {\n\tmode: 'history',\n\tbase: '/',\n\troutes,\n\tscrollBehavior\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/router/index.spec.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/api.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":78,"column":14,"nodeType":"SpreadElement","messageId":"forbidden","endLine":78,"endColumn":28}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"import Vue from 'vue';\nimport Vuex from 'vuex';\nimport SwaggerClient from 'swagger-client';\n\nimport {\n\tOPENAPI_SCHEMA_URL,\n\tmakeApiCall\n} from '@/plugins/swagger';\nimport { displayErrorNotification } from '@/helpers/notifications';\n\nVue.use( Vuex );\n\nexport const getters = {};\n\nexport const actions = {\n\t/**\n\t * Load the backend server's OpenAPI spec.\n\t *\n\t * @param {Object} context - Vuex context\n\t * @param {boolean} invalidateCache - Force fetching schema if true\n\t * @return {Promise<Object>}\n\t */\n\tfetchOpenAPISchema( context, invalidateCache = false ) {\n\t\t// Avoid loading the raw schema if we already have it in cache\n\t\tif ( !invalidateCache && context.state.schemaPromise ) {\n\t\t\treturn context.state.schemaPromise;\n\t\t}\n\n\t\tconst promise = makeApiCall(\n\t\t\tcontext, { url: OPENAPI_SCHEMA_URL }\n\t\t).then( ( response ) => {\n\t\t\tconst spec = response.body;\n\t\t\treturn SwaggerClient.resolve( { spec } );\n\t\t} ).then( ( { spec } ) => {\n\t\t\tcontext.commit( 'onSpecChanged', { spec } );\n\t\t\treturn spec;\n\t\t} ).catch( ( failure ) => {\n\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t} );\n\n\t\tcontext.commit( 'SCHEMA_PROMISE', promise );\n\t\treturn promise;\n\t},\n\n\t/**\n\t * Get an API operation schema.\n\t *\n\t * @param {Object} context - Vuex state\n\t * @param {string} opId - Operation id (e.g. 'tools_create')\n\t * @return {Promise<Object|undefined>}\n\t */\n\tgetOperationSchema( context, opId ) {\n\t\treturn context.dispatch( 'fetchOpenAPISchema' ).then( ( api ) => {\n\t\t\tfor ( const pathName in api.paths ) {\n\t\t\t\tconst path = api.paths[ pathName ];\n\t\t\t\tfor ( const method in path ) {\n\t\t\t\t\tconst operation = path[ method ];\n\t\t\t\t\tif ( operation.operationId === opId ) {\n\t\t\t\t\t\treturn operation;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new Error( `Operation ${opId} not found` );\n\t\t} );\n\t},\n\n\t/**\n\t * Get the schema for the request body of an operation.\n\t *\n\t * @param {Object} context - Vuex state\n\t * @param {string} opId - Operation id (e.g. 'tools_create')\n\t * @return {Promise<Object|undefined>}\n\t */\n\tgetRequestSchema( context, opId ) {\n\t\treturn context.dispatch( 'getOperationSchema', opId ).then(\n\t\t\t( data ) => {\n\t\t\t\tconst body = data.requestBody.content[ 'application/json' ];\n\t\t\t\treturn { ...body.schema };\n\t\t\t}\n\t\t);\n\t}\n};\n\nexport const mutations = {\n\t/**\n\t * Persist an OpenAPI spec change.\n\t *\n\t * @param {Object} state - Vuex state tree.\n\t * @param {Object} payload - mutation payload.\n\t * @param {Object} payload.spec - OpenAPI spec\n\t */\n\tonSpecChanged( state, { spec } ) {\n\t\tstate.apispec = spec;\n\t},\n\tSCHEMA_PROMISE( state, promise ) {\n\t\tstate.schemaPromise = promise;\n\t}\n};\n\nexport default {\n\tnamespaced: true,\n\tstate: {\n\t\tapispec: null,\n\t\tschemaPromise: null\n\t},\n\tgetters: getters,\n\tactions: actions,\n\tmutations: mutations,\n\tstrict: process.env.NODE_ENV !== 'production'\n};\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/api.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":80,"column":40,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":102,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":104,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":116,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":121,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":138,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":140,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":160,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":87,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":87,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":97,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":97,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":108,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":108,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":109,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":109,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":115,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":115,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":122,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":122,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":131,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":131,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":141,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":141,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":155,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":155,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-vars","severity":2,"message":"'reject' is defined but never used.","line":170,"column":44,"nodeType":"Identifier","messageId":"unusedVar","endLine":170,"endColumn":50,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\tactions,\n\tmutations\n} from './api';\n\nconst spec = {\n\topenapi: '3.0.3',\n\tinfo: {\n\t\ttitle: 'Toolhub API',\n\t\tversion: '0.0.1',\n\t\tlicense: [ Object ]\n\t},\n\tcomponents: {\n\t\tschemas: [ Object ]\n\t},\n\tpaths: {\n\t\t'/api/auditlogs/': {\n\t\t\tget: {\n\t\t\t\toperationId: 'auditlogs_list',\n\t\t\t\tdescription: 'List all log entries.',\n\t\t\t\tparameters: [ Object ]\n\t\t\t}\n\t\t}\n\t},\n\t$$normalized: true\n};\n\ndescribe( 'store/api', () => {\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst dispatch = sinon.stub();\n\t\tconst state = {\n\t\t\tapispec: null,\n\t\t\tschemaPromise: null\n\t\t};\n\t\tconst rootState = { locale: { locale: 'en' } };\n\t\tconst context = { commit, dispatch, state, rootState };\n\n\t\tconst apiError = {\n\t\t\terrors: [ {\n\t\t\t\tfield: 'test field1',\n\t\t\t\tmessage: 'something went wrong'\n\t\t\t} ]\n\t\t};\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'fetchOpenAPISchema', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/schema/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: spec\n\t\t\t};\n\n\t\t\tit( 'should fetch open api schema', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/schema/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst promise = actions.fetchOpenAPISchema( context );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit.getCall( 0 ) ).to.have.been.calledWithExactly(\n\t\t\t\t\t'SCHEMA_PROMISE', promise\n\t\t\t\t);\n\n\t\t\t\tawait promise;\n\n\t\t\t\texpect( commit ).to.have.been.calledTwice;\n\t\t\t\texpect( commit.getCall( 1 ) ).to.have.been.calledWithExactly(\n\t\t\t\t\t'onSpecChanged', { spec }\n\t\t\t\t);\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tconst promise = actions.fetchOpenAPISchema( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'SCHEMA_PROMISE', promise\n\t\t\t\t);\n\n\t\t\t\tawait promise;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getOperationSchema', () => {\n\t\t\tit( 'should fetch an api operation schema', async () => {\n\t\t\t\texpect( state.schemaPromise ).to.be.null;\n\n\t\t\t\tdispatch.onFirstCall().returns(\n\t\t\t\t\t{ then: sinon.stub().yields( spec ) }\n\t\t\t\t);\n\t\t\t\tconst operation = await actions.getOperationSchema(\n\t\t\t\t\tcontext, 'auditlogs_list'\n\t\t\t\t);\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'fetchOpenAPISchema'\n\t\t\t\t);\n\t\t\t\texpect( operation ).to.equal(\n\t\t\t\t\tspec.paths[ '/api/auditlogs/' ].get\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should fail on unknown operations', async () => {\n\t\t\t\texpect( state.schemaPromise ).to.be.null;\n\n\t\t\t\tdispatch.onFirstCall().returns(\n\t\t\t\t\t{ then: sinon.stub().yields( spec ) }\n\t\t\t\t);\n\t\t\t\tlet operation;\n\t\t\t\ttry {\n\t\t\t\t\toperation = await actions.getOperationSchema(\n\t\t\t\t\t\tcontext, 'this-does-not-exist'\n\t\t\t\t\t);\n\t\t\t\t} catch ( err ) {\n\t\t\t\t\toperation = err;\n\t\t\t\t}\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'fetchOpenAPISchema'\n\t\t\t\t);\n\t\t\t\texpect( operation ).to.be.an.instanceof( Error );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store schemaPromise', () => {\n\t\t\tconst state = {\n\t\t\t\tschemaPromise: null\n\t\t\t};\n\t\t\t// eslint-disable-next-line no-unused-vars\n\t\t\tconst promise = new Promise( ( resolve, reject ) => {\n\t\t\t\tresolve( true );\n\t\t\t} );\n\t\t\tmutations.SCHEMA_PROMISE( state, promise );\n\t\t\texpect( state.schemaPromise ).to.equal( promise );\n\t\t} );\n\t\tit( 'should store apispec', () => {\n\t\t\tconst state = {\n\t\t\t\tapispec: null\n\t\t\t};\n\t\t\tmutations.onSpecChanged( state, { spec } );\n\t\t\texpect( state.apispec ).to.equal( spec );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/auditlogs.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/auditlogs.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":89,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":103,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":105,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":113,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":115,"column":51,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":124,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":96,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":96,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":99,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":99,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":110,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":110,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":111,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":111,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":112,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":112,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":122,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":122,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\tactions,\n\tmutations\n} from './auditlogs';\n\ndescribe( 'store/auditlogs', () => {\n\tconst auditLogsResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tid: 599,\n\t\t\t\ttimestamp: '2021-04-14T02:11:54.977936Z',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'Bot'\n\t\t\t\t},\n\t\t\t\ttarget: {\n\t\t\t\t\ttype: 'tool',\n\t\t\t\t\tid: 'random',\n\t\t\t\t\tlabel: 'random'\n\t\t\t\t},\n\t\t\t\taction: 'updated',\n\t\t\t\tmessage: 'test'\n\t\t\t}\n\t\t]\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst state = {};\n\t\tconst rootState = { locale: { locale: 'en' } };\n\t\tconst context = { commit, state, rootState };\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'fetchAuditLogs', () => {\n\t\t\tconst testPayload1 = {\n\t\t\t\tpage: 1,\n\t\t\t\tfilters: {\n\t\t\t\t\ttarget_type: 'tool',\n\t\t\t\t\tuser: 'Bot'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst testPayload2 = {\n\t\t\t\tpage: 2,\n\t\t\t\tfilters: {\n\t\t\t\t\ttarget_type: null,\n\t\t\t\t\tuser: 'Bot'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/auditlogs/?target_type=tool&user=Bot&page=1',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: auditLogsResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch logs', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/auditlogs/?target_type=tool&user=Bot&page=1'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.fetchAuditLogs( context, testPayload1 );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUDIT_LOGS', auditLogsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.fetchAuditLogs( context, testPayload1 );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should remove null or undefined filters', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/auditlogs/?user=Bot&page=2'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.fetchAuditLogs( context, testPayload2 );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store logs', () => {\n\t\t\tconst state = {\n\t\t\t\tauditLogs: [],\n\t\t\t\tnumLogs: 0\n\t\t\t};\n\t\t\tconst logs = {\n\t\t\t\tresults: auditLogsResponse.results,\n\t\t\t\tcount: auditLogsResponse.count\n\t\t\t};\n\t\t\tmutations.AUDIT_LOGS( state, logs );\n\n\t\t\texpect( state.auditLogs ).to.equal( logs.results );\n\t\t\texpect( state.numLogs ).to.equal( logs.count );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/crawler.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":11,"column":27,"nodeType":"FunctionExpression","messageId":"forbidden","endLine":33,"endColumn":3}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"import Vue from 'vue';\nimport Vuex from 'vuex';\nimport { makeApiCall, makeURLQueryParams } from '@/plugins/swagger';\nimport i18n from '@/plugins/i18n';\nimport { asUrl } from '@/helpers/casl';\nimport { displayErrorNotification } from '@/helpers/notifications';\n\nVue.use( Vuex );\n\nexport const actions = {\n\tasync fetchCrawlerHistory( context, payload ) {\n\n\t\tconst filters = payload.filters;\n\t\tconst params = [\n\t\t\t[ 'page', payload.page ],\n\t\t\t[ 'ordering', filters.runs_ordering ]\n\t\t];\n\n\t\tconst cleanParams = makeURLQueryParams( params );\n\n\t\tlet history = [];\n\t\tconst request1 = { url: '/api/crawler/runs/?' + cleanParams.toString() };\n\n\t\treturn makeApiCall( context, request1 ).then(\n\t\t\t( success1 ) => {\n\t\t\t\thistory = success1.body;\n\t\t\t\tcontext.commit( 'CRAWLER_HISTORY', history );\n\t\t\t},\n\t\t\t( failure ) => {\n\t\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t\t}\n\t\t);\n\t},\n\n\tfetchCrawlerUrls( context, payload ) {\n\n\t\tconst filters = payload.filters;\n\t\tconst params = [\n\t\t\t[ 'page', payload.page ],\n\t\t\t[ 'ordering', filters.urls_ordering ]\n\t\t];\n\n\t\tconst cleanParams = makeURLQueryParams( params );\n\n\t\tconst request = {\n\t\t\turl: '/api/crawler/runs/' + payload.runId + '/urls/?' + cleanParams.toString()\n\t\t};\n\n\t\treturn makeApiCall( context, request ).then(\n\t\t\t( success ) => {\n\t\t\t\tcontext.commit( 'CRAWLER_URLS', success.body );\n\t\t\t},\n\t\t\t( failure ) => {\n\t\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t\t}\n\t\t);\n\t},\n\tregisterUrl( context, url ) {\n\t\tif ( !context.rootState.user.user.is_authenticated ) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tconst request = {\n\t\t\turl: '/api/crawler/urls/',\n\t\t\tmethod: 'POST',\n\t\t\tbody: JSON.stringify( { url: url } )\n\t\t};\n\t\treturn makeApiCall( context, request ).then(\n\t\t\t( success ) => {\n\t\t\t\tcontext.commit( 'REGISTER_URL', success.body );\n\t\t\t\tthis._vm.$notify.success( i18n.t( 'toolurlregistrationsuccess' ) );\n\t\t\t},\n\t\t\t( failure ) => {\n\t\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t\t}\n\t\t);\n\t},\n\tunregisterUrl( context, urlObj ) {\n\t\tif ( !context.rootState.user.user.is_authenticated ) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\tconst request = {\n\t\t\turl: '/api/crawler/urls/' + urlObj.id + '/',\n\t\t\tmethod: 'DELETE'\n\t\t};\n\n\t\treturn makeApiCall( context, request ).then(\n\t\t\t() => {\n\t\t\t\tcontext.commit( 'UNREGISTER_URL', urlObj.url );\n\t\t\t\tthis._vm.$notify.success( i18n.t( 'toolurlunregistrationsuccess' ) );\n\t\t\t},\n\t\t\t( failure ) => {\n\t\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t\t}\n\t\t);\n\t},\n\tgetUrlsCreatedByUser( context, payload ) {\n\t\tif ( !context.rootState.user.user.is_authenticated ) {\n\t\t\tthis._vm.$notify.info(\n\t\t\t\ti18n.t( 'addremovetools-nologintext' )\n\t\t\t);\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tconst filters = payload.filters;\n\t\tconst params = [\n\t\t\t[ 'page', payload.page ],\n\t\t\t[ 'ordering', filters.ordering ]\n\t\t];\n\n\t\tconst cleanParams = makeURLQueryParams( params );\n\n\t\tconst request = {\n\t\t\turl: '/api/crawler/urls/self/?' + cleanParams.toString(),\n\t\t\tmethod: 'GET'\n\t\t};\n\n\t\treturn makeApiCall( context, request ).then(\n\t\t\t( success ) => {\n\t\t\t\tcontext.commit( 'USER_CREATED_URLS', success.body );\n\t\t\t},\n\t\t\t( failure ) => {\n\t\t\t\tdisplayErrorNotification.call( this, failure );\n\t\t\t}\n\t\t);\n\t}\n};\n\nexport const mutations = {\n\tCRAWLER_HISTORY( state, history ) {\n\t\tstate.crawlerHistory = history.results;\n\t\tstate.lastCrawlerRun = history.results[ 0 ];\n\t\tstate.numCrawlerRuns = history.count;\n\t},\n\tCRAWLER_URLS( state, urls ) {\n\t\tstate.crawlerUrls = urls.results;\n\t\tstate.numCrawlerUrls = urls.count;\n\t},\n\tUSER_CREATED_URLS( state, urls ) {\n\t\tstate.userCreatedUrls = asUrl( urls.results );\n\t\tstate.numUserCreatedUrls = urls.count;\n\t},\n\tREGISTER_URL( state, url ) {\n\t\tstate.userCreatedUrls.push( asUrl( url ) );\n\t\tstate.numUserCreatedUrls += 1;\n\t},\n\tUNREGISTER_URL( state, url ) {\n\t\tconst index = state.userCreatedUrls.findIndex(\n\t\t\t( obj ) => obj.url === url\n\t\t);\n\t\tstate.userCreatedUrls.splice( index, 1 );\n\t\tstate.numUserCreatedUrls -= 1;\n\t}\n};\n\nexport default {\n\tnamespaced: true,\n\tstate: {\n\t\tcrawlerHistory: [],\n\t\tcrawlerUrls: [],\n\t\tlastCrawlerRun: [],\n\t\tuserCreatedUrls: [],\n\t\tnumUserCreatedUrls: 0,\n\t\tnumCrawlerRuns: 0,\n\t\tnumCrawlerUrls: 0\n\t},\n\tactions,\n\tmutations,\n\t// Strict mode in development/testing, but disabled for performance in prod\n\tstrict: process.env.NODE_ENV !== 'production'\n};\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/crawler.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":103,"column":32,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":117,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":119,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":126,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":149,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":163,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":165,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":172,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":187,"column":52,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":197,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":199,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":211,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":213,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":221,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":236,"column":52,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":246,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":248,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":258,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":260,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":266,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":288,"column":52,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":299,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":301,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":315,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":317,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":324,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":110,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":110,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":113,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":113,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":123,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":123,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":124,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":124,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":125,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":125,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":156,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":156,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":159,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":159,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":169,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":169,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":170,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":170,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":171,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":171,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":194,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":194,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":205,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":205,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":207,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":207,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":210,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":210,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":210,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":210,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":218,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":218,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":220,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":220,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":243,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":243,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":254,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":254,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":255,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":255,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":257,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":257,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":257,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":257,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":264,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":264,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":265,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":265,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":296,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":296,"endColumn":61,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":296,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":296,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":297,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":297,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":307,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":307,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":311,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":311,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":321,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":321,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":322,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":322,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":323,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":323,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":13,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { asUrl } from '@/helpers/casl';\nimport {\n\tactions,\n\tmutations\n} from './crawler';\n\ndescribe( 'store/crawler', () => {\n\tconst crawlerHistoryResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tid: 1,\n\t\t\t\tstart_date: '2021-03-05T01:24:41.816288Z',\n\t\t\t\tend_date: '2021-03-05T01:25:24.528516Z',\n\t\t\t\tcrawled_urls: 2,\n\t\t\t\tnew_tools: 365,\n\t\t\t\tupdated_tools: 0,\n\t\t\t\ttotal_tools: 365\n\t\t\t}\n\t\t]\n\t};\n\n\tconst crawlerUrlsResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tid: 7,\n\t\t\t\turl: 'http://test124.com',\n\t\t\t\tcreated_by: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'Srish'\n\t\t\t\t},\n\t\t\t\tcreated_date: '2021-04-23T18:12:42.148717Z'\n\t\t\t}\n\t\t]\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tconst testUrlObj = crawlerUrlsResponse.results[ 0 ];\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { is_authenticated: true, csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, rootState };\n\n\t\tconst stubThis = {\n\t\t\t_vm: {\n\t\t\t\t$notify: {\n\t\t\t\t\tinfo: sinon.stub(),\n\t\t\t\t\tsuccess: sinon.stub()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'fetchCrawlerHistory', () => {\n\t\t\tconst testPayload = {\n\t\t\t\tpage: 2,\n\t\t\t\tfilters: {\n\t\t\t\t\truns_ordering: '-crawled_urls'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst url = '/api/crawler/runs/?page=2&ordering=-crawled_urls';\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: crawlerHistoryResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch history', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.fetchCrawlerHistory( context, testPayload );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CRAWLER_HISTORY', crawlerHistoryResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.fetchCrawlerHistory( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'fetchCrawlerUrls', () => {\n\n\t\t\tconst testPayload = {\n\t\t\t\tpage: 1,\n\t\t\t\trunId: 7,\n\t\t\t\tfilters: {\n\t\t\t\t\turls_ordering: '-url__url'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst url = '/api/crawler/runs/7/urls/?page=1&ordering=-url__url';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: crawlerUrlsResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch urls', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.fetchCrawlerUrls( context, testPayload );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CRAWLER_URLS', crawlerUrlsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.fetchCrawlerUrls( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'registerUrl', () => {\n\n\t\t\tconst url = '/api/crawler/urls/';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify( testUrlObj )\n\t\t\t};\n\n\t\t\tit( 'should return when user is not logged in', async () => {\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tcontext.rootState.user.user.is_authenticated = false;\n\n\t\t\t\tawait actions.registerUrl( context, url );\n\n\t\t\t\texpect( http ).to.not.have.been.called;\n\n\t\t\t\tcontext.rootState.user.user.is_authenticated = true;\n\t\t\t} );\n\n\t\t\tit( 'should log success', async () => {\n\t\t\t\thttp.resolves( response );\n\t\t\t\tconst registerUrl = actions.registerUrl.bind( stubThis );\n\n\t\t\t\tawait registerUrl( context, url );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.registerUrl( context, url );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'unregisterUrl', () => {\n\n\t\t\tconst url = '/api/crawler/urls/' + testUrlObj.id + '/';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: {}\n\t\t\t};\n\n\t\t\tit( 'should return when user is not logged in', async () => {\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tcontext.rootState.user.user.is_authenticated = false;\n\n\t\t\t\tawait actions.unregisterUrl( context, url );\n\n\t\t\t\texpect( http ).to.not.have.been.called;\n\n\t\t\t\tcontext.rootState.user.user.is_authenticated = true;\n\t\t\t} );\n\n\t\t\tit( 'should log success', async () => {\n\t\t\t\thttp.resolves( response );\n\t\t\t\tconst unregisterUrl = actions.unregisterUrl.bind( stubThis );\n\n\t\t\t\tawait unregisterUrl( context, url );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.unregisterUrl( context, url );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getUrlsCreatedByUser', () => {\n\t\t\tconst testPayload = {\n\t\t\t\tpage: 1,\n\t\t\t\tfilters: {\n\t\t\t\t\tordering: '-created_date'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst url = '/api/crawler/urls/self/?page=1&ordering=-created_date';\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t},\n\t\t\t\tbody: crawlerUrlsResponse\n\t\t\t};\n\n\t\t\tit( 'should return when user is not logged in', async () => {\n\t\t\t\thttp.resolves( response );\n\t\t\t\tcontext.rootState.user.user.is_authenticated = false;\n\t\t\t\tconst getUrlsCreatedByUser = actions.getUrlsCreatedByUser.bind( stubThis );\n\n\t\t\t\tawait getUrlsCreatedByUser( context, testPayload );\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.info ).to.have.been.called;\n\t\t\t\texpect( http ).to.not.have.been.called;\n\t\t\t\tcontext.rootState.user.user.is_authenticated = true;\n\t\t\t} );\n\n\t\t\tit( 'should fetch urls created by user', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( { url }, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getUrlsCreatedByUser( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'USER_CREATED_URLS', crawlerUrlsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getUrlsCreatedByUser( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store crawler history and urls', () => {\n\t\t\tconst state = {\n\t\t\t\tcrawlerHistory: [],\n\t\t\t\tcrawlerUrls: [],\n\t\t\t\tlastCrawlerRun: [],\n\t\t\t\tnumCrawlerRuns: 0,\n\t\t\t\tnumCrawlerUrls: 0\n\t\t\t};\n\n\t\t\tconst history = {\n\t\t\t\tresults: crawlerHistoryResponse.results,\n\t\t\t\tcount: crawlerHistoryResponse.count\n\t\t\t};\n\n\t\t\tmutations.CRAWLER_HISTORY( state, history );\n\t\t\texpect( state.crawlerHistory ).to.equal( history.results );\n\t\t\texpect( state.numCrawlerRuns ).to.equal( history.count );\n\t\t\texpect( state.lastCrawlerRun ).to.equal( history.results[ 0 ] );\n\n\t\t\tconst urls = {\n\t\t\t\tresults: crawlerUrlsResponse.results,\n\t\t\t\tcount: crawlerUrlsResponse.count\n\t\t\t};\n\n\t\t\tmutations.CRAWLER_URLS( state, urls );\n\t\t\texpect( state.crawlerUrls ).to.equal( urls.results );\n\t\t\texpect( state.numCrawlerUrls ).to.equal( urls.count );\n\t\t} );\n\n\t\tit( 'should store, register, and unregister user created urls', () => {\n\t\t\tconst state = {\n\t\t\t\tuserCreatedUrls: [],\n\t\t\t\tnumUserCreatedUrls: 0\n\t\t\t};\n\n\t\t\tconst urls = {\n\t\t\t\tresults: crawlerUrlsResponse.results,\n\t\t\t\tcount: crawlerUrlsResponse.count\n\t\t\t};\n\n\t\t\tmutations.USER_CREATED_URLS( state, urls );\n\t\t\texpect( state.userCreatedUrls ).to.eql( asUrl( urls.results ) );\n\t\t\texpect( state.numUserCreatedUrls ).to.equal( urls.count );\n\n\t\t\tmutations.REGISTER_URL( state, testUrlObj );\n\t\t\texpect( state.userCreatedUrls[ urls.count ] ).to.eql( asUrl( testUrlObj ) );\n\t\t\texpect( state.numUserCreatedUrls ).to.equal( urls.count + 1 );\n\n\t\t\tmutations.UNREGISTER_URL( state, testUrlObj.url );\n\t\t\texpect( state.userCreatedUrls[ urls.count ] ).to.not.eql( asUrl( testUrlObj ) );\n\t\t\texpect( state.numUserCreatedUrls ).to.equal( urls.count );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/favorites.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/favorites.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":70,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":86,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":88,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":95,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":106,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":124,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":126,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":133,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":143,"column":32,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":160,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":162,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":169,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":184,"column":34,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":198,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":200,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":212,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":214,"column":39,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":222,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":78,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":78,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":82,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":82,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":92,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":92,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":93,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":93,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":94,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":94,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":116,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":116,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":120,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":120,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":130,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":130,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":131,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":131,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":132,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":132,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":152,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":152,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":156,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":156,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":166,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":166,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":167,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":167,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":168,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":168,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":192,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":192,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":196,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":196,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":208,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":208,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":210,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":210,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":218,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":218,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":219,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":219,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":220,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":220,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":9,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { actions, mutations } from './favorites';\n\ndescribe( 'store/favorites', () => {\n\tconst favoritesResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tname: 'hay-directory',\n\t\t\t\ttitle: 'Tools Directory',\n\t\t\t\tdescription: 'A way to easily discover Wikimedia-related tools.',\n\t\t\t\turl: 'http://tools.wmflabs.org/hay/directory',\n\t\t\t\tkeywords: [ 'tools', 'recursion', 'discoverability' ],\n\t\t\t\tauthor: 'Hay Kranen',\n\t\t\t\ticon: null\n\t\t\t}\n\t\t]\n\t};\n\tconst toolResponse = favoritesResponse.results[ 0 ];\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\t// FIXME: can we extract this boilerplate to some shared location\n\t\tconst commit = sinon.spy();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, state, rootState };\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'getFavoriteTools', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/user/favorites/?page=' + testPage,\n\t\t\t\tbody: favoritesResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch users favorite tools', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/favorites/?page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getFavoriteTools( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'FAVORITE_TOOLS', favoritesResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getFavoriteTools( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'addTool', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/user/favorites/',\n\t\t\t\tbody: toolResponse\n\t\t\t};\n\n\t\t\tit( 'should add a tool', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/favorites/',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: JSON.stringify( { name: toolResponse.name } )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.addTool( context, toolResponse.name );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'ADD_FAVORITE', toolResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.addTool( context, 'test-tool' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'removeTool', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/user/favorites/' + toolResponse.name + '/'\n\t\t\t};\n\n\t\t\tit( 'should remove a tool', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: response.url,\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.removeTool( context, toolResponse.name );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'REMOVE_FAVORITE', toolResponse.name\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.removeTool( context, 'test-tool' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'isFavorite', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/user/favorites/' + toolResponse.name + '/'\n\t\t\t};\n\t\t\tconst response404 = {\n\t\t\t\tok: false,\n\t\t\t\tstatusCode: 404,\n\t\t\t\turl: '/api/user/favorites/' + toolResponse.name + '/'\n\t\t\t};\n\n\t\t\tit( 'should find a favorite', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: response.url\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst resp = await actions.isFavorite( context, toolResponse.name );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.not.have.been.called;\n\t\t\t\texpect( resp ).to.equal( true );\n\t\t\t} );\n\n\t\t\tit( 'should return false on 404', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: response.url\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( response404 );\n\n\t\t\t\tconst resp = await actions.isFavorite( context, toolResponse.name );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.not.have.been.called;\n\t\t\t\texpect( resp ).to.equal( false );\n\t\t\t} );\n\n\t\t\tit( 'should log non-404 failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tconst resp = await actions.isFavorite( context, 'test-tool' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t\texpect( resp ).to.equal( false );\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store, add and remove user favorite tools', () => {\n\t\t\tconst state = {\n\t\t\t\tfavoriteTools: [],\n\t\t\t\tnumFavoriteTools: 0\n\t\t\t};\n\n\t\t\tmutations.FAVORITE_TOOLS( state, favoritesResponse );\n\t\t\texpect( state.favoriteTools ).to.eql( favoritesResponse.results );\n\t\t\texpect( state.numFavoriteTools ).to.eql( favoritesResponse.count );\n\t\t\tstate.favoriteTools = [];\n\t\t\tstate.numFavoriteTools = 0;\n\n\t\t\tmutations.ADD_FAVORITE( state, toolResponse );\n\t\t\texpect( state.favoriteTools[ 0 ] ).to.eql( toolResponse );\n\t\t\texpect( state.numFavoriteTools ).to.equal( 1 );\n\n\t\t\tmutations.REMOVE_FAVORITE( state, toolResponse.tool );\n\t\t\texpect( state.favoriteTools[ 0 ] ).to.not.eql( toolResponse );\n\t\t\texpect( state.numFavoriteTools ).to.equal( 0 );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/groups.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/groups.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":95,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":111,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":113,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":120,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":139,"column":42,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":168,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":170,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":188,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":207,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":235,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":237,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":256,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":103,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":103,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":107,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":107,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":117,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":117,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":118,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":118,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":119,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":119,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":149,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":149,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":153,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":153,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":178,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":178,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":179,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":179,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":217,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":217,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":221,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":221,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":246,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":246,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":247,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":247,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":6,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport i18n from '@/plugins/i18n';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\tactions,\n\tmutations\n} from './groups';\n\ndescribe( 'store/groups', () => {\n\tconst groupsResponse = {\n\t\tcount: 5,\n\t\tresults: [ {\n\t\t\tid: 1,\n\t\t\tname: 'Administrators'\n\t\t},\n\t\t{\n\t\t\tid: 2,\n\t\t\tname: 'Bureaucrats'\n\t\t},\n\t\t{\n\t\t\tid: 3,\n\t\t\tname: 'Oversighters'\n\t\t}\n\t\t] };\n\n\tconst testUsers = [ {\n\t\tid: 1,\n\t\tusername: 'admin',\n\t\tgroups: [ {\n\t\t\tid: 4,\n\t\t\tname: 'Patrollers'\n\t\t} ]\n\t}\n\t];\n\n\tconst groupModifiedResponse = {\n\t\tid: 2,\n\t\tname: 'Bureaucrats',\n\t\tusers: testUsers\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: {\n\t\t\t\tuser: {\n\t\t\t\t\tcsrf_token: 'abcd'\n\t\t\t\t},\n\t\t\t\tusers: testUsers\n\t\t\t}\n\t\t};\n\t\tconst context = { commit, state, rootState };\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'listAllUserGroups', () => {\n\t\t\tconst testPage = 2;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/groups/?page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: groupsResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch groups', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/groups/?page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.listAllUserGroups( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'GROUPS', groupsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.listAllUserGroups( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'addMemberToGroup', () => {\n\t\t\tconst testPayload = {\n\t\t\t\tgroup: { id: 2, name: 'Bureaucrats' },\n\t\t\t\tmember: { id: 1, username: 'admin' }\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/groups/' + testPayload.group.id + '/members/' +\n                    testPayload.member.id + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: groupModifiedResponse\n\t\t\t};\n\n\t\t\tit( 'should add a member to a group', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/groups/' + testPayload.group.id + '/members/' +\n                    testPayload.member.id + '/',\n\t\t\t\t\tmethod: 'PUT'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tawait actions.addMemberToGroup( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledTwice;\n\t\t\t\ttestUsers[ 0 ].groups.push( testPayload.group );\n\n\t\t\t\texpect( commit.args ).to.deep.equal( [\n\t\t\t\t\t[\n\t\t\t\t\t\t'user/USERS', { results: testUsers, count: testUsers.length },\n\t\t\t\t\t\t{ root: true }\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'NOTIFICATION', { message: i18n.t( 'members-groupadd-success',\n\t\t\t\t\t\t\t[ testPayload.member.username, testPayload.group.name ] ),\n\t\t\t\t\t\ttype: 'success' }\n\t\t\t\t\t]\n\t\t\t\t] );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\tconst error = {\n\t\t\t\t\tfield: 'add',\n\t\t\t\t\tmessage: 'Cannot add member to the group'\n\t\t\t\t};\n\t\t\t\thttp.rejects( error );\n\n\t\t\t\tawait actions.addMemberToGroup( context, testPayload );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'NOTIFICATION',\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage: i18n.t( 'apierror', [ error.message ] ),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'removeMemberFromGroup', () => {\n\t\t\tconst testPayload = {\n\t\t\t\tgroup: { id: 2, name: 'Bureaucrats' },\n\t\t\t\tmember: { id: 1, username: 'admin' }\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/groups/' + testPayload.group.id + '/members/' +\n                    testPayload.member.id + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: groupModifiedResponse\n\t\t\t};\n\n\t\t\tit( 'should remove a member to a group', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/groups/' + testPayload.group.id + '/members/' +\n                    testPayload.member.id + '/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tawait actions.removeMemberFromGroup( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledTwice;\n\t\t\t\ttestUsers[ 0 ].groups.pop();\n\n\t\t\t\texpect( commit.args ).to.deep.equal( [\n\t\t\t\t\t[\n\t\t\t\t\t\t'user/USERS', { results: testUsers, count: testUsers.length },\n\t\t\t\t\t\t{ root: true }\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'NOTIFICATION', { message: i18n.t( 'members-groupremove-success',\n\t\t\t\t\t\t\t[ testPayload.member.username, testPayload.group.name ] ),\n\t\t\t\t\t\ttype: 'success' }\n\t\t\t\t\t]\n\t\t\t\t] );\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\tconst error = {\n\t\t\t\t\tfield: 'remove',\n\t\t\t\t\tmessage: 'Cannot remove member to the group'\n\t\t\t\t};\n\t\t\t\thttp.rejects( error );\n\n\t\t\t\tawait actions.removeMemberFromGroup( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'NOTIFICATION',\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage: i18n.t( 'apierror', [ error.message ] ),\n\t\t\t\t\t\ttype: 'error'\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store groups', () => {\n\t\t\tconst state = {\n\t\t\t\tgroups: [],\n\t\t\t\tnumGroups: 0,\n\t\t\t\tnofitication: null\n\t\t\t};\n\n\t\t\tconst groups = {\n\t\t\t\tresults: groupsResponse.results,\n\t\t\t\tcount: groupsResponse.count\n\t\t\t};\n\n\t\t\tmutations.GROUPS( state, groups );\n\t\t\texpect( state.groups ).to.equal( groups.results );\n\t\t\texpect( state.numGroups ).to.equal( groups.count );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/index.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/lists.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/lists.spec.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":31,"column":4,"nodeType":"SpreadElement","messageId":"forbidden","endLine":31,"endColumn":24},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":50,"column":4,"nodeType":"SpreadElement","messageId":"forbidden","endLine":50,"endColumn":27},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":166,"column":39,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":182,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":184,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":192,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":205,"column":40,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":221,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":223,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":231,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":245,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":267,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":269,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":282,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":294,"column":42,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":311,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":313,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":321,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":333,"column":44,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":350,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":352,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":360,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":372,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":391,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":393,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":404,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":418,"column":28,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":435,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":437,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":442,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":456,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":472,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":474,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":479,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":493,"column":32,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":509,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":511,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":519,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":535,"column":50,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":549,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":551,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":564,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":581,"column":35,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":592,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":609,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":625,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":627,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":634,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":652,"column":47,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":668,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":670,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":677,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":699,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":714,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":716,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":726,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":743,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":756,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":758,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":766,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":784,"column":34,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":797,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":799,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":807,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":824,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":837,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":839,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":861,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":863,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":871,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":174,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":174,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":178,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":178,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":189,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":189,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":190,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":190,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":191,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":191,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":213,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":213,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":217,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":217,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":228,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":228,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":229,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":229,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":230,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":230,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":254,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":254,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":259,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":259,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":263,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":263,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":275,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":275,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":279,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":279,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":280,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":280,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":281,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":281,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":304,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":304,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":308,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":308,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":318,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":318,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":319,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":319,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":320,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":320,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":343,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":343,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":347,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":347,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":357,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":357,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":358,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":358,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":359,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":359,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":383,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":383,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":387,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":387,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":398,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":398,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":399,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":399,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":403,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":403,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":429,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":429,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":434,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":434,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":434,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":434,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":441,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":441,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":466,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":466,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":471,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":471,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":471,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":471,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":478,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":478,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":501,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":501,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":505,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":505,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":516,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":516,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":517,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":517,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":518,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":518,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":539,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":539,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":545,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":545,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":556,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":556,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":562,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":562,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":563,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":563,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":589,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":589,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":617,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":617,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":621,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":621,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":631,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":631,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":632,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":632,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":633,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":633,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":660,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":660,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":664,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":664,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":674,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":674,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":675,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":675,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":676,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":676,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":710,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":710,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":722,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":722,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":723,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":723,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":753,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":753,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":763,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":763,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":764,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":764,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":765,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":765,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":794,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":794,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":804,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":804,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":805,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":805,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":806,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":806,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":834,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":834,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":858,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":858,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":860,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":860,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":868,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":868,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":869,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":869,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":870,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":870,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":36,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\nimport { asList, asVersion } from '@/helpers/casl';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\tactions,\n\tmutations\n} from './lists';\n\ndescribe( 'store/lists', () => {\n\tconst shortListResponse = {\n\t\ttitle: 'test',\n\t\tdescription: null,\n\t\ticon: null,\n\t\ttools: [],\n\t\tcomment: '',\n\t\tpublished: true\n\t};\n\n\tconst listResponse = {\n\t\tcount: 1,\n\t\tresults: [ {\n\t\t\t...shortListResponse,\n\t\t\tid: 14,\n\t\t\tfavorites: false,\n\t\t\tfeatured: true\n\t\t} ]\n\t};\n\n\tconst shortListResponseTwo = {\n\t\ttitle: 'my private list',\n\t\tdescription: null,\n\t\ticon: null,\n\t\ttools: [],\n\t\tcomment: '',\n\t\tpublished: false\n\t};\n\n\tconst listResponseTwo = {\n\t\tcount: 1,\n\t\tresults: [ {\n\t\t\t...shortListResponseTwo,\n\t\t\tid: 14,\n\t\t\tfavorites: false,\n\t\t\tfeatured: false\n\t\t} ]\n\t};\n\n\tconst apiError = {\n\t\tcode: 4000,\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tconst listRevisionResponse1 = {\n\t\tcomment: 'This is a test edit!!',\n\t\tid: '596',\n\t\ttimestamp: '2021-04-27T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 3,\n\t\t\tusername: 'Alice'\n\t\t}\n\t};\n\n\tconst listRevisionResponse2 = {\n\t\tcomment: 'This is a test edit!!',\n\t\tid: '598',\n\t\ttimestamp: '2021-04-28T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 3,\n\t\t\tusername: 'Alice'\n\t\t}\n\t};\n\n\tconst listRevisionsResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\tlistRevisionResponse1, listRevisionResponse2\n\t\t]\n\t};\n\n\tconst diffRevisionResponse = {\n\t\toriginal: {\n\t\t\tid: 593,\n\t\t\ttimestamp: '2021-04-28T19:49:31.735437Z',\n\t\t\tuser: {\n\t\t\t\tid: 3,\n\t\t\t\tusername: 'Alice'\n\t\t\t},\n\t\t\tcomment: 'Test comment'\n\t\t},\n\t\toperations: [\n\t\t\t{\n\t\t\t\top: 'replace',\n\t\t\t\tpath: '/description',\n\t\t\t\tvalue: 'Coolest list ever'\n\t\t\t},\n\t\t\t{\n\t\t\t\top: 'replace',\n\t\t\t\tpath: '/title',\n\t\t\t\tvalue: 'super-cool-list'\n\t\t\t}\n\t\t],\n\t\tresult: {\n\t\t\tid: 596,\n\t\t\ttimestamp: '2021-04-28T20:12:08.025365Z',\n\t\t\tuser: {\n\t\t\t\tid: 3,\n\t\t\t\tusername: 'Alice'\n\t\t\t},\n\t\t\tcomment: 'Another test comment'\n\t\t}\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst dispatch = sinon.stub();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { username: 'unit tester', csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, dispatch, state, rootState };\n\t\tconst stubThis = {\n\t\t\t_vm: {\n\t\t\t\t$notify: {\n\t\t\t\t\tsuccess: sinon.stub()\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'getFeaturedLists', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/?featured=true&page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch featured lists', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/?featured=true&page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getFeaturedLists( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'FEATURED_LISTS', listResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getFeaturedLists( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getPublishedLists', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/?published=true&page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch published lists', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/?published=true&page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getPublishedLists( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'PUBLISHED_LISTS', listResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getFeaturedLists( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getMyLists', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst testPageSize = 10;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/?user=unit+tester&page=' + testPage + '&page_size=' + testPageSize,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listResponseTwo\n\t\t\t};\n\n\t\t\tit( 'should fetch private lists', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/?user=unit+tester&page=' + testPage + '&page_size=' + testPageSize\n\t\t\t\t}, context );\n\t\t\t\tdispatch.resolves( null );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getMyLists( context, { page: testPage, pageSize: testPageSize } );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWith(\n\t\t\t\t\t'user/getUserInfo', null, { root: true }\n\t\t\t\t);\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'MY_LISTS', listResponseTwo\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\tdispatch.resolves( null );\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getMyLists( context, { page: testPage, pageSize: testPageSize } );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWith(\n\t\t\t\t\t'user/getUserInfo', null, { root: true }\n\t\t\t\t);\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'featureList', () => {\n\t\t\tconst testId = 14;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/lists/' + testId + '/feature/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should mark a list as featured', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testId + '/feature/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst featureList = actions.featureList.bind( stubThis );\n\t\t\t\tawait featureList( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getListById', testId );\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.featureList( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'unfeatureList', () => {\n\t\t\tconst testId = 14;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/lists/' + testId + '/unfeature/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should mark a list as unfeatured', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testId + '/unfeature/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst unfeatureList = actions.unfeatureList.bind( stubThis );\n\t\t\t\tawait unfeatureList( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getListById', testId );\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.unfeatureList( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'createNewList', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl: '/api/lists/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify( shortListResponse )\n\t\t\t};\n\n\t\t\tit( 'should create list', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: JSON.stringify( shortListResponse )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst createNewList = actions.createNewList.bind( stubThis );\n\t\t\t\tawait createNewList( context, shortListResponse );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CREATE_LIST', JSON.stringify( shortListResponse )\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.createNewList( context, shortListResponse );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CREATE_LIST', false\n\t\t\t\t);\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'editList', () => {\n\t\t\tconst testId = 14;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl: '/api/lists/' + testId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify( listResponse )\n\t\t\t};\n\n\t\t\tit( 'should edit list', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testId + '/',\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\tbody: JSON.stringify( listResponse.results[ 0 ] )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst editList = actions.editList.bind( stubThis );\n\t\t\t\tawait editList( context, listResponse.results[ 0 ] );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.editList( context, listResponse.results[ 0 ] );\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'deleteList', () => {\n\t\t\tconst testId = 14;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl: '/api/lists/' + testId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: {}\n\t\t\t};\n\n\t\t\tit( 'should delete list', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testId + '/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst deleteList = actions.deleteList.bind( stubThis );\n\t\t\t\tawait deleteList( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.deleteList( context, testId );\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getListById', () => {\n\t\t\tconst testId = 14;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listResponse\n\t\t\t};\n\n\t\t\tit( 'should get list info', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testId + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getListById( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'LIST', listResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getListById( context, testId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\t\tdescribe( 'updateListRevisions', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\tpage: 1\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/?page=' + testList.page,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listRevisionsResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch and update list revisions', async () => {\n\t\t\t\tdispatch.onFirstCall().returns( { then: sinon.stub().yields( response ) } );\n\t\t\t\tactions.updateListRevisions( context, testList );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getRevisions', testList\n\t\t\t\t);\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'LIST_REVISIONS', listRevisionsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\tdispatch.onFirstCall().rejects( { errors: { error1: { field: 'Boom', message: 'Boom Boom' } } } );\n\n\t\t\t\tawait actions.updateListRevisions( context, testList );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getRevisions', testList\n\t\t\t\t);\n\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getRevisions', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\tpage: 1\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/?page=' + testList.page,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listRevisionsResponse\n\t\t\t};\n\n\t\t\tit( 'should return a promise', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: `/api/lists/${testList.id}/revisions/?page=${testList.page}`\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst promise = actions.getRevisions( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( promise ).to.be.an.instanceof( Promise );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getListRevision', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listRevisionResponse1\n\t\t\t};\n\n\t\t\tit( 'should fetch list revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getListRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'LIST_REVISION', listRevisionResponse1\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getListRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\t\tdescribe( 'getListRevisionsDiff', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 593,\n\t\t\t\totherId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/diff/' + testList.otherId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: diffRevisionResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch diff between revisions', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/diff/' + testList.otherId + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getListRevisionsDiff( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'DIFF_REVISION', diffRevisionResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getListRevisionsDiff( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'undoChangesBetweenRevisions', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 596,\n\t\t\t\tprevRevId: 595\n\t\t\t};\n\n\t\t\tconst id = testList.revId;\n\t\t\tconst prevId = testList.prevRevId;\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + id + '/undo/' + prevId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: listResponse\n\t\t\t};\n\n\t\t\tit( 'should undo between revisions', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + id + '/undo/' + prevId + '/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tcontext.state.listRevisions = listRevisionsResponse.results;\n\t\t\t\tawait actions.undoChangesBetweenRevisions( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\tcontext.state.listRevisions = [];\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tcontext.state.listRevisions = listRevisionsResponse.results;\n\t\t\t\tawait actions.undoChangesBetweenRevisions( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\n\t\t\t\tcontext.state.listRevisions = [];\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'restoreListToRevision', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/revert/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should restore list to a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/revert/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst restoreListToRevision = actions.restoreListToRevision.bind( stubThis );\n\t\t\t\tawait restoreListToRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.restoreListToRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'hideRevealRevision', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 596,\n\t\t\t\taction: 'hide'\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/' + testList.action + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should hide a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/' + testList.action + '/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst hideRevealRevision = actions.hideRevealRevision.bind( stubThis );\n\t\t\t\tawait hideRevealRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.hideRevealRevision( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'markRevisionAsPatrolled', () => {\n\t\t\tconst testList = {\n\t\t\t\tid: 14,\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/patrol/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should patrol a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/patrol/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst markRevisionAsPatrolled = actions.markRevisionAsPatrolled.bind( stubThis );\n\t\t\t\tawait markRevisionAsPatrolled( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should ignore error 4093', async () => {\n\t\t\t\tconst error4093 = {\n\t\t\t\t\tcode: 4093,\n\t\t\t\t\tmessage: 'Revision is already marked as patrolled.',\n\t\t\t\t\tstatus_code: 400,\n\t\t\t\t\terrors: [ {\n\t\t\t\t\t\tfield: 'detail',\n\t\t\t\t\t\tmessage: 'Revision is already marked as patrolled.'\n\t\t\t\t\t} ]\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/lists/' + testList.id + '/revisions/' + testList.revId + '/patrol/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( error4093 );\n\n\t\t\t\tconst markRevisionAsPatrolled = actions.markRevisionAsPatrolled.bind( stubThis );\n\t\t\t\tawait markRevisionAsPatrolled( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( displayErrorNotification ).to.have.not.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.markRevisionAsPatrolled( context, testList );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store featured lists, list, list created', () => {\n\t\t\tconst state = {\n\t\t\t\tfeaturedLists: [],\n\t\t\t\tlistCreated: {},\n\t\t\t\tlist: {}\n\t\t\t};\n\n\t\t\tmutations.FEATURED_LISTS( state, listResponse );\n\t\t\texpect( state.featuredLists ).to.eql( asList( listResponse ) );\n\n\t\t\tmutations.CREATE_LIST( state, shortListResponse );\n\t\t\texpect( state.listCreated ).to.eql( asList( shortListResponse ) );\n\n\t\t\tmutations.LIST( state, listResponse );\n\t\t\texpect( state.list ).to.eql( asList( listResponse ) );\n\t\t} );\n\n\t\tit( 'should store diff and list revisions', () => {\n\t\t\tconst state = {\n\t\t\t\tlistRevisions: [],\n\t\t\t\tnumRevisions: 0,\n\t\t\t\tdiffRevision: null,\n\t\t\t\tlistRevision: null\n\t\t\t};\n\n\t\t\tmutations.LIST_REVISIONS( state, listRevisionsResponse );\n\t\t\texpect( state.listRevisions ).to.eql( asVersion( listRevisionsResponse.results ) );\n\t\t\texpect( state.numRevisions ).to.equal( listRevisionsResponse.count );\n\n\t\t\tmutations.LIST_REVISION( state, listRevisionResponse1 );\n\t\t\texpect( state.listRevision ).to.eql( asVersion( listRevisionResponse1 ) );\n\n\t\t\tmutations.DIFF_REVISION( state, diffRevisionResponse );\n\t\t\texpect( state.diffRevision ).to.equal( diffRevisionResponse );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/locale.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":63,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":63,"endColumn":21},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":64,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":64,"endColumn":21},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":150,"column":15,"nodeType":"SpreadElement","messageId":"forbidden","endLine":150,"endColumn":33}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"import Vue from 'vue';\nimport Vuex from 'vuex';\nimport languageData from '@wikimedia/language-data';\nimport BananaFormatter from '@/plugins/i18n/formatter';\n\nVue.use( Vuex );\n\n// T271217: Setup i18n for moment library\nconst moment = require( 'moment' );\nrequire( 'moment/min/locales.min' );\nVue.use( require( 'vue-moment' ), {\n\tmoment\n} );\n\n// T269164: Add a qqx mapping to languageNameMap.\nlanguageData.addLanguage(\n\t'qqx',\n\t{ script: 'Latn', regions: [], autonym: 'QQX' }\n);\n\nexport const DEFAULT_LOCALE = 'en';\nexport const LOCALE_KEY = 'locale';\n\n/**\n * @param {string} locale\n * @return {string}\n */\nexport function sanitizeLocale( locale ) {\n\tif ( languageData.isKnown( locale ) ) {\n\t\treturn languageData.isRedirect( locale ) || locale;\n\t}\n\tlet parts = String( locale ).toLowerCase().split( '-' );\n\twhile ( parts && parts.length ) {\n\t\tconst code = parts.join( '-' );\n\t\tif ( languageData.isKnown( code ) ) {\n\t\t\treturn languageData.isRedirect( code ) || code;\n\t\t}\n\t\tparts = parts.slice( 0, -1 );\n\t}\n\treturn DEFAULT_LOCALE;\n}\n\nexport const initialLocale = ( () => {\n\treturn sanitizeLocale(\n\t\twindow.localStorage.getItem( LOCALE_KEY ) ||\n\t\twindow.navigator.language ||\n\t\tDEFAULT_LOCALE\n\t);\n} )();\n\nconst localeMap = ( () => {\n\tconst preferedLocales = navigator.languages.map( ( x ) => {\n\t\treturn sanitizeLocale( x );\n\t} );\n\tconst languageNameMap = languageData.getAutonyms();\n\n\tconst filteredLocales = preferedLocales.reduce( ( obj, key ) => {\n\t\tobj[ key ] = languageNameMap[ key ];\n\t\treturn obj;\n\t}, {} );\n\n\treturn {\n\t\t...filteredLocales,\n\t\t...languageNameMap\n\t};\n} )();\n\nconst localeSelect = ( () => {\n\treturn Object.keys( localeMap ).map( ( key ) => {\n\t\treturn {\n\t\t\ttext: `${localeMap[ key ]} (${key})`,\n\t\t\tvalue: key\n\t\t};\n\t} );\n} )();\n\nexport const getters = {\n\t/**\n\t * Get autonym of active locale.\n\t *\n\t * @param {Object} state\n\t * @return {string}\n\t */\n\tlocaleAutonym( state ) {\n\t\treturn languageData.getAutonym( state.locale );\n\t},\n\n\t/**\n\t * Get RTL status of active locale.\n\t *\n\t * @param {Object} state\n\t * @return {boolean}\n\t */\n\tisRTL( state ) {\n\t\treturn languageData.isRtl( state.locale );\n\t}\n};\n\nexport const actions = {\n\t/**\n\t * Initialize the locale.\n\t *\n\t * Intended to be called from the application's `created()` callback.\n\t *\n\t * @param {Object} context - Vuex context\n\t * @param {Object} payload\n\t * @param {Object} payload.vm - Vue\n\t * @return {Promise<undefined>}\n\t */\n\tinitializeLocale( context, payload ) {\n\t\tpayload.initial = true;\n\t\tpayload.locale = initialLocale;\n\t\tconst qs = payload.vm.$route.query;\n\t\tif ( qs.uselang ) {\n\t\t\tpayload.locale = sanitizeLocale( qs.uselang );\n\t\t}\n\t\treturn context.dispatch( 'setLocale', payload );\n\t},\n\n\t/**\n\t * Trigger a locale change.\n\t *\n\t * @param {Object} context - Vuex context\n\t * @param {Object} payload\n\t * @param {string} payload.locale - ISO 639-1 code\n\t * @param {Object} payload.vm - Vue\n\t * @param {boolean} payload.initial - Are we being called by the intializer?\n\t * @return {Promise<undefined>}\n\t */\n\tsetLocale( context, payload ) {\n\t\tconst locale = sanitizeLocale( payload.locale );\n\t\tconst vm = payload.vm;\n\t\tconst initial = payload.initial || false;\n\t\tconst localeWas = context.state.locale;\n\n\t\treturn context.dispatch(\n\t\t\t'user/setLocale', locale, { root: true }\n\t\t).then( () => {\n\t\t\tcontext.commit( 'onLocaleChanged', { locale: locale } );\n\n\t\t\t// Set the locale for the frontend\n\t\t\tvm.$i18n.locale = locale;\n\t\t\tvm.$i18n.formatter = new BananaFormatter( locale );\n\t\t\tvm.$vuetify.rtl = languageData.isRtl( locale );\n\t\t\tvm.$moment.locale( locale );\n\n\t\t\t// Show the locale in the query string if it changed\n\t\t\tif ( !initial && vm.$route.query.uselang !== locale ) {\n\t\t\t\tvm.$router.push( {\n\t\t\t\t\tquery: { ...vm.$route.query, uselang: locale }\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Update our OpenAPI schema using the new locale, but only if the\n\t\t\t// schema has been fetched previously and the locale has changed.\n\t\t\tif ( context.rootState.api.schemaPromise && locale !== localeWas ) {\n\t\t\t\tcontext.dispatch(\n\t\t\t\t\t'api/fetchOpenAPISchema', true, { root: true }\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t}\n};\n\nexport const mutations = {\n\t/**\n\t * Persist a locale change.\n\t *\n\t * @param {Object} state - Vuex state tree.\n\t * @param {Object} payload - mutation payload.\n\t * @param {string} payload.locale - ISO 639-1 code.\n\t */\n\tonLocaleChanged( state, payload ) {\n\t\twindow.localStorage.setItem( LOCALE_KEY, payload.locale );\n\t\tstate.locale = payload.locale;\n\t}\n};\n\nexport default {\n\tnamespaced: true,\n\tstate: {\n\t\tlocale: initialLocale,\n\t\tlocaleMap: localeMap,\n\t\tlocaleSelect: localeSelect\n\t},\n\tgetters: getters,\n\tactions: actions,\n\tmutations: mutations,\n\tstrict: process.env.NODE_ENV !== 'production'\n};\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/locale.spec.js","messages":[],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":68,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":68,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":70,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":70,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":88,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":88,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":90,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":90,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":111,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":111,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":117,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":117,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":126,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":126,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":131,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":131,"endColumn":58,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":151,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":151,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":157,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":157,"endColumn":45,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":166,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":166,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":171,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":171,"endColumn":58,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-proto","severity":2,"message":"The '__proto__' property is deprecated.","line":180,"column":5,"nodeType":"MemberExpression","messageId":"unexpectedProto","endLine":180,"endColumn":34,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/oauth.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/oauth.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":91,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":107,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":109,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":116,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":133,"column":34,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":152,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":154,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":164,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":177,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":194,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":196,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":203,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":219,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":231,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":233,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":240,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":253,"column":40,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":268,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":270,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":277,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":290,"column":43,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":306,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":308,"column":48,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":315,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":99,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":99,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":103,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":103,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":113,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":113,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":114,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":114,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":115,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":115,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":144,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":144,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":148,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":148,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":158,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":158,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":159,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":159,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":163,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":163,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":187,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":187,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":191,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":191,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":200,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":200,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":201,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":201,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":202,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":202,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":226,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":226,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":228,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":228,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":230,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":230,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":230,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":230,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":237,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":237,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":238,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":238,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":239,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":239,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":260,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":260,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":264,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":264,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":274,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":274,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":275,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":275,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":276,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":276,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":300,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":300,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":304,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":304,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":312,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":312,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":313,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":313,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":314,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":314,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":12,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { asApp, asToken } from '@/helpers/casl';\nimport { actions, mutations } from './oauth';\n\ndescribe( 'store/oauth', () => {\n\n\tconst testClientAppsObj = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tclient_id: 'xyza',\n\t\t\t\tname: 'test789',\n\t\t\t\tredirect_url: 'http://test789.co',\n\t\t\t\tuser: {\n\t\t\t\t\tid: 2,\n\t\t\t\t\tusername: 'Srish'\n\t\t\t\t}\n\t\t\t}\n\t\t]\n\t};\n\n\tconst testAppObj = testClientAppsObj.results[ 0 ];\n\n\tconst testAuthorizedAppsObj = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tid: 2,\n\t\t\t\tapplication: testAppObj\n\t\t\t}\n\t\t]\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, state, rootState };\n\t\tconst stubThis = {\n\t\t\t_vm: {\n\t\t\t\t$notify: {\n\t\t\t\t\tsuccess: sinon.stub(),\n\t\t\t\t\terror: sinon.stub()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'listClientApps', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/oauth/applications?page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: testClientAppsObj\n\t\t\t};\n\n\t\t\tit( 'should fetch client apps', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/oauth/applications/?page=' + testPage,\n\t\t\t\t\tmethod: 'GET'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\t\t\t\tawait actions.listClientApps( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CLIENT_APPS', testClientAppsObj\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.listClientApps( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'registerApp', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl: '/api/oauth/applications/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: testAppObj\n\t\t\t};\n\n\t\t\tconst app = {\n\t\t\t\tname: 'test123',\n\t\t\t\tredirect_url: 'http://test123.com'\n\t\t\t};\n\n\t\t\tit( 'should register an app', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/oauth/applications/',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: JSON.stringify( app )\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tconst registerApp = actions.registerApp.bind( stubThis );\n\t\t\t\tawait registerApp( context, app );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'REGISTER_APP', testAppObj\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.registerApp( context, app );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'REGISTER_APP', false\n\t\t\t\t);\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'deleteClientApp', () => {\n\t\t\tconst testClientId = 'jklm';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/oauth/applications/' + testClientId + '/',\n\t\t\t\theaders: { 'Content-length': '0' }\n\t\t\t};\n\n\t\t\tit( 'should delete a client app', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/oauth/applications/' + testClientId + '/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tconst deleteClientApp = actions.deleteClientApp.bind( stubThis );\n\t\t\t\tawait deleteClientApp( context, testClientId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly( 'DELETE_CLIENT_APP', testClientId );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.deleteClientApp( context, testClientId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'updateClientApp', () => {\n\t\t\tconst app = {\n\t\t\t\tclientId: testAppObj.clientId,\n\t\t\t\tredirectUrl: 'http://newurl.com'\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: testAppObj\n\t\t\t};\n\n\t\t\tit( 'should update a client app', async () => {\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\texpect( testAppObj.redirect_url ).to.not.equal( app.redirectUrl );\n\t\t\t\tconst updateClientApp = actions.updateClientApp.bind( stubThis );\n\t\t\t\tawait updateClientApp( context, app );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.updateClientApp( context, app );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'listAuthorizedApps', () => {\n\t\t\tconst testPage = 1;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/oauth/authorized/?page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: testAuthorizedAppsObj\n\t\t\t};\n\n\t\t\tit( 'should fetch authorized apps', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/oauth/authorized/?page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\t\t\t\tawait actions.listAuthorizedApps( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHORIZED_APPS', testAuthorizedAppsObj\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.listAuthorizedApps( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'deleteAuthorizedApp', () => {\n\t\t\tconst testAuthAppId = 'mnop';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/oauth/authorized/' + testAuthAppId + '/',\n\t\t\t\theaders: { 'Content-length': '0' }\n\t\t\t};\n\n\t\t\tit( 'should delete an authorized app', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/oauth/authorized/' + testAuthAppId + '/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\t\t\t\tconst deleteAuthorizedApp = actions.deleteAuthorizedApp.bind( stubThis );\n\t\t\t\tawait deleteAuthorizedApp( context, testAuthAppId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly( 'DELETE_AUTHORIZED_APP', testAuthAppId );\n\t\t\t} );\n\n\t\t\tit( 'should log failure when error occurs', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.deleteAuthorizedApp( context, testAuthAppId );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store, register, and delete client apps', () => {\n\t\t\tconst state = {\n\t\t\t\tclientApps: [],\n\t\t\t\tnumClientApps: 0,\n\t\t\t\tclientAppCreated: {}\n\t\t\t};\n\n\t\t\tconst apps = {\n\t\t\t\tresults: testClientAppsObj.results,\n\t\t\t\tcount: testClientAppsObj.count\n\t\t\t};\n\n\t\t\tmutations.CLIENT_APPS( state, apps );\n\t\t\texpect( state.clientApps ).to.eql( asApp( apps.results ) );\n\t\t\texpect( state.numClientApps ).to.equal( apps.count );\n\n\t\t\tmutations.REGISTER_APP( state, testAppObj );\n\t\t\texpect( state.clientApps[ apps.count ] ).to.eql( asApp( testAppObj ) );\n\t\t\texpect( state.numClientApps ).to.equal( apps.count + 1 );\n\n\t\t\tmutations.DELETE_CLIENT_APP( state, testAppObj.client_id );\n\t\t\texpect( state.clientApps[ apps.count ] ).to.not.eql( asApp( testAppObj ) );\n\t\t\texpect( state.numClientApps ).to.equal( apps.count );\n\t\t} );\n\n\t\tit( 'should store and delete authorized apps', () => {\n\t\t\tconst state = {\n\t\t\t\tauthorizedApps: [],\n\t\t\t\tnumAuthorizedApps: 0\n\t\t\t};\n\n\t\t\tconst apps = {\n\t\t\t\tresults: testAuthorizedAppsObj.results,\n\t\t\t\tcount: testAuthorizedAppsObj.count\n\t\t\t};\n\n\t\t\tmutations.AUTHORIZED_APPS( state, apps );\n\t\t\texpect( state.authorizedApps ).to.eql( asToken( apps.results ) );\n\t\t\texpect( state.numAuthorizedApps ).to.equal( apps.count );\n\n\t\t\tconst app = testAuthorizedAppsObj.results[ 0 ];\n\n\t\t\tmutations.DELETE_AUTHORIZED_APP( state, app.id );\n\t\t\texpect( state.authorizedApps[ apps.count ] ).to.not.eql( asToken( app ) );\n\t\t\texpect( state.numAuthorizedApps ).to.equal( apps.count - 1 );\n\t\t} );\n\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/recentchanges.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/recentchanges.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":96,"column":39,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":112,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":114,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":121,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":104,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":104,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":108,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":108,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":118,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":118,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":119,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":119,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":120,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":120,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { asVersion } from '@/helpers/casl';\nimport {\n\tactions,\n\tmutations\n} from './recentchanges';\n\ndescribe( 'store/tools', () => {\n\n\tconst change1 = {\n\t\tcomment: 'This is a test edit',\n\t\tid: 568,\n\t\tparent_id: 567,\n\t\tchild_id: 569,\n\t\tcontent_type: 'tool',\n\t\tcontent_id: 'this-is-name',\n\t\ttimestamp: '2021-04-28T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t}\n\t};\n\n\tconst change2 = {\n\t\tcomment: 'This is a test edit!!',\n\t\tid: 598,\n\t\tparent_id: 597,\n\t\tchild_id: 599,\n\t\tcontent_type: 'toollist',\n\t\tcontent_id: 1,\n\t\ttimestamp: '2021-04-27T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t}\n\t};\n\n\tconst recentChangesResponse = {\n\t\tcount: 2,\n\t\tresults: [\n\t\t\tchange1,\n\t\t\tchange2\n\t\t]\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst dispatch = sinon.stub();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, dispatch, state, rootState };\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'fetchRecentChanges', () => {\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/recent/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: recentChangesResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch recent changes', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/recent/?user=Raymond&page=1'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.fetchRecentChanges( context, { user: 'Raymond', page: 1 } );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'RECENT_CHANGES', recentChangesResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.fetchRecentChanges( context, {} );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t} );\n\n\tdescribe( 'mutations', () => {\n\n\t\tit( 'should store recentchanges', () => {\n\t\t\tconst state = {\n\t\t\t\trecentChanges: [],\n\t\t\t\tnumChanges: 0\n\t\t\t};\n\n\t\t\tmutations.RECENT_CHANGES( state, recentChangesResponse );\n\t\t\texpect( state.recentChanges ).to.eql( asVersion( recentChangesResponse.results ) );\n\t\t\texpect( state.numChanges ).to.equal( recentChangesResponse.count );\n\n\t\t} );\n\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/search.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/search.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":135,"column":37,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":146,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":148,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":156,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":168,"column":37,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":179,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":181,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":189,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":201,"column":39,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":212,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":214,"column":37,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":228,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":230,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":238,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":250,"column":39,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":261,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":263,"column":37,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":279,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":281,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":289,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":61,"column":4,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":61,"endColumn":66,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":142,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":142,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":145,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":145,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":153,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":153,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":154,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":154,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":155,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":155,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":175,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":175,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":178,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":178,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":186,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":186,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":187,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":187,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":188,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":188,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":208,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":208,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":211,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":211,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":224,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":224,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":227,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":227,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":235,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":235,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":236,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":236,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":237,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":237,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":257,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":257,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":260,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":260,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":275,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":275,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":278,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":278,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":286,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":286,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":287,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":287,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":288,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":288,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":10,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\textractFacets,\n\tactions,\n\tmutations\n} from './search';\n\ndescribe( 'store/search', () => {\n\tconst facetResponse = {\n\t\tfacets: {\n\t\t\t_filter_unittest: {\n\t\t\t\tdoc_count: 42,\n\t\t\t\tunittest: {\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttype: 'type',\n\t\t\t\t\t\tmulti: true,\n\t\t\t\t\t\tparam: 'unittest__term',\n\t\t\t\t\t\tmissing_value: '--',\n\t\t\t\t\t\tmissing_param: 'unittest__isnull'\n\t\t\t\t\t},\n\t\t\t\t\tsum_other_doc_count: 11,\n\t\t\t\t\tbuckets: [\n\t\t\t\t\t\t{ key: 'muhbukket', doc_count: 11 },\n\t\t\t\t\t\t{ key: 'test', doc_count: 10 },\n\t\t\t\t\t\t{ key: '--', doc_count: 10 }\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\tconst autoCompleteResponse = [ { name: 'tool1', title: 'tool1 title' }, { name: 'tool2', title: 'tool2 title' } ];\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'extractFacets', () => {\n\t\tit( 'should accept empty filters', () => {\n\t\t\tconst filters = [];\n\t\t\tconst out = extractFacets( facetResponse, filters );\n\t\t\texpect( out ).to.be.an( 'array' ).with.a.lengthOf( 1 );\n\t\t\texpect( out[ 0 ] ).to.have.all.keys(\n\t\t\t\t'name', 'type', 'multi', 'param', 'missingValue',\n\t\t\t\t'missingParam', 'docCount', 'otherCount', 'buckets',\n\t\t\t\t'selected'\n\t\t\t);\n\t\t\texpect( out[ 0 ].selected ).to.be.an( 'array' ).that.is.empty;\n\t\t} );\n\n\t\tit( 'should process a missing filter', () => {\n\t\t\tconst filters = [ [ 'unittest__isnull', 1 ] ];\n\t\t\tconst out = extractFacets( facetResponse, filters );\n\t\t\texpect( out ).to.be.an( 'array' ).with.lengthOf( 1 );\n\t\t\texpect( out[ 0 ] ).to.have.all.keys(\n\t\t\t\t'name', 'type', 'multi', 'param', 'missingValue',\n\t\t\t\t'missingParam', 'docCount', 'otherCount', 'buckets',\n\t\t\t\t'selected'\n\t\t\t);\n\t\t\texpect( out[ 0 ].selected ).to.be.an( 'array' ).with.lengthOf( 1 );\n\t\t\texpect( out[ 0 ].selected[ 0 ] ).to.equal( '--' );\n\t\t} );\n\n\t\tit( 'should process a term filter', () => {\n\t\t\tconst filters = [ [ 'unittest__term', 'muhbukket' ] ];\n\t\t\tconst out = extractFacets( facetResponse, filters );\n\t\t\texpect( out ).to.be.an( 'array' ).with.a.lengthOf( 1 );\n\t\t\texpect( out[ 0 ] ).to.have.all.keys(\n\t\t\t\t'name', 'type', 'multi', 'param', 'missingValue',\n\t\t\t\t'missingParam', 'docCount', 'otherCount', 'buckets',\n\t\t\t\t'selected'\n\t\t\t);\n\t\t\texpect( out[ 0 ].selected ).to.be.an( 'array' ).with.lengthOf( 1 );\n\t\t\texpect( out[ 0 ].selected[ 0 ] ).to.equal( 'muhbukket' );\n\t\t} );\n\n\t\tit( 'should process multiple term filters', () => {\n\t\t\tconst filters = [\n\t\t\t\t[ 'unittest__term', 'muhbukket' ],\n\t\t\t\t[ 'unittest__term', 'test' ]\n\t\t\t];\n\t\t\tconst out = extractFacets( facetResponse, filters );\n\t\t\texpect( out ).to.be.an( 'array' ).with.a.lengthOf( 1 );\n\t\t\texpect( out[ 0 ] ).to.have.all.keys(\n\t\t\t\t'name', 'type', 'multi', 'param', 'missingValue',\n\t\t\t\t'missingParam', 'docCount', 'otherCount', 'buckets',\n\t\t\t\t'selected'\n\t\t\t);\n\t\t\texpect( out[ 0 ].selected ).to.be.an( 'array' ).with.lengthOf( 2 );\n\t\t\texpect( out[ 0 ].selected[ 0 ] ).to.equal( 'muhbukket' );\n\t\t\texpect( out[ 0 ].selected[ 1 ] ).to.equal( 'test' );\n\t\t} );\n\t} );\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst state = {};\n\t\tconst rootState = { locale: { locale: 'en' } };\n\t\tconst context = { commit, state, rootState };\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'AutoCompleteTools', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/autocomplete/tools/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: autoCompleteResponse\n\t\t\t};\n\n\t\t\tit( 'should build query string', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/autocomplete/tools/?q=wiki'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.autoCompleteTools( context, 'wiki' );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.autoCompleteTools( context, '' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'AutoCompleteLists', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/autocomplete/lists/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: autoCompleteResponse\n\t\t\t};\n\n\t\t\tit( 'should build query string', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/autocomplete/lists/?q=wiki'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.autoCompleteLists( context, 'wiki' );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.autoCompleteLists( context, '' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'findTools', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/search/tools/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: facetResponse\n\t\t\t};\n\n\t\t\tit( 'should accept empty payload', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/search/tools/?'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.findTools( context, {} );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should build query string', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/search/tools/?q=q&filter=term'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.findTools( context, {\n\t\t\t\t\tquery: 'q',\n\t\t\t\t\tfilters: [ [ 'filter', 'term' ] ]\n\t\t\t\t} );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.findTools( context, {} );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'findLists', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/search/lists/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: facetResponse\n\t\t\t};\n\n\t\t\tit( 'should accept empty payload', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/search/lists/?'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.findLists( context, {} );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should build query string', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/search/lists/?q=q&page=1&page_size=10&ordering=-score'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.findLists( context, {\n\t\t\t\t\tquery: 'q',\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tpageSize: 10,\n\t\t\t\t\tordering: '-score'\n\t\t\t\t} );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.findLists( context, {} );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tdescribe( 'onToolsResults', () => {\n\t\t\tit( 'should store inputs', () => {\n\t\t\t\tconst state = {\n\t\t\t\t\ttoolsQueryParams: null,\n\t\t\t\t\ttoolsResponse: {},\n\t\t\t\t\ttoolAutoCompleteResults: {},\n\t\t\t\t\tlistsResponse: {},\n\t\t\t\t\tlistAutoCompleteResults: {}\n\t\t\t\t};\n\n\t\t\t\tconst results = 'whatever';\n\t\t\t\tconst qs = 'something';\n\t\t\t\tmutations.onToolsResults( state, { results, qs } );\n\t\t\t\tmutations.onToolsAutoCompleteResults( state, results );\n\t\t\t\tmutations.onListsResults( state, results );\n\t\t\t\tmutations.onListsAutoCompleteResults( state, results );\n\n\t\t\t\texpect( state.toolsQueryParams ).to.equal( qs );\n\t\t\t\texpect( state.toolsResponse ).to.equal( results );\n\t\t\t\texpect( state.toolAutoCompleteResults ).to.equal( results );\n\t\t\t\texpect( state.listsResponse ).to.equal( results );\n\t\t\t\texpect( state.listAutoCompleteResults ).to.equal( results );\n\t\t\t} );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/tools.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/tools.spec.js","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":56,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":56,"endColumn":23},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":57,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":57,"endColumn":25},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":221,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":237,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":239,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":246,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":260,"column":37,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":276,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":278,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":285,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":298,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":314,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":316,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":323,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":336,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":358,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":360,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":368,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":386,"column":28,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":403,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":405,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":412,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":430,"column":35,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":447,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":449,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":456,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":474,"column":50,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":488,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":490,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":503,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":521,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":537,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":539,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":546,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":565,"column":47,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":581,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":583,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":590,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":612,"column":41,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":627,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":629,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":639,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":656,"column":45,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":669,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":671,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":679,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":697,"column":34,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":710,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":712,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":720,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":737,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":750,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":752,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":774,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":776,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":784,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":229,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":229,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":233,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":233,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":243,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":243,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":244,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":244,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":245,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":245,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":268,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":268,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":272,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":272,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":282,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":282,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":283,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":283,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":284,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":284,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":306,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":306,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":310,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":310,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":320,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":320,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":321,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":321,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":322,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":322,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":347,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":347,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":351,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":351,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":357,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":357,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":357,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":357,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":365,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":365,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":366,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":366,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":367,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":367,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":397,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":397,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":401,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":401,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":401,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":401,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":410,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":410,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":411,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":411,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":441,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":441,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":445,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":445,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":445,"column":13,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":445,"endColumn":25,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":454,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":454,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":455,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":455,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":478,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":478,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":484,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":484,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":495,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":495,"endColumn":48,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":501,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":501,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":502,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":502,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":529,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":529,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":533,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":533,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":543,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":543,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":544,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":544,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":545,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":545,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":573,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":573,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":577,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":577,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":587,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":587,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":588,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":588,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":589,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":589,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":623,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":623,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":635,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":635,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":636,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":636,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":666,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":666,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":676,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":676,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":677,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":677,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":678,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":678,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":707,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":707,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":717,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":717,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":718,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":718,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":719,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":719,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":747,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":747,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":771,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":771,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":773,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":773,"endColumn":64,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":781,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":781,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":782,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":782,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":783,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":783,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":29,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { asTool, asVersion } from '@/helpers/casl';\nimport {\n\tactions,\n\tmutations\n} from './tools';\n\ndescribe( 'store/tools', () => {\n\n\tconst shortToolResponse = {\n\t\tauthor: 'Srish',\n\t\tbugtracker_url: 'http://testtracker.com',\n\t\tcomment: \"Tool with title 'ToolTest' created\",\n\t\tdescription: 'Cooltool',\n\t\tlicense: 'AFL-1.1',\n\t\tname: 'Hellotool',\n\t\trepository: 'http://testrepo.com',\n\t\ttitle: 'ToolTest',\n\t\ttool_type: 'gadget',\n\t\turl: 'http://testurl.com',\n\t\tuser_docs_url: [ {\n\t\t\tlanguage: 'en',\n\t\t\turl: 'http://testdocs.com'\n\t\t} ]\n\t};\n\n\tconst annotationsResponse = {\n\t\ticon: null,\n\t\tapi_url: null,\n\t\ttranslate_url: null,\n\t\tbugtracker_url: null,\n\t\tuser_docs_url: Array( 0 ),\n\t\tdeveloper_docs_url: Array( 0 ),\n\t\tfeedback_url: Array( 0 ),\n\t\tprivacy_policy_url: Array( 0 ),\n\t\ttool_type: null,\n\t\tavailable_ui_languages: Array( 0 ),\n\t\tfor_wikis: Array( 0 ),\n\t\tdeprecated: false,\n\t\texperimental: false,\n\t\treplaced_by: null,\n\t\twikidata_qid: null\n\t};\n\n\tconst toolResponse = {\n\t\t...shortToolResponse,\n\t\t...annotationsResponse,\n\t\tapi_url: null,\n\t\tavailable_ui_languages: Array( 0 ),\n\t\tbot_username: null,\n\t\tcreated_by: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t},\n\t\tcreated_date: '2021-04-14T02:11:44.751235Z',\n\t\tdeprecated: false,\n\t\tdeveloper_docs_url: Array( 0 ),\n\t\texperimental: false,\n\t\tfeedback_url: Array( 0 ),\n\t\tfor_wikis: Array( 0 ),\n\t\ticon: null,\n\t\tkeywords: Array( 0 ),\n\t\tmodified_by: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t},\n\t\tmodified_date: '2021-04-14T02:11:54.980904Z',\n\t\topenhub_id: null,\n\t\torigin: 'api',\n\t\tprivacy_policy_url: Array( 0 ),\n\t\treplaced_by: null,\n\t\tsponsor: Array( 0 ),\n\t\tsubtitle: null,\n\t\ttechnology_used: Array( 0 ),\n\t\ttranslate_url: null,\n\t\turl_alternates: [ {\n\t\t\tlanguage: 'en',\n\t\t\turl: 'http://test123.com'\n\t\t} ],\n\t\t_language: 'en',\n\t\t_schema: null\n\t};\n\n\tconst toolsListResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\ttoolResponse\n\t\t]\n\t};\n\n\tconst spdxLicensesResponse = [\n\t\t{\n\t\t\tdeprecated: false,\n\t\t\tfsf_approved: false,\n\t\t\tid: '0BSD',\n\t\t\tname: 'BSD Zero Clause License',\n\t\t\tosi_approved: true\n\t\t}\n\t];\n\n\tconst toolRevisionResponse1 = {\n\t\tcomment: 'This is a test edit',\n\t\tid: '596',\n\t\ttimestamp: '2021-04-28T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t}\n\t};\n\n\tconst toolRevisionResponse2 = {\n\t\tcomment: 'This is a test edit!!',\n\t\tid: '598',\n\t\ttimestamp: '2021-04-27T20:12:08.025365Z',\n\t\tuser: {\n\t\t\tid: 2,\n\t\t\tusername: 'Srish'\n\t\t}\n\t};\n\n\tconst toolRevisionsResponse = {\n\t\tcount: 1,\n\t\tresults: [\n\t\t\ttoolRevisionResponse1,\n\t\t\ttoolRevisionResponse2\n\t\t]\n\t};\n\n\tconst diffRevisionResponse = {\n\t\toriginal: {\n\t\t\tid: 593,\n\t\t\ttimestamp: '2021-04-28T19:49:31.735437Z',\n\t\t\tuser: {\n\t\t\t\tid: 2,\n\t\t\t\tusername: 'Srish'\n\t\t\t},\n\t\t\tcomment: 'Test comment'\n\t\t},\n\t\toperations: [\n\t\t\t{\n\t\t\t\top: 'replace',\n\t\t\t\tpath: '/description',\n\t\t\t\tvalue: 'Cool tool it is'\n\t\t\t},\n\t\t\t{\n\t\t\t\top: 'replace',\n\t\t\t\tpath: '/repository',\n\t\t\t\tvalue: 'http://testrepo.co'\n\t\t\t}\n\t\t],\n\t\tresult: {\n\t\t\tid: 596,\n\t\t\ttimestamp: '2021-04-28T20:12:08.025365Z',\n\t\t\tuser: {\n\t\t\t\tid: 2,\n\t\t\t\tusername: 'Srish'\n\t\t\t},\n\t\t\tcomment: 'Another test comment'\n\t\t}\n\t};\n\n\tconst apiError = {\n\t\tcode: 4000,\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst dispatch = sinon.stub();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: { user: { csrf_token: 'abcd' } }\n\t\t};\n\t\tconst context = { commit, dispatch, state, rootState };\n\t\tconst stubThis = {\n\t\t\t_vm: {\n\t\t\t\t$notify: {\n\t\t\t\t\tsuccess: sinon.stub()\n\t\t\t\t}\n\n\t\t\t}\n\t\t};\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'listAllTools', () => {\n\t\t\tconst testPage = 2;\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/?page_size=12&page=' + testPage,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolsListResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch tools', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/?page_size=12&page=' + testPage\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.listAllTools( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'TOOLS_LIST', toolsListResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.listAllTools( context, testPage );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getToolByName', () => {\n\t\t\tconst testName = 'Awesome';\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + encodeURI( testName ) + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch tool by name', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + encodeURI( testName ) + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getToolByName( context, testName );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'TOOL', toolResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getToolByName( context, testName );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getSpdxLicenses', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/spdx/?deprecated=false',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: spdxLicensesResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch spdx licenses', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/spdx/?deprecated=false'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getSpdxLicenses( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'SPDX_LICENSES', spdxLicensesResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getSpdxLicenses( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'createTool', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 201,\n\t\t\t\turl: '/api/tools/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolResponse\n\t\t\t};\n\n\t\t\tit( 'should create tool', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: JSON.stringify( shortToolResponse )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst createTool = actions.createTool.bind( stubThis );\n\t\t\t\tawait createTool( context, shortToolResponse );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'CREATE_TOOL', toolResponse\n\t\t\t\t);\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.createTool( context, shortToolResponse );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'editTool', () => {\n\t\t\tconst testTool = {\n\t\t\t\tinfo: toolResponse,\n\t\t\t\tname: 'Hellotool'\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolResponse\n\t\t\t};\n\n\t\t\tit( 'should edit tool', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/',\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\tbody: JSON.stringify( testTool.info )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst editTool = actions.editTool.bind( stubThis );\n\t\t\t\tawait editTool( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.editTool( context, toolResponse );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'editAnnotations', () => {\n\t\t\tconst testTool = {\n\t\t\t\tannotations: annotationsResponse,\n\t\t\t\tname: 'Hellotool'\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/annotations/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: annotationsResponse\n\t\t\t};\n\n\t\t\tit( 'should edit annotations', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/annotations/',\n\t\t\t\t\tmethod: 'PUT',\n\t\t\t\t\tbody: JSON.stringify( testTool.annotations )\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst editAnnotations = actions.editAnnotations.bind( stubThis );\n\t\t\t\tawait editAnnotations( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\t\texpect( stubThis._vm.$notify.success ).to.have.been.called;\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.editAnnotations( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'updateToolRevisions', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Hellotool',\n\t\t\t\tpage: 1\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/?page=' + testTool.page,\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolRevisionsResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch and update tool revisions', async () => {\n\t\t\t\tdispatch.onFirstCall().returns( { then: sinon.stub().yields( response ) } );\n\t\t\t\tactions.updateToolRevisions( context, testTool );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getRevisions', testTool\n\t\t\t\t);\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'TOOL_REVISIONS', toolRevisionsResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\tdispatch.onFirstCall().rejects( { errors: { error1: { field: 'Boom', message: 'Boom Boom' } } } );\n\n\t\t\t\tawait actions.updateToolRevisions( context, testTool );\n\n\t\t\t\texpect( dispatch ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( dispatch ).to.have.been.calledWithExactly(\n\t\t\t\t\t'getRevisions', testTool\n\t\t\t\t);\n\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getToolRevision', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Awesome',\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolRevisionResponse1\n\t\t\t};\n\n\t\t\tit( 'should fetch tool revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getToolRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'TOOL_REVISION', toolRevisionResponse1\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getToolRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'getToolRevisionsDiff', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Awesome',\n\t\t\t\trevId: 593,\n\t\t\t\totherId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/diff/' + testTool.otherId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: diffRevisionResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch diff between revisions', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/diff/' + testTool.otherId + '/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getToolRevisionsDiff( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'DIFF_REVISION', diffRevisionResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.getToolRevisionsDiff( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'undoChangesBetweenRevisions', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Hellotool',\n\t\t\t\trevId: 596,\n\t\t\t\tprevRevId: 595\n\t\t\t};\n\n\t\t\tconst id = testTool.revId;\n\t\t\tconst prevId = testTool.prevRevId;\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + id + '/undo/' + prevId + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: toolResponse\n\t\t\t};\n\n\t\t\tit( 'should undo between revisions', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + id + '/undo/' + prevId + '/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tcontext.state.toolRevisions = toolRevisionsResponse.results;\n\t\t\t\tawait actions.undoChangesBetweenRevisions( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\tcontext.state.toolRevisions = [];\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tcontext.state.toolRevisions = toolRevisionsResponse.results;\n\t\t\t\tawait actions.undoChangesBetweenRevisions( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\n\t\t\t\tcontext.state.toolRevisions = [];\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'restoreToolToRevision', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Hellotool',\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/revert/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should restore tool to a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/revert/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst restoreToolToRevision = actions.restoreToolToRevision.bind( stubThis );\n\t\t\t\tawait restoreToolToRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.restoreToolToRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'hideRevealRevision', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Hellotool',\n\t\t\t\trevId: 596,\n\t\t\t\taction: 'hide'\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/' + testTool.action + '/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should hide a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/' + testTool.action + '/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst hideRevealRevision = actions.hideRevealRevision.bind( stubThis );\n\t\t\t\tawait hideRevealRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.hideRevealRevision( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t\tdescribe( 'markRevisionAsPatrolled', () => {\n\t\t\tconst testTool = {\n\t\t\t\tname: 'Hellotool',\n\t\t\t\trevId: 596\n\t\t\t};\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 204,\n\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/patrol/',\n\t\t\t\theaders: { 'Content-type': 'application/json' }\n\t\t\t};\n\n\t\t\tit( 'should patrol a revision', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/patrol/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst markRevisionAsPatrolled = actions.markRevisionAsPatrolled.bind( stubThis );\n\t\t\t\tawait markRevisionAsPatrolled( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t} );\n\n\t\t\tit( 'should ignore error 4093', async () => {\n\t\t\t\tconst error4093 = {\n\t\t\t\t\tcode: 4093,\n\t\t\t\t\tmessage: 'Revision is already marked as patrolled.',\n\t\t\t\t\tstatus_code: 400,\n\t\t\t\t\terrors: [ {\n\t\t\t\t\t\tfield: 'detail',\n\t\t\t\t\t\tmessage: 'Revision is already marked as patrolled.'\n\t\t\t\t\t} ]\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/tools/' + testTool.name + '/revisions/' + testTool.revId + '/patrol/',\n\t\t\t\t\tmethod: 'PATCH'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( error4093 );\n\n\t\t\t\tconst markRevisionAsPatrolled = actions.markRevisionAsPatrolled.bind( stubThis );\n\t\t\t\tawait markRevisionAsPatrolled( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( displayErrorNotification ).to.have.not.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.markRevisionAsPatrolled( context, testTool );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t} );\n\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'should store tool, tools list and tool created', () => {\n\t\t\tconst state = {\n\t\t\t\ttoolsList: [],\n\t\t\t\tnumTools: 0,\n\t\t\t\ttool: null,\n\t\t\t\ttoolCreated: {}\n\t\t\t};\n\n\t\t\tconst tools = {\n\t\t\t\tresults: toolsListResponse.results,\n\t\t\t\tcount: toolsListResponse.count\n\t\t\t};\n\n\t\t\tmutations.TOOLS_LIST( state, tools );\n\t\t\texpect( state.toolsList ).to.eql( asTool( tools.results ) );\n\t\t\texpect( state.numTools ).to.equal( tools.count );\n\n\t\t\tmutations.TOOL( state, toolResponse );\n\t\t\texpect( state.tool ).to.eql( asTool( toolResponse ) );\n\n\t\t\tmutations.CREATE_TOOL( state, toolResponse );\n\t\t\texpect( state.toolCreated ).to.eql( asTool( toolResponse ) );\n\t\t} );\n\n\t\tit( 'should store licenses', () => {\n\t\t\tconst state = {\n\t\t\t\tspdxLicenses: []\n\t\t\t};\n\n\t\t\tmutations.SPDX_LICENSES( state, spdxLicensesResponse );\n\t\t\texpect( state.spdxLicenses ).to.equal( spdxLicensesResponse );\n\t\t} );\n\n\t\tit( 'should store diff and tool revisions', () => {\n\t\t\tconst state = {\n\t\t\t\ttoolRevisions: [],\n\t\t\t\tnumRevisions: 0,\n\t\t\t\tdiffRevision: null,\n\t\t\t\ttoolRevision: null\n\t\t\t};\n\n\t\t\tmutations.TOOL_REVISIONS( state, toolRevisionsResponse );\n\t\t\texpect( state.toolRevisions ).to.eql( asVersion( toolRevisionsResponse.results ) );\n\t\t\texpect( state.numRevisions ).to.equal( toolRevisionsResponse.count );\n\n\t\t\tmutations.TOOL_REVISION( state, toolRevisionResponse1 );\n\t\t\texpect( state.toolRevision ).to.eql( asVersion( toolRevisionResponse1 ) );\n\n\t\t\tmutations.DIFF_REVISION( state, diffRevisionResponse );\n\t\t\texpect( state.diffRevision ).to.equal( diffRevisionResponse );\n\t\t} );\n\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/ui.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/ui.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":59,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":73,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":75,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":83,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":66,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":66,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":69,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":69,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":80,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":80,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":81,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":81,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":82,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":82,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport {\n\tactions,\n\tmutations\n} from './ui';\n\ndescribe( 'store/ui', () => {\n\tconst homeDataResponse = {\n\t\ttotal_tools: 1493,\n\t\tlast_crawl_time: '2021-10-04T20:40:00.913796Z',\n\t\tlast_crawl_changed: 58\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst state = {};\n\t\tconst rootState = { locale: { locale: 'en' } };\n\t\tconst context = { commit, state, rootState };\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'getHomeData', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/ui/home/',\n\t\t\t\theaders: { 'Content-type': 'application/json' },\n\t\t\t\tbody: homeDataResponse\n\t\t\t};\n\n\t\t\tit( 'should fetch data', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/ui/home/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getHomeData( context );\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'onHomeData', homeDataResponse\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getHomeData( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\t\tit( 'onHomeData', () => {\n\t\t\tconst state = {\n\t\t\t\ttotalTools: 0,\n\t\t\t\tlastCrawlTime: '',\n\t\t\t\tlastCrawlChanged: 0\n\t\t\t};\n\t\t\tmutations.onHomeData( state, {\n\t\t\t\ttotal_tools: 1493,\n\t\t\t\tlast_crawl_time: '2021-10-04T20:40:00.913796Z',\n\t\t\t\tlast_crawl_changed: 58\n\t\t\t} );\n\n\t\t\texpect( state.totalTools ).to.equal( 1493 );\n\t\t\texpect( state.lastCrawlTime ).to.equal( '2021-10-04T20:40:00.913796Z' );\n\t\t\texpect( state.lastCrawlChanged ).to.equal( 58 );\n\t\t} );\n\t} );\n\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/user.js","messages":[],"suppressedMessages":[],"errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/store/user.spec.js","messages":[{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":87,"column":34,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":109,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":111,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":123,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":125,"column":42,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":134,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":160,"column":30,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":174,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":176,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":183,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":187,"column":31,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":196,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":200,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":231,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":233,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":258,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":260,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":273,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":277,"column":29,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":309,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":311,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":325,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":329,"column":25,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":352,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":354,"column":36,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":377,"endColumn":5},{"ruleId":"es-x/no-async-functions","severity":2,"message":"ES2017 async function declarations are forbidden.","line":379,"column":38,"nodeType":"ArrowFunctionExpression","messageId":"forbidden","endLine":393,"endColumn":5}],"suppressedMessages":[{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":95,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":95,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":105,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":105,"endColumn":47,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":115,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":115,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":116,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":116,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":122,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":122,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":131,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":131,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":132,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":132,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":133,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":133,"endColumn":31,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":166,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":166,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":170,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":170,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":180,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":180,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":181,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":181,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":182,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":182,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":192,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":192,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":193,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":193,"endColumn":49,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":223,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":223,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":227,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":227,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":250,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":250,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":254,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":254,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":268,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":268,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":271,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":271,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":272,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":272,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":301,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":301,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":305,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":305,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":320,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":320,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":323,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":323,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":324,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":324,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":344,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":344,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":348,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":348,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":369,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":369,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":373,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":373,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":388,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":388,"endColumn":44,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":391,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":391,"endColumn":46,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-unused-expressions","severity":2,"message":"Expected an assignment or function call and instead saw an expression.","line":392,"column":5,"nodeType":"ExpressionStatement","messageId":"unusedExpression","endLine":392,"endColumn":60,"suppressions":[{"kind":"directive","justification":""}]},{"ruleId":"no-underscore-dangle","severity":2,"message":"Unexpected dangling '_' in '_vm'.","line":430,"column":12,"nodeType":"MemberExpression","messageId":"unexpectedUnderscore","endLine":430,"endColumn":24,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":14,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"'use strict';\nimport chai from 'chai';\nimport sinon from 'sinon';\nimport SwaggerClient from 'swagger-client';\nimport { addRequestDefaults } from '@/plugins/swagger';\nimport * as notifications from '@/helpers/notifications';\n\nchai.use( require( 'sinon-chai' ) );\nconst expect = chai.expect;\n/* eslint-disable no-unused-expressions */\n\nimport { actions, mutations } from './user';\n\ndescribe( 'store/user', () => {\n\tconst testUserObj = {\n\t\tis_authenticated: true,\n\t\tcsrf_token: 'abcd',\n\t\tcasl: [ {\n\t\t\taction: 'view',\n\t\t\tsubject: 'auth/group'\n\t\t} ]\n\t};\n\n\tconst testUsersObj = {\n\t\tcount: 2,\n\t\tresults: [\n\t\t\t{\n\t\t\t\tid: 2,\n\t\t\t\tusername: 'Srish',\n\t\t\t\tgroups: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\tname: 'Administrators'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 2,\n\t\t\t\t\t\tname: 'Bureaucrats'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tdate_joined: '2021-02-26T20:45:06Z'\n\t\t\t}\n\t\t]\n\t};\n\n\tconst apiError = {\n\t\terrors: [ {\n\t\t\tfield: 'test field1',\n\t\t\tmessage: 'something went wrong'\n\t\t} ]\n\t};\n\n\tdescribe( 'actions', () => {\n\t\tconst commit = sinon.spy();\n\t\tconst dispatch = sinon.stub();\n\t\tconst state = { user: { is_authenticated: true } };\n\t\tconst rootState = {\n\t\t\tlocale: { locale: 'en' },\n\t\t\tuser: state\n\t\t};\n\t\tconst context = { commit, dispatch, state, rootState };\n\n\t\tlet http = 'func';\n\t\tlet displayErrorNotification = 'func';\n\n\t\tbeforeEach( () => {\n\t\t\thttp = sinon.stub( SwaggerClient, 'http' );\n\t\t\tdisplayErrorNotification = sinon.stub( notifications, 'displayErrorNotification' );\n\t\t} );\n\n\t\tafterEach( () => {\n\t\t\thttp.restore();\n\t\t\tdisplayErrorNotification.restore();\n\t\t\tsinon.reset();\n\t\t} );\n\n\t\tdescribe( 'getUserInfo', () => {\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl: '/api/user/',\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t},\n\t\t\t\tbody: testUserObj\n\t\t\t};\n\n\t\t\tit( 'should fetch user info', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tconst promise = actions.getUserInfo( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit.getCall( 0 ) ).to.have.been.calledWithExactly(\n\t\t\t\t\t'USER_PROMISE', promise\n\t\t\t\t);\n\n\t\t\t\tawait promise;\n\n\t\t\t\texpect( commit ).to.have.been.calledTwice;\n\t\t\t\texpect( commit.getCall( 1 ) ).to.have.been.calledWithExactly(\n\t\t\t\t\t'USER', response.body\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tconst promise = actions.getUserInfo( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'USER_PROMISE', promise\n\t\t\t\t);\n\n\t\t\t\tawait promise;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\n\t\t\tit( 'should return existing promise', async () => {\n\t\t\t\tstate.userPromise = Promise.resolve( true );\n\n\t\t\t\tconst promise = actions.getUserInfo( context );\n\t\t\t\tconst resp = await promise;\n\n\t\t\t\texpect( http ).to.have.not.been.called;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( resp ).to.be.true;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'listAllUsers', () => {\n\t\t\tconst testPayload = {\n\t\t\t\tpage: 1,\n\t\t\t\tfilters: {\n\t\t\t\t\tusername: 'Srish',\n\t\t\t\t\tgroups_id: 1,\n\t\t\t\t\tordering: '-username'\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst url = '/api/users/?page=1&username__contains=Srish' +\n            '&groups__id=1&ordering=-username';\n\n\t\t\tconst response = {\n\t\t\t\tok: true,\n\t\t\t\tstatus: 200,\n\t\t\t\turl,\n\t\t\t\theaders: {\n\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t},\n\t\t\t\tbody: testUsersObj\n\t\t\t};\n\n\t\t\tit( 'should fetch users', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( { url }, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.listAllUsers( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'USERS', testUsersObj\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should log failures', async () => {\n\t\t\t\thttp.rejects( apiError );\n\t\t\t\tawait actions.listAllUsers( context, testPayload );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'setLocale', () => {\n\t\t\tit( 'should retry on 403', async () => {\n\t\t\t\tdispatch.resolves( null );\n\t\t\t\thttp.rejects( { ok: false, status: 403 } );\n\t\t\t\tawait actions.setLocale( context, 'en-US' );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( dispatch ).to.have.been.calledTwice;\n\t\t\t\texpect( dispatch ).to.have.been.calledWith( 'getUserInfo' );\n\t\t\t\texpect( dispatch ).to.have.been.calledWith( 'setLocale', 'en-US' );\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'getAuthtoken', () => {\n\t\t\tit( 'should fetch data', async () => {\n\t\t\t\tconst response = {\n\t\t\t\t\tok: true,\n\t\t\t\t\tstatusCode: 200,\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t\t},\n\t\t\t\t\tbody: {\n\t\t\t\t\t\ttoken: '**token**',\n\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\t\tusername: 'user'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.getAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHTOKEN', response.body.token\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should store null on 404', async () => {\n\t\t\t\tconst response = {\n\t\t\t\t\tok: false,\n\t\t\t\t\tstatusCode: 404,\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t\t},\n\t\t\t\t\tbody: {}\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/'\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( response );\n\n\t\t\t\tawait actions.getAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHTOKEN', null\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should emit error messages', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/'\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.getAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'newAuthtoken', () => {\n\t\t\tit( 'should fetch data', async () => {\n\t\t\t\tconst response = {\n\t\t\t\t\tok: true,\n\t\t\t\t\tstatusCode: 200,\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t'Content-type': 'application/json'\n\t\t\t\t\t},\n\t\t\t\t\tbody: {\n\t\t\t\t\t\ttoken: '**token**',\n\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\tid: 1,\n\t\t\t\t\t\t\tusername: 'user'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.newAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHTOKEN', response.body.token\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should emit error messages', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tmethod: 'POST'\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.newAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\n\t\tdescribe( 'deleteAuthtoken', () => {\n\t\t\tit( 'should delete', async () => {\n\t\t\t\tconst response = {\n\t\t\t\t\tok: true,\n\t\t\t\t\tstatusCode: 204,\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tbody: {}\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\t\t\t\thttp.resolves( response );\n\n\t\t\t\tawait actions.deleteAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHTOKEN', null\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should store null on 404', async () => {\n\t\t\t\tconst response = {\n\t\t\t\t\tok: false,\n\t\t\t\t\tstatusCode: 404,\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tbody: {}\n\t\t\t\t};\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( response );\n\n\t\t\t\tawait actions.deleteAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledBefore( commit );\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.been.calledOnce;\n\t\t\t\texpect( commit ).to.have.been.calledWithExactly(\n\t\t\t\t\t'AUTHTOKEN', null\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\tit( 'should emit error messages', async () => {\n\t\t\t\tconst expectRequest = addRequestDefaults( {\n\t\t\t\t\turl: '/api/user/authtoken/',\n\t\t\t\t\tmethod: 'DELETE'\n\t\t\t\t}, context );\n\t\t\t\thttp.rejects( apiError );\n\n\t\t\t\tawait actions.deleteAuthtoken( context );\n\n\t\t\t\texpect( http ).to.have.been.calledOnce;\n\t\t\t\texpect( http ).to.have.been.calledWith( expectRequest );\n\n\t\t\t\texpect( commit ).to.have.not.been.called;\n\t\t\t\texpect( displayErrorNotification ).to.have.been.called;\n\t\t\t} );\n\t\t} );\n\t} );\n\n\tdescribe( 'mutations', () => {\n\n\t\tit( 'should store authtokens', () => {\n\t\t\tconst state = {\n\t\t\t\tauthtoken: null\n\t\t\t};\n\n\t\t\tmutations.AUTHTOKEN( state, '**token**' );\n\t\t\texpect( state.authtoken ).to.equal( '**token**' );\n\n\t\t\tmutations.AUTHTOKEN( state, null );\n\t\t\texpect( state.authtoken ).to.equal( null );\n\t\t} );\n\n\t\tit( 'should store user', () => {\n\t\t\tconst stubThis = {\n\t\t\t\t_vm: {\n\t\t\t\t\t$ability: {\n\t\t\t\t\t\tupdate: sinon.stub()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst state = {\n\t\t\t\tuser: {\n\t\t\t\t\tis_authenticated: false,\n\t\t\t\t\tcsrf_token: '',\n\t\t\t\t\tcasl: []\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst USER = mutations.USER.bind( stubThis );\n\t\t\tUSER( state, testUserObj );\n\t\t\texpect( state.user ).to.eql( testUserObj );\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\texpect( stubThis._vm.$ability.update )\n\t\t\t\t.to.have.been.calledWithExactly( testUserObj.casl );\n\t\t} );\n\t} );\n} );\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/AddRemoveTools.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":56,"column":15,"nodeType":"SpreadElement","messageId":"forbidden","endLine":56,"endColumn":35}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'addremovetools' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-tabs v-model=\"tab\">\n\t\t\t\t\t<v-tab\n\t\t\t\t\t\tv-for=\"item in items\"\n\t\t\t\t\t\t:key=\"item.href\"\n\t\t\t\t\t\t:href=\"'#' + item.href\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ item.label }}\n\t\t\t\t\t</v-tab>\n\t\t\t\t</v-tabs>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-tabs-items v-model=\"tab\">\n\t\t\t\t\t<v-tab-item\n\t\t\t\t\t\tv-for=\"item in items\"\n\t\t\t\t\t\t:key=\"item.href\"\n\t\t\t\t\t\t:value=\"item.href\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<component :is=\"item.component\" />\n\t\t\t\t\t</v-tab-item>\n\t\t\t\t</v-tabs-items>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport CreateNewTool from '@/components/tools/CreateNewTool';\nimport RegisterToolUrl from '@/components/tools/RegisterToolUrl';\nimport fetchMetaInfo from '@/helpers/metadata';\n\nexport default {\n\tcomponents: {\n\t\tCreateNewTool,\n\t\tRegisterToolUrl\n\t},\n\tcomputed: {\n\t\ttab: {\n\t\t\tset( tab ) {\n\t\t\t\tthis.$router.replace( {\n\t\t\t\t\tquery: { ...this.$route.query, tab }\n\t\t\t\t} );\n\t\t\t},\n\t\t\tget() {\n\t\t\t\treturn this.$route.query.tab;\n\t\t\t}\n\t\t},\n\t\titems() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\thref: 'tool-create',\n\t\t\t\t\tlabel: this.$t( 'createnewtool' ),\n\t\t\t\t\tcomponent: 'CreateNewTool'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\thref: 'urls',\n\t\t\t\t\tlabel: this.$t( 'submitjsonurl' ),\n\t\t\t\t\tcomponent: 'RegisterToolUrl'\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'addremovetools' );\n\t},\n\tmounted() {\n\t\tthis.$store.dispatch( 'user/getUserInfo' ).then(\n\t\t\t( user ) => {\n\t\t\t\tif ( !user.is_authenticated ) {\n\t\t\t\t\tthis.$notify.info(\n\t\t\t\t\t\tthis.$t( 'addremovetools-nologintext' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ApiDocs.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":51,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":51,"endColumn":38},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":52,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":52,"endColumn":36},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":55,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":55,"endColumn":51}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'apidocs' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<rapi-doc\n\t\t\t\t\tv-if=\"apispec\"\n\t\t\t\t\tref=\"rapidoc\"\n\t\t\t\t\tclass=\"no-gutters flex-wrap flex-column fill-height elevation-1 py-6\"\n\t\t\t\t\tallow-api-list-style-selection=\"false\"\n\t\t\t\t\tallow-authentication=\"false\"\n\t\t\t\t\tallow-search=\"false\"\n\t\t\t\t\tallow-server-selection=\"false\"\n\t\t\t\t\tallow-spec-file-load=\"false\"\n\t\t\t\t\tallow-spec-url-load=\"false\"\n\t\t\t\t\tlayout=\"column\"\n\t\t\t\t\tload-fonts=\"false\"\n\t\t\t\t\t:primary-color=\"$vuetify.theme.themes.light.primary\"\n\t\t\t\t\trender-style=\"view\"\n\t\t\t\t\tschema-description-expanded=\"true\"\n\t\t\t\t\tschema-style=\"tree\"\n\t\t\t\t\tshow-header=\"false\"\n\t\t\t\t\ttheme=\"light\"\n\t\t\t\t\tuse-path-in-nav-bar=\"true\"\n\t\t\t\t\tapi-key-name=\"X-CSRFToken\"\n\t\t\t\t\tapi-key-location=\"header\"\n\t\t\t\t\t:api-key-value=\"user.csrf_token\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapState } from 'vuex';\nimport 'rapidoc';\nimport fetchMetaInfo from '@/helpers/metadata';\n\nexport default {\n\tname: 'ApiDocs',\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'apidocs' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'api', [ 'apispec' ] ),\n\t\t...mapState( 'user', [ 'user' ] )\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'fetchOpenAPISchema' ] ),\n\n\t\t/**\n\t\t * Load an OpenAPI spec into the display component.\n\t\t *\n\t\t * @param {Object|string} spec - OpenAPI spec or URL to fetch from\n\t\t */\n\t\tloadSpec( spec ) {\n\t\t\tthis.$nextTick( () => this.$refs.rapidoc.loadSpec( spec ) );\n\t\t}\n\t},\n\twatch: {\n\t\tapispec: {\n\t\t\thandler( newVal ) {\n\t\t\t\tif ( Object.keys( newVal ).length > 0 ) {\n\t\t\t\t\tthis.loadSpec( newVal );\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.fetchOpenAPISchema().then( () => this.loadSpec( this.apispec ) );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/AuditLogs.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":192,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":192,"endColumn":57}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'auditlogs' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'auditlogs-pagetitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-form ref=\"filtersform\">\n\t\t\t\t<v-row>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-text-field\n\t\t\t\t\t\t\tv-model=\"filters.user\"\n\t\t\t\t\t\t\t:label=\"$t( 'auditlogs-username' )\"\n\t\t\t\t\t\t\tprepend-icon=\"mdi-account-outline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-select\n\t\t\t\t\t\t\tv-model=\"filters.target_type\"\n\t\t\t\t\t\t\t:label=\"$t( 'auditlogs-type' )\"\n\t\t\t\t\t\t\t:items=\"targets\"\n\t\t\t\t\t\t\titem-value=\"type\"\n\t\t\t\t\t\t\titem-text=\"label\"\n\t\t\t\t\t\t\tprepend-icon=\"mdi-filter-variant\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\tv-model=\"filters.after\"\n\t\t\t\t\t\t\t:label=\"$t( 'datepicker-startdate' )\"\n\t\t\t\t\t\t\tsuffix=\"T00:00Z\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\tv-model=\"filters.before\"\n\t\t\t\t\t\t\t:label=\"$t( 'datepicker-enddate' )\"\n\t\t\t\t\t\t\tsuffix=\"T23:59:59.999Z\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t@click=\"filterLogs\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'auditlogs-filter' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-magnify\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\tsm=\"3\"\n\t\t\t\t\t\tmd=\"2\"\n\t\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t@click=\"clearFilters\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ $t( 'auditlogs-clear' ) }}\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-close\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-form>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"!loading && numLogs === 0\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t{{ $t( 'auditlogs-nologsfoundtext' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<LogEvent\n\t\t\t\t\tv-for=\"log in auditLogs\"\n\t\t\t\t\t:key=\"log.id\"\n\t\t\t\t\t:log=\"log\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numLogs > 0\"\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"Math.ceil( numLogs / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport { fetchMetaInfo } from '@/helpers/metadata';\nimport { filterEmpty } from '@/helpers/object';\nimport DatePicker from '@/components/common/DatePicker';\nimport LogEvent from '@/components/auditlog/LogEvent';\n\nexport default {\n\tcomponents: {\n\t\tDatePicker,\n\t\tLogEvent\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10,\n\t\t\tloading: true,\n\t\t\tfilters: {\n\t\t\t\tuser: null,\n\t\t\t\ttarget_type: null,\n\t\t\t\tafter: null,\n\t\t\t\tbefore: null\n\t\t\t},\n\t\t\ttargets: [\n\t\t\t\t{\n\t\t\t\t\ttype: 'tool',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-tool' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'url',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-url' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'user',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-user' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'group',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-group' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'version',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-version' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'toollist',\n\t\t\t\t\tlabel: this.$t( 'auditlogs-targettype-toollist' )\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'auditlogs' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'auditlogs', [ 'auditLogs', 'numLogs' ] )\n\t},\n\tmethods: {\n\t\tfetchAuditLogs() {\n\t\t\tthis.loading = true;\n\t\t\tthis.$store.dispatch( 'auditlogs/fetchAuditLogs', {\n\t\t\t\tpage: this.page,\n\t\t\t\tfilters: this.filters\n\t\t\t} ).then( () => {\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.$router.push( {\n\t\t\t\t\tname: 'auditlogs',\n\t\t\t\t\tquery: filterEmpty( this.filters )\n\t\t\t\t} ).catch( () => {} );\n\t\t\t} );\n\t\t},\n\t\tgoToPage( page ) {\n\t\t\tthis.page = page;\n\t\t\tthis.fetchAuditLogs();\n\t\t},\n\t\tfilterLogs() {\n\t\t\tthis.page = 1;\n\t\t\tthis.fetchAuditLogs();\n\t\t},\n\t\tclearFilters() {\n\t\t\tthis.filters = {\n\t\t\t\tuser: null,\n\t\t\t\ttarget_type: null,\n\t\t\t\tafter: null,\n\t\t\t\tbefore: null\n\t\t\t};\n\t\t\tthis.$refs.filtersform.reset();\n\t\t\tthis.fetchAuditLogs();\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to filtered results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'user':\n\t\t\t\t\t\tthis.filters.user = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'target_type':\n\t\t\t\t\t\tthis.filters.target_type = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'after':\n\t\t\t\t\t\tthis.filters.after = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'before':\n\t\t\t\t\t\tthis.filters.before = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.loadStateFromQueryString();\n\t\tthis.fetchAuditLogs();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/CrawlerHistory.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":43,"column":10,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":43,"endColumn":48},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":208,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":213,"endColumn":6},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":269,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":273,"endColumn":13},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":277,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":293,"endColumn":13},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":289,"column":8,"nodeType":"SpreadElement","messageId":"forbidden","endLine":289,"endColumn":37},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":290,"column":8,"nodeType":"SpreadElement","messageId":"forbidden","endLine":290,"endColumn":34}],"suppressedMessages":[],"errorCount":6,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'crawlerhistory' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'crawlerhistory-pagesubtitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row\n\t\t\tclass=\"elevation-2 pa-2 mx-1 my-4 table-crawler-history\"\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h3 class=\"text-h5\">\n\t\t\t\t\t{{ $t( 'crawlerruns' ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t\t<v-col\n\t\t\t\tlg=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-data-table\n\t\t\t\t\tv-model=\"crawlerRunSelected\"\n\t\t\t\t\tv-model:options=\"crawlerHistoryOptions\"\n\t\t\t\t\t:headers=\"crawlerRunsHeaders\"\n\t\t\t\t\t:items=\"crawlerHistory\"\n\t\t\t\t\t:server-items-length=\"numCrawlerRuns\"\n\t\t\t\t\tclass=\"elevation-0 mt-2 table-striped\"\n\t\t\t\t\thide-default-footer\n\t\t\t\t\tmobile-breakpoint=\"0\"\n\t\t\t\t\tsingle-select\n\t\t\t\t\t:loading=\"crawlerHistoryLoading\"\n\t\t\t\t\t@click:row=\"crawlerRunRowClicked\"\n\t\t\t\t>\n\t\t\t\t\t<template #[`item.end_date`]=\"{ item }\">\n\t\t\t\t\t\t{{ item.end_date | moment( \"utc\", \"lll\" ) }}\n\t\t\t\t\t</template>\n\t\t\t\t</v-data-table>\n\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numCrawlerRuns > 0\"\n\t\t\t\t\tv-model=\"runsPage\"\n\t\t\t\t\t:length=\"Math.ceil( numCrawlerRuns / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\t@input=\"goToRunsPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\n\t\t\t<v-col\n\t\t\t\tlg=\"6\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-row>\n\t\t\t\t\t<v-col cols=\"12\"\n\t\t\t\t\t\tmd=\"6\"\n\t\t\t\t\t\tlg=\"12\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<LineChart :height=\"250\" :chart-data=\"crawledUrlsChartData\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"12\"\n\t\t\t\t\t\tmd=\"6\"\n\t\t\t\t\t\tlg=\"12\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<LineChart :height=\"250\" :chart-data=\"totalToolsChartData\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row\n\t\t\tref=\"crawldetails\"\n\t\t\tclass=\"elevation-2 mx-1 my-4 pa-2\"\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h3 class=\"text-h5\">\n\t\t\t\t\t{{ $t( 'urlscrawledon', [ crawlerRunEndDate ] ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-data-table\n\t\t\t\t\tv-model:options=\"crawlerUrlsOptions\"\n\t\t\t\t\tv-model:expanded=\"expanded\"\n\t\t\t\t\t:headers=\"urlsCrawledHeaders\"\n\t\t\t\t\t:items=\"crawlerUrls\"\n\t\t\t\t\t:server-items-length=\"numCrawlerUrls\"\n\t\t\t\t\titem-key=\"url.url\"\n\t\t\t\t\tshow-expand\n\t\t\t\t\tsingle-expand\n\t\t\t\t\tclass=\"elevation-0 mt-2 table-striped\"\n\t\t\t\t\thide-default-footer\n\t\t\t\t\tmobile-breakpoint=\"0\"\n\t\t\t\t\t:loading=\"crawlerUrlsLoading\"\n\t\t\t\t>\n\t\t\t\t\t<template #[`item.url.url`]=\"{ item }\">\n\t\t\t\t\t\t<a :href=\"item.url.url\" target=\"_blank\">{{ item.url.url }}</a>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<template #[`item.url.created_by.username`]=\"{ item }\">\n\t\t\t\t\t\t<a :href=\"`http://meta.wikimedia.org/wiki/User:${item.url.created_by.username}`\"\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>{{ item.url.created_by.username }}</a>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<template #[`item.valid`]=\"{ item }\">\n\t\t\t\t\t\t<span v-if=\"item.valid\" class=\"success--text pa-0 ma-0\">\n\t\t\t\t\t\t\t{{ $t( 'valid' ) }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span v-else class=\"error--text pa-0 ma-0\">\n\t\t\t\t\t\t\t{{ $t( 'invalid' ) }}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #expanded-item=\"{ headers, item }\">\n\t\t\t\t\t\t<td\n\t\t\t\t\t\t\tclass=\"pa-2\"\n\t\t\t\t\t\t\t:colspan=\"headers.length\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<pre class=\"pre-logs\">{{ item.logs }}</pre>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</template>\n\t\t\t\t</v-data-table>\n\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numCrawlerUrls > 0\"\n\t\t\t\t\tv-model=\"urlsPage\"\n\t\t\t\t\t:length=\"Math.ceil( numCrawlerUrls / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\t@input=\"goToUrlsPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<ScrollTop />\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport LineChart from '@/components/chart/LineChart.js';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport { filterEmpty } from '@/helpers/object';\nimport ScrollTop from '@/components/common/ScrollTop';\n\nexport default {\n\tcomponents: {\n\t\tLineChart,\n\t\tScrollTop\n\t},\n\tdata() {\n\t\treturn {\n\t\t\trunsPage: 1,\n\t\t\turlsPage: 1,\n\t\t\titemsPerPage: 10,\n\t\t\tcrawlerRunEndDate: null,\n\t\t\tcrawlerRunId: 0,\n\t\t\tcrawlerRunSelected: [],\n\t\t\texpanded: [],\n\t\t\tcrawlerUrlsLoading: null,\n\t\t\tcrawlerHistoryLoading: null,\n\t\t\tcrawlerUrlsFilters: {\n\t\t\t\turls_ordering: null\n\t\t\t},\n\t\t\tcrawlerHistoryFilters: {\n\t\t\t\truns_ordering: null\n\t\t\t},\n\t\t\tcrawlerUrlsOptions: {},\n\t\t\tcrawlerHistoryOptions: {}\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'crawlerhistory' );\n\t},\n\tcomputed: {\n\t\tcrawledUrlsChartData() {\n\t\t\treturn {\n\t\t\t\tlabels: this.crawlEndDates,\n\t\t\t\tdatasets: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: this.$t( 'urlscrawled' ),\n\t\t\t\t\t\tbackgroundColor: this.$vuetify.theme.themes.light.accent,\n\t\t\t\t\t\tdata: this.crawlUrlsCrawled\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\ttotalToolsChartData() {\n\t\t\treturn {\n\t\t\t\tlabels: this.crawlEndDates,\n\t\t\t\tdatasets: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: this.$t( 'totaltools' ),\n\t\t\t\t\t\tbackgroundColor: this.$vuetify.theme.themes.light.primary,\n\t\t\t\t\t\tdata: this.crawlTotalTools\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t};\n\t\t},\n\t\t...mapState( 'crawler', [\n\t\t\t'crawlerHistory',\n\t\t\t'numCrawlerRuns',\n\t\t\t'crawlerUrls',\n\t\t\t'numCrawlerUrls'\n\t\t] ),\n\t\tcrawlerRunsHeaders() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'crawlerrundate' ),\n\t\t\t\t\tvalue: 'end_date'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'urlscrawled' ),\n\t\t\t\t\tvalue: 'crawled_urls'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'totaltools' ),\n\t\t\t\t\tvalue: 'total_tools'\n\t\t\t\t}\n\t\t\t];\n\t\t},\n\t\turlsCrawledHeaders() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'url' ),\n\t\t\t\t\tvalue: 'url.url'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'createdby' ),\n\t\t\t\t\tvalue: 'url.created_by.username'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'status' ),\n\t\t\t\t\tvalue: 'valid'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: '',\n\t\t\t\t\tvalue: 'data-table-expand'\n\t\t\t\t}\n\t\t\t];\n\t\t},\n\t\tcrawlEndDates() {\n\t\t\treturn this.crawlerHistory.map( ( crawl ) =>\n\t\t\t\tthis.$moment.utc( crawl.end_date ).format( 'lll' )\n\t\t\t).reverse();\n\t\t},\n\t\tcrawlTotalTools() {\n\t\t\treturn this.crawlerHistory.map( ( crawl ) =>\n\t\t\t\tcrawl.total_tools\n\t\t\t).reverse();\n\t\t},\n\t\tcrawlUrlsCrawled() {\n\t\t\treturn this.crawlerHistory.map( ( crawl ) =>\n\t\t\t\tcrawl.crawled_urls\n\t\t\t).reverse();\n\t\t}\n\t},\n\tmethods: {\n\t\tfetchCrawlerHistory() {\n\t\t\tthis.crawlerHistoryLoading = true;\n\t\t\tthis.$store.dispatch( 'crawler/fetchCrawlerHistory', {\n\t\t\t\tpage: this.runsPage,\n\t\t\t\tfilters: this.crawlerHistoryFilters\n\t\t\t} )\n\t\t\t\t.finally( () => { this.crawlerHistoryLoading = false; } );\n\t\t},\n\t\tfetchCrawlerUrls() {\n\t\t\tthis.crawlerUrlsLoading = true;\n\t\t\tthis.$store.dispatch( 'crawler/fetchCrawlerUrls',\n\t\t\t\t{ page: this.urlsPage,\n\t\t\t\t\trunId: this.crawlerRunId,\n\t\t\t\t\tfilters: this.crawlerUrlsFilters\n\t\t\t\t} )\n\t\t\t\t.then( () => {\n\t\t\t\t\tthis.$router.push( {\n\t\t\t\t\t\tpath: document.location.pathname,\n\t\t\t\t\t\tquery: filterEmpty( {\n\t\t\t\t\t\t\truns_page: this.runsPage,\n\t\t\t\t\t\t\turls_page: this.urlsPage,\n\t\t\t\t\t\t\truns_id: this.crawlerRunId,\n\t\t\t\t\t\t\t...this.crawlerHistoryFilters,\n\t\t\t\t\t\t\t...this.crawlerUrlsFilters } )\n\t\t\t\t\t} ).catch( () => {} );\n\t\t\t\t} )\n\t\t\t\t.finally( () => { this.crawlerUrlsLoading = false; } );\n\t\t},\n\t\tgoToRunsPage( page ) {\n\t\t\tthis.runsPage = page;\n\t\t\tthis.fetchCrawlerHistory();\n\t\t},\n\t\tgoToUrlsPage( page ) {\n\t\t\tthis.urlsPage = page;\n\t\t\tthis.fetchCrawlerUrls();\n\t\t},\n\t\tchangeUrlsCrawled() {\n\t\t\tlet item = this.crawlerHistory.filter( ( run ) => run.id === this.crawlerRunId );\n\t\t\tif ( item.length === 0 ) {\n\t\t\t\titem = [ this.crawlerHistory[ 0 ] ];\n\t\t\t\tthis.crawlerRunId = item[ 0 ].id;\n\t\t\t}\n\t\t\tthis.crawlerRunEndDate = this.$moment.utc( item[ 0 ].end_date ).format( 'lll' );\n\t\t\tthis.crawlerRunSelected = item;\n\t\t\tthis.fetchCrawlerUrls();\n\t\t},\n\t\tcrawlerRunRowClicked( item ) {\n\t\t\tthis.crawlerRunId = item.id;\n\t\t\tthis.urlsPage = 1;\n\t\t\tthis.changeUrlsCrawled();\n\t\t\tthis.$vuetify.goTo( this.$refs.crawldetails );\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to filtered results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'runs_page':\n\t\t\t\t\t\tthis.runsPage = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'urls_page':\n\t\t\t\t\t\tthis.urlsPage = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'runs_id':\n\t\t\t\t\t\tthis.crawlerRunId = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'runs_ordering':\n\t\t\t\t\t\tthis.crawlerHistoryFilters.runs_ordering = value;\n\n\t\t\t\t\t\tif ( value[ 0 ] === '-' ) {\n\t\t\t\t\t\t\tthis.crawlerHistoryOptions.sortBy = [ value.replace( '-', '' ) ];\n\t\t\t\t\t\t\tthis.crawlerHistoryOptions.sortDesc = [ true ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.crawlerHistoryOptions.sortBy = [ value ];\n\t\t\t\t\t\t\tthis.crawlerHistoryOptions.sortDesc = [ false ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'urls_ordering':\n\t\t\t\t\t\tthis.crawlerUrlsFilters.urls_ordering = value;\n\n\t\t\t\t\t\tif ( value[ 0 ] === '-' ) {\n\t\t\t\t\t\t\tthis.crawlerUrlsOptions.sortBy = [\n\t\t\t\t\t\t\t\tvalue.replace( '-', '' ).split( '__' ).join( '.' ) ];\n\t\t\t\t\t\t\tthis.crawlerUrlsOptions.sortDesc = [ true ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.crawlerUrlsOptions.sortBy = [ value.split( '__' ).join( '.' ) ];\n\t\t\t\t\t\t\tthis.crawlerUrlsOptions.sortDesc = [ false ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\twatch: {\n\t\tcrawlerHistory( newVal, oldVal ) {\n\t\t\tif ( oldVal !== newVal ) {\n\t\t\t\tthis.changeUrlsCrawled();\n\t\t\t}\n\t\t},\n\t\tcrawlerHistoryOptions: {\n\t\t\thandler( _, oldVal ) {\n\t\t\t\tconst {\n\t\t\t\t\tsortBy,\n\t\t\t\t\tsortDesc\n\t\t\t\t} = this.crawlerHistoryOptions;\n\t\t\t\tif ( sortBy.length === 1 && sortDesc.length === 1 ) {\n\t\t\t\t\tif ( sortDesc[ 0 ] === false ) {\n\t\t\t\t\t\tthis.crawlerHistoryFilters.runs_ordering = sortBy[ 0 ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.crawlerHistoryFilters.runs_ordering = `-${sortBy[ 0 ]}`;\n\t\t\t\t\t}\n\t\t\t\t\tthis.fetchCrawlerHistory();\n\t\t\t\t} else if ( oldVal.sortBy ) {\n\t\t\t\t\tthis.crawlerHistoryFilters.runs_ordering = null;\n\t\t\t\t\tthis.fetchCrawlerHistory();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t},\n\t\tcrawlerUrlsOptions: {\n\t\t\thandler( _, oldVal ) {\n\t\t\t\tconst {\n\t\t\t\t\tsortBy,\n\t\t\t\t\tsortDesc\n\t\t\t\t} = this.crawlerUrlsOptions;\n\t\t\t\tif ( oldVal.sortBy && sortBy.length === 1 && sortDesc.length === 1 ) {\n\t\t\t\t\tif ( sortDesc[ 0 ] === false ) {\n\t\t\t\t\t\tthis.crawlerUrlsFilters\n\t\t\t\t\t\t\t.urls_ordering = sortBy[ 0 ].split( '.' ).join( '__' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.crawlerUrlsFilters\n\t\t\t\t\t\t\t.urls_ordering = `-${sortBy[ 0 ].split( '.' ).join( '__' )}`;\n\t\t\t\t\t}\n\t\t\t\t\tthis.fetchCrawlerUrls();\n\t\t\t\t} else if ( oldVal.sortBy ) {\n\t\t\t\t\tthis.crawlerUrlsFilters.urls_ordering = null;\n\t\t\t\t\tthis.fetchCrawlerUrls();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.loadStateFromQueryString();\n\t\tthis.fetchCrawlerHistory();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/DeveloperSettings.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":62,"column":15,"nodeType":"SpreadElement","messageId":"forbidden","endLine":62,"endColumn":35}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'developersettings' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'developersettings-pagesubtitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-tabs v-model=\"tab\">\n\t\t\t\t\t<v-tab\n\t\t\t\t\t\tv-for=\"item in items\"\n\t\t\t\t\t\t:key=\"item.href\"\n\t\t\t\t\t\t:href=\"'#' + item.href\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ item.label }}\n\t\t\t\t\t</v-tab>\n\t\t\t\t</v-tabs>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-tabs-items v-model=\"tab\">\n\t\t\t\t\t<v-tab-item\n\t\t\t\t\t\tv-for=\"item in items\"\n\t\t\t\t\t\t:key=\"item.href\"\n\t\t\t\t\t\t:value=\"item.href\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<component :is=\"item.component\" />\n\t\t\t\t\t</v-tab-item>\n\t\t\t\t</v-tabs-items>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport fetchMetaInfo from '@/helpers/metadata';\nimport RegisterApp from '@/components/oauth/RegisterApp';\nimport ClientApps from '@/components/oauth/ClientApps';\nimport AuthorizedApps from '@/components/oauth/AuthorizedApps';\nimport AuthToken from '@/components/user/AuthToken';\n\nexport default {\n\tcomponents: {\n\t\tRegisterApp,\n\t\tClientApps,\n\t\tAuthorizedApps,\n\t\tAuthToken\n\t},\n\tcomputed: {\n\t\ttab: {\n\t\t\tset( tab ) {\n\t\t\t\tthis.$router.replace( {\n\t\t\t\t\tquery: { ...this.$route.query, tab }\n\t\t\t\t} );\n\t\t\t},\n\t\t\tget() {\n\t\t\t\treturn this.$route.query.tab;\n\t\t\t}\n\t\t},\n\t\titems() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\thref: 'oauth-register',\n\t\t\t\t\tlabel: this.$t( 'registerapps' ),\n\t\t\t\t\tcomponent: 'RegisterApp'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\thref: 'oauth-clients',\n\t\t\t\t\tlabel: this.$t( 'clientapps' ),\n\t\t\t\t\tcomponent: 'ClientApps'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\thref: 'oauth-authorized',\n\t\t\t\t\tlabel: this.$t( 'authorizedapps' ),\n\t\t\t\t\tcomponent: 'AuthorizedApps'\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\thref: 'authtoken',\n\t\t\t\t\tlabel: this.$t( 'authtoken' ),\n\t\t\t\t\tcomponent: 'AuthToken'\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'developersettings' );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/EditToolOrAnnotations.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":64,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":64,"endColumn":37},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":93,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":93,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":94,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":94,"endColumn":48}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<EditTool\n\t\t\tv-if=\"editToolinfo &&\n\t\t\t\ttool_schema &&\n\t\t\t\ttool &&\n\t\t\t\t$can( 'change', tool )\"\n\t\t\t:tool=\"tool\"\n\t\t\t:tool-schema=\"tool_schema\"\n\t\t\t:annotations-schema=\"annotations_schema\"\n\t\t\t:links=\"links\"\n\t\t/>\n\t\t<EditAnnotations\n\t\t\tv-else-if=\"editAnnotations &&\n\t\t\t\tannotations_schema &&\n\t\t\t\ttool &&\n\t\t\t\t$can( 'add', 'toolinfo/annotations' )\"\n\t\t\t:tool=\"tool\"\n\t\t\t:schema=\"annotations_schema\"\n\t\t\t:links=\"links\"\n\t\t/>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<ScrollTop />\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapActions } from 'vuex';\n\nimport fetchMetaInfo from '@/helpers/metadata';\n\nimport EditAnnotations from '@/components/tools/EditAnnotations';\nimport EditTool from '@/components/tools/EditTool';\nimport ScrollTop from '@/components/common/ScrollTop';\n\nconst EDIT_TOOL = 'edit';\nconst EDIT_ANNOTATIONS = 'edit-annotations';\n\nexport default {\n\tname: 'EditToolOrAnnotations',\n\tcomponents: {\n\t\tEditTool,\n\t\tEditAnnotations,\n\t\tScrollTop\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tlinks: [\n\t\t\t\t'user_docs_url',\n\t\t\t\t'developer_docs_url',\n\t\t\t\t'privacy_policy_url',\n\t\t\t\t'feedback_url',\n\t\t\t\t'url_alternates'\n\t\t\t]\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'tools-edit', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'tools', [ 'tool' ] ),\n\t\tname() {\n\t\t\treturn this.$route.params.name;\n\t\t},\n\t\teditType() {\n\t\t\treturn this.$route.path.split( '/' ).pop();\n\t\t},\n\t\teditToolinfo() {\n\t\t\treturn this.editType === EDIT_TOOL;\n\t\t},\n\t\teditAnnotations() {\n\t\t\treturn this.editType === EDIT_ANNOTATIONS;\n\t\t}\n\t},\n\tasyncComputed: {\n\t\ttool_schema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'tools_update' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t},\n\t\tannotations_schema: {\n\t\t\tget() {\n\t\t\t\treturn this.getRequestSchema( 'tools_annotations_update' );\n\t\t\t},\n\t\t\tdefault: false\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'api', [ 'getRequestSchema' ] ),\n\t\t...mapActions( 'tools', [ 'getToolByName' ] )\n\t},\n\tmounted() {\n\t\tthis.getToolByName( this.name );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/Favorites.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":57,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":57,"endColumn":70}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col>\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'favorites-pagetitle' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row v-if=\"favoriteTools.length === 0\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t{{ $t( 'favorites-notoolsfoundtext' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row class=\"my-2\">\n\t\t\t<v-col v-for=\"tool in favoriteTools\"\n\t\t\t\t:key=\"tool.name\"\n\t\t\t\tclass=\"lists pa-0\"\n\t\t\t>\n\t\t\t\t<v-card\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\tmin-width=\"210\"\n\t\t\t\t>\n\t\t\t\t\t<ToolCard :tool=\"tool\" />\n\t\t\t\t</v-card>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-pagination\n\t\t\tv-if=\"numFavoriteTools > 0\"\n\t\t\tv-model=\"page\"\n\t\t\t:length=\"Math.ceil( numFavoriteTools / itemsPerPage )\"\n\t\t\tclass=\"ma-4\"\n\t\t\ttotal-visible=\"10\"\n\t\t\t@input=\"goToPage\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport ToolCard from '@/components/tools/ToolCard';\n\nexport default {\n\tcomponents: {\n\t\tToolCard\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10\n\t\t};\n\t},\n\tcomputed: {\n\t\t...mapState( 'favorites', [ 'favoriteTools', 'numFavoriteTools' ] )\n\t},\n\tmethods: {\n\t\tgetFavoriteTools() {\n\t\t\tthis.$store.dispatch( 'favorites/getFavoriteTools', this.page );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tconst query = { page: parseInt( num ) || 1 };\n\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t}\n\t},\n\twatch: {\n\t\t/**\n\t\t * Watch ?page=... and update favorite tools.\n\t\t *\n\t\t * @param {string} newValue\n\t\t */\n\t\t'$route.query.page'( newValue ) {\n\t\t\tthis.page = parseInt( newValue ) || 1;\n\t\t\tthis.getFavoriteTools();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.page = parseInt( this.$route.query.page ) || 1;\n\t\tthis.getFavoriteTools();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/Home.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":112,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":114,"endColumn":6},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":115,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":115,"endColumn":57},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":118,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":118,"endColumn":43}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"pa-0\">\n\t\t\t\t<v-row no-gutters>\n\t\t\t\t\t<v-col sm=\"auto\" cols=\"12\">\n\t\t\t\t\t\t<v-avatar\n\t\t\t\t\t\t\tclass=\"ma-3\"\n\t\t\t\t\t\t\tsize=\"150\"\n\t\t\t\t\t\t\ttile\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-img src=\"/static/img/logo-community.svg\" />\n\t\t\t\t\t\t</v-avatar>\n\t\t\t\t\t</v-col>\n\n\t\t\t\t\t<v-col>\n\t\t\t\t\t\t<h1 class=\"text-h4 mx-1 my-3\">\n\t\t\t\t\t\t\t{{ $t( 'welcomemessage' ) }}\n\t\t\t\t\t\t</h1>\n\n\t\t\t\t\t\t<div class=\"text-subtitle-1 ma-1\">\n\t\t\t\t\t\t\t{{ $t( 'tagline-about' ) }}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div v-if=\"totalTools\" class=\"text-subtitle-1 ma-1\">\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tsize=\"20\"\n\t\t\t\t\t\t\t\tcolor=\"base20\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-update\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'newtoolsfound', [ lastCrawlChanged ] ) }}\n\t\t\t\t\t\t\t{{ $t(\n\t\t\t\t\t\t\t\t'tools-lastupdated',\n\t\t\t\t\t\t\t\t[ formatDate( lastCrawlTime ) ]\n\t\t\t\t\t\t\t) }}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div v-if=\"totalTools\" class=\"text-subtitle-1 ma-1\">\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tsize=\"20\"\n\t\t\t\t\t\t\t\tcolor=\"base20\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-tools\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t{{ $t( 'toolsfound', [ totalTools ] ) }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tmd=\"8\"\n\t\t\t\tcols=\"12\"\n\t\t\t\tclass=\"mx-auto pb-8\"\n\t\t\t>\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\tblock\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname: 'search',\n\t\t\t\t\t\tquery: {\n\t\t\t\t\t\t\tordering: '-modified_date'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon\n\t\t\t\t\t\tsize=\"20\"\n\t\t\t\t\t\tdark\n\t\t\t\t\t>\n\t\t\t\t\t\tmdi-tools\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'browse-all-tools' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<Lists v-if=\"featuredLists.count\"\n\t\t\t:lists=\"featuredLists\"\n\t\t/>\n\n\t\t<v-pagination\n\t\t\tv-if=\"featuredLists.count > 0\"\n\t\t\tv-model=\"page\"\n\t\t\t:length=\"Math.ceil( featuredLists.count / itemsPerPage )\"\n\t\t\tclass=\"ma-4\"\n\t\t\ttotal-visible=\"10\"\n\t\t\t@input=\"goToPage\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapState } from 'vuex';\nimport '@/assets/styles/index.css';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport Lists from '@/components/lists/Lists';\n\nexport default {\n\tcomponents: {\n\t\tLists\n\t},\n\tdata: () => ( {\n\t\tpage: 1,\n\t\titemsPerPage: 10\n\t} ),\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'home' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'ui', [\n\t\t\t'totalTools', 'lastCrawlTime', 'lastCrawlChanged'\n\t\t] ),\n\t\t...mapState( 'lists', [ 'featuredLists', 'myLists' ] )\n\t},\n\tmethods: {\n\t\t...mapActions( 'ui', [ 'getHomeData' ] ),\n\t\tgetFeaturedLists() {\n\t\t\tthis.$store.dispatch( 'lists/getFeaturedLists', this.page );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tconst query = { page: parseInt( num ) || 1 };\n\t\t\t// Update query string and let our watch trigger a search\n\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t},\n\t\tformatDate( date ) {\n\t\t\treturn this.$moment.utc( date ).format( 'lll' );\n\t\t}\n\t},\n\twatch: {\n\t\t/**\n\t\t * Watch ?page=... and update displayed tools.\n\t\t *\n\t\t * @param {string} newValue\n\t\t */\n\t\t'$route.query.page'( newValue ) {\n\t\t\tthis.page = parseInt( newValue ) || 1;\n\t\t\tthis.getFeaturedLists();\n\t\t},\n\t\tmyLists() {\n\t\t\tthis.getFeaturedLists();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.page = parseInt( this.$route.query.page ) || 1;\n\t\tthis.getHomeData();\n\t\tthis.getFeaturedLists();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ListHistory.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":74,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":74,"endColumn":62}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'lists-history' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'lists-view', params: { id: id } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtolistinfo' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'listhistory-pagesubtitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<Revisions\n\t\t\t\t\t:revisions=\"listRevisions\"\n\t\t\t\t\t@update-revisions=\"getRevisions\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numRevisions > 0\"\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"Math.ceil( numRevisions / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport Revisions from '@/components/common/Revisions';\n\nexport default {\n\tname: 'ListHistory',\n\tcomponents: {\n\t\tRevisions\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tid: this.$route.params.id,\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'lists-history', this.id );\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'listRevisions', 'numRevisions' ] )\n\t},\n\tmethods: {\n\t\tgetRevisions() {\n\t\t\tthis.$store.dispatch( 'lists/updateListRevisions', { page: this.page, id: this.id } );\n\t\t},\n\t\tgoToPage( page ) {\n\t\t\tthis.page = page;\n\t\t\tthis.getRevisions();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getRevisions();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ListRevisionsDiff.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":101,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":101,"endColumn":61},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":119,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":119,"endColumn":50}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"changes\">\n\t\t<v-row>\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'lists-diff' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'lists-history', params: { id: id } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtolisthistory' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"listRevision\">\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t{{ $t( 'viewlistrevisionsdiff', [\n\t\t\t\t\tid,\n\t\t\t\t\tlistRevision.toollist.title\n\t\t\t\t] ) }}\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"diffRevision\"\n\t\t\tclass=\"my-4\"\n\t\t>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'listrevisioninfo', [\n\t\t\t\t\t\tformatDate( diffRevision.original.timestamp ),\n\t\t\t\t\t\tdiffRevision.original.user.username,\n\t\t\t\t\t\tdiffRevision.original.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'listrevisioninfo', [\n\t\t\t\t\t\tformatDate( diffRevision.result.timestamp ),\n\t\t\t\t\t\tdiffRevision.result.user.username,\n\t\t\t\t\t\tdiffRevision.result.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"my-2\">\n\t\t\t\t<v-row v-for=\"( op, idx ) in changes\"\n\t\t\t\t\t:key=\"idx\"\n\t\t\t\t>\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-row class=\"ms-2 cols\">\n\t\t\t\t\t\t\t<DiffPath :path=\"op.path\" />\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<DiffValue op=\"remove\" :value=\"op.oldValue\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-row class=\"ms-2 cols\">\n\t\t\t\t\t\t\t<DiffPath :path=\"op.path\" />\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<DiffValue op=\"add\" :value=\"op.newValue\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex';\nimport { normalizeEmpty, computeChangeInfo } from '@/helpers/diff';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport DiffPath from '@/components/diff/DiffPath';\nimport DiffValue from '@/components/diff/DiffValue';\n\nexport default {\n\tname: 'ListRevisionsDiff',\n\tcomponents: {\n\t\tDiffPath,\n\t\tDiffValue\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tid: this.$route.params.id,\n\t\t\trevId: this.$route.params.revId,\n\t\t\totherRevId: this.$route.params.otherRevId\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'lists-diff', this.id );\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'diffRevision', 'listRevision' ] ),\n\t\t/**\n\t\t * Compute changes to render as diff based on JSON Patch from API.\n\t\t *\n\t\t * @return {Object[]}\n\t\t */\n\t\tchanges() {\n\t\t\tif ( !this.diffRevision || !this.listRevision ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn computeChangeInfo(\n\t\t\t\tthis.diffRevision.operations,\n\t\t\t\tthis.listRevision.toollist,\n\t\t\t\tthis.formatProperty\n\t\t\t);\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapMutations( 'lists', [ 'DIFF_REVISION' ] ),\n\t\tgetDiff() {\n\t\t\tthis.$store.dispatch( 'lists/getListRevisionsDiff', {\n\t\t\t\tid: this.id,\n\t\t\t\trevId: this.revId,\n\t\t\t\totherId: this.otherRevId\n\t\t\t} );\n\t\t},\n\t\tgetRevision() {\n\t\t\tthis.$store.dispatch( 'lists/getListRevision', {\n\t\t\t\tid: this.id,\n\t\t\t\trevId: this.revId\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Format a property value for display to the user.\n\t\t *\n\t\t * @param {string} pointer - JSON-Pointer to property\n\t\t * @param {*} value - property value\n\t\t * @return {*}\n\t\t */\n\t\tformatProperty( pointer, value ) {\n\t\t\tif ( pointer.indexOf( '/tools/' ) !== -1 ) {\n\t\t\t\tif ( !!value && typeof value === 'object' ) {\n\t\t\t\t\tvalue = value.name;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn normalizeEmpty( value );\n\t\t},\n\t\tformatDate( date ) {\n\t\t\treturn this.$moment.utc( date ).format( 'lll' );\n\t\t}\n\t},\n\tmounted() {\n\t\t// Clear any data from a prior view\n\t\tthis.DIFF_REVISION( null );\n\t\tthis.getDiff();\n\t\tthis.getRevision();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ListView.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":69,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":69,"endColumn":53},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":72,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":72,"endColumn":79},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":73,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":73,"endColumn":58}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row v-if=\"revId && listRevision\">\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'listrevisioninfo', [\n\t\t\t\t\t\tlistRevision.timestamp,\n\t\t\t\t\t\tlistRevision.user.username,\n\t\t\t\t\t\tlistRevision.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t\t<template v-if=\"$can( 'patrol', 'reversion/version' )\">\n\t\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t\t<template v-if=\"!listRevision.patrolled\">\n\t\t\t\t\t\t\t(<a @click=\"patrol( listRevision.id )\">\n\t\t\t\t\t\t\t\t{{ $t( 'markaspatrolled' ) }}\n\t\t\t\t\t\t\t</a>)\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t(<span>{{ $t( 'patrolled' ) }}</span>)\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</h3>\n\t\t\t\t</template>\n\t\t\t</v-col>\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'lists-history', params: { id: id } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtolisthistory' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<ListInfo\n\t\t\t:list=\"( revId && listRevision ) ? listRevision.toollist : list\"\n\t\t\t:rev-id=\"revId\"\n\t\t\t:show-clipboard-msg=\"showClipboardMsg\"\n\t\t\t@copy-to-clipboard=\"copyToClipboard\"\n\t\t\t@delete-list=\"deleteList_\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapMutations, mapState } from 'vuex';\nimport ListInfo from '@/components/lists/ListInfo';\nimport fetchMetaInfo from '@/helpers/metadata';\n\nexport default {\n\tname: 'ListView',\n\tcomponents: {\n\t\tListInfo\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tid: this.$route.params.id,\n\t\t\trevId: this.$route.params.revId,\n\t\t\tshowClipboardMsg: false\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'lists-view', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'list', 'listRevision' ] )\n\t},\n\tmethods: {\n\t\t...mapActions( 'lists', [ 'getListById', 'getListRevision', 'deleteList' ] ),\n\t\t...mapMutations( 'lists', [ 'LIST', 'LIST_REVISION' ] ),\n\n\t\tpatrol( revId ) {\n\t\t\tthis.$store.dispatch( 'lists/markRevisionAsPatrolled', {\n\t\t\t\tid: this.id,\n\t\t\t\trevId: revId,\n\t\t\t\tpage: 1\n\t\t\t} ).then( () => {\n\t\t\t\tthis.getListInfo();\n\t\t\t} );\n\t\t},\n\t\tgetListInfo() {\n\t\t\tif ( this.revId ) {\n\t\t\t\tthis.getListRevision( { id: this.id, revId: this.revId } );\n\t\t\t} else {\n\t\t\t\tthis.getListById( this.id );\n\t\t\t}\n\t\t},\n\t\tcopyToClipboard() {\n\t\t\tconst fullUrl = window.location.origin + this.$route.path;\n\t\t\tthis.$copyText( fullUrl ).then( () => {\n\t\t\t\tthis.showClipboardMsg = true;\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tthis.showClipboardMsg = false;\n\t\t\t\t}, 20000 );\n\t\t\t}, this );\n\t\t},\n\t\tdeleteList_() {\n\t\t\tthis.deleteList( this.id ).then(\n\t\t\t\t() => {\n\t\t\t\t\tthis.$router.push( { name: 'lists' } );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getListInfo();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/Members.vue","messages":[{"ruleId":"vue/no-deprecated-filter","severity":2,"message":"Filters are deprecated.","line":99,"column":10,"nodeType":"VFilterSequenceExpression","messageId":"noDeprecatedFilter","endLine":99,"endColumn":44},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":278,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":278,"endColumn":49},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":279,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":279,"endColumn":56},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":331,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":340,"endColumn":15}],"suppressedMessages":[],"errorCount":4,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'members' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'members-pagetitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-form ref=\"filtersform\">\n\t\t\t<v-row>\n\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\tmd=\"4\"\n\t\t\t\t>\n\t\t\t\t\t<v-text-field\n\t\t\t\t\t\tv-model=\"filters.username\"\n\t\t\t\t\t\t:label=\"$t( 'members-userslist-header-username' )\"\n\t\t\t\t\t\tprepend-icon=\"mdi-account-outline\"\n\t\t\t\t\t/>\n\t\t\t\t</v-col>\n\n\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\tmd=\"4\"\n\t\t\t\t>\n\t\t\t\t\t<v-select\n\t\t\t\t\t\tv-model=\"filters.groups_id\"\n\t\t\t\t\t\t:label=\"$t( 'members-groupselect-label' )\"\n\t\t\t\t\t\t:items=\"groups\"\n\t\t\t\t\t\titem-text=\"name\"\n\t\t\t\t\t\titem-value=\"id\"\n\t\t\t\t\t\tprepend-icon=\"mdi-filter-variant\"\n\t\t\t\t\t/>\n\t\t\t\t</v-col>\n\n\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\tmd=\"2\"\n\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\tblock\n\t\t\t\t\t\t@click=\"filterUsers\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $t( 'filter' ) }}\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tright\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-magnify\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\tmd=\"2\"\n\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t>\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tblock\n\t\t\t\t\t\t@click=\"clearFilters\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{{ $t( 'clear' ) }}\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tright\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-close\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-col>\n\t\t\t</v-row>\n\t\t</v-form>\n\n\t\t<v-row\n\t\t\tclass=\"my-4\"\n\t\t>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-data-table\n\t\t\t\t\tv-model:options=\"options\"\n\t\t\t\t\t:headers=\"usersListHeaders\"\n\t\t\t\t\t:items=\"users\"\n\t\t\t\t\t:server-items-length=\"numUsers\"\n\t\t\t\t\tclass=\"elevation-2 mt-2\"\n\t\t\t\t\thide-default-footer\n\t\t\t\t\tmobile-breakpoint=\"0\"\n\t\t\t\t\t:loading=\"usersLoading\"\n\t\t\t\t>\n\t\t\t\t\t<template #[`item.username`]=\"{ item }\">\n\t\t\t\t\t\t<a :href=\"`http://meta.wikimedia.org/wiki/User:${item.username}`\" target=\"_blank\">{{ item.username\n\t\t\t\t\t\t}}</a>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #[`item.date_joined`]=\"{ item }\">\n\t\t\t\t\t\t{{ item.date_joined | moment( 'lll' ) }}\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #[`item.groups`]=\"{ item }\">\n\t\t\t\t\t\t<v-chip\n\t\t\t\t\t\t\tv-for=\"group in item.groups\"\n\t\t\t\t\t\t\t:key=\"group.name\"\n\t\t\t\t\t\t\t:ripple=\"false\"\n\t\t\t\t\t\t\tdisabled\n\t\t\t\t\t\t\tclass=\"ma-1 opacity-1\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ group.name }}\n\t\t\t\t\t\t</v-chip>\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #[`item.add_remove_member`]=\"{ item }\">\n\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\tclass=\"mt-2 mb-2\"\n\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\t@click=\"invokeDialog( item )\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tmdi-pencil\n\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t</template>\n\t\t\t\t</v-data-table>\n\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numUsers > 0\"\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"Math.ceil( numUsers / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-dialog\n\t\t\tv-model=\"dialog.open\"\n\t\t\tpersistent\n\t\t\tmax-width=\"600px\"\n\t\t\t@keydown.esc=\"dialog.open = false\"\n\t\t>\n\t\t\t<v-card>\n\t\t\t\t<v-card-title>\n\t\t\t\t\t<span class=\"text-h5\">{{ $t( 'members-dialog-title',\n\t\t\t\t\t\t[ dialog.user.username ] ) }}</span>\n\t\t\t\t</v-card-title>\n\n\t\t\t\t<v-card-text>\n\t\t\t\t\t<v-container>\n\t\t\t\t\t\t<v-row v-if=\"notification !== null\">\n\t\t\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t\t\t<v-alert\n\t\t\t\t\t\t\t\t\t:type=\"notification.type\"\n\t\t\t\t\t\t\t\t\tdismissible\n\t\t\t\t\t\t\t\t\t@input=\"clearNotification\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ notification.message }}\n\t\t\t\t\t\t\t\t</v-alert>\n\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t<v-col cols=\"9\">\n\t\t\t\t\t\t\t\t<v-select\n\t\t\t\t\t\t\t\t\tref=\"groupFilterForSelectedUser\"\n\t\t\t\t\t\t\t\t\tv-model=\"groupFilterForSelectedUser\"\n\t\t\t\t\t\t\t\t\t:items=\"filteredGroupsForSelectedUser\"\n\t\t\t\t\t\t\t\t\titem-value=\"name\"\n\t\t\t\t\t\t\t\t\titem-text=\"name\"\n\t\t\t\t\t\t\t\t\t:label=\"$t( 'members-groupselect-label' )\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</v-col>\n\n\t\t\t\t\t\t\t<v-col cols=\"3\">\n\t\t\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\t\t\tclass=\"mt-4\"\n\t\t\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\t\t\twidth=\"100%\"\n\t\t\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t\t\t:disabled=\"groupFilterForSelectedUser === ''\"\n\t\t\t\t\t\t\t\t\t@click=\"addMemberToGroup( dialog.user )\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ $t( 'add' ) }}\n\t\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tmdi-checkbox-marked-circle\n\t\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t</v-row>\n\n\t\t\t\t\t\t<v-row>\n\t\t\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t\t\t<v-data-table\n\t\t\t\t\t\t\t\t\t:items-per-page=\"itemsPerPage\"\n\t\t\t\t\t\t\t\t\t:headers=\"userGroupsListHeaders\"\n\t\t\t\t\t\t\t\t\t:items=\"dialog.user.groups\"\n\t\t\t\t\t\t\t\t\tclass=\"elevation-2 mt-2\"\n\t\t\t\t\t\t\t\t\thide-default-footer\n\t\t\t\t\t\t\t\t\tmobile-breakpoint=\"0\"\n\t\t\t\t\t\t\t\t\t:loading=\"dialog.user.groups === 0\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<template #[`item.groups`]=\"{ item }\">\n\t\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\t<template #[`item.remove_member`]=\"{ item }\">\n\t\t\t\t\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\t\t\t\t\tclass=\"mt-2 mb-2\"\n\t\t\t\t\t\t\t\t\t\t\tcolor=\"error\"\n\t\t\t\t\t\t\t\t\t\t\t@click=\"removeMemberFromGroup( dialog.user, item )\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\tmdi-delete\n\t\t\t\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t</v-data-table>\n\t\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t</v-container>\n\t\t\t\t</v-card-text>\n\n\t\t\t\t<v-card-actions>\n\t\t\t\t\t<v-spacer />\n\n\t\t\t\t\t<v-btn\n\t\t\t\t\t\tcolor=\"accent text--secondary\"\n\t\t\t\t\t\t@click=\"close\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\tclass=\"me-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tmdi-close\n\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t{{ $t( 'close' ) }}\n\t\t\t\t\t</v-btn>\n\t\t\t\t</v-card-actions>\n\t\t\t</v-card>\n\t\t</v-dialog>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport { filterEmpty } from '@/helpers/object';\n\nexport default {\n\tname: 'Members',\n\tdata() {\n\t\treturn {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10,\n\t\t\tusersLoading: null,\n\t\t\tdialog: {\n\t\t\t\tuser: {},\n\t\t\t\topen: false\n\t\t\t},\n\t\t\tfilters: {\n\t\t\t\tusername: null,\n\t\t\t\tgroups_id: null,\n\t\t\t\tordering: null\n\t\t\t},\n\t\t\tgroupFilterForSelectedUser: '',\n\t\t\tfilteredGroupsForSelectedUser: [],\n\t\t\toptions: {}\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'members', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'user', [ 'users', 'numUsers' ] ),\n\t\t...mapState( 'groups', [ 'groups', 'notification' ] ),\n\n\t\tusersListHeaders() {\n\t\t\tconst headers = [\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'members-userslist-header-username' ),\n\t\t\t\t\tvalue: 'username',\n\t\t\t\t\tsortable: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'members-userslist-header-membersince' ),\n\t\t\t\t\tvalue: 'date_joined',\n\t\t\t\t\tsortable: true\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'members-userslist-header-groups' ),\n\t\t\t\t\tvalue: 'groups',\n\t\t\t\t\tsortable: false\n\t\t\t\t}\n\t\t\t];\n\n\t\t\tif ( this.$can( 'change', 'auth/group' ) ) {\n\t\t\t\theaders.push( {\n\t\t\t\t\ttext: this.$t( 'members-userslist-header-action' ),\n\t\t\t\t\tvalue: 'add_remove_member',\n\t\t\t\t\tsortable: false,\n\t\t\t\t\talign: 'right'\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn headers;\n\t\t},\n\n\t\tuserGroupsListHeaders() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'members-usergroupslist-header-groups' ),\n\t\t\t\t\tvalue: 'groups',\n\t\t\t\t\tsortable: false\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttext: this.$t( 'members-usergroupslist-header-removemember' ),\n\t\t\t\t\tvalue: 'remove_member',\n\t\t\t\t\tsortable: false,\n\t\t\t\t\talign: 'right'\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\tmethods: {\n\t\tlistAllUsers() {\n\t\t\tthis.usersLoading = true;\n\t\t\tthis.$store.dispatch( 'user/listAllUsers', {\n\t\t\t\tpage: this.page,\n\t\t\t\tfilters: this.filters\n\t\t\t} ).then( () => {\n\t\t\t\tthis.$router.push( {\n\t\t\t\t\tname: 'members',\n\t\t\t\t\tquery: filterEmpty( this.filters )\n\t\t\t\t}\n\t\t\t\t).catch( () => {} );\n\t\t\t} ).finally( () => {\n\t\t\t\tthis.usersLoading = false;\n\t\t\t} );\n\t\t},\n\t\tlistAllUserGroups() {\n\t\t\tthis.$store.dispatch( 'groups/listAllUserGroups', /* page */ 1 );\n\t\t},\n\t\taddMemberToGroup( member ) {\n\t\t\tconst selectedGroup = this.groups.find( ( group ) =>\n\t\t\t\tgroup.name === this.groupFilterForSelectedUser );\n\t\t\tthis.$store.dispatch( 'groups/addMemberToGroup', {\n\t\t\t\tgroup: selectedGroup,\n\t\t\t\tmember: member\n\t\t\t} );\n\t\t\tthis.groupFilterForSelectedUser = '';\n\t\t\tthis.$refs.groupFilterForSelectedUser.reset();\n\t\t},\n\t\tremoveMemberFromGroup( member, group ) {\n\t\t\tthis.$store.dispatch( 'groups/removeMemberFromGroup', {\n\t\t\t\tgroup: group,\n\t\t\t\tmember: member\n\t\t\t} );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tthis.page = num;\n\t\t\tthis.listAllUsers();\n\t\t},\n\t\tsetFilteredGroups() {\n\t\t\tthis.filteredGroupsForSelectedUser = this.groups.filter(\n\t\t\t\t( group ) => !this.dialog.user.groups.filter(\n\t\t\t\t\t( selectedUserGroup ) => selectedUserGroup.id === group.id\n\t\t\t\t).length\n\t\t\t);\n\t\t},\n\t\tinvokeDialog( user ) {\n\t\t\tthis.dialog = {\n\t\t\t\topen: true,\n\t\t\t\tuser: user\n\t\t\t};\n\t\t\tthis.setFilteredGroups();\n\t\t},\n\t\tclearNotification() {\n\t\t\tthis.$store.commit( 'groups/NOTIFICATION', null );\n\t\t},\n\t\tclose() {\n\t\t\tthis.dialog.open = false;\n\t\t\tthis.clearNotification();\n\t\t},\n\t\tfilterUsers() {\n\t\t\tthis.page = 1;\n\t\t\tthis.listAllUsers();\n\t\t},\n\t\tclearFilters() {\n\t\t\tthis.$refs.filtersform.reset();\n\t\t\tthis.listAllUsers();\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to filtered results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'username':\n\t\t\t\t\t\tthis.filters.username = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'groups_id':\n\t\t\t\t\t\tthis.filters.groups_id = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ordering':\n\t\t\t\t\t\tthis.filters.ordering = value;\n\n\t\t\t\t\t\tif ( value[ 0 ] === '-' ) {\n\t\t\t\t\t\t\tthis.options.sortBy = [ value.replace( '-', '' ) ];\n\t\t\t\t\t\t\tthis.options.sortDesc = [ true ];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.options.sortBy = [ value ];\n\t\t\t\t\t\t\tthis.options.sortDesc = [ false ];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\twatch: {\n\t\tusers: {\n\t\t\thandler( newUsers ) {\n\t\t\t\tif ( this.dialog.open ) {\n\t\t\t\t\tthis.dialog.user = newUsers.find( ( user ) => user.id === this.dialog.user.id );\n\t\t\t\t\tthis.setFilteredGroups();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true,\n\t\t\timmediate: true\n\t\t},\n\t\toptions: {\n\t\t\thandler( _, oldVal ) {\n\t\t\t\tconst {\n\t\t\t\t\tsortBy,\n\t\t\t\t\tsortDesc\n\t\t\t\t} = this.options;\n\t\t\t\tif ( sortBy.length === 1 && sortDesc.length === 1 ) {\n\t\t\t\t\tif ( sortDesc[ 0 ] === false ) {\n\t\t\t\t\t\tthis.filters.ordering = sortBy[ 0 ];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.filters.ordering = `-${sortBy[ 0 ]}`;\n\t\t\t\t\t}\n\t\t\t\t\tthis.listAllUsers();\n\t\t\t\t} else if ( oldVal.sortBy ) {\n\t\t\t\t\tthis.filters.ordering = null;\n\t\t\t\t\tthis.listAllUsers();\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeep: true\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.loadStateFromQueryString();\n\t\tthis.listAllUserGroups();\n\t\tthis.listAllUsers();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/MyLists.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":67,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":67,"endColumn":40}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col>\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'lists-yourlists' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col\n\t\t\t\tcols=\"auto\"\n\t\t\t>\n\t\t\t\t<v-btn\n\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t:to=\"{ name: 'lists-create' }\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon>\n\t\t\t\t\t\tmdi-plus\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'lists-createnewlist' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<Lists\n\t\t\t:lists=\"myLists\"\n\t\t\t@delete-list=\"deleteList( $event )\"\n\t\t/>\n\t\t<v-row v-if=\"!myLists.count\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t{{ $t( 'lists-nolistsfoundtext' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-pagination\n\t\t\tv-if=\"myLists.count > 0\"\n\t\t\tv-model=\"page\"\n\t\t\t:length=\"Math.ceil( myLists.count / itemsPerPage )\"\n\t\t\tclass=\"ma-4\"\n\t\t\ttotal-visible=\"10\"\n\t\t\t@input=\"goToPage\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport fetchMetaInfo from '@/helpers/metadata';\nimport { mapState } from 'vuex';\nimport Lists from '@/components/lists/Lists';\n\nexport default {\n\tcomponents: {\n\t\tLists\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'lists' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'lists', [ 'myLists' ] )\n\t},\n\tmethods: {\n\t\tgetMyLists() {\n\t\t\tthis.$store.dispatch( 'lists/getMyLists', { page: this.page, pageSize: this.itemsPerPage } );\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tconst query = { page: parseInt( num ) || 1 };\n\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t},\n\t\tdeleteList( id ) {\n\t\t\tthis.$store.dispatch( 'lists/deleteList', id ).then(\n\t\t\t\t() => {\n\t\t\t\t\tconst currentPage = this.page;\n\t\t\t\t\tconst lastPage = this.page === 1 ? 1 : Math.ceil(\n\t\t\t\t\t\t( this.myLists.count - 1 ) / this.itemsPerPage );\n\t\t\t\t\tthis.page = Math.min( this.page, lastPage );\n\t\t\t\t\tif ( this.page !== currentPage ) {\n\t\t\t\t\t\tthis.$router.push( { path: 'lists', query: { page: this.page } } );\n\t\t\t\t\t}\n\t\t\t\t\tthis.getMyLists();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\twatch: {\n\t\t/**\n\t\t * Watch ?page=... and update private lists.\n\t\t *\n\t\t * @param {string} newValue\n\t\t */\n\t\t'$route.query.page'( newValue ) {\n\t\t\tthis.page = parseInt( newValue ) || 1;\n\t\t\tthis.getMyLists();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.page = parseInt( this.$route.query.page ) || 1;\n\t\tthis.getMyLists();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/PublishedLists.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":92,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":94,"endColumn":6},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":95,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":95,"endColumn":40},{"ruleId":"es-x/no-promise-prototype-finally","severity":2,"message":"ES2018 'Promise.prototype.finally' method is forbidden.","line":122,"column":4,"nodeType":"MemberExpression","messageId":"forbidden","endLine":123,"endColumn":13}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'publishedlists' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'publishedlists-pagetitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<SearchBar\n\t\t\t\t\tref=\"searchbar\"\n\t\t\t\t\t:loading=\"searching\"\n\t\t\t\t\t:target=\"searchTarget\"\n\t\t\t\t\t@search=\"onSearchBarSearch\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<p v-if=\"!searching && response.count\">\n\t\t\t\t\t{{ $t( 'search-result-summary', [\n\t\t\t\t\t\t1 + pageOffset,\n\t\t\t\t\t\tpageOffset + response.results.length,\n\t\t\t\t\t\tresponse.count\n\t\t\t\t\t] ) }}\n\t\t\t\t</p>\n\t\t\t\t<p v-if=\"!searching && response.count === 0\">\n\t\t\t\t\t{{ $t( 'search-no-results-message' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<Sort\n\t\t\t\t\t@change=\"onSortChange\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<Lists\n\t\t\t:lists=\"response\"\n\t\t\tlist-footer\n\t\t/>\n\t\t<v-pagination\n\t\t\tv-if=\"response.count > 0\"\n\t\t\tv-model=\"queryParams.page\"\n\t\t\t:length=\"Math.ceil( response.count / queryParams.pageSize )\"\n\t\t\tclass=\"ma-4\"\n\t\t\ttotal-visible=\"10\"\n\t\t\t@input=\"goToPage\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport fetchMetaInfo from '@/helpers/metadata';\nimport { mapState } from 'vuex';\nimport Lists from '@/components/lists/Lists';\nimport SearchBar from '@/components/search/SearchBar';\nimport Sort from '@/components/search/Sort';\n\nexport default {\n\tname: 'PublishedLists',\n\tcomponents: {\n\t\tLists,\n\t\tSearchBar,\n\t\tSort\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsearchTarget: 'list',\n\t\t\tsearching: false,\n\t\t\tqueryParams: {\n\t\t\t\tquery: '',\n\t\t\t\tpage: 1,\n\t\t\t\tpageSize: 10,\n\t\t\t\tordering: '-score'\n\t\t\t}\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'publishedlists' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'search', {\n\t\t\tresponse: 'listsResponse'\n\t\t} ),\n\t\t...mapState( 'lists', [ 'myLists' ] ),\n\t\tpageOffset() {\n\t\t\treturn this.queryParams.pageSize * ( this.queryParams.page - 1 );\n\t\t}\n\t},\n\tmethods: {\n\t\tpushQueryParamsToRouter() {\n\t\t\tconst query = {\n\t\t\t\tq: this.queryParams.query,\n\t\t\t\tpage: this.queryParams.page,\n\t\t\t\tpage_size: this.queryParams.pageSize,\n\t\t\t\tordering: this.queryParams.ordering\n\t\t\t};\n\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t},\n\t\tonSearchBarSearch( query ) {\n\t\t\tthis.queryParams.query = query;\n\t\t\tthis.queryParams.page = 1;\n\t\t\tthis.pushQueryParamsToRouter();\n\t\t},\n\t\tonSortChange( obj ) {\n\t\t\tthis.queryParams.ordering = obj.value;\n\t\t\tthis.queryParams.page = 1;\n\t\t\tthis.pushQueryParamsToRouter();\n\t\t},\n\t\tfindLists() {\n\t\t\tthis.searching = true;\n\t\t\tthis.$store.dispatch( 'search/findLists', this.queryParams )\n\t\t\t\t.finally( () => {\n\t\t\t\t\tthis.searching = false;\n\t\t\t\t} );\n\t\t},\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tthis.queryParams.query = value;\n\t\t\t\t\t\tthis.$refs.searchbar.query = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.queryParams.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page_size':\n\t\t\t\t\t\tthis.queryParams.pageSize = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ordering':\n\t\t\t\t\t\tthis.queryParams.ordering = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t},\n\t\tgoToPage( num ) {\n\t\t\tconst query = {};\n\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tquery[ key ] = value;\n\t\t\t}\n\n\t\t\tquery.page = parseInt( num, 10 ) || 1;\n\n\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t}\n\t},\n\twatch: {\n\t\t/**\n\t\t * Watch url query params,\n\t\t * load query params into local state,\n\t\t * then call findLists with the params.\n\t\t *\n\t\t * @param {string} newParams\n\t\t */\n\t\t'$route.query': {\n\t\t\thandler( newParams ) {\n\t\t\t\tif ( newParams === undefined ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.loadStateFromQueryString();\n\t\t\t\tthis.findLists();\n\t\t\t},\n\t\t\tdeep: true\n\t\t},\n\t\tmyLists() {\n\t\t\tthis.findLists();\n\t\t}\n\t},\n\tmounted() {\n\t\tif ( this.loadStateFromQueryString() ) {\n\t\t\t// Deep link, trigger a search now.\n\t\t\tthis.findLists();\n\t\t} else {\n\t\t\t// Set query string based on internal state.\n\t\t\t// Our watch on $route.query will fire the search next.\n\t\t\tthis.pushQueryParamsToRouter();\n\t\t}\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/RecentChanges.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":209,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":209,"endColumn":68}],"suppressedMessages":[{"ruleId":"@intlify/vue-i18n/no-dynamic-keys","severity":2,"message":"'`recentchanges-action-${key}`' dynamic key is used'","line":223,"column":13,"nodeType":"CallExpression","endLine":223,"endColumn":53,"suppressions":[{"kind":"directive","justification":""}]}],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'recentchanges' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'recentchanges-pagesubtitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-form ref=\"filtersform\">\n\t\t\t\t\t<v-row>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-text-field\n\t\t\t\t\t\t\t\tv-model=\"filters.user\"\n\t\t\t\t\t\t\t\t:label=\"$t( 'recentchanges-username' )\"\n\t\t\t\t\t\t\t\tprepend-icon=\"mdi-account-outline\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-select\n\t\t\t\t\t\t\t\tv-model=\"filters.target_type\"\n\t\t\t\t\t\t\t\t:label=\"$t( 'recentchanges-type' )\"\n\t\t\t\t\t\t\t\t:items=\"targetsComputed\"\n\t\t\t\t\t\t\t\titem-value=\"type\"\n\t\t\t\t\t\t\t\titem-text=\"label\"\n\t\t\t\t\t\t\t\tprepend-icon=\"mdi-filter-variant\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-menu\n\t\t\t\t\t\t\t\t:close-on-content-click=\"false\"\n\t\t\t\t\t\t\t\ttransition=\"scale-transition\"\n\t\t\t\t\t\t\t\toffset-y\n\t\t\t\t\t\t\t\tleft\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<template #activator=\"{ on, attrs }\">\n\t\t\t\t\t\t\t\t\t<v-text-field\n\t\t\t\t\t\t\t\t\t\t:value=\"formattedActions\"\n\t\t\t\t\t\t\t\t\t\t:label=\"$t( 'recentchanges-action' )\"\n\t\t\t\t\t\t\t\t\t\treadonly\n\t\t\t\t\t\t\t\t\t\tv-bind=\"attrs\"\n\t\t\t\t\t\t\t\t\t\tprepend-icon=\"mdi-police-badge-outline\"\n\t\t\t\t\t\t\t\t\t\tv-on=\"on\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t<v-list>\n\t\t\t\t\t\t\t\t\t<v-list-item>\n\t\t\t\t\t\t\t\t\t\t<v-checkbox\n\t\t\t\t\t\t\t\t\t\t\tv-model=\"filters.unpatrolled\"\n\t\t\t\t\t\t\t\t\t\t\t:label=\"$t( 'recentchanges-action-unpatrolled' )\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</v-list-item>\n\t\t\t\t\t\t\t\t\t<v-list-item>\n\t\t\t\t\t\t\t\t\t\t<v-checkbox\n\t\t\t\t\t\t\t\t\t\t\tv-model=\"filters.suppressed\"\n\t\t\t\t\t\t\t\t\t\t\t:label=\"$t( 'recentchanges-action-suppressed' )\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</v-list-item>\n\t\t\t\t\t\t\t\t</v-list>\n\t\t\t\t\t\t\t</v-menu>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\t\tv-model=\"filters.date_created_after\"\n\t\t\t\t\t\t\t\t:label=\"$t( 'datepicker-startdate' )\"\n\t\t\t\t\t\t\t\tsuffix=\"T00:00Z\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<DatePicker\n\t\t\t\t\t\t\t\tv-model=\"filters.date_created_before\"\n\t\t\t\t\t\t\t\t:label=\"$t( 'datepicker-enddate' )\"\n\t\t\t\t\t\t\t\tsuffix=\"T23:59:59.999Z\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\t\tcolor=\"primary base100--text\"\n\t\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t\t\t\t\t@click=\"filterChanges\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ $t( 'recentchanges-filter' ) }}\n\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tmdi-magnify\n\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t\t<v-col cols=\"6\"\n\t\t\t\t\t\t\tlg=\"2\"\n\t\t\t\t\t\t\tmd=\"3\"\n\t\t\t\t\t\t\tclass=\"mt-2\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<v-btn\n\t\t\t\t\t\t\t\tblock\n\t\t\t\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t\t\t\t\t@click=\"clearFilters\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{{ $t( 'clear' ) }}\n\t\t\t\t\t\t\t\t<v-icon\n\t\t\t\t\t\t\t\t\tdark\n\t\t\t\t\t\t\t\t\tright\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tmdi-close\n\t\t\t\t\t\t\t\t</v-icon>\n\t\t\t\t\t\t\t</v-btn>\n\t\t\t\t\t\t</v-col>\n\t\t\t\t\t</v-row>\n\t\t\t\t</v-form>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"!loading && numChanges === 0\">\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<p class=\"text-h6 text--secondary\">\n\t\t\t\t\t{{ $t( 'recentchanges-nochangesfoundtext' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<Revisions\n\t\t\t\t\t:revisions=\"recentChanges\"\n\t\t\t\t\taggregate\n\t\t\t\t\t@update-revisions=\"fetchRecentChanges\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numChanges > 0\"\n\t\t\t\t\tv-model=\"filters.page\"\n\t\t\t\t\t:length=\"Math.ceil( numChanges / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport { fetchMetaInfo } from '@/helpers/metadata';\nimport { filterEmpty } from '@/helpers/object';\nimport DatePicker from '@/components/common/DatePicker';\nimport Revisions from '@/components/common/Revisions';\n\nexport default {\n\tname: 'RecentChanges',\n\tcomponents: {\n\t\tDatePicker,\n\t\tRevisions\n\t},\n\tdata() {\n\t\treturn {\n\t\t\titemsPerPage: 10,\n\t\t\tloading: true,\n\t\t\tfilters: {\n\t\t\t\tuser: null,\n\t\t\t\ttarget_type: null,\n\t\t\t\tsuppressed: null,\n\t\t\t\tunpatrolled: null,\n\t\t\t\tdate_created_after: null,\n\t\t\t\tdate_created_before: null,\n\t\t\t\tpage: 1\n\t\t\t}\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'recentchanges' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'recentchanges', [ 'recentChanges', 'numChanges' ] ),\n\t\t/**\n\t\t * Format unpatrolled and suppressed>\n\t\t *\n\t\t * @return {string} - e.g. 'unpatrolled, suppressed'\n\t\t */\n\t\tformattedActions() {\n\t\t\tlet values = {\n\t\t\t\tunpatrolled: this.filters.unpatrolled,\n\t\t\t\tsuppressed: this.filters.suppressed\n\t\t\t};\n\t\t\tvalues = Object.keys( values ).map( ( key ) => {\n\t\t\t\tif ( values[ key ] === true ) {\n\t\t\t\t\t// eslint-disable-next-line @intlify/vue-i18n/no-dynamic-keys\n\t\t\t\t\treturn this.$t( `recentchanges-action-${key}` );\n\t\t\t\t} else {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t} );\n\t\t\tvalues = values.filter( ( each ) => each );\n\t\t\treturn values.join( ' ' );\n\t\t},\n\t\ttargetsComputed() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\ttype: 'tool',\n\t\t\t\t\tlabel: this.$t( 'recentchanges-targettype-tool' )\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttype: 'toollist',\n\t\t\t\t\tlabel: this.$t( 'recentchanges-targettype-toollist' )\n\t\t\t\t}\n\t\t\t];\n\t\t}\n\t},\n\tmethods: {\n\t\tfetchRecentChanges() {\n\t\t\tthis.loading = true;\n\t\t\tthis.$store.dispatch(\n\t\t\t\t'recentchanges/fetchRecentChanges', this.filters\n\t\t\t).then( () => {\n\t\t\t\tthis.loading = false;\n\t\t\t\tthis.$router.push( {\n\t\t\t\t\tname: 'recentchanges',\n\t\t\t\t\tquery: filterEmpty( this.filters )\n\t\t\t\t} ).catch( () => {} );\n\t\t\t} );\n\t\t},\n\t\tgoToPage( page ) {\n\t\t\tthis.filters.page = page;\n\t\t\tthis.fetchRecentChanges();\n\t\t},\n\t\tfilterChanges() {\n\t\t\tthis.filters.page = 1;\n\t\t\tthis.fetchRecentChanges();\n\t\t},\n\t\tclearFilters() {\n\t\t\tthis.filters = {\n\t\t\t\tuser: null,\n\t\t\t\ttarget_type: null,\n\t\t\t\tsuppressed: null,\n\t\t\t\tunpatrolled: null,\n\t\t\t\tdate_created_after: null,\n\t\t\t\tdate_created_before: null,\n\t\t\t\tpage: 1\n\t\t\t};\n\t\t\tthis.$refs.filtersform.reset();\n\t\t\tthis.fetchRecentChanges();\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to filtered results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'user':\n\t\t\t\t\t\tthis.filters.user = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'target_type':\n\t\t\t\t\t\tthis.filters.target_type = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'suppressed':\n\t\t\t\t\t\tif ( value === 'true' ) {\n\t\t\t\t\t\t\tthis.filters.suppressed = true;\n\t\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\t} else if ( value === 'false' ) {\n\t\t\t\t\t\t\tthis.filters.suppressed = false;\n\t\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'patrolled':\n\t\t\t\t\t\tif ( value === 'true' ) {\n\t\t\t\t\t\t\tthis.filters.unpatrolled = false;\n\t\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\t} else if ( value === 'false' ) {\n\t\t\t\t\t\t\tthis.filters.unpatrolled = true;\n\t\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'date_created_after':\n\t\t\t\t\t\tthis.filters.date_created_after = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'date_created_before':\n\t\t\t\t\t\tthis.filters.date_created_before = value;\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.filters.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// ignore this param\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.loadStateFromQueryString();\n\t\tthis.fetchRecentChanges();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/Search.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":95,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":98,"endColumn":6}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<p v-if=\"!searching && response.count\">\n\t\t\t\t\t{{ $t( 'search-result-summary', [\n\t\t\t\t\t\t1 + pageOffset,\n\t\t\t\t\t\tpageOffset + response.results.length,\n\t\t\t\t\t\tresponse.count\n\t\t\t\t\t] ) }}\n\t\t\t\t</p>\n\t\t\t\t<p v-if=\"!searching && response.count === 0\">\n\t\t\t\t\t{{ $t( 'search-no-results-message' ) }}\n\t\t\t\t</p>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<Sort\n\t\t\t\t\tref=\"sort\"\n\t\t\t\t\t@change=\"onSortChange\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col\n\t\t\t\tmd=\"3\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<Filters\n\t\t\t\t\t:facets=\"response.facets\"\n\t\t\t\t\t@change=\"onFilterChange\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t\t<v-col\n\t\t\t\tmd=\"9\"\n\t\t\t\tcols=\"12\"\n\t\t\t>\n\t\t\t\t<v-row justify=\"space-around\">\n\t\t\t\t\t<v-col v-for=\"tool in response.results\"\n\t\t\t\t\t\t:key=\"tool.name\"\n\t\t\t\t\t\tsm=\"12\"\n\t\t\t\t\t\tmd=\"6\"\n\t\t\t\t\t\tlg=\"4\"\n\t\t\t\t\t\tcols=\"12\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToolCard :tool=\"tool\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t\t<v-row>\n\t\t\t\t\t<v-col cols=\"12\">\n\t\t\t\t\t\t<v-pagination\n\t\t\t\t\t\t\tv-if=\"!searching && response.count > 0\"\n\t\t\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t\t\t:length=\"Math.ceil( response.count / pageSize )\"\n\t\t\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t\t\t@input=\"onPageChange\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\n\nimport { ensureArray } from '@/helpers/array';\nimport { EventBus } from '@/helpers/event-bus';\nimport { fetchMetaInfo } from '@/helpers/metadata';\n\nimport Filters from '@/components/search/Filters';\nimport Sort from '@/components/search/Sort';\nimport ToolCard from '@/components/tools/ToolCard';\n\nexport default {\n\tname: 'Search',\n\tcomponents: {\n\t\tFilters,\n\t\tToolCard,\n\t\tSort\n\t},\n\tdata: () => ( {\n\t\tquery: '',\n\t\tpage: 1,\n\t\tpageSize: 12,\n\t\tfacets: [],\n\t\tsearching: false,\n\t\tordering: '-score'\n\t} ),\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'search' );\n\t},\n\tcomputed: {\n\t\t...mapState( 'search', {\n\t\t\tresponse: 'toolsResponse',\n\t\t\tqueryParams: 'toolsQueryParams'\n\t\t} ),\n\t\tpageOffset() {\n\t\t\treturn this.pageSize * ( this.page - 1 );\n\t\t}\n\t},\n\tmethods: {\n\t\tonSearchBarSearch( query ) {\n\t\t\tthis.query = query;\n\t\t\tthis.page = 1;\n\t\t\tthis.doSearch();\n\t\t},\n\t\tonSortChange( obj ) {\n\t\t\tthis.ordering = obj.value;\n\t\t\tthis.page = 1;\n\t\t\tthis.doSearch();\n\t\t},\n\t\tonPageChange( page ) {\n\t\t\tthis.page = page;\n\t\t\tthis.doSearch();\n\t\t},\n\t\tonFilterChange( payload ) {\n\t\t\tthis.facets = payload;\n\t\t\tthis.page = 1;\n\t\t\tthis.doSearch();\n\t\t},\n\t\tdoSearch() {\n\t\t\tconst payload = {\n\t\t\t\tquery: this.query,\n\t\t\t\tpage: this.page,\n\t\t\t\tpageSize: this.pageSize,\n\t\t\t\tordering: this.ordering,\n\t\t\t\tfilters: this.facets\n\t\t\t};\n\t\t\tthis.searching = true;\n\t\t\tthis.$store.dispatch( 'search/findTools', payload );\n\t\t},\n\t\t/**\n\t\t * Allow deep linking to search results by reconstructing internal\n\t\t * state based on data provided in the current query string.\n\t\t *\n\t\t * @return {boolean} True if state was updated. False otherwise.\n\t\t */\n\t\tloadStateFromQueryString() {\n\t\t\tconst params = new URLSearchParams(\n\t\t\t\tdocument.location.search.substring( 1 )\n\t\t\t);\n\t\t\tlet gotQueryData = false;\n\t\t\tconst qsFilters = [];\n\t\t\tfor ( const [ key, value ] of params ) {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tswitch ( key ) {\n\t\t\t\t\tcase 'q':\n\t\t\t\t\t\tthis.query = value;\n\t\t\t\t\t\tEventBus.$emit( 'searchQueryChange', value );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page':\n\t\t\t\t\t\tthis.page = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'page_size':\n\t\t\t\t\t\tthis.pageSize = parseInt( value, 10 );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'ordering':\n\t\t\t\t\t\tthis.ordering = value;\n\t\t\t\t\t\tthis.$refs.sort.setOrder( value );\n\t\t\t\t\t\tgotQueryData = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'uselang':\n\t\t\t\t\t\t// ignore global state params\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// Treat any unknown param as a search filter coming\n\t\t\t\t\t\t// from our facet navigation. This could be made\n\t\t\t\t\t\t// 'smarter' if we loaded the OpenAPI schema for the\n\t\t\t\t\t\t// search endpoint and used it to validate param\n\t\t\t\t\t\t// names.\n\t\t\t\t\t\tensureArray( value ).forEach( ( val ) => {\n\t\t\t\t\t\t\tqsFilters.push( [ key, val ] );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( qsFilters.length > 0 ) {\n\t\t\t\tthis.facets = qsFilters;\n\t\t\t\tgotQueryData = true;\n\t\t\t}\n\t\t\treturn gotQueryData;\n\t\t}\n\t},\n\twatch: {\n\t\t/**\n\t\t * React to changes in stored query parameters.\n\t\t *\n\t\t * @param {URLSearchParams} newParams\n\t\t * @param {URLSearchParams|null} oldParams\n\t\t */\n\t\tqueryParams( newParams, oldParams ) {\n\t\t\tif ( newParams === undefined || newParams === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst query = {};\n\t\t\tfor ( const key of newParams.keys() ) {\n\t\t\t\tquery[ key ] = newParams.getAll( key );\n\t\t\t}\n\t\t\tthis.searching = false;\n\t\t\tif ( oldParams === null ) {\n\t\t\t\tthis.$router.replace( { query } ).catch( () => {} );\n\t\t\t} else {\n\t\t\t\tthis.$router.push( { query } ).catch( () => {} );\n\t\t\t}\n\t\t}\n\t},\n\tcreated() {\n\t\tEventBus.$on( 'toolSearch', this.onSearchBarSearch );\n\t},\n\tmounted() {\n\t\tif ( !this.searching ) {\n\t\t\tif ( this.loadStateFromQueryString() ) {\n\t\t\t\tthis.doSearch();\n\t\t\t}\n\t\t}\n\t},\n\tbeforeUnmount() {\n\t\tthis.$store.dispatch( 'search/clearToolsQueryParams' );\n\t\tEventBus.$emit( 'searchQueryClear' );\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ToolHistory.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":74,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":74,"endColumn":62}],"suppressedMessages":[],"errorCount":1,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row>\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'tools-history' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'tools-view', params: { name: name } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtotoolinfo' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t<p>{{ $t( 'toolhistory-pagesubtitle' ) }}</p>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<Revisions\n\t\t\t\t\t:revisions=\"toolRevisions\"\n\t\t\t\t\t@update-revisions=\"getRevisions\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\">\n\t\t\t\t<v-pagination\n\t\t\t\t\tv-if=\"numRevisions > 0\"\n\t\t\t\t\tv-model=\"page\"\n\t\t\t\t\t:length=\"Math.ceil( numRevisions / itemsPerPage )\"\n\t\t\t\t\tclass=\"ma-4\"\n\t\t\t\t\ttotal-visible=\"5\"\n\t\t\t\t\t@input=\"goToPage\"\n\t\t\t\t/>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState } from 'vuex';\nimport fetchMetaInfo from '@/helpers/metadata';\nimport Revisions from '@/components/common/Revisions';\n\nexport default {\n\tname: 'ToolHistory',\n\tcomponents: {\n\t\tRevisions\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tname: this.$route.params.name,\n\t\t\tpage: 1,\n\t\t\titemsPerPage: 10\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'tools-history', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'tools', [ 'toolRevisions', 'numRevisions' ] )\n\t},\n\tmethods: {\n\t\tgetRevisions() {\n\t\t\tthis.$store.dispatch( 'tools/updateToolRevisions', {\n\t\t\t\tpage: this.page, name: this.name\n\t\t\t} );\n\t\t},\n\t\tgoToPage( page ) {\n\t\t\tthis.page = page;\n\t\t\tthis.getRevisions();\n\t\t}\n\t},\n\tmounted() {\n\t\tthis.getRevisions();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ToolRevisionsDiff.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":98,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":98,"endColumn":61},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":116,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":116,"endColumn":50}],"suppressedMessages":[],"errorCount":2,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container v-if=\"changes\">\n\t\t<v-row>\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h2 class=\"text-h4\">\n\t\t\t\t\t{{ $t( 'tools-diff' ) }}\n\t\t\t\t</h2>\n\t\t\t</v-col>\n\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'tools-history', params: { name: name } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtotoolhistory' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"py-0\">\n\t\t\t\t{{ $t( 'viewtoolrevisionsdiff', [ name ] ) }}\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<v-row v-if=\"diffRevision\"\n\t\t\tclass=\"my-4\"\n\t\t>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'toolrevisioninfo', [\n\t\t\t\t\t\tformatDate( diffRevision.original.timestamp ),\n\t\t\t\t\t\tdiffRevision.original.user.username,\n\t\t\t\t\t\tdiffRevision.original.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t\t<v-col cols=\"6\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'toolrevisioninfo', [\n\t\t\t\t\t\tformatDate( diffRevision.result.timestamp ),\n\t\t\t\t\t\tdiffRevision.result.user.username,\n\t\t\t\t\t\tdiffRevision.result.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t</v-col>\n\t\t</v-row>\n\t\t<v-row>\n\t\t\t<v-col cols=\"12\" class=\"my-2\">\n\t\t\t\t<v-row v-for=\"( op, idx ) in changes\"\n\t\t\t\t\t:key=\"idx\"\n\t\t\t\t>\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-row class=\"ms-2 cols\">\n\t\t\t\t\t\t\t<DiffPath :path=\"op.path\" />\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<DiffValue op=\"remove\" :value=\"op.oldValue\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t\t<v-col cols=\"6\">\n\t\t\t\t\t\t<v-row class=\"ms-2 cols\">\n\t\t\t\t\t\t\t<DiffPath :path=\"op.path\" />\n\t\t\t\t\t\t</v-row>\n\t\t\t\t\t\t<DiffValue op=\"add\" :value=\"op.newValue\" />\n\t\t\t\t\t</v-col>\n\t\t\t\t</v-row>\n\t\t\t</v-col>\n\t\t</v-row>\n\t</v-container>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex';\nimport { normalizeEmpty, computeChangeInfo } from '@/helpers/diff';\nimport { fetchMetaInfo } from '@/helpers/metadata';\nimport DiffPath from '@/components/diff/DiffPath';\nimport DiffValue from '@/components/diff/DiffValue';\n\nexport default {\n\tname: 'ToolRevisionsDiff',\n\tcomponents: {\n\t\tDiffPath,\n\t\tDiffValue\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tname: this.$route.params.name,\n\t\t\trevId: this.$route.params.revId,\n\t\t\totherRevId: this.$route.params.otherRevId\n\t\t};\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'tools-diff', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'tools', [ 'diffRevision', 'toolRevision' ] ),\n\t\t/**\n\t\t * Compute changes to render as diff based on JSON Patch from API.\n\t\t *\n\t\t * @return {Object[]}\n\t\t */\n\t\tchanges() {\n\t\t\tif ( !this.diffRevision || !this.toolRevision ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\treturn computeChangeInfo(\n\t\t\t\tthis.diffRevision.operations,\n\t\t\t\tthis.toolRevision.toolinfo,\n\t\t\t\tthis.formatProperty\n\t\t\t);\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapMutations( 'tools', [ 'DIFF_REVISION' ] ),\n\t\tgetDiff() {\n\t\t\tthis.$store.dispatch( 'tools/getToolRevisionsDiff', {\n\t\t\t\tname: this.name,\n\t\t\t\trevId: this.revId,\n\t\t\t\totherId: this.otherRevId\n\t\t\t} );\n\t\t},\n\t\tgetRevision() {\n\t\t\tthis.$store.dispatch( 'tools/getToolRevision', {\n\t\t\t\tname: this.name,\n\t\t\t\trevId: this.revId\n\t\t\t} );\n\t\t},\n\t\t/**\n\t\t * Format a property value for display to the user.\n\t\t *\n\t\t * @param {string} pointer - JSON-Pointer to property\n\t\t * @param {*} value - property value\n\t\t * @return {*}\n\t\t */\n\t\tformatProperty( pointer, value ) {\n\t\t\tif ( pointer.indexOf( 'date' ) !== -1 ) {\n\t\t\t\tvalue = this.formatDate( value );\n\t\t\t}\n\t\t\treturn normalizeEmpty( value );\n\t\t},\n\t\tformatDate( date ) {\n\t\t\treturn this.$moment.utc( date ).format( 'lll' );\n\t\t}\n\t},\n\tmounted() {\n\t\t// Clear any data from a prior view\n\t\tthis.DIFF_REVISION( null );\n\t\tthis.getDiff();\n\t\tthis.getRevision();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]},{"filePath":"/src/repo/vue/src/views/ToolView.vue","messages":[{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":60,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":60,"endColumn":53},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":69,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":69,"endColumn":67},{"ruleId":"es-x/no-rest-spread-properties","severity":2,"message":"ES2018 rest/spread properties are forbidden.","line":70,"column":3,"nodeType":"SpreadElement","messageId":"forbidden","endLine":70,"endColumn":58}],"suppressedMessages":[],"errorCount":3,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"source":"<template>\n\t<v-container>\n\t\t<v-row v-if=\"revId && toolRevision\">\n\t\t\t<v-col md=\"9\" cols=\"12\">\n\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t{{ $t( 'toolrevisioninfo', [\n\t\t\t\t\t\ttoolRevision.timestamp,\n\t\t\t\t\t\ttoolRevision.user.username,\n\t\t\t\t\t\ttoolRevision.comment\n\t\t\t\t\t] ) }}\n\t\t\t\t</h3>\n\t\t\t\t<template v-if=\"$can( 'patrol', 'reversion/version' )\">\n\t\t\t\t\t<h3 class=\"font-weight-medium\">\n\t\t\t\t\t\t<template v-if=\"!toolRevision.patrolled\">\n\t\t\t\t\t\t\t(<a @click=\"patrol( toolRevision.id )\">\n\t\t\t\t\t\t\t\t{{ $t( 'markaspatrolled' ) }}\n\t\t\t\t\t\t\t</a>)\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t(<span>{{ $t( 'patrolled' ) }}</span>)\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</h3>\n\t\t\t\t</template>\n\t\t\t</v-col>\n\t\t\t<v-col md=\"3\" cols=\"12\">\n\t\t\t\t<v-btn\n\t\t\t\t\t:to=\"{ name: 'tools-history', params: { name: name } }\"\n\t\t\t\t\t:small=\"$vuetify.breakpoint.smAndDown\"\n\t\t\t\t>\n\t\t\t\t\t<v-icon class=\"me-2\">\n\t\t\t\t\t\tmdi-chevron-left\n\t\t\t\t\t</v-icon>\n\t\t\t\t\t{{ $t( 'backtotoolhistory' ) }}\n\t\t\t\t</v-btn>\n\t\t\t</v-col>\n\t\t</v-row>\n\n\t\t<ToolInfo\n\t\t\t:tool=\"( revId && toolRevision ) ? toolRevision.toolinfo : tool\"\n\t\t\t:rev-id=\"revId\"\n\t\t\t:name=\"name\"\n\t\t/>\n\t</v-container>\n</template>\n\n<script>\nimport { mapActions, mapMutations, mapState } from 'vuex';\nimport ToolInfo from '@/components/tools/ToolInfo';\nimport fetchMetaInfo from '@/helpers/metadata';\n\nexport default {\n\tname: 'ToolView',\n\tcomponents: {\n\t\tToolInfo\n\t},\n\tmetaInfo() {\n\t\treturn fetchMetaInfo( 'tools-view', this.name );\n\t},\n\tcomputed: {\n\t\t...mapState( 'tools', [ 'tool', 'toolRevision' ] ),\n\t\tname() {\n\t\t\treturn this.$route.params.name;\n\t\t},\n\t\trevId() {\n\t\t\treturn this.$route.params.revId;\n\t\t}\n\t},\n\tmethods: {\n\t\t...mapActions( 'tools', [ 'getToolByName', 'getToolRevision' ] ),\n\t\t...mapMutations( 'tools', [ 'TOOL', 'TOOL_REVISION' ] ),\n\n\t\tpatrol( revId ) {\n\t\t\tthis.$store.dispatch( 'tools/markRevisionAsPatrolled', {\n\t\t\t\tname: this.name,\n\t\t\t\trevId: revId,\n\t\t\t\tpage: 1\n\t\t\t} ).then( () => {\n\t\t\t\tthis.getToolInfo();\n\t\t\t} );\n\t\t},\n\t\tgetToolInfo() {\n\t\t\t// Clear any data from a prior view\n\t\t\tthis.TOOL( null );\n\t\t\tthis.TOOL_REVISION( null );\n\t\t\tif ( this.revId ) {\n\t\t\t\tthis.getToolRevision( { name: this.name, revId: this.revId } );\n\t\t\t} else {\n\t\t\t\tthis.getToolByName( this.name );\n\t\t\t}\n\t\t}\n\t},\n\twatch: {\n\t\t$route: 'getToolInfo'\n\t},\n\tmounted() {\n\t\tthis.getToolInfo();\n\t}\n};\n</script>\n","usedDeprecatedRules":[{"ruleId":"no-new-require","replacedBy":[]}]}]

--- end ---
$ ./node_modules/.bin/stylelint docs/_static/css/custom.css vue/src/assets/styles/index.css vue/static/vue/css/loading.css toolhub/apps/crawler/static/css/admin.css static/css/oauth.css -f json
--- stderr ---
Error: Could not find "stylelint-config-wikimedia/grade-a". Do you need a `configBasedir`?
    at configurationError (/src/repo/node_modules/stylelint/lib/utils/configurationError.js:11:49)
    at getModulePath (/src/repo/node_modules/stylelint/lib/utils/getModulePath.js:28:9)
    at loadExtendedConfig (/src/repo/node_modules/stylelint/lib/augmentConfig.js:230:21)
    at extendConfig (/src/repo/node_modules/stylelint/lib/augmentConfig.js:201:30)
    at augmentConfigBasic (/src/repo/node_modules/stylelint/lib/augmentConfig.js:52:26)
    at augmentConfigFull (/src/repo/node_modules/stylelint/lib/augmentConfig.js:106:30)
    at Object.transform (/src/repo/node_modules/stylelint/lib/getConfigForFile.js:51:37)
    at run (/src/repo/node_modules/cosmiconfig/dist/Explorer.js:42:49)
    at async cacheWrapper (/src/repo/node_modules/cosmiconfig/dist/cacheWrapper.js:16:18)
    at async cacheWrapper (/src/repo/node_modules/cosmiconfig/dist/cacheWrapper.js:16:18)
--- stdout ---

--- end ---
Traceback (most recent call last):
  File "/venv/lib/python3.9/site-packages/runner-0.1.0-py3.9.egg/runner/__init__.py", line 1400, in main
    libup.run(args.repo, args.output, args.branch)
  File "/venv/lib/python3.9/site-packages/runner-0.1.0-py3.9.egg/runner/__init__.py", line 1338, in run
    self.npm_upgrade(plan)
  File "/venv/lib/python3.9/site-packages/runner-0.1.0-py3.9.egg/runner/__init__.py", line 1046, in npm_upgrade
    hook(update)
  File "/venv/lib/python3.9/site-packages/runner-0.1.0-py3.9.egg/runner/__init__.py", line 1081, in _handle_stylelint
    errors = json.loads(self.check_call(['./node_modules/.bin/stylelint'] + files + [
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Source code is licensed under the AGPL.