diff --git a/.changeset/config.json b/.changeset/config.json index 5d43f151..b408a4ea 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,15 +1,15 @@ { - "$schema": "https://unpkg.com/@changesets/config/schema.json", - "changelog": [ - "@changesets/changelog-github", - { - "repo": "ota-meshi/eslint-plugin-lodash-template" - } - ], - "commit": false, - "linked": [], - "baseBranch": "main", - "updateInternalDependencies": "patch", - "bumpVersionsWithWorkspaceProtocolOnly": true, - "ignore": [] + "$schema": "https://unpkg.com/@changesets/config/schema.json", + "changelog": [ + "@changesets/changelog-github", + { + "repo": "ota-meshi/eslint-plugin-lodash-template" + } + ], + "commit": false, + "linked": [], + "baseBranch": "main", + "updateInternalDependencies": "patch", + "bumpVersionsWithWorkspaceProtocolOnly": true, + "ignore": [] } diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 274f889f..fe04f670 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,28 +1,26 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node { - "name": "Node.js & TypeScript", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", + "name": "Node.js & TypeScript", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye", - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "npm install", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "npm install", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "dbaeumer.vscode-eslint" - ] - } - } + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": ["dbaeumer.vscode-eslint"] + } + } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3b50bdc3..00000000 --- a/.eslintignore +++ /dev/null @@ -1,11 +0,0 @@ -/.nyc_output -/coverage -/node_modules -/playground/node_modules -/assets -/samples -/tests_fixtures -!/.vscode -!/docs/.vitepress -/docs/.vitepress/dist -/docs/.vitepress/cache diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index aff20ca9..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; - -module.exports = { - parserOptions: { - sourceType: "script", - ecmaVersion: 2020, - }, - extends: [ - "plugin:lodash-template/all", - "plugin:@ota-meshi/recommended", - "plugin:@ota-meshi/+node", - "plugin:@ota-meshi/+eslint-plugin", - "plugin:@ota-meshi/+json", - "plugin:@ota-meshi/+package-json", - "plugin:@ota-meshi/+yaml", - // "plugin:@ota-meshi/+md", - "plugin:@ota-meshi/+prettier", - ], - plugins: ["es"], - rules: { - "require-jsdoc": "error", - "no-warning-comments": "warn", - "regexp/no-obscure-range": ["error", { allowed: "all" }], - }, - overrides: [ - { - files: ["lib/rules/**"], - rules: { - "eslint-plugin/require-meta-docs-description": [ - "error", - { pattern: "^(enforce|require|disallow|prefer)" }, - ], - "eslint-plugin/report-message-format": [ - "error", - "[^a-z].*\\.$", - ], - "eslint-plugin/require-meta-docs-url": [ - "error", - { - pattern: - "https://ota-meshi.github.io/eslint-plugin-lodash-template/rules/{{name}}.html", - }, - ], - }, - }, - { - files: ["scripts/*.js"], - rules: { - "require-jsdoc": "off", - }, - }, - { - files: ["docs/.vitepress/**"], - parser: "vue-eslint-parser", - parserOptions: { - sourceType: "module", - ecmaVersion: 2020, - }, - extends: ["plugin:@ota-meshi/+vue3", "plugin:@ota-meshi/+prettier"], - globals: { - window: true, - }, - rules: { - "require-jsdoc": "off", - "@mysticatea/node/no-missing-import": "off", - "@mysticatea/vue/html-closing-bracket-newline": "off", - "@mysticatea/vue/max-attributes-per-line": "off", - "@mysticatea/vue/comma-dangle": "off", - "@mysticatea/vue/html-indent": "off", - "@mysticatea/vue/html-self-closing": "off", - "@mysticatea/node/file-extension-in-import": "off", - "@mysticatea/node/no-unsupported-features/es-syntax": "off", - }, - }, - { - files: ["docs/.vitepress/**/*.mts", "docs/.vitepress/**/*.ts"], - parser: "@typescript-eslint/parser", - extends: [ - "plugin:@ota-meshi/+typescript", - "plugin:@typescript-eslint/disable-type-checked", - ], - }, - ], -}; diff --git a/.github/workflows/GHPages.yml b/.github/workflows/GHPages.yml index ae3f500e..cd275469 100644 --- a/.github/workflows/GHPages.yml +++ b/.github/workflows/GHPages.yml @@ -1,22 +1,22 @@ name: GHPages on: - push: - branches: [master] + push: + branches: [master] jobs: - deploy-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - name: Install Packages - run: npm install - - name: Build docs - run: npm run docs:build - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/.vitepress/dist/eslint-plugin-lodash-template - force_orphan: true + deploy-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Install Packages + run: npm install + - name: Build docs + run: npm run docs:build + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/.vitepress/dist/eslint-plugin-lodash-template + force_orphan: true diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index 2cef7d32..9bd22ea4 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -1,61 +1,61 @@ name: CI on: - push: - branches: [master] - pull_request: - branches: [master] + push: + branches: [master] + pull_request: + branches: [master] jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - name: Install Packages - run: npm install - - name: Lint - run: npm run lint - test: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - name: Uninstall Packages - run: |+ - npm r -D eslint-plugin-eslint-plugin eslint-plugin-prettier vue-eslint-parser eslint-plugin-vue - - name: Install Packages - run: npm install - - name: Test - run: npm test - test-for-eslintv9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - - name: Install ESLint v9 - run: npm install -D eslint@^9.0.0-0 -f - - name: Install Packages - run: npm install -f - - name: Test - run: npm test - test-and-coverage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - - name: Install Packages - run: npm install - - name: Test - run: npm run test:nyc - - name: Coveralls GitHub Action - uses: coverallsapp/github-action@v2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Install Packages + run: npm install + - name: Lint + run: npm run lint + test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Uninstall Packages + run: |+ + npm r -D eslint-plugin-eslint-plugin eslint-plugin-prettier vue-eslint-parser eslint-plugin-vue + - name: Install Packages + run: npm install + - name: Test + run: npm test + test-for-eslintv9: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js + uses: actions/setup-node@v4 + - name: Install ESLint v9 + run: npm install -D eslint@^9.0.0-0 -f + - name: Install Packages + run: npm install -f + - name: Test + run: npm test + test-and-coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - name: Install Packages + run: npm install + - name: Test + run: npm run test:nyc + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index c4b99e35..647d9bc7 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -1,42 +1,42 @@ name: Release on: - push: - branches: - - master + push: + branches: + - master permissions: - contents: write - issues: write - pull-requests: write + contents: write + issues: write + pull-requests: write jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Checkout Repo - uses: actions/checkout@v4 - with: - # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits - fetch-depth: 0 + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 - - name: Install Dependencies - run: npm install + - name: Install Dependencies + run: npm install - - name: Create Release Pull Request or Publish to npm - id: changesets - uses: changesets/action@v1 - with: - # this expects you to have a npm script called version that runs some logic and then calls `changeset version`. - version: npm run version:ci - # This expects you to have a script called release which does a build for your packages and calls changeset publish - publish: npm run release - commit: "chore: release eslint-plugin-lodash-template" - title: "chore: release eslint-plugin-lodash-template" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + # this expects you to have a npm script called version that runs some logic and then calls `changeset version`. + version: npm run version:ci + # This expects you to have a script called release which does a build for your packages and calls changeset publish + publish: npm run release + commit: "chore: release eslint-plugin-lodash-template" + title: "chore: release eslint-plugin-lodash-template" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 98fba323..8dd1f64a 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,34 +1,34 @@ name: 👔 Format on: - workflow_dispatch: null + workflow_dispatch: null permissions: - contents: write + contents: write jobs: - format: - runs-on: ubuntu-latest + format: + runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - name: Setup node - uses: actions/setup-node@v4 - - name: Install deps - run: npm install -f - - name: Format - run: npm run lint:fix - - name: Commit - run: | - git config --local user.email "github-actions[bot]@users.noreply.github.com" - git config --local user.name "github-actions[bot]" + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + - name: Install deps + run: npm install -f + - name: Format + run: npm run lint:fix + - name: Commit + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" - git add . - if [ -z "$(git status --porcelain)" ]; then - echo "no formatting changed" - exit 0 - fi - git commit -m "chore: format" - git push - echo "pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)" + git add . + if [ -z "$(git status --porcelain)" ]; then + echo "no formatting changed" + exit 0 + fi + git commit -m "chore: format" + git push + echo "pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)" diff --git a/README.md b/README.md index 97a5d403..63af6cce 100644 --- a/README.md +++ b/README.md @@ -4,36 +4,38 @@ ESLint plugin for John Resig-style micro templating. [![npm license]](https://www.npmjs.com/package/eslint-plugin-lodash-template) [![npm version](https://img.shields.io/npm/v/eslint-plugin-lodash-template.svg)](https://www.npmjs.com/package/eslint-plugin-lodash-template) -[![npm downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-lodash-template&maxAge=3600)](http://www.npmtrends.com/eslint-plugin-lodash-template) -[![npm downloads]](http://www.npmtrends.com/eslint-plugin-lodash-template) -[![npm downloads](https://img.shields.io/npm/dm/eslint-plugin-lodash-template.svg)](http://www.npmtrends.com/eslint-plugin-lodash-template) -[![npm downloads](https://img.shields.io/npm/dy/eslint-plugin-lodash-template.svg)](http://www.npmtrends.com/eslint-plugin-lodash-template) -[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-lodash-template.svg)](http://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-lodash-template&maxAge=3600)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads]](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dm/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dy/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) [![Build Status]](https://github.com/ota-meshi/eslint-plugin-lodash-template/actions?query=workflow%3ACI) [![Coverage Status]](https://coveralls.io/github/ota-meshi/eslint-plugin-lodash-template?branch=master) -It can be used in projects using [Underscore.js](http://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s template. +It can be used in projects using [Underscore.js](https://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s template. This plugin supports code checking for templates like the examples below. ```html
-
- -
-
-

<%= from_user %>: <%= text %>

-
+
+ +
+
+

+ <%= from_user %>: <%= text %> +

+
``` ```html <% for ( var i = 0; i < users.length; i++ ) { %> -
  • <%= users[i].name %>
  • +
  • <%= users[i].name %>
  • <% } %> ``` -[***Playground on the Web***](https://eslint-online-playground.netlify.app/#eNqNUk2P2jAQ/SujSIiPDUm3hx7SQC/tuZeqlw1CxhkSbx3bsg2lQvz3jp2EAtVKqxxizbx5783HOXGW53hinZGYtb6TSZGUE8gX0Ei9YxIY5/qgvEvh4NA6WOQwWVeKMGMm22v7jfF2NjuLOgVj9V5I3IqONbg9WJnC3upuG8ovKYg5rNZwjiQAZS2OIOpVRaIreoRwAlwy54bYTMAEPsJqBc/wBaaAR1TTAqbTecRGloFnLGusqLfPwKRpGVjRtP6KI6TomisyJrEmSRrDIPif/6iTj0I5Kb0p+gl0hw0DrpVHGs2trlmXu3XJoLW4J3wetK6D6Xt5DJU5WxdlvltDyHg8+Rg0j17GBy3lEsei4pv2AjM4MgsCVvDhM/3KfouZRNX4liJPTzD/tw0pbhwGzYh+EZtsnEP0eI0q1uHgs8ypuLcQ2ZI0ydBJobzl2aujs+p0faAjw5PR1jtydCafoSlUtSvgpUp6fGGR666jaNhMClVi5KERqpC6Zq5deqRjZR7zG9zyt/DtMtxvlWzSwGuYJZffjRdaEXvUIjXesZ9knoIFEQcaR9cRKyrv9MFy/PHHYEj2fqsk5C4RoY9oac0Y3caKgbby4WT6JhYZvtLiexfho4Pi6Jy2UfGhh95yD+1F3iC957yd2nun47gVhprdDGrhR+8Lbcow/ouunUS0ok2RASCvNR6/ogkMigsk/TjGcHnjqkLoboq3yWVvbPlg7L4mlJCTS3L5C/4egQw=) +[**_Playground on the Web_**](https://eslint-online-playground.netlify.app/#eNqNU01v2kAQ/SsjSxGEELvpoQdqaA+tVPXSQ6P2gBFa1oO9dD+s3TWiQvz3zq4NCTREERK2Z968N377vE+c5RnumGokprVXMpkk+Q1kI6ikWTEJjHPTau/G0Dq0DkYZ3MwKTZhjJ10b+5Xxejjci3IMjTVrIXEpFKtw2Vo5hrU1ahnGD2MQtzCdwT6SAOSl2IIopwWJTukmlBPgkjnX14YCbuA9TKfwAJ9gALhFPZjAYHAbsZGl5zmOVVaUywdgsqkZWFHV/oQjpFDVCRmbWJIk2dAL/rd/1MmOQhkpXRX9AEZhxYAb7ZGsea7bzPLVLGdQW1wTPgtaJ2O6d7ks5RmbTfJsNYPQ8bjzsdhc7nK8oUM5RFt0vKdzgSFsmQUBU3j3kS55d4qpRF35mip3d3D7dBpSPNswaEb0XCzSow9xx1NVM4X9nnlGw90KkS0ZJ+ik0D4lM9aiStXGUbaEaoz10LW+u/i6MPjcPWcbNyh0D5GmZK5+REom89gDO9x9I9tK6PsOcu97DM0WGndxusQ1a6WHOdX8Ua1fxaUWuVEKdYnlOADOtV6C/Ra+/kafR4DTwD780RzTVUsx+dF4YbSbQF8nSa7YL3KJyhMokkDrKIZRLfycaS3Hx78NhrYyZSuxSLruIVwO50ohksQ/L5LRKBvFL7VIFpHudSRuKIUdsPCUbY7OGTu5sDc9dVzkfgPx23ivWPmTW9H4k8oi5qVh/A+ZScxGU1RIFsibErdfsAmTmgsk0ehyyH/RJyyUzizumk+hugJ4NUznM2GEjuWQHP4B2WO+Uw==) output sample(on SublimeText): @@ -41,11 +43,11 @@ output sample(on SublimeText): ## Features -- Enable [ESLint](http://eslint.org) in [Underscore.js](http://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s templates. +- Enable [ESLint](https://eslint.org) in [Underscore.js](https://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s templates. - You can find issues specific to template tags. - Improves readability of HTML templates. -- For JavaScript (TypeScript) templates, enable [ESLint](http://eslint.org) both inside and outside the template tag. (*This is an experimental feature*) -- Partial supports for [EJS](http://ejs.co/). +- For JavaScript (TypeScript) templates, enable [ESLint](https://eslint.org) both inside and outside the template tag. (_This is an experimental feature_) +- Partial supports for [EJS](https://ejs.co/). ## Installation @@ -59,34 +61,18 @@ See [documents](https://ota-meshi.github.io/eslint-plugin-lodash-template/). ## Usage -Create `.eslintrc.*` file to configure rules. See also: [http://eslint.org/docs/user-guide/configuring](http://eslint.org/docs/user-guide/configuring). +Create `eslint.config.*` file to configure rules. See also: [https://eslint.org/docs/latest/use/configure/configuration-files](https://eslint.org/docs/latest/use/configure/configuration-files). -Example **eslint.config.js**: +Example **`eslint.config.*`**: ```js -import lodashTemplate from 'eslint-plugin-lodash-template' +import lodashTemplate from "eslint-plugin-lodash-template"; export default [ { - files: ['**/*.html'], - ...lodashTemplate.configs['flat/recommended-with-html'] - } -] -``` - -Example **.eslintrc.js**: - -```js -module.exports = { - extends: [ - // add more generic rulesets here, such as: - // 'eslint:recommended', - 'plugin:lodash-template/recommended-with-html' - ], - rules: { - // override/add rules settings here, such as: - // 'lodash-template/no-warning-html-comments': 'error' - } -} + files: ["**/*.html"], + ...lodashTemplate.configs.recommendedWithHtml, + }, +]; ``` ### Attention @@ -134,28 +120,15 @@ This plugin does special handling for the following rule warnings in the templat ## Configs -### For `eslint.config.js` - -This plugin provides 7 predefined configs: - -- `*.configs['flat/base']` - Settings and rules to enable correct ESLint parsing -- `*.configs['flat/base-with-ejs']` - Settings and rules to enable correct ESLint parsing for EJS -- `*.configs['flat/best-practices']` - Above, plus rules to improve dev experience -- `*.configs['flat/recommended']` - Above, plus rules to improve code readability -- `*.configs['flat/recommended-with-html']` - Above, plus rules to improve code readability with HTML template -- `*.configs['flat/recommended-with-script']` - `*.configs['flat/recommended']` config, plus to enable ESLint parsing of JavaScript templates (*This is an experimental feature*) -- `*.configs['flat/all']` - All rules of this plugin are included +This plugin provides 7 predefined configs to use in `eslint.config.js`: -### For `.eslintrc.*` - -This plugin provides 6 predefined configs: - -- `plugin:lodash-template/base` - Settings and rules to enable correct ESLint parsing -- `plugin:lodash-template/best-practices` - Above, plus rules to improve dev experience -- `plugin:lodash-template/recommended` - Above, plus rules to improve code readability -- `plugin:lodash-template/recommended-with-html` - Above, plus rules to improve code readability with HTML template -- `plugin:lodash-template/recommended-with-script` - `plugin:lodash-template/recommended` config, plus to enable ESLint parsing of JavaScript templates (*This is an experimental feature*) -- `plugin:lodash-template/all` - All rules of this plugin are included +- `*.configs.base` - Settings and rules to enable correct ESLint parsing +- `*.configs.baseWithEjs` - Settings and rules to enable correct ESLint parsing for EJS +- `*.configs.bestPractices` - Above, plus rules to improve dev experience +- `*.configs.recommended` - Above, plus rules to improve code readability +- `*.configs.recommendedWithHtml` - Above, plus rules to improve code readability with HTML template +- `*.configs.recommendedWithScript` - `*.configs.recommended` config, plus to enable ESLint parsing of JavaScript templates (_This is an experimental feature_) +- `*.configs.all` - All rules of this plugin are included ## Rules @@ -167,83 +140,96 @@ The `--fix` option on the [command line](https://eslint.org/docs/user-guide/comm Enable this plugin using with: -```json -{ - "extends": "plugin:lodash-template/base" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.base]; ``` -| | Rule ID | Description | -|:---|:--------|:------------| -| | [lodash-template/no-script-parsing-error](./docs/rules/no-script-parsing-error.md) | disallow parsing errors in template | +| | Rule ID | Description | +| :-- | :--------------------------------------------------------------------------------- | :---------------------------------- | +| | [lodash-template/no-script-parsing-error](./docs/rules/no-script-parsing-error.md) | disallow parsing errors in template | ### Best Practices (Improve Development Experience) Enforce all the rules in this category with: -```json -{ - "extends": "plugin:lodash-template/best-practices" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.bestPractices]; ``` -| | Rule ID | Description | -|:---|:--------|:------------| -| | [lodash-template/no-empty-template-tag](./docs/rules/no-empty-template-tag.md) | disallow empty micro-template tag. (ex. :ng: `<% %>`) | -| | [lodash-template/no-invalid-template-interpolation](./docs/rules/no-invalid-template-interpolation.md) | disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`) | +| | Rule ID | Description | +| :------- | :----------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- | +| | [lodash-template/no-empty-template-tag](./docs/rules/no-empty-template-tag.md) | disallow empty micro-template tag. (ex. :ng: `<% %>`) | +| | [lodash-template/no-invalid-template-interpolation](./docs/rules/no-invalid-template-interpolation.md) | disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`) | | :wrench: | [lodash-template/no-semi-in-template-interpolation](./docs/rules/no-semi-in-template-interpolation.md) | disallow the semicolon at the end of expression in micro template interpolation.(ex. :ok: `<%= text %>` :ng: `<%= text; %>`) | ### Recommended (Improve Readability) Enforce all the rules in this category and all the rules in `Best Practices` categories with: -```json -{ - "extends": "plugin:lodash-template/recommended" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + lodashTemplate.configs.recommended, + + // If you want to lint HTML files, also set the following: + { + files: ["**/*.html"], + }, +]; ``` -| | Rule ID | Description | -|:---|:--------|:------------| -| :wrench: | [lodash-template/no-irregular-whitespace](./docs/rules/no-irregular-whitespace.md) | disallow irregular whitespace outside the template tags. | -| :wrench: | [lodash-template/no-multi-spaces-in-scriptlet](./docs/rules/no-multi-spaces-in-scriptlet.md) | disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`) | -| :wrench: | [lodash-template/scriptlet-indent](./docs/rules/scriptlet-indent.md) | enforce consistent indentation to scriptlet in micro-template tag. | -| :wrench: | [lodash-template/template-tag-spacing](./docs/rules/template-tag-spacing.md) | enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`) | +| | Rule ID | Description | +| :------- | :------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | +| :wrench: | [lodash-template/no-irregular-whitespace](./docs/rules/no-irregular-whitespace.md) | disallow irregular whitespace outside the template tags. | +| :wrench: | [lodash-template/no-multi-spaces-in-scriptlet](./docs/rules/no-multi-spaces-in-scriptlet.md) | disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`) | +| :wrench: | [lodash-template/scriptlet-indent](./docs/rules/scriptlet-indent.md) | enforce consistent indentation to scriptlet in micro-template tag. | +| :wrench: | [lodash-template/template-tag-spacing](./docs/rules/template-tag-spacing.md) | enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`) | ### Recommended with HTML template (Improve Readability with HTML template) Enforce all the rules in this category and all the rules in `Best Practices`/`Recommended` categories with: -```json -{ - "extends": "plugin:lodash-template/recommended-with-html" -} -``` - -| | Rule ID | Description | -|:---|:--------|:------------| -| :wrench: | [lodash-template/attribute-name-casing](./docs/rules/attribute-name-casing.md) | enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `) | -| :wrench: | [lodash-template/attribute-value-quote](./docs/rules/attribute-value-quote.md) | enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `) | -| :wrench: | [lodash-template/element-name-casing](./docs/rules/element-name-casing.md) | enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `) | -| :wrench: | [lodash-template/html-closing-bracket-newline](./docs/rules/html-closing-bracket-newline.md) | require or disallow a line break before tag's closing brackets | -| :wrench: | [lodash-template/html-closing-bracket-spacing](./docs/rules/html-closing-bracket-spacing.md) | require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``) | -| :wrench: | [lodash-template/html-comment-content-newline](./docs/rules/html-comment-content-newline.md) | require or disallow a line break before and after HTML comment contents | -| :wrench: | [lodash-template/html-comment-spacing](./docs/rules/html-comment-spacing.md) | enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``) | -| :wrench: | [lodash-template/html-content-newline](./docs/rules/html-content-newline.md) | require or disallow a line break before and after HTML contents | -| :wrench: | [lodash-template/html-indent](./docs/rules/html-indent.md) | enforce consistent HTML indentation. | -| :wrench: | [lodash-template/max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | enforce the maximum number of HTML attributes per line | -| | [lodash-template/no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplication of HTML attributes. (ex. :ng: `
    `) | -| | [lodash-template/no-html-comments](./docs/rules/no-html-comments.md) | disallow HTML comments. (ex. :ng: ``) | -| :wrench: | [lodash-template/no-multi-spaces-in-html-tag](./docs/rules/no-multi-spaces-in-html-tag.md) | disallow multiple spaces in HTML tags. (ex. :ng: ``) | -| :wrench: | [lodash-template/no-space-attribute-equal-sign](./docs/rules/no-space-attribute-equal-sign.md) | disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `) | -| | [lodash-template/no-warning-html-comments](./docs/rules/no-warning-html-comments.md) | disallow specified warning terms in HTML comments. (ex. :ng: ``) | +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [ + lodashTemplate.configs.recommendedWithHtml, + + // If you want to lint HTML files, also set the following: + { + files: ["**/*.html"], + }, +]; +``` + +| | Rule ID | Description | +| :------- | :--------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- | +| :wrench: | [lodash-template/attribute-name-casing](./docs/rules/attribute-name-casing.md) | enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `) | +| :wrench: | [lodash-template/attribute-value-quote](./docs/rules/attribute-value-quote.md) | enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `) | +| :wrench: | [lodash-template/element-name-casing](./docs/rules/element-name-casing.md) | enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `) | +| :wrench: | [lodash-template/html-closing-bracket-newline](./docs/rules/html-closing-bracket-newline.md) | require or disallow a line break before tag's closing brackets | +| :wrench: | [lodash-template/html-closing-bracket-spacing](./docs/rules/html-closing-bracket-spacing.md) | require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``) | +| :wrench: | [lodash-template/html-comment-content-newline](./docs/rules/html-comment-content-newline.md) | require or disallow a line break before and after HTML comment contents | +| :wrench: | [lodash-template/html-comment-spacing](./docs/rules/html-comment-spacing.md) | enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``) | +| :wrench: | [lodash-template/html-content-newline](./docs/rules/html-content-newline.md) | require or disallow a line break before and after HTML contents | +| :wrench: | [lodash-template/html-indent](./docs/rules/html-indent.md) | enforce consistent HTML indentation. | +| :wrench: | [lodash-template/max-attributes-per-line](./docs/rules/max-attributes-per-line.md) | enforce the maximum number of HTML attributes per line | +| | [lodash-template/no-duplicate-attributes](./docs/rules/no-duplicate-attributes.md) | disallow duplication of HTML attributes. (ex. :ng: `
    `) | +| | [lodash-template/no-html-comments](./docs/rules/no-html-comments.md) | disallow HTML comments. (ex. :ng: ``) | +| :wrench: | [lodash-template/no-multi-spaces-in-html-tag](./docs/rules/no-multi-spaces-in-html-tag.md) | disallow multiple spaces in HTML tags. (ex. :ng: ``) | +| :wrench: | [lodash-template/no-space-attribute-equal-sign](./docs/rules/no-space-attribute-equal-sign.md) | disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `) | +| | [lodash-template/no-warning-html-comments](./docs/rules/no-warning-html-comments.md) | disallow specified warning terms in HTML comments. (ex. :ng: ``) | ### Uncategorized -| | Rule ID | Description | -|:---|:--------|:------------| -| | [lodash-template/no-template-tag-in-start-tag](./docs/rules/no-template-tag-in-start-tag.md) | disallow template tag in start tag outside attribute values. (ex. :ng: ` >`) | -| | [lodash-template/prefer-escape-template-interpolations](./docs/rules/prefer-escape-template-interpolations.md) | prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`) | +| | Rule ID | Description | +| :-- | :------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | +| | [lodash-template/no-template-tag-in-start-tag](./docs/rules/no-template-tag-in-start-tag.md) | disallow template tag in start tag outside attribute values. (ex. :ng: ` >`) | +| | [lodash-template/prefer-escape-template-interpolations](./docs/rules/prefer-escape-template-interpolations.md) | prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`) | @@ -253,14 +239,17 @@ Enforce all the rules in this category and all the rules in `Best Practices`/`Re Please set the global variable used in all templates as follows. -**.eslintrc.\***: +**`eslint.config.*`**: -```diff - { - "settings": { -+ "lodash-template/globals": ["variableName"] - } - } +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + settings: { + "lodash-template/globals": ["variableName"], + }, + }, +]; ``` Please write the global comment in the file as follows for the variable to be used with a specific template. @@ -276,14 +265,16 @@ Please write the global comment in the file as follows for the variable to be us Please set as follows. -**.eslintrc.\***: +**`eslint.config.*`**: -```diff - { - "settings": { -+ "lodash-template/ignoreRules": ["no-undef", "no-tabs"] - } - } +```js +export default [ + { + settings: { + "lodash-template/ignoreRules": ["no-undef", "no-tabs"], + }, + }, +]; ``` The ESLint standard suppression method can also be used by using template tag, as follows. @@ -298,60 +289,77 @@ For example, if you set [Lodash `templateSettings`](https://lodash.com/docs/#tem ```js _.templateSettings = { - evaluate: /{{([\s\S]+?)}}/g, + evaluate: /{{([\s\S]+?)}}/g, interpolate: /{{=([\s\S]+?)}}/g, - escape: /{{-([\s\S]+?)}}/g + escape: /{{-([\s\S]+?)}}/g, }; ``` -please set `parserOptions`(ex. **.eslintrc.\***) as follows. +please set `parserOptions` in your **`eslint.config.*`** as follows: -```diff - parserOptions: { -+ templateSettings: { -+ evaluate: ["{{", "}}"], -+ interpolate: ["{{=", "}}"], -+ escape: ["{{-", "}}"], -+ }, - }, +```js +export default [ + { + languageOptions: { + parserOptions: { + templateSettings: { + evaluate: ["{{", "}}"], + interpolate: ["{{=", "}}"], + escape: ["{{-", "}}"], + }, + }, + }, + }, +]; ``` -For example, to parse like [EJS](http://ejs.co/), set as follows, - -(If `plugin:lodash-template/***` is set in `extends`, it is automatically applied to the extension `.ejs`.) +For example, to parse like [EJS](https://ejs.co/), set as follows: -```diff - parserOptions: { -+ templateSettings: { -+ evaluate: [ ["<%", "<%_"], ["%>", "-%>", "_%>"] ], -+ interpolate: [ "<%-", ["%>", "-%>", "_%>"] ], -+ escape: [ "<%=", ["%>", "-%>", "_%>"] ], -+ comment: [ "<%#", ["%>", "-%>", "_%>"] ], -+ literal: [ "<%%" ], -+ }, - }, -``` +(Alternatively, you can use `lodashTemplate.configs.baseWithEjs`.) -(This plugin do not provide complete support for [EJS](http://ejs.co/). e.g. the `include` directive.) +```js +export default [ + { + files: ["**/*.ejs"], + languageOptions: { + parserOptions: { + templateSettings: { + evaluate: [ + ["<%", "<%_"], + ["%>", "-%>", "_%>"], + ], + interpolate: ["<%-", ["%>", "-%>", "_%>"]], + escape: ["<%=", ["%>", "-%>", "_%>"]], + comment: ["<%#", ["%>", "-%>", "_%>"]], + literal: ["<%%"], + }, + }, + }, + }, +]; +``` + +(This plugin do not provide complete support for [EJS](https://ejs.co/). e.g. the `include` directive.) ### Customize target extensions -Please set **.eslintrc.\*** as follows. +Please configure in your **`eslint.config.*`** as follows: -(For example, for [EJS](http://ejs.co/).) +(For example, for [EJS](https://ejs.co/).) -```diff -+ "overrides": [ -+ { -+ "files": ["*.ejs"], -+ "processor": "lodash-template/html" -+ } -+ ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/*.ejs"], + processor: lodashTemplate.processors.html, + }, +]; ``` ### For JavaScript (TypeScript) Templates -(*This is an experimental feature*. Also check for [known limitations](#known-limitations-in-script-templates).) +(_This is an experimental feature_. Also check for [known limitations](#known-limitations-in-script-templates).) For example if you have a file like below. @@ -361,60 +369,68 @@ For example if you have a file like below. // if this plugin is not used, a parsing error will occur. const obj = <%= JSON.stringify(options ) %> -// ^^^^ ^^^^^ +// ^^^^ ^^^^^ // | | -// | If you don't use `"plugin:lodash-template/recommended-with-script"`, +// | If you don't use lodashTemplate.configs.recommendedWithScript, // | only the space after `options` is reported. // | -// + When using `"plugin:lodash-template/recommended-with-script"`, the space after `obj` is also reported. +// + When using lodashTemplate.configs.recommendedWithScript, the space after `obj` is also reported. ``` -[***Playground on the Web***](https://eslint-online-playground.netlify.app/#eNqdVMFu2zAM/RVCQLAti+270e60y3ZYDxu2Q9UirkzHymTRkOQ2QZd/H2W5qBM0w1rlEMUk33t8pPMovFMF7qquN5hvvShFsQT0RtsAlrJuMEFnvq8U+hLQOXKwLKS9WMBznqG68m0WkEGqgMVJXaZt5pXTfTAYnkFg8UlaaYsCdAOh1R56M2y0Bb5ZCjB4rFdQQV85r+1mqnvQxgApNbhcWkXWB6C7LfC5hIvFJXz9fvUt98FxhW7276kPmpNiHD6MjMyXzi2f6friifFbmBUA/PlXPofPJX9pYE8D1GTfjX3BWorUbHnqnUNFXYe2xjp70KGdnJNivTqHTtbs2UCE0W6omoAO1lPn62inw55cwJotm0Mc/foIv1q0rC56/SZ9L2i42478lfE0FyFWIk+741Rauo7qgRcQdzHH8ywfeTcC7gIz8eJdS5Hyyxm/FCv4f51t6IwUN+yiDHGl0F0lh8rExWyqq34iLxvZkoEjjOfGxgoZPA1O4Y99jzGY9EoRY4cxg+55QXUdX5PrVDHBytBokx6LZY5b/6QifnpH/IZ4ciPjSQ9JckpNJGdAjzHnrr12ijcTW/zi+4EnxQP9XW3inwNZnhQLANZa4/1n7COCVRqZf7QxLtLTqOKjIxfnwSwJy06EHdfEElZyEIe/wU2LAg==) +[**_Playground on the Web_**](https://eslint-online-playground.netlify.app/#eNqdU8tu2zAQ/JUFAcOta0l3ISl66KHNoTkkaA5hAjPSyqZLkQJJNTES/3uWFBM/YBtBaMB67MzOcjh6Zs5WBT6JtlOYLx0rWTEBdEpqD9pkba+8zFwnKnQloLXGwqTg+mwEG5wytXCLzCM1ER6LPV4mdeYqKzuv0G+awOg711wXBcgG/EI66FQ/lxroThsPvcN6CgI6YZ3U88R7lEqBqare5lxXRjsP5mEJtM7hbHQOF1eXf3LnLTFks/piOi8JFOrwNSqS3rDuaaXbgyvU72GLAPByCk/lY+DfDaxMD7XR47gvmHE2bLbc985iZdoWdY119ij9IjnH2Wx6rLvRakUGIkS7QTQeLczSzmfBToudsR5rsmy7xc7TN7hZoKbpgtefmu/ADA/LqC+UM9tDsCkbopPTCTZynrcxebINiJSqCweNNS2MfwzPxdKNuU6QYarrNFQCDrhsGDzbG5y4XONTZNfYCMon3NI7/6aWRnH51g7Jcu53tQ7BbsiHX75VAU6E5/BHPKHnvZjj5XAQJaT3JFm14i9Sqo0ugbPQ1pGDUS38nOlthderDkO5NXWvkLOhug6X9a5SI1X4Om85m0yKSb6gUTi7i+1OI3Hp3oDcd9bQx+qMLffszd8rLvb+QOOP9T1i5VVM1LvKXcwLxeofmUmdjaaokCyQNzX+/4ldYOpKIolGl0OceUpYeLVj8VDchOoI4GSYdjmBQseyZutXHHXISQ==) #### Configuring -Please set **.eslintrc.\*** as follows. +Please configure in your **`eslint.config.*`** as follows: -```diff -+ "overrides": [ -+ { -+ "files": ["**/your/templates/*.js"], -+ "extends": ["plugin:lodash-template/recommended-with-script"] -+ } -+ ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/your/templates/*.js"], + ...lodashTemplate.configs.recommendedWithScript, + }, +]; ``` -If you do not want to use the included rules, set the details as follows. +If you do not want to use the included rules, set the details as follows: -```diff - "overrides": [ - { - "files": ["**/your/templates/*.js"], -- "extends": ["plugin:lodash-template/recommended-with-script"], -+ "extends": ["plugin:lodash-template/base"], -+ "processor": "lodash-template/script", -+ "rules": { -+ "lodash-template/no-invalid-template-interpolation": "error" -+ ... -+ } - } - ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/your/templates/*.js"], + ...lodashTemplate.configs.base, + processor: lodashTemplate.processors.script, + rules: { + "lodash-template/no-invalid-template-interpolation": "error", + // other rules... + }, + }, +]; ``` -If you want to use it with TypeScript, you need to configure `parserOptions`. +If you want to use it with TypeScript, you need to configure `parserOptions`: -```diff - "overrides": [ - { -- "files": ["**/your/templates/*.js"], -+ "files": ["**/your/templates/*.ts"], -+ "parserOptions": { -+ "parser": "@typescript-eslint/parser", -+ "sourceType": "module" -+ }, - "extends": ["plugin:lodash-template/recommended-with-script"] - } - ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +import tseslint from "typescript-eslint"; + +export default [ + { + files: ["**/your/templates/*.ts"], + ...lodashTemplate.configs.recommendedWithScript, + }, + { + files: ["**/your/templates/*.ts"], + languageOptions: { + parserOptions: { + parser: tseslint.parser, + sourceType: "module", + }, + }, + }, +]; ``` ## FAQ @@ -465,37 +481,27 @@ const a = 'foo' Generated Script 1: ```js +const a = "foo"; -const a = 'foo' - - const b = 1; - - - +const b = 1; ``` Generated Script 2: ```js +const a = "foo"; -const a = 'foo' - - - - const b = 2; - +const b = 2; ``` If we use the following script, it is a parsing error. ```js +const a = "foo"; -const a = 'foo' - - const b = 1; - - const b = 2; // <- Identifier 'b' has already been declared +const b = 1; +const b = 2; // <- Identifier 'b' has already been declared ``` The plugin also tries to generate scripts using branches that are as consistent as possible. @@ -519,29 +525,19 @@ Template: Generated Script 1: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - console.log(a) - - - +console.log(a); ``` Generated Script 2: ```js - - - // ... - - - // process for x.foo is false - +// process for x.foo is false ``` However, branching conditions are compared using text, so even logically the same can be confusing. @@ -565,29 +561,21 @@ Template: Generated Script 1: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - console.log(a) - - - +console.log(a); ``` Generated Script 2: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - - - // process for x.foo is false - +// process for x.foo is false ``` This template gets an error `'a' is assigned a value but never used.` from the `no-unused-vars` rule. @@ -596,17 +584,17 @@ This template gets an error `'a' is assigned a value but never used.` from the ` About how to mark warnings on editor. -- VSCode ([VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)) +- VSCode ([VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)) **settings.json**: ```json { - "eslint.validate": [ "javascript", "javascriptreact", "html" ] + "eslint.validate": ["javascript", "javascriptreact", "html"] } ``` -- Sublime Text3 ([SublimeLinter-eslint](https://packagecontrol.io/packages/SublimeLinter-eslint)) +- Sublime Text3 ([SublimeLinter-eslint](https://packagecontrol.io/packages/SublimeLinter-eslint)) [Preference] > [Package Settings] > [SublimeLinter] > [Settings] @@ -633,12 +621,12 @@ Please use GitHub's Issues/PRs. ### `parserServices` -[Information provided by `parserServices` on this plugin](./docs/services/index.md) +[Information provided by `parserServices` on this plugin](./docs/services/index.md) ### Development Tools -- `npm test` runs tests and measures coverage. -- `npm run update` runs in order to update readme and recommended configuration. +- `npm test` runs tests and measures coverage. +- `npm run update` runs in order to update readme and recommended configuration. ## License diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index c259be8f..ab73a641 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -64,7 +64,7 @@ export default async (): Promise> => { }, { files: ["*.js", "**/*.js"], - processor: "lodash-template/script", + processor: plugin.processors.script, rules: { "lodash-template/no-script-parsing-error": "error", @@ -72,7 +72,7 @@ export default async (): Promise> => { }, { files: ["*.html", "**/*.html"], - processor: "lodash-template/html", + processor: plugin.processors.html, }, ], }), @@ -120,6 +120,7 @@ export default async (): Promise> => { }, // Rules in no category. + // eslint-disable-next-line no-extra-parens -- false positive ? ...(rules.some((rule) => rule.meta.deprecated) ? [ { diff --git a/docs/index.md b/docs/index.md index 94a01a62..1d30f57f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,40 +2,48 @@ ESLint plugin for John Resig-style micro templating. -[![NPM license](https://img.shields.io/npm/l/eslint-plugin-lodash-template.svg)](https://www.npmjs.com/package/eslint-plugin-lodash-template) -[![NPM version](https://img.shields.io/npm/v/eslint-plugin-lodash-template.svg)](https://www.npmjs.com/package/eslint-plugin-lodash-template) -[![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-lodash-template.svg)](http://www.npmtrends.com/eslint-plugin-lodash-template) - -It can be used in projects using [Underscore.js](http://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s template. +[![npm license]](https://www.npmjs.com/package/eslint-plugin-lodash-template) +[![npm version](https://img.shields.io/npm/v/eslint-plugin-lodash-template.svg)](https://www.npmjs.com/package/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-lodash-template&maxAge=3600)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads]](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dm/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dy/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![npm downloads](https://img.shields.io/npm/dt/eslint-plugin-lodash-template.svg)](https://www.npmtrends.com/eslint-plugin-lodash-template) +[![Build Status]](https://github.com/ota-meshi/eslint-plugin-lodash-template/actions?query=workflow%3ACI) +[![Coverage Status]](https://coveralls.io/github/ota-meshi/eslint-plugin-lodash-template?branch=master) + +It can be used in projects using [Underscore.js](https://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s template. This plugin supports code checking for templates like the examples below. ```html
    -
    - -
    -
    -

    <%= from_user %>: <%= text %>

    -
    +
    + +
    +
    +

    + <%= from_user %>: <%= text %> +

    +
    ``` ```html <% for ( var i = 0; i < users.length; i++ ) { %> -
  • <%= users[i].name %>
  • +
  • <%= users[i].name %>
  • <% } %> ``` -[***Playground on the Web***](https://eslint-online-playground.netlify.app/#eNqNUk2P2jAQ/SujSIiPDUm3hx7SQC/tuZeqlw1CxhkSbx3bsg2lQvz3jp2EAtVKqxxizbx5783HOXGW53hinZGYtb6TSZGUE8gX0Ei9YxIY5/qgvEvh4NA6WOQwWVeKMGMm22v7jfF2NjuLOgVj9V5I3IqONbg9WJnC3upuG8ovKYg5rNZwjiQAZS2OIOpVRaIreoRwAlwy54bYTMAEPsJqBc/wBaaAR1TTAqbTecRGloFnLGusqLfPwKRpGVjRtP6KI6TomisyJrEmSRrDIPif/6iTj0I5Kb0p+gl0hw0DrpVHGs2trlmXu3XJoLW4J3wetK6D6Xt5DJU5WxdlvltDyHg8+Rg0j17GBy3lEsei4pv2AjM4MgsCVvDhM/3KfouZRNX4liJPTzD/tw0pbhwGzYh+EZtsnEP0eI0q1uHgs8ypuLcQ2ZI0ydBJobzl2aujs+p0faAjw5PR1jtydCafoSlUtSvgpUp6fGGR666jaNhMClVi5KERqpC6Zq5deqRjZR7zG9zyt/DtMtxvlWzSwGuYJZffjRdaEXvUIjXesZ9knoIFEQcaR9cRKyrv9MFy/PHHYEj2fqsk5C4RoY9oac0Y3caKgbby4WT6JhYZvtLiexfho4Pi6Jy2UfGhh95yD+1F3iC957yd2nun47gVhprdDGrhR+8Lbcow/ouunUS0ok2RASCvNR6/ogkMigsk/TjGcHnjqkLoboq3yWVvbPlg7L4mlJCTS3L5C/4egQw=) +[**_Playground on the Web_**](https://eslint-online-playground.netlify.app/#eNqNU01v2kAQ/SsjSxGEELvpoQdqaA+tVPXSQ6P2gBFa1oO9dD+s3TWiQvz3zq4NCTREERK2Z968N377vE+c5RnumGokprVXMpkk+Q1kI6ikWTEJjHPTau/G0Dq0DkYZ3MwKTZhjJ10b+5Xxejjci3IMjTVrIXEpFKtw2Vo5hrU1ahnGD2MQtzCdwT6SAOSl2IIopwWJTukmlBPgkjnX14YCbuA9TKfwAJ9gALhFPZjAYHAbsZGl5zmOVVaUywdgsqkZWFHV/oQjpFDVCRmbWJIk2dAL/rd/1MmOQhkpXRX9AEZhxYAb7ZGsea7bzPLVLGdQW1wTPgtaJ2O6d7ks5RmbTfJsNYPQ8bjzsdhc7nK8oUM5RFt0vKdzgSFsmQUBU3j3kS55d4qpRF35mip3d3D7dBpSPNswaEb0XCzSow9xx1NVM4X9nnlGw90KkS0ZJ+ik0D4lM9aiStXGUbaEaoz10LW+u/i6MPjcPWcbNyh0D5GmZK5+REom89gDO9x9I9tK6PsOcu97DM0WGndxusQ1a6WHOdX8Ua1fxaUWuVEKdYnlOADOtV6C/Ra+/kafR4DTwD780RzTVUsx+dF4YbSbQF8nSa7YL3KJyhMokkDrKIZRLfycaS3Hx78NhrYyZSuxSLruIVwO50ohksQ/L5LRKBvFL7VIFpHudSRuKIUdsPCUbY7OGTu5sDc9dVzkfgPx23ivWPmTW9H4k8oi5qVh/A+ZScxGU1RIFsibErdfsAmTmgsk0ehyyH/RJyyUzizumk+hugJ4NUznM2GEjuWQHP4B2WO+Uw==) ## Features -- Enable [ESLint](http://eslint.org) in [Underscore.js](http://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s templates. +- Enable [ESLint](https://eslint.org) in [Underscore.js](https://underscorejs.org/#template) and [Lodash](https://lodash.com/docs/#template)'s templates. - You can find issues specific to template tags. - Improves readability of HTML templates. -- For JavaScript (TypeScript) templates, enable [ESLint](http://eslint.org) both inside and outside the template tag. (*This is an experimental feature*) -- Partial supports for [EJS](http://ejs.co/). +- For JavaScript (TypeScript) templates, enable [ESLint](https://eslint.org) both inside and outside the template tag. (_This is an experimental feature_) +- Partial supports for [EJS](https://ejs.co/). ## Installation @@ -45,34 +53,18 @@ npm install --save-dev eslint eslint-plugin-lodash-template ## Usage -Create `.eslintrc.*` file to configure rules. See also: [http://eslint.org/docs/user-guide/configuring](http://eslint.org/docs/user-guide/configuring). +Create `eslint.config.*` file to configure rules. See also: [https://eslint.org/docs/latest/use/configure/configuration-files](https://eslint.org/docs/latest/use/configure/configuration-files). -Example **eslint.config.js**: +Example **`eslint.config.*`**: ```js -import lodashTemplate from 'eslint-plugin-lodash-template' +import lodashTemplate from "eslint-plugin-lodash-template"; export default [ { - files: ['**/*.html'], - ...lodashTemplate.configs['flat/recommended-with-html'] - } -] -``` - -Example **.eslintrc.js**: - -```js -module.exports = { - extends: [ - // add more generic rulesets here, such as: - // 'eslint:recommended', - 'plugin:lodash-template/recommended-with-html' - ], - rules: { - // override/add rules settings here, such as: - // 'lodash-template/no-warning-html-comments': 'error' - } -} + files: ["**/*.html"], + ...lodashTemplate.configs.recommendedWithHtml, + }, +]; ``` ### Attention @@ -120,28 +112,15 @@ This plugin does special handling for the following rule warnings in the templat ## Configs -### For `eslint.config.js` +This plugin provides 7 predefined configs to use in `eslint.config.js`: -This plugin provides 7 predefined configs: - -- `*.configs['flat/base']` - Settings and rules to enable correct ESLint parsing -- `*.configs['flat/base-with-ejs']` - Settings and rules to enable correct ESLint parsing for EJS -- `*.configs['flat/best-practices']` - Above, plus rules to improve dev experience -- `*.configs['flat/recommended']` - Above, plus rules to improve code readability -- `*.configs['flat/recommended-with-html']` - Above, plus rules to improve code readability with HTML template -- `*.configs['flat/recommended-with-script']` - `*.configs['flat/recommended']` config, plus to enable ESLint parsing of JavaScript templates (*This is an experimental feature*) -- `*.configs['flat/all']` - All rules of this plugin are included - -### For `.eslintrc.*` - -This plugin provides 6 predefined configs: - -- `plugin:lodash-template/base` - Settings and rules to enable correct ESLint parsing -- `plugin:lodash-template/best-practices` - Above, plus rules to improve dev experience -- `plugin:lodash-template/recommended` - Above, plus rules to improve code readability -- `plugin:lodash-template/recommended-with-html` - Above, plus rules to improve code readability with HTML template -- `plugin:lodash-template/recommended-with-script` - `plugin:lodash-template/recommended` config, plus to enable ESLint parsing of JavaScript templates (*This is an experimental feature*) -- `plugin:lodash-template/all` - All rules of this plugin are included +- `*.configs.base` - Settings and rules to enable correct ESLint parsing +- `*.configs.baseWithEjs` - Settings and rules to enable correct ESLint parsing for EJS +- `*.configs.bestPractices` - Above, plus rules to improve dev experience +- `*.configs.recommended` - Above, plus rules to improve code readability +- `*.configs.recommendedWithHtml` - Above, plus rules to improve code readability with HTML template +- `*.configs.recommendedWithScript` - `*.configs.recommended` config, plus to enable ESLint parsing of JavaScript templates (_This is an experimental feature_) +- `*.configs.all` - All rules of this plugin are included ## All Rules @@ -153,14 +132,17 @@ Please see [All Rules](./rules/index.md) Please set the global variable used in all templates as follows. -**.eslintrc.\***: +**`eslint.config.*`**: -```diff - { - "settings": { -+ "lodash-template/globals": ["variableName"] - } - } +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + settings: { + "lodash-template/globals": ["variableName"], + }, + }, +]; ``` Please write the global comment in the file as follows for the variable to be used with a specific template. @@ -176,14 +158,16 @@ Please write the global comment in the file as follows for the variable to be us Please set as follows. -**.eslintrc.\***: +**`eslint.config.*`**: -```diff - { - "settings": { -+ "lodash-template/ignoreRules": ["no-undef", "no-tabs"] - } - } +```js +export default [ + { + settings: { + "lodash-template/ignoreRules": ["no-undef", "no-tabs"], + }, + }, +]; ``` The ESLint standard suppression method can also be used by using template tag, as follows. @@ -200,62 +184,77 @@ For example, if you set [Lodash `templateSettings`](https://lodash.com/docs/#tem ```js _.templateSettings = { - evaluate: /{{([\s\S]+?)}}/g, + evaluate: /{{([\s\S]+?)}}/g, interpolate: /{{=([\s\S]+?)}}/g, - escape: /{{-([\s\S]+?)}}/g + escape: /{{-([\s\S]+?)}}/g, }; ``` -please set `parserOptions`(ex. **.eslintrc.\***) as follows. +please set `parserOptions` in your **`eslint.config.*`** as follows: -```diff - parserOptions: { -+ templateSettings: { -+ evaluate: ["{{", "}}"], -+ interpolate: ["{{=", "}}"], -+ escape: ["{{-", "}}"], -+ }, - }, +```js +export default [ + { + languageOptions: { + parserOptions: { + templateSettings: { + evaluate: ["{{", "}}"], + interpolate: ["{{=", "}}"], + escape: ["{{-", "}}"], + }, + }, + }, + }, +]; ``` -
    +For example, to parse like [EJS](https://ejs.co/), set as follows: -For example, to parse like [EJS](http://ejs.co/), set as follows, +(Alternatively, you can use `lodashTemplate.configs.baseWithEjs`.) -(If `plugin:lodash-template/***` is set in `extends`, it is automatically applied to the extension `.ejs`.) - -```diff - parserOptions: { -+ templateSettings: { -+ evaluate: [ ["<%", "<%_"], ["%>", "-%>", "_%>"] ], -+ interpolate: [ "<%-", ["%>", "-%>", "_%>"] ], -+ escape: [ "<%=", ["%>", "-%>", "_%>"] ], -+ comment: [ "<%#", ["%>", "-%>", "_%>"] ], -+ literal: [ "<%%" ], -+ }, - }, +```js +export default [ + { + files: ["**/*.ejs"], + languageOptions: { + parserOptions: { + templateSettings: { + evaluate: [ + ["<%", "<%_"], + ["%>", "-%>", "_%>"], + ], + interpolate: ["<%-", ["%>", "-%>", "_%>"]], + escape: ["<%=", ["%>", "-%>", "_%>"]], + comment: ["<%#", ["%>", "-%>", "_%>"]], + literal: ["<%%"], + }, + }, + }, + }, +]; ``` -(This plugin do not provide complete support for [EJS](http://ejs.co/). e.g. the `include` directive.) +(This plugin do not provide complete support for [EJS](https://ejs.co/). e.g. the `include` directive.) ### Customize target extensions -Please set **.eslintrc.\*** as follows. +Please configure in your **`eslint.config.*`** as follows: -(For example, for [EJS](http://ejs.co/).) +(For example, for [EJS](https://ejs.co/).) -```diff -+ "overrides": [ -+ { -+ "files": ["*.ejs"], -+ "processor": "lodash-template/html" -+ } -+ ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/*.ejs"], + processor: lodashTemplate.processors.html, + }, +]; ``` ### For JavaScript (TypeScript) Templates -(*This is an experimental feature*. Also check for [known limitations](#known-limitations-in-script-templates).) +(_This is an experimental feature_. Also check for [known limitations](#known-limitations-in-script-templates).) For example if you have a file like below. @@ -265,56 +264,68 @@ For example if you have a file like below. // if this plugin is not used, a parsing error will occur. const obj = <%= JSON.stringify(options ) %> -// ^^^^ ^^^^^ +// ^^^^ ^^^^^ // | | -// | If you don't use `"plugin:lodash-template/recommended-with-script"`, +// | If you don't use lodashTemplate.configs.recommendedWithScript, // | only the space after `options` is reported. // | -// + When using `"plugin:lodash-template/recommended-with-script"`, the space after `obj` is also reported. +// + When using lodashTemplate.configs.recommendedWithScript, the space after `obj` is also reported. ``` -[***Playground on the Web***](https://eslint-online-playground.netlify.app/#eNqdVMFu2zAM/RVCQLAti+270e60y3ZYDxu2Q9UirkzHymTRkOQ2QZd/H2W5qBM0w1rlEMUk33t8pPMovFMF7qquN5hvvShFsQT0RtsAlrJuMEFnvq8U+hLQOXKwLKS9WMBznqG68m0WkEGqgMVJXaZt5pXTfTAYnkFg8UlaaYsCdAOh1R56M2y0Bb5ZCjB4rFdQQV85r+1mqnvQxgApNbhcWkXWB6C7LfC5hIvFJXz9fvUt98FxhW7276kPmpNiHD6MjMyXzi2f6friifFbmBUA/PlXPofPJX9pYE8D1GTfjX3BWorUbHnqnUNFXYe2xjp70KGdnJNivTqHTtbs2UCE0W6omoAO1lPn62inw55cwJotm0Mc/foIv1q0rC56/SZ9L2i42478lfE0FyFWIk+741Rauo7qgRcQdzHH8ywfeTcC7gIz8eJdS5Hyyxm/FCv4f51t6IwUN+yiDHGl0F0lh8rExWyqq34iLxvZkoEjjOfGxgoZPA1O4Y99jzGY9EoRY4cxg+55QXUdX5PrVDHBytBokx6LZY5b/6QifnpH/IZ4ciPjSQ9JckpNJGdAjzHnrr12ijcTW/zi+4EnxQP9XW3inwNZnhQLANZa4/1n7COCVRqZf7QxLtLTqOKjIxfnwSwJy06EHdfEElZyEIe/wU2LAg==) +[**_Playground on the Web_**](https://eslint-online-playground.netlify.app/#eNqdU8tu2zAQ/JUFAcOta0l3ISl66KHNoTkkaA5hAjPSyqZLkQJJNTES/3uWFBM/YBtBaMB67MzOcjh6Zs5WBT6JtlOYLx0rWTEBdEpqD9pkba+8zFwnKnQloLXGwqTg+mwEG5wytXCLzCM1ER6LPV4mdeYqKzuv0G+awOg711wXBcgG/EI66FQ/lxroThsPvcN6CgI6YZ3U88R7lEqBqare5lxXRjsP5mEJtM7hbHQOF1eXf3LnLTFks/piOi8JFOrwNSqS3rDuaaXbgyvU72GLAPByCk/lY+DfDaxMD7XR47gvmHE2bLbc985iZdoWdY119ij9IjnH2Wx6rLvRakUGIkS7QTQeLczSzmfBToudsR5rsmy7xc7TN7hZoKbpgtefmu/ADA/LqC+UM9tDsCkbopPTCTZynrcxebINiJSqCweNNS2MfwzPxdKNuU6QYarrNFQCDrhsGDzbG5y4XONTZNfYCMon3NI7/6aWRnH51g7Jcu53tQ7BbsiHX75VAU6E5/BHPKHnvZjj5XAQJaT3JFm14i9Sqo0ugbPQ1pGDUS38nOlthderDkO5NXWvkLOhug6X9a5SI1X4Om85m0yKSb6gUTi7i+1OI3Hp3oDcd9bQx+qMLffszd8rLvb+QOOP9T1i5VVM1LvKXcwLxeofmUmdjaaokCyQNzX+/4ldYOpKIolGl0OceUpYeLVj8VDchOoI4GSYdjmBQseyZutXHHXISQ==) #### Configuring -Please set **.eslintrc.\*** as follows. +Please configure in your **`eslint.config.*`** as follows: -```diff -+ "overrides": [ -+ { -+ "files": ["**/your/templates/*.js"], -+ "extends": ["plugin:lodash-template/recommended-with-script"] -+ } -+ ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/your/templates/*.js"], + ...lodashTemplate.configs.recommendedWithScript, + }, +]; ``` -If you do not want to use the included rules, set the details as follows. +If you do not want to use the included rules, set the details as follows: -```diff - "overrides": [ - { - "files": ["**/your/templates/*.js"], -- "extends": ["plugin:lodash-template/recommended-with-script"], -+ "extends": ["plugin:lodash-template/base"], -+ "processor": "lodash-template/script" - } - ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +export default [ + { + files: ["**/your/templates/*.js"], + ...lodashTemplate.configs.base, + processor: lodashTemplate.processors.script, + rules: { + "lodash-template/no-invalid-template-interpolation": "error", + // other rules... + }, + }, +]; ``` -If you want to use it with TypeScript, you need to configure `parserOptions`. +If you want to use it with TypeScript, you need to configure `parserOptions`: -```diff - "overrides": [ - { -- "files": ["**/your/templates/*.js"], -+ "files": ["**/your/templates/*.ts"], -+ "parserOptions": { -+ "parser": "@typescript-eslint/parser", -+ "sourceType": "module" -+ }, - "extends": ["plugin:lodash-template/recommended-with-script"] - } - ] +```js +import lodashTemplate from "eslint-plugin-lodash-template"; +import tseslint from "typescript-eslint"; + +export default [ + { + files: ["**/your/templates/*.ts"], + ...lodashTemplate.configs.recommendedWithScript, + }, + { + files: ["**/your/templates/*.ts"], + languageOptions: { + parserOptions: { + parser: tseslint.parser, + sourceType: "module", + }, + }, + }, +]; ``` ## FAQ @@ -365,37 +376,27 @@ const a = 'foo' Generated Script 1: ```js +const a = "foo"; -const a = 'foo' - - const b = 1; - - - +const b = 1; ``` Generated Script 2: ```js +const a = "foo"; -const a = 'foo' - - - - const b = 2; - +const b = 2; ``` If we use the following script, it is a parsing error. ```js +const a = "foo"; -const a = 'foo' - - const b = 1; - - const b = 2; // <- Identifier 'b' has already been declared +const b = 1; +const b = 2; // <- Identifier 'b' has already been declared ``` The plugin also tries to generate scripts using branches that are as consistent as possible. @@ -419,29 +420,19 @@ Template: Generated Script 1: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - console.log(a) - - - +console.log(a); ``` Generated Script 2: ```js - - - // ... - - - // process for x.foo is false - +// process for x.foo is false ``` However, branching conditions are compared using text, so even logically the same can be confusing. @@ -465,48 +456,40 @@ Template: Generated Script 1: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - console.log(a) - - - +console.log(a); ``` Generated Script 2: ```js - - const a = 'x.foo is true' +const a = "x.foo is true"; // ... - - - // process for x.foo is false - +// process for x.foo is false ``` This template gets an error `'a' is assigned a value but never used.` from the `no-unused-vars` rule. -### Editor Settings +### Editor Settings with HTML templates About how to mark warnings on editor. -- VSCode ([VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)) +- VSCode ([VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)) **settings.json**: ```json { - "eslint.validate": [ "javascript", "javascriptreact", { "language": "html", "autoFix": true } ] + "eslint.validate": ["javascript", "javascriptreact", "html"] } ``` -- Sublime Text3 ([SublimeLinter-eslint](https://packagecontrol.io/packages/SublimeLinter-eslint)) +- Sublime Text3 ([SublimeLinter-eslint](https://packagecontrol.io/packages/SublimeLinter-eslint)) [Preference] > [Package Settings] > [SublimeLinter] > [Settings] @@ -533,13 +516,21 @@ Please use GitHub's Issues/PRs. ### `parserServices` -[Information provided by `parserServices` on this plugin](./services/index.md) +[Information provided by `parserServices` on this plugin](./services/index.md) ### Development Tools -- `npm test` runs tests and measures coverage. -- `npm run update` runs in order to update readme and recommended configuration. +- `npm test` runs tests and measures coverage. +- `npm run update` runs in order to update readme and recommended configuration. ## License -See the [LICENSE](https://github.com/ota-meshi/eslint-plugin-lodash-template/blob/master/LICENSE) file for license rights and limitations (MIT). +See the [LICENSE] file for license rights and limitations (MIT). + +[license]: https://github.com/ota-meshi/eslint-plugin-lodash-template/blob/master/LICENSE +[npm license]: https://img.shields.io/npm/l/eslint-plugin-lodash-template.svg +[npm version]: https://img.shields.io/npm/v/eslint-plugin-lodash-template.svg +[npm downloads]: https://img.shields.io/npm/dw/eslint-plugin-lodash-template.svg +[Build Status]: https://github.com/ota-meshi/eslint-plugin-lodash-template/workflows/CI/badge.svg?branch=master +[Coverage Status]: https://coveralls.io/repos/github/ota-meshi/eslint-plugin-lodash-template/badge.svg?branch=master +[Greenkeeper badge]: https://badges.greenkeeper.io/ota-meshi/eslint-plugin-lodash-template.svg diff --git a/docs/rules/attribute-name-casing.md b/docs/rules/attribute-name-casing.md index 37301d7e..cc809566 100644 --- a/docs/rules/attribute-name-casing.md +++ b/docs/rules/attribute-name-casing.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/attribute-name-casing" description: "enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `)" --- + # lodash-template/attribute-name-casing + > enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: This rule enforces attribute name casing style (kebab-case). + ```html <% /* eslint "lodash-template/attribute-name-casing": "error" */ %> @@ -26,7 +29,7 @@ This rule enforces attribute name casing style (kebab-case). ## Options -```json +```js { "lodash-template/attribute-name-casing": ["error", { "ignore": [], @@ -37,6 +40,7 @@ This rule enforces attribute name casing style (kebab-case). ### Examples for this rule with `"ignore": ["onClick"]` option: + ```html <% /* eslint "lodash-template/attribute-name-casing": ["error", {"ignore": ["onClick"]}] */ %> @@ -45,6 +49,7 @@ This rule enforces attribute name casing style (kebab-case). ### Examples for this rule with `"ignoreSvgCamelCaseAttributes": true,` (default) + ```html <% /* eslint "lodash-template/attribute-name-casing": ["error", {"ignoreSvgCamelCaseAttributes": true}] */ %> @@ -53,9 +58,9 @@ This rule enforces attribute name casing style (kebab-case). ## Further Reading -- [Google HTML/CSS Style Guide *Capitalization*](https://google.github.io/styleguide/htmlcssguide.html#Capitalization) -- [HTML - MDN - Mozilla *`data-*`*](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*) -- [HTML5 *Embedding custom non-visible data with the `data-*` attributes*](https://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-attributes) +- [Google HTML/CSS Style Guide _Capitalization_](https://google.github.io/styleguide/htmlcssguide.html#Capitalization) +- [HTML - MDN - Mozilla _`data-_`\*](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-*) +- [HTML5 _Embedding custom non-visible data with the `data-_` attributes\*](https://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-attributes) ## Implementation diff --git a/docs/rules/attribute-value-quote.md b/docs/rules/attribute-value-quote.md index 28ed915f..4a9d9edd 100644 --- a/docs/rules/attribute-value-quote.md +++ b/docs/rules/attribute-value-quote.md @@ -2,9 +2,11 @@ pageClass: "rule-details" sidebarDepth: 0 title: "lodash-template/attribute-value-quote" -description: "enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `)" +description: 'enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `)' --- + # lodash-template/attribute-value-quote + > enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -26,7 +28,7 @@ This rule enforces the quotes style of HTML attributes. ## Options -```json +```js { "lodash-template/attribute-value-quote": ["error", "double" | "single" | "either" | "prefer-double"] } @@ -63,8 +65,8 @@ This rule enforces the quotes style of HTML attributes. ## Further Reading -- [Google HTML/CSS Style Guide *HTML Quotation Marks*](https://google.github.io/styleguide/htmlcssguide.html#HTML_Quotation_Marks) -- [HTML5 Style Guide - W3Schools *Quote Attribute Values*](https://www.w3schools.com/html/html5_syntax.asp) +- [Google HTML/CSS Style Guide _HTML Quotation Marks_](https://google.github.io/styleguide/htmlcssguide.html#HTML_Quotation_Marks) +- [HTML5 Style Guide - W3Schools _Quote Attribute Values_](https://www.w3schools.com/html/html5_syntax.asp) ## Implementation diff --git a/docs/rules/element-name-casing.md b/docs/rules/element-name-casing.md index 9eec1ffe..8755e60c 100644 --- a/docs/rules/element-name-casing.md +++ b/docs/rules/element-name-casing.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/element-name-casing" description: "enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `)" --- + # lodash-template/element-name-casing + > enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "enforce HTML element name casing. (ex. :ok: `` :ng: ` This rule enforces element name casing style (kebab-case). + ```html <% /* eslint "lodash-template/element-name-casing": "error" */ %> @@ -27,7 +30,7 @@ This rule enforces element name casing style (kebab-case). ## Further Reading -- [Web Components | MDN *Using custom elements*](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) +- [Web Components | MDN _Using custom elements_](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) ## Implementation diff --git a/docs/rules/html-closing-bracket-newline.md b/docs/rules/html-closing-bracket-newline.md index a6da28d4..f9fc44fe 100644 --- a/docs/rules/html-closing-bracket-newline.md +++ b/docs/rules/html-closing-bracket-newline.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-closing-bracket-newline" description: "require or disallow a line break before tag's closing brackets" --- + # lodash-template/html-closing-bracket-newline + > require or disallow a line break before tag's closing brackets - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -15,6 +17,7 @@ description: "require or disallow a line break before tag's closing brackets" People have own preference about the location of closing brackets. This rule enforces a line break (or no line break) before tag's closing brackets. + ```html
    ``` + ```html <% /* eslint "lodash-template/html-closing-bracket-newline": "error" */ %> @@ -50,26 +54,30 @@ This rule enforces a line break (or no line break) before tag's closing brackets ## Options -```json +```js { - "lodash-template/html-closing-bracket-newline": ["error", { - "singleline": "never", - "multiline": "never" - }] + "lodash-template/html-closing-bracket-newline": [ + "error", + { + "singleline": "never", + "multiline": "never" + } + ] } ``` - `singleline` ... the configuration for single-line elements. It's a single-line element if the element does not have attributes or the last attribute is on the same line as the opening bracket. - - `"never"` ... disallow line breaks before the closing bracket. This is the default. - - `"always"` ... require one line break before the closing bracket. + - `"never"` ... disallow line breaks before the closing bracket. This is the default. + - `"always"` ... require one line break before the closing bracket. - `multiline` ... the configuration for multiline elements. It's a multiline element if the last attribute is not on the same line of the opening bracket. - - `"never"` ... disallow line breaks before the closing bracket. This is the default. - - `"always"` ... require one line break before the closing bracket. + - `"never"` ... disallow line breaks before the closing bracket. This is the default. + - `"always"` ... require one line break before the closing bracket. Plus, you can use [`lodash-template/html-indent`](./html-indent.md) rule to enforce indent-level of the closing brackets. ### Examples for this rule with `{ "multiline": "always" }` option: + ```html <% /* eslint "lodash-template/html-closing-bracket-newline": ["error", { "multiline": "always" }] */ %> diff --git a/docs/rules/html-closing-bracket-spacing.md b/docs/rules/html-closing-bracket-spacing.md index 68f20d3a..8d7958bc 100644 --- a/docs/rules/html-closing-bracket-spacing.md +++ b/docs/rules/html-closing-bracket-spacing.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-closing-bracket-spacing" description: "require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``)" --- + # lodash-template/html-closing-bracket-spacing + > require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,11 +16,13 @@ description: "require or disallow a space before tag's closing brackets. (ex. :o This rule enforces consistent spacing style before closing brackets `>` of tags. + ```html
    or
    or ``` + ```html <% /* eslint "lodash-template/html-closing-bracket-spacing": "error" */ %> @@ -42,8 +46,7 @@ This rule enforces consistent spacing style before closing brackets `>` of tags. ## Options - -```json +```js { "lodash-template/html-closing-bracket-spacing": ["error", { "startTag": "always" | "never", @@ -54,15 +57,16 @@ This rule enforces consistent spacing style before closing brackets `>` of tags. ``` - `startTag` (`"always" | "never"`) ... Setting for the `>` of start tags (e.g. `
    `). Default is `"never"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. - `endTag` (`"always" | "never"`) ... Setting for the `>` of end tags (e.g. `
    `). Default is `"never"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. - `selfClosingTag` (`"always" | "never"`) ... Setting for the `/>` of self-closing tags (e.g. `
    `). Default is `"always"`. - - `"always"` ... requires one or more spaces. - - `"never"` ... disallows spaces. + - `"always"` ... requires one or more spaces. + - `"never"` ... disallows spaces. + ```html <% /* eslint lodash-template/html-closing-bracket-spacing: ["error", { diff --git a/docs/rules/html-comment-content-newline.md b/docs/rules/html-comment-content-newline.md index 02915912..e04b7630 100644 --- a/docs/rules/html-comment-content-newline.md +++ b/docs/rules/html-comment-content-newline.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-comment-content-newline" description: "require or disallow a line break before and after HTML comment contents" --- + # lodash-template/html-comment-content-newline + > require or disallow a line break before and after HTML comment contents - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -36,24 +38,28 @@ This rule enforces a line break (or no line break) before and after HTML comment ## Options -```json +```js { - "lodash-template/html-comment-content-newline": ["error", { - "singleline": "never", - "multiline": "always", - }] + "lodash-template/html-comment-content-newline": [ + "error", + { + "singleline": "never", + "multiline": "always" + } + ] } ``` - `singleline` ... the configuration for single-line comments. - - `"ignore"` ... Don't enforce line breaks style before and after the comments. - - `"never"` ... disallow line breaks before and after the comments. This is the default. - - `"always"` ... require one line break before and after the comments. + - `"ignore"` ... Don't enforce line breaks style before and after the comments. + - `"never"` ... disallow line breaks before and after the comments. This is the default. + - `"always"` ... require one line break before and after the comments. - `multiline` ... the configuration for multiline comments. - - `"ignore"` ... Don't enforce line breaks style before and after the comments. - - `"never"` ... disallow line breaks before and after the comments. - - `"always"` ... require one line break before and after the comments. This is the default. + - `"ignore"` ... Don't enforce line breaks style before and after the comments. + - `"never"` ... disallow line breaks before and after the comments. + - `"always"` ... require one line break before and after the comments. This is the default. + ```html <% /* eslint lodash-template/html-comment-content-newline: ["error", { @@ -83,7 +89,7 @@ This rule enforces a line break (or no line break) before and after HTML comment ## Further Reading -- [HTML5 Style Guide - W3Schools *HTML Comments*](https://www.w3schools.com/html/html5_syntax.asp) +- [HTML5 Style Guide - W3Schools _HTML Comments_](https://www.w3schools.com/html/html5_syntax.asp) ## Implementation diff --git a/docs/rules/html-comment-spacing.md b/docs/rules/html-comment-spacing.md index 457e7359..c4211886 100644 --- a/docs/rules/html-comment-spacing.md +++ b/docs/rules/html-comment-spacing.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-comment-spacing" description: "enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``)" --- + # lodash-template/html-comment-spacing + > enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "enforce unified spacing in HTML comment. (ex. :ok: ` ```html <% /* eslint "lodash-template/html-comment-spacing": "error" */ %> @@ -28,7 +31,7 @@ This rule aims to enforce unified spacing in HTML comment. Default spacing is set to `always` -```json +```js { "lodash-template/html-comment-spacing": ["error", "always" | "never"] } @@ -36,6 +39,7 @@ Default spacing is set to `always` ### `"always"` - Expect one space between comment and curly brackets. + ```html <% /* eslint "lodash-template/html-comment-spacing": ["error", "always"] */ %> @@ -48,6 +52,7 @@ Default spacing is set to `always` ### `"never"` - Expect no spaces between comment and curly brackets. + ```html <% /* eslint "lodash-template/html-comment-spacing": ["error", "never"] */ %> diff --git a/docs/rules/html-content-newline.md b/docs/rules/html-content-newline.md index 31c34511..7bd6f776 100644 --- a/docs/rules/html-content-newline.md +++ b/docs/rules/html-content-newline.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-content-newline" description: "require or disallow a line break before and after HTML contents" --- + # lodash-template/html-content-newline + > require or disallow a line break before and after HTML contents - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "require or disallow a line break before and after HTML contents" This rule enforces a line break (or no line break) before and after HTML contents. + ```html <% /* eslint "lodash-template/html-content-newline": "error" */ %> @@ -37,27 +40,31 @@ This rule enforces a line break (or no line break) before and after HTML content ## Options -```json +```js { - "lodash-template/html-content-newline": ["error", { - "singleline": "ignore", - "multiline": "always", - "ignoreNames": ["pre", "textarea"] - }] + "lodash-template/html-content-newline": [ + "error", + { + "singleline": "ignore", + "multiline": "always", + "ignoreNames": ["pre", "textarea"] + } + ] } ``` - `singleline` ... the configuration for single-line elements. It's a single-line element if startTag, endTag and contents are single-line. - - `"ignore"` ... Don't enforce line breaks style before and after the contents. This is the default. - - `"never"` ... disallow line breaks before and after the contents. - - `"always"` ... require one line break before and after the contents. + - `"ignore"` ... Don't enforce line breaks style before and after the contents. This is the default. + - `"never"` ... disallow line breaks before and after the contents. + - `"always"` ... require one line break before and after the contents. - `multiline` ... the configuration for multiline elements. It's a multiline element if startTag, endTag or contents are multiline. - - `"ignore"` ... Don't enforce line breaks style before and after the contents. - - `"never"` ... disallow line breaks before and after the contents. - - `"always"` ... require one line break before and after the contents. This is the default. + - `"ignore"` ... Don't enforce line breaks style before and after the contents. + - `"never"` ... disallow line breaks before and after the contents. + - `"always"` ... require one line break before and after the contents. This is the default. - `ignoreNames` ... the configuration for element names to ignore line breaks style. - default `["pre", "textarea"]` + default `["pre", "textarea"]` + ```html <% /*eslint lodash-template/html-content-newline: ["error", { diff --git a/docs/rules/html-indent.md b/docs/rules/html-indent.md index 4db4bd1d..d8db4da2 100644 --- a/docs/rules/html-indent.md +++ b/docs/rules/html-indent.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/html-indent" description: "enforce consistent HTML indentation." --- + # lodash-template/html-indent + > enforce consistent HTML indentation. - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "enforce consistent HTML indentation." This rule enforces a consistent HTML indentation style. The default style is 2 spaces. + ```html <% /* eslint "lodash-template/html-indent": "error" */ %> @@ -33,7 +36,7 @@ This rule enforces a consistent HTML indentation style. The default style is 2 s ## Options -```json +```js { "lodash-template/html-indent": ["error", type, { "attribute": 1, @@ -48,6 +51,7 @@ This rule enforces a consistent HTML indentation style. The default style is 2 s ### Examples for this rule with `{ attribute: 1, closeBracket: 1 }` option: + ```html <% /* eslint "lodash-template/html-indent": ["error", 2, { "attribute": 1, "closeBracket": 1 }] */ %> @@ -65,6 +69,7 @@ This rule enforces a consistent HTML indentation style. The default style is 2 s ### Examples for this rule with `{ attribute: 2, closeBracket: 1 }` option: + ```html <% /* eslint "lodash-template/html-indent": ["error", 2, { "attribute": 2, "closeBracket": 1 }] */ %> diff --git a/docs/rules/index.md b/docs/rules/index.md index c0062579..0645b639 100644 --- a/docs/rules/index.md +++ b/docs/rules/index.md @@ -10,76 +10,76 @@ sidebarDepth: 0 Enable this plugin using with: -```json -{ - "extends": "plugin:lodash-template/base" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.base]; ``` -| Rule ID | Description | | -|:--------|:------------|:---| -| [lodash-template/no-script-parsing-error](./no-script-parsing-error.md) | disallow parsing errors in template | | +| Rule ID | Description | | +| :---------------------------------------------------------------------- | :---------------------------------- | :-- | +| [lodash-template/no-script-parsing-error](./no-script-parsing-error.md) | disallow parsing errors in template | | ## Best Practices (Improve Development Experience) Enforce all the rules in this category with: -```json -{ - "extends": "plugin:lodash-template/best-practices" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.bestPractices]; ``` -| Rule ID | Description | | -|:--------|:------------|:---| -| [lodash-template/no-empty-template-tag](./no-empty-template-tag.md) | disallow empty micro-template tag. (ex. :ng: `<% %>`) | | -| [lodash-template/no-invalid-template-interpolation](./no-invalid-template-interpolation.md) | disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`) | | +| Rule ID | Description | | +| :------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------- | :------- | +| [lodash-template/no-empty-template-tag](./no-empty-template-tag.md) | disallow empty micro-template tag. (ex. :ng: `<% %>`) | | +| [lodash-template/no-invalid-template-interpolation](./no-invalid-template-interpolation.md) | disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`) | | | [lodash-template/no-semi-in-template-interpolation](./no-semi-in-template-interpolation.md) | disallow the semicolon at the end of expression in micro template interpolation.(ex. :ok: `<%= text %>` :ng: `<%= text; %>`) | :wrench: | ## Recommended (Improve Readability) Enforce all the rules in this category and all the rules in `Best Practices` categories with: -```json -{ - "extends": "plugin:lodash-template/recommended" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.recommended]; ``` -| Rule ID | Description | | -|:--------|:------------|:---| -| [lodash-template/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace outside the template tags. | :wrench: | -| [lodash-template/no-multi-spaces-in-scriptlet](./no-multi-spaces-in-scriptlet.md) | disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`) | :wrench: | -| [lodash-template/scriptlet-indent](./scriptlet-indent.md) | enforce consistent indentation to scriptlet in micro-template tag. | :wrench: | -| [lodash-template/template-tag-spacing](./template-tag-spacing.md) | enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`) | :wrench: | +| Rule ID | Description | | +| :-------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | :------- | +| [lodash-template/no-irregular-whitespace](./no-irregular-whitespace.md) | disallow irregular whitespace outside the template tags. | :wrench: | +| [lodash-template/no-multi-spaces-in-scriptlet](./no-multi-spaces-in-scriptlet.md) | disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`) | :wrench: | +| [lodash-template/scriptlet-indent](./scriptlet-indent.md) | enforce consistent indentation to scriptlet in micro-template tag. | :wrench: | +| [lodash-template/template-tag-spacing](./template-tag-spacing.md) | enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`) | :wrench: | ## Recommended with HTML template (Improve Readability with HTML template) Enforce all the rules in this category and all the rules in `Best Practices`/`Recommended` categories with: -```json -{ - "extends": "plugin:lodash-template/recommended-with-html" -} +```js +import lodashTemplate from "eslint-plugin-lodash-template"; + +export default [...lodashTemplate.configs.recommendedWithHtml]; ``` -| Rule ID | Description | | -|:--------|:------------|:---| -| [lodash-template/attribute-name-casing](./attribute-name-casing.md) | enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `) | :wrench: | -| [lodash-template/attribute-value-quote](./attribute-value-quote.md) | enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `) | :wrench: | -| [lodash-template/element-name-casing](./element-name-casing.md) | enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `) | :wrench: | -| [lodash-template/html-closing-bracket-newline](./html-closing-bracket-newline.md) | require or disallow a line break before tag's closing brackets | :wrench: | -| [lodash-template/html-closing-bracket-spacing](./html-closing-bracket-spacing.md) | require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``) | :wrench: | -| [lodash-template/html-comment-content-newline](./html-comment-content-newline.md) | require or disallow a line break before and after HTML comment contents | :wrench: | -| [lodash-template/html-comment-spacing](./html-comment-spacing.md) | enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``) | :wrench: | -| [lodash-template/html-content-newline](./html-content-newline.md) | require or disallow a line break before and after HTML contents | :wrench: | -| [lodash-template/html-indent](./html-indent.md) | enforce consistent HTML indentation. | :wrench: | -| [lodash-template/max-attributes-per-line](./max-attributes-per-line.md) | enforce the maximum number of HTML attributes per line | :wrench: | -| [lodash-template/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of HTML attributes. (ex. :ng: `
    `) | | -| [lodash-template/no-html-comments](./no-html-comments.md) | disallow HTML comments. (ex. :ng: ``) | | -| [lodash-template/no-multi-spaces-in-html-tag](./no-multi-spaces-in-html-tag.md) | disallow multiple spaces in HTML tags. (ex. :ng: ``) | :wrench: | -| [lodash-template/no-space-attribute-equal-sign](./no-space-attribute-equal-sign.md) | disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `) | :wrench: | -| [lodash-template/no-warning-html-comments](./no-warning-html-comments.md) | disallow specified warning terms in HTML comments. (ex. :ng: ``) | | +| Rule ID | Description | | +| :---------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :------- | +| [lodash-template/attribute-name-casing](./attribute-name-casing.md) | enforce HTML attribute name casing. (ex. :ok: `
    ` :ng: `
    ` `
    `) | :wrench: | +| [lodash-template/attribute-value-quote](./attribute-value-quote.md) | enforce quotes style of HTML attributes. (ex. :ok: `
    ` :ng: `
    ` `
    `) | :wrench: | +| [lodash-template/element-name-casing](./element-name-casing.md) | enforce HTML element name casing. (ex. :ok: `` :ng: `` `
    `) | :wrench: | +| [lodash-template/html-closing-bracket-newline](./html-closing-bracket-newline.md) | require or disallow a line break before tag's closing brackets | :wrench: | +| [lodash-template/html-closing-bracket-spacing](./html-closing-bracket-spacing.md) | require or disallow a space before tag's closing brackets. (ex. :ok: `` `` :ng: `` ``) | :wrench: | +| [lodash-template/html-comment-content-newline](./html-comment-content-newline.md) | require or disallow a line break before and after HTML comment contents | :wrench: | +| [lodash-template/html-comment-spacing](./html-comment-spacing.md) | enforce unified spacing in HTML comment. (ex. :ok: ``, :ng: ``) | :wrench: | +| [lodash-template/html-content-newline](./html-content-newline.md) | require or disallow a line break before and after HTML contents | :wrench: | +| [lodash-template/html-indent](./html-indent.md) | enforce consistent HTML indentation. | :wrench: | +| [lodash-template/max-attributes-per-line](./max-attributes-per-line.md) | enforce the maximum number of HTML attributes per line | :wrench: | +| [lodash-template/no-duplicate-attributes](./no-duplicate-attributes.md) | disallow duplication of HTML attributes. (ex. :ng: `
    `) | | +| [lodash-template/no-html-comments](./no-html-comments.md) | disallow HTML comments. (ex. :ng: ``) | | +| [lodash-template/no-multi-spaces-in-html-tag](./no-multi-spaces-in-html-tag.md) | disallow multiple spaces in HTML tags. (ex. :ng: ``) | :wrench: | +| [lodash-template/no-space-attribute-equal-sign](./no-space-attribute-equal-sign.md) | disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `) | :wrench: | +| [lodash-template/no-warning-html-comments](./no-warning-html-comments.md) | disallow specified warning terms in HTML comments. (ex. :ng: ``) | | ## Uncategorized @@ -88,15 +88,15 @@ Please enable each rule if you want. For example: -```json +```js { - "rules": { - "lodash-template/no-template-tag-in-start-tag": "error" - } + rules: { + "lodash-template/no-template-tag-in-start-tag": "error" + } } ``` -| Rule ID | Description | | -|:--------|:------------|:---| -| [lodash-template/no-template-tag-in-start-tag](./no-template-tag-in-start-tag.md) | disallow template tag in start tag outside attribute values. (ex. :ng: ` >`) | | -| [lodash-template/prefer-escape-template-interpolations](./prefer-escape-template-interpolations.md) | prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`) | | +| Rule ID | Description | | +| :-------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-- | +| [lodash-template/no-template-tag-in-start-tag](./no-template-tag-in-start-tag.md) | disallow template tag in start tag outside attribute values. (ex. :ng: ` >`) | | +| [lodash-template/prefer-escape-template-interpolations](./prefer-escape-template-interpolations.md) | prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`) | | diff --git a/docs/rules/max-attributes-per-line.md b/docs/rules/max-attributes-per-line.md index 817fa0a8..3c91e21e 100644 --- a/docs/rules/max-attributes-per-line.md +++ b/docs/rules/max-attributes-per-line.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/max-attributes-per-line" description: "enforce the maximum number of HTML attributes per line" --- + # lodash-template/max-attributes-per-line + > enforce the maximum number of HTML attributes per line - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -18,6 +20,7 @@ This rule aims to enforce a number of attributes per line in HTML. It checks all the elements and verifies that the number of attributes per line does not exceed the defined maximum. An attribute is considered to be in a new line when there is a line break between two attributes. + ```html <% /* eslint "lodash-template/max-attributes-per-line": "error" */ %> @@ -49,7 +52,7 @@ An attribute is considered to be in a new line when there is a line break betwee ## Options -```json +```js { "lodash-template/max-attributes-per-line": ["error", { "singleline": 1, @@ -65,6 +68,7 @@ An attribute is considered to be in a new line when there is a line break betwee For multi-line declarations, defines if allows attributes to be put in the first line. (Default false) + ```html <% /* eslint lodash-template/max-attributes-per-line: ["error", { @@ -90,6 +94,7 @@ For multi-line declarations, defines if allows attributes to be put in the first Number of maximum attributes per line when the opening tag is in a single line. (Default is 1) + ```html <% /* eslint lodash-template/max-attributes-per-line: ["error", { @@ -108,6 +113,7 @@ Number of maximum attributes per line when the opening tag is in a single line. Number of maximum attributes per line when a tag is in multiple lines. (Default is 1) + ```html <% /* eslint lodash-template/max-attributes-per-line: ["error", { diff --git a/docs/rules/no-duplicate-attributes.md b/docs/rules/no-duplicate-attributes.md index b549188a..68097757 100644 --- a/docs/rules/no-duplicate-attributes.md +++ b/docs/rules/no-duplicate-attributes.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-duplicate-attributes" description: "disallow duplication of HTML attributes. (ex. :ng: `
    `)" --- + # lodash-template/no-duplicate-attributes + > disallow duplication of HTML attributes. (ex. :ng: `
    `) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -16,6 +18,7 @@ This rule reports duplicate attributes. When duplicate arguments exist, only the last one is valid. It's possibly mistakes. + ```html <% /* eslint "lodash-template/no-duplicate-attributes": "error" */ %> diff --git a/docs/rules/no-empty-template-tag.md b/docs/rules/no-empty-template-tag.md index af8c3aa2..5d71157a 100644 --- a/docs/rules/no-empty-template-tag.md +++ b/docs/rules/no-empty-template-tag.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-empty-template-tag" description: "disallow empty micro-template tag. (ex. :ng: `<% %>`)" --- + # lodash-template/no-empty-template-tag + > disallow empty micro-template tag. (ex. :ng: `<% %>`) - :gear: This rule is included in all of `"plugin:lodash-template/best-practices"`, `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "disallow empty micro-template tag. (ex. :ng: `<% %>`)" This rule reports empty micro-template interpolate/evaluate. + ```html <% /* eslint "lodash-template/no-empty-template-tag": "error" */ %> diff --git a/docs/rules/no-html-comments.md b/docs/rules/no-html-comments.md index b8a6764b..0cc951aa 100644 --- a/docs/rules/no-html-comments.md +++ b/docs/rules/no-html-comments.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-html-comments" description: "disallow HTML comments. (ex. :ng: ``)" --- + # lodash-template/no-html-comments + > disallow HTML comments. (ex. :ng: ``) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "disallow HTML comments. (ex. :ng: ``)" This rule reports HTML comments. + ```html <% /* eslint "lodash-template/no-html-comments": "error" */ %> <% /* ✓ GOOD */ %> diff --git a/docs/rules/no-invalid-template-interpolation.md b/docs/rules/no-invalid-template-interpolation.md index 6f6f6b79..ff1a1ecf 100644 --- a/docs/rules/no-invalid-template-interpolation.md +++ b/docs/rules/no-invalid-template-interpolation.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-invalid-template-interpolation" description: "disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`)" --- + # lodash-template/no-invalid-template-interpolation + > disallow other than expression in micro-template interpolation. (ex. :ng: `<%= if (test) { %>`) - :gear: This rule is included in all of `"plugin:lodash-template/best-practices"`, `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "disallow other than expression in micro-template interpolation. (e This rule disallow other than expression in micro-template interpolation. + ```html <% /* eslint "lodash-template/no-invalid-template-interpolation": "error" */ %> diff --git a/docs/rules/no-irregular-whitespace.md b/docs/rules/no-irregular-whitespace.md index 92638306..52c4c50e 100644 --- a/docs/rules/no-irregular-whitespace.md +++ b/docs/rules/no-irregular-whitespace.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-irregular-whitespace" description: "disallow irregular whitespace outside the template tags." --- + # lodash-template/no-irregular-whitespace + > disallow irregular whitespace outside the template tags. - :gear: This rule is included in all of `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "disallow irregular whitespace outside the template tags." This rule disallows the irregular whitespaces. + ```html <% /* eslint "lodash-template/no-irregular-whitespace": "error" */ %> @@ -27,13 +30,16 @@ This rule disallows the irregular whitespaces. ## Options -```json +```js { - "lodash-template/no-irregular-whitespace": ["error", { - "skipComments": false, - "skipAttrValues": false, - "skipText": false - }] + "lodash-template/no-irregular-whitespace": [ + "error", + { + "skipComments": false, + "skipAttrValues": false, + "skipText": false + } + ] } ``` diff --git a/docs/rules/no-multi-spaces-in-html-tag.md b/docs/rules/no-multi-spaces-in-html-tag.md index a88716d8..7e2cf128 100644 --- a/docs/rules/no-multi-spaces-in-html-tag.md +++ b/docs/rules/no-multi-spaces-in-html-tag.md @@ -2,9 +2,11 @@ pageClass: "rule-details" sidebarDepth: 0 title: "lodash-template/no-multi-spaces-in-html-tag" -description: "disallow multiple spaces in HTML tags. (ex. :ng: ``)" +description: 'disallow multiple spaces in HTML tags. (ex. :ng: ``)' --- + # lodash-template/no-multi-spaces-in-html-tag + > disallow multiple spaces in HTML tags. (ex. :ng: ``) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "disallow multiple spaces in HTML tags. (ex. :ng: ` ```html <% /* eslint "lodash-template/no-multi-spaces-in-html-tag": "error" */ %> diff --git a/docs/rules/no-multi-spaces-in-scriptlet.md b/docs/rules/no-multi-spaces-in-scriptlet.md index bd523e41..ddc9c162 100644 --- a/docs/rules/no-multi-spaces-in-scriptlet.md +++ b/docs/rules/no-multi-spaces-in-scriptlet.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-multi-spaces-in-scriptlet" description: "disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`)" --- + # lodash-template/no-multi-spaces-in-scriptlet + > disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test)···{ %>`) - :gear: This rule is included in all of `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "disallow multiple spaces in scriptlet. (ex. :ng: `<% if···(test This rule aims to disallow multiple whitespace in script which are not used for indentation. + ```html <% /* eslint "lodash-template/no-multi-spaces-in-scriptlet": "error" */ %> diff --git a/docs/rules/no-script-parsing-error.md b/docs/rules/no-script-parsing-error.md index 6117a3a0..90cabf94 100644 --- a/docs/rules/no-script-parsing-error.md +++ b/docs/rules/no-script-parsing-error.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-script-parsing-error" description: "disallow parsing errors in template" --- + # lodash-template/no-script-parsing-error + > disallow parsing errors in template - :gear: This rule is included in all of `"plugin:lodash-template/base"`, `"plugin:lodash-template/all"`, `"plugin:lodash-template/best-practices"`, `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/recommended-with-script"`. @@ -14,6 +16,7 @@ description: "disallow parsing errors in template" This rule reports syntax errors in JavaScript template. This rule works when verification of ["JavaScript Templates"](../index.md#for-javascript-templates) is enabled. + ```js /* eslint "lodash-template/no-script-parsing-error": "error" */ /* ✓ GOOD */ @@ -24,6 +27,7 @@ This rule works when verification of ["JavaScript Templates"](../index.md#for-ja <% } %> ``` + ```js /* eslint "lodash-template/no-script-parsing-error": "error" */ /* ✗ BAD */ diff --git a/docs/rules/no-semi-in-template-interpolation.md b/docs/rules/no-semi-in-template-interpolation.md index 5bb704f3..10b803bf 100644 --- a/docs/rules/no-semi-in-template-interpolation.md +++ b/docs/rules/no-semi-in-template-interpolation.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-semi-in-template-interpolation" description: "disallow the semicolon at the end of expression in micro template interpolation.(ex. :ok: `<%= text %>` :ng: `<%= text; %>`)" --- + # lodash-template/no-semi-in-template-interpolation + > disallow the semicolon at the end of expression in micro template interpolation.(ex. :ok: `<%= text %>` :ng: `<%= text; %>`) - :gear: This rule is included in all of `"plugin:lodash-template/best-practices"`, `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "disallow the semicolon at the end of expression in micro template This rule disallow the semicolon at the end of expression in micro template interpolation. + ```html <% /* eslint "lodash-template/no-semi-in-template-interpolation": "error" */ %> diff --git a/docs/rules/no-space-attribute-equal-sign.md b/docs/rules/no-space-attribute-equal-sign.md index e6b43cc1..46c5726a 100644 --- a/docs/rules/no-space-attribute-equal-sign.md +++ b/docs/rules/no-space-attribute-equal-sign.md @@ -2,9 +2,11 @@ pageClass: "rule-details" sidebarDepth: 0 title: "lodash-template/no-space-attribute-equal-sign" -description: "disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `)" +description: 'disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `)' --- + # lodash-template/no-space-attribute-equal-sign + > disallow spacing around equal signs in attribute. (ex. :ok: `
    ` :ng: `
    `) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -16,6 +18,7 @@ This rule disallow spacing around equal signs in attribute. HTML5 allows spaces around equal signs. But space-less is easier to read, and groups entities better together. + ```html <% /* eslint "lodash-template/no-space-attribute-equal-sign": "error" */ %> @@ -27,7 +30,7 @@ HTML5 allows spaces around equal signs. But space-less is easier to read, and gr ## Further Reading -- [HTML5 Style Guide - W3Schools *Spaces and Equal Signs*](https://www.w3schools.com/html/html5_syntax.asp) +- [HTML5 Style Guide - W3Schools _Spaces and Equal Signs_](https://www.w3schools.com/html/html5_syntax.asp) ## Implementation diff --git a/docs/rules/no-template-tag-in-start-tag.md b/docs/rules/no-template-tag-in-start-tag.md index 09110de9..f8e5dc1e 100644 --- a/docs/rules/no-template-tag-in-start-tag.md +++ b/docs/rules/no-template-tag-in-start-tag.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-template-tag-in-start-tag" description: "disallow template tag in start tag outside attribute values. (ex. :ng: ` >`)" --- + # lodash-template/no-template-tag-in-start-tag + > disallow template tag in start tag outside attribute values. (ex. :ng: ` >`) - :gear: This rule is included in `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "disallow template tag in start tag outside attribute values. (ex. This rule reports the template tag that is in the start tag, outside attribute values. + ```html <% /* eslint "lodash-template/no-template-tag-in-start-tag": "error" */ %> @@ -34,16 +37,20 @@ This rule reports the template tag that is in the start tag, outside attribute v ## Options -```json +```js { - "lodash-template/no-template-tag-in-start-tag": ["error", { - "arrowEvaluateTag": false, - }] + "lodash-template/no-template-tag-in-start-tag": [ + "error", + { + "arrowEvaluateTag": false + } + ] } ``` ### Examples for this rule with `{arrowEvaluateTag: true}` option: + ```html <% /* eslint "lodash-template/no-template-tag-in-start-tag": ["error", {"arrowEvaluateTag": true}] */ %> diff --git a/docs/rules/no-warning-html-comments.md b/docs/rules/no-warning-html-comments.md index c4650c30..9186e858 100644 --- a/docs/rules/no-warning-html-comments.md +++ b/docs/rules/no-warning-html-comments.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/no-warning-html-comments" description: "disallow specified warning terms in HTML comments. (ex. :ng: ``)" --- + # lodash-template/no-warning-html-comments + > disallow specified warning terms in HTML comments. (ex. :ng: ``) - :gear: This rule is included in `"plugin:lodash-template/recommended-with-html"` and `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "disallow specified warning terms in HTML comments. (ex. :ng: ` ```html <% /* eslint "lodash-template/no-warning-html-comments": "error" */ %> diff --git a/docs/rules/prefer-escape-template-interpolations.md b/docs/rules/prefer-escape-template-interpolations.md index a2d31bba..791b38dc 100644 --- a/docs/rules/prefer-escape-template-interpolations.md +++ b/docs/rules/prefer-escape-template-interpolations.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/prefer-escape-template-interpolations" description: "prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`)" --- + # lodash-template/prefer-escape-template-interpolations + > prefer escape micro-template interpolations. (ex. :ok: `<%- ... %>`, :ng: `<%= ... %>`) - :gear: This rule is included in `"plugin:lodash-template/all"`. @@ -13,6 +15,7 @@ description: "prefer escape micro-template interpolations. (ex. :ok: `<%- ... %> This rule reports no escape micro-template interpolates. + ```html <% /* eslint "lodash-template/prefer-escape-template-interpolations": "error" */ %> diff --git a/docs/rules/scriptlet-indent.md b/docs/rules/scriptlet-indent.md index e9c6dff6..325f2d91 100644 --- a/docs/rules/scriptlet-indent.md +++ b/docs/rules/scriptlet-indent.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/scriptlet-indent" description: "enforce consistent indentation to scriptlet in micro-template tag." --- + # lodash-template/scriptlet-indent + > enforce consistent indentation to scriptlet in micro-template tag. - :gear: This rule is included in all of `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -14,6 +16,7 @@ description: "enforce consistent indentation to scriptlet in micro-template tag. This rule enforces a consistent indentation style to script in micro-template tag. The default style is 2 spaces. + ```html <% /* eslint "lodash-template/scriptlet-indent": "error" */ %> @@ -37,7 +40,7 @@ This rule enforces a consistent indentation style to script in micro-template ta ## Options -```json +```js { "lodash-template/scriptlet-indent": ["error", type, { "startIndent": 1, @@ -52,6 +55,7 @@ This rule enforces a consistent indentation style to script in micro-template ta ### Examples for this rule with `{startIndent: 0}`: + ```html <% /* eslint "lodash-template/scriptlet-indent": ["error", 2, {"startIndent": 0}] */ %> @@ -66,6 +70,7 @@ This rule enforces a consistent indentation style to script in micro-template ta ### Examples for this rule with `{startIndent: 2}`: + ```html <% /* eslint "lodash-template/scriptlet-indent": ["error", 2, {"startIndent": 2}] */ %> diff --git a/docs/rules/template-tag-spacing.md b/docs/rules/template-tag-spacing.md index 739c4b9b..706fd379 100644 --- a/docs/rules/template-tag-spacing.md +++ b/docs/rules/template-tag-spacing.md @@ -4,7 +4,9 @@ sidebarDepth: 0 title: "lodash-template/template-tag-spacing" description: "enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`)" --- + # lodash-template/template-tag-spacing + > enforce unified spacing in micro-template tag. (ex. :ok: `<%= prop %>`, :ng: `<%=prop%>`) - :gear: This rule is included in all of `"plugin:lodash-template/recommended"`, `"plugin:lodash-template/recommended-with-html"`, `"plugin:lodash-template/recommended-with-script"` and `"plugin:lodash-template/all"`. @@ -20,7 +22,7 @@ This rule aims to enforce unified spacing in micro-template interpolate/evaluate
    <%= text %>
    -
    <%= text %>
    +
    <%= text %>
    <%=text%>
    ``` @@ -28,7 +30,7 @@ This rule aims to enforce unified spacing in micro-template interpolate/evaluate Default spacing is set to `always` -```json +```js { "lodash-template/micro-template-interpolation-spacing": ["error", "always" | "never"] } @@ -36,6 +38,7 @@ Default spacing is set to `always` ### `"always"` - Expect one space between expression and curly brackets. + ```html <% /* eslint "lodash-template/template-tag-spacing": ["error", "always"] */ %> @@ -48,6 +51,7 @@ Default spacing is set to `always` ### `"never"` - Expect no spaces between expression and curly brackets. + ```html <%/* eslint "lodash-template/template-tag-spacing": ["error", "never"] */%> diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..705f4122 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,113 @@ +import eslintPluginLodashTemplate from "eslint-plugin-lodash-template"; +import eslintPluginOtaMeshi from "@ota-meshi/eslint-plugin"; +import eslintPluginEs from "eslint-plugin-es"; +import vueEslintParser from "vue-eslint-parser"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + { + languageOptions: { + sourceType: "script", + ecmaVersion: 2020, + }, + plugins: { + es: eslintPluginEs, + }, + rules: { + "jsdoc/require-jsdoc": "error", + "no-warning-comments": "warn", + "regexp/no-obscure-range": ["error", { allowed: "all" }], + }, + }, + + eslintPluginLodashTemplate.configs.all, + eslintPluginOtaMeshi.config({ + node: true, + packageJson: true, + eslintPlugin: true, + json: true, + yaml: true, + // md: true, + prettier: true, + }), + + { + files: ["lib/rules/**/*.js"], + rules: { + "eslint-plugin/require-meta-docs-description": [ + "error", + { pattern: "^(enforce|require|disallow|prefer)" }, + ], + "eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"], + "eslint-plugin/require-meta-docs-url": [ + "error", + { + pattern: + "https://ota-meshi.github.io/eslint-plugin-lodash-template/rules/{{name}}.html", + }, + ], + }, + }, + + { + files: ["scripts/*.js"], + rules: { + "jsdoc/require-jsdoc": "off", + }, + }, + + { + files: ["docs/.vitepress/**"], + extends: [ + eslintPluginOtaMeshi.config({ + vue3: true, + prettier: true, + }), + ], + languageOptions: { + parser: vueEslintParser, + sourceType: "module", + ecmaVersion: 2020, + globals: { + window: "readonly", + }, + }, + rules: { + "jsdoc/require-jsdoc": "off", + "@mysticatea/node/no-missing-import": "off", + "@mysticatea/vue/html-closing-bracket-newline": "off", + "@mysticatea/vue/max-attributes-per-line": "off", + "@mysticatea/vue/comma-dangle": "off", + "@mysticatea/vue/html-indent": "off", + "@mysticatea/vue/html-self-closing": "off", + "@mysticatea/node/file-extension-in-import": "off", + "@mysticatea/node/no-unsupported-features/es-syntax": "off", + }, + }, + + { + files: ["docs/.vitepress/**/*.mts", "docs/.vitepress/**/*.ts"], + languageOptions: { + parser: tseslint.parser, + }, + extends: [ + eslintPluginOtaMeshi.config({ + ts: true, + }), + tseslint.configs.disableTypeChecked, + ], + }, + + { + ignores: [ + ".nyc_output/**", + "coverage/**", + "node_modules/**", + "playground/node_modules/**", + "assets/**", + "tests_fixtures/**", + "docs/.vitepress/dist/**", + "docs/.vitepress/cache/**", + ], + }, +); diff --git a/lib/ast/html-nodes.js b/lib/ast/html-nodes.js index eb752ed1..5f7abb92 100644 --- a/lib/ast/html-nodes.js +++ b/lib/ast/html-nodes.js @@ -733,7 +733,6 @@ class HTMLStartTag extends HTMLNode { const tagStartIndex = this.range[0]; let template = html.slice(tagStartIndex, this.range[1]); - /* eslint-disable no-inner-declarations -- ignore */ /** * Strip template of range. * @param {number} start The start index of range. @@ -741,7 +740,6 @@ class HTMLStartTag extends HTMLNode { * @returns {void} */ function stripAttr(start, end) { - /* eslint-enable no-inner-declarations -- ignore */ const before = template.slice(0, start - tagStartIndex); const target = template.slice( start - tagStartIndex, diff --git a/lib/configs/all.js b/lib/configs/all.js index 700b78de..8d997489 100644 --- a/lib/configs/all.js +++ b/lib/configs/all.js @@ -3,6 +3,6 @@ const util = require("../utils/rules"); module.exports = { - extends: require.resolve("./base"), + ...require("./base"), rules: util.collectRules(), }; diff --git a/lib/configs/flat/base-with-ejs.js b/lib/configs/base-with-ejs.js similarity index 100% rename from lib/configs/flat/base-with-ejs.js rename to lib/configs/base-with-ejs.js diff --git a/lib/configs/base.js b/lib/configs/base.js index 03d5a5dc..d91ec519 100644 --- a/lib/configs/base.js +++ b/lib/configs/base.js @@ -3,24 +3,13 @@ const util = require("../utils/rules"); module.exports = { - parser: require.resolve("../parser/micro-template-eslint-parser"), - plugins: ["lodash-template"], - rules: util.collectRules("base"), - overrides: [ - { - files: ["*.ejs"], - parserOptions: { - templateSettings: { - evaluate: [ - ["<%", "<%_"], - ["%>", "-%>", "_%>"], - ], - interpolate: ["<%-", ["%>", "-%>", "_%>"]], - escape: ["<%=", ["%>", "-%>", "_%>"]], - comment: ["<%#", ["%>", "-%>", "_%>"]], - literal: ["<%%"], - }, - }, + languageOptions: { + parser: require("../parser/micro-template-eslint-parser"), + }, + plugins: { + get "lodash-template"() { + return require("../index"); }, - ], + }, + rules: util.collectRules("base"), }; diff --git a/lib/configs/best-practices.js b/lib/configs/best-practices.js index 2070da34..58d25667 100644 --- a/lib/configs/best-practices.js +++ b/lib/configs/best-practices.js @@ -2,7 +2,11 @@ const util = require("../utils/rules"); +const base = require("./base"); module.exports = { - extends: require.resolve("./base"), - rules: util.collectRules("best-practices"), + ...base, + rules: { + ...base.rules, + ...util.collectRules("best-practices"), + }, }; diff --git a/lib/configs/flat/all.js b/lib/configs/flat/all.js deleted file mode 100644 index 52c243c1..00000000 --- a/lib/configs/flat/all.js +++ /dev/null @@ -1,8 +0,0 @@ -"use strict"; - -const util = require("../../utils/rules"); - -module.exports = { - ...require("./base"), - rules: util.collectRules(), -}; diff --git a/lib/configs/flat/base.js b/lib/configs/flat/base.js deleted file mode 100644 index df667e3f..00000000 --- a/lib/configs/flat/base.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -const util = require("../../utils/rules"); - -module.exports = { - languageOptions: { - parser: require("../../parser/micro-template-eslint-parser"), - }, - plugins: { - get "lodash-template"() { - return require("../../index"); - }, - }, - rules: util.collectRules("base"), -}; diff --git a/lib/configs/flat/best-practices.js b/lib/configs/flat/best-practices.js deleted file mode 100644 index 2fc83ed4..00000000 --- a/lib/configs/flat/best-practices.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -const util = require("../../utils/rules"); - -const base = require("./base"); -module.exports = { - ...base, - rules: { - ...base.rules, - ...util.collectRules("best-practices"), - }, -}; diff --git a/lib/configs/flat/recommended-with-html.js b/lib/configs/flat/recommended-with-html.js deleted file mode 100644 index 25f9e6cf..00000000 --- a/lib/configs/flat/recommended-with-html.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict"; - -const util = require("../../utils/rules"); - -const recommended = require("./recommended"); -module.exports = { - ...recommended, - rules: { - ...recommended.rules, - ...util.collectRules("recommended-with-html"), - }, - processor: "lodash-template/html", -}; diff --git a/lib/configs/flat/recommended-with-script.js b/lib/configs/flat/recommended-with-script.js deleted file mode 100644 index f710b43e..00000000 --- a/lib/configs/flat/recommended-with-script.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -const recommended = require("./recommended"); -module.exports = { - ...recommended, - processor: "lodash-template/script", -}; diff --git a/lib/configs/flat/recommended.js b/lib/configs/flat/recommended.js deleted file mode 100644 index 717e27be..00000000 --- a/lib/configs/flat/recommended.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict"; - -const util = require("../../utils/rules"); - -const bestPractices = require("./best-practices"); -module.exports = { - ...bestPractices, - rules: { - ...bestPractices.rules, - ...util.collectRules("recommended"), - }, -}; diff --git a/lib/configs/recommended-with-html.js b/lib/configs/recommended-with-html.js index bba0c1cc..42bd0f55 100644 --- a/lib/configs/recommended-with-html.js +++ b/lib/configs/recommended-with-html.js @@ -2,7 +2,14 @@ const util = require("../utils/rules"); +const recommended = require("./recommended"); +const processors = require("../processors"); + module.exports = { - extends: require.resolve("./recommended"), - rules: util.collectRules("recommended-with-html"), + ...recommended, + rules: { + ...recommended.rules, + ...util.collectRules("recommended-with-html"), + }, + processor: processors.html, }; diff --git a/lib/configs/recommended-with-script.js b/lib/configs/recommended-with-script.js index 0aa83ec3..2b4839bd 100644 --- a/lib/configs/recommended-with-script.js +++ b/lib/configs/recommended-with-script.js @@ -1,6 +1,9 @@ "use strict"; +const recommended = require("./recommended"); +const processors = require("../processors"); + module.exports = { - extends: require.resolve("./recommended"), - processor: "lodash-template/script", + ...recommended, + processor: processors.script, }; diff --git a/lib/configs/recommended.js b/lib/configs/recommended.js index 284ea772..b62df280 100644 --- a/lib/configs/recommended.js +++ b/lib/configs/recommended.js @@ -2,7 +2,11 @@ const util = require("../utils/rules"); +const bestPractices = require("./best-practices"); module.exports = { - extends: require.resolve("./best-practices"), - rules: util.collectRules("recommended"), + ...bestPractices, + rules: { + ...bestPractices.rules, + ...util.collectRules("recommended"), + }, }; diff --git a/lib/index.js b/lib/index.js index af870a6d..5bcab26e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -12,18 +12,12 @@ module.exports = { meta: require("./meta"), configs: { base: require("./configs/base"), - "best-practices": require("./configs/best-practices"), + baseWithEjs: require("./configs/base-with-ejs"), + bestPractices: require("./configs/best-practices"), recommended: require("./configs/recommended"), - "recommended-with-html": require("./configs/recommended-with-html"), - "recommended-with-script": require("./configs/recommended-with-script"), + recommendedWithHtml: require("./configs/recommended-with-html"), + recommendedWithScript: require("./configs/recommended-with-script"), all: require("./configs/all"), - "flat/base": require("./configs/flat/base"), - "flat/base-with-ejs": require("./configs/flat/base-with-ejs"), - "flat/best-practices": require("./configs/flat/best-practices"), - "flat/recommended": require("./configs/flat/recommended"), - "flat/recommended-with-html": require("./configs/flat/recommended-with-html"), - "flat/recommended-with-script": require("./configs/flat/recommended-with-script"), - "flat/all": require("./configs/flat/all"), }, rules, processors, diff --git a/lib/parser/micro-template-eslint-parser.js b/lib/parser/micro-template-eslint-parser.js index 6340491e..a44ba74a 100644 --- a/lib/parser/micro-template-eslint-parser.js +++ b/lib/parser/micro-template-eslint-parser.js @@ -240,11 +240,11 @@ function parseTemplate(code, options) { const parserOptions = normalizeOptions(options); const sourceCodeStore = new SourceCodeStore(code); - // 文字位置をそのままにしてscriptとhtmlを分解 + // Decompose script and html with character positions intact let script = ""; let pre = 0; let template = ""; - const microTemplateTokens = []; // テンプレートTokens + const microTemplateTokens = []; for (const token of genMicroTemplateTokens( code, parserOptions, diff --git a/lib/parser/parse-script.js b/lib/parser/parse-script.js index 3449f11f..bc151304 100644 --- a/lib/parser/parse-script.js +++ b/lib/parser/parse-script.js @@ -1,8 +1,5 @@ "use strict"; -const path = require("path"); -const { createRequire } = require("./create-require"); - module.exports = parseScript; /** @@ -12,7 +9,8 @@ module.exports = parseScript; * @returns {object} The parsing result. */ function parseScript(code, parserOptions) { - const parser = loadParser(parserOptions.parser); + // eslint-disable-next-line n/no-unpublished-require -- espree is the default parser for ESLint + const parser = parserOptions.parser ?? require("espree"); const parserOptionsWithoutParser = Object.assign({}, parserOptions); delete parserOptionsWithoutParser.parser; const scriptParserOptions = Object.assign( @@ -31,18 +29,3 @@ function parseScript(code, parserOptions) { ast: result, }; } - -/** Load parser */ -function loadParser(parser) { - if (parser && parser !== "espree") { - try { - const cwd = process.cwd(); - const relativeTo = path.join(cwd, "__placeholder__.js"); - return createRequire(relativeTo)(parser); - } catch (_e) { - return require(parser); - } - } - // eslint-disable-next-line n/no-unpublished-require -- default - return require("espree"); -} diff --git a/lib/processors/script/index.js b/lib/processors/script/index.js index 8c7ec878..3f0c234e 100644 --- a/lib/processors/script/index.js +++ b/lib/processors/script/index.js @@ -263,7 +263,8 @@ module.exports = { for (const msgs of groupingMessages(scriptMessages).values()) { const msg = msgs[0]; - // TODO Handles script verify messages that are reported only on a specific path. + // eslint-disable-next-line no-warning-comments -- TODO + // TODO: Handles script verify messages that are reported only on a specific path. // if (msgs.length < scriptMessages.length) { // } adjustScriptMessages.push(msg); diff --git a/lib/processors/utils/get-config.js b/lib/processors/utils/get-config.js index bbc390e6..02e0dbc6 100644 --- a/lib/processors/utils/get-config.js +++ b/lib/processors/utils/get-config.js @@ -2,21 +2,24 @@ const getLinters = require("../../utils/get-linters"); +// It's not possible to access the config directly inside processors. +// So, we have to get the config some other way. +// ESLint.calculateConfigForFile is async, so we can't use it in processor methods, +// which are sync. As a result, we have to do all these hackery to get the config. let curConfig = null; -let alternativeCLIEngine = null; for (const Linter of getLinters()) { const verifyBase = Linter.prototype.verify; const verifyAndFixBase = Linter.prototype.verifyAndFix; Object.defineProperty(Linter.prototype, "verify", { // eslint-disable-next-line no-loop-func -- ignore - value: function verify(textOrSourceCode, config, ...args) { + value: function verify(textOrSourceCode, config, options) { curConfig = config; const result = verifyBase.call( this, textOrSourceCode, config, - ...args, + options, ); curConfig = null; return result; @@ -43,21 +46,18 @@ for (const Linter of getLinters()) { } module.exports = (filename) => { - if (curConfig) { - if (typeof curConfig.extractConfig === "function") { - return curConfig.extractConfig(filename); - } + if (!curConfig) { + return {}; + } + + if (!Array.isArray(curConfig)) { return curConfig; } - const eslint = require("eslint"); - try { - if (!alternativeCLIEngine) { - alternativeCLIEngine = new eslint.CLIEngine({}); - } - const config = alternativeCLIEngine.getConfigForFile(filename); - return Object.assign({ filePath: filename }, config); - } catch (_) { - // ignore + + // https://www.npmjs.com/package/@eslint/config-array + if (typeof curConfig.getConfig === "function") { + return curConfig.getConfig(filename); } - return {}; + + return curConfig; }; diff --git a/lib/services/micro-template-service.js b/lib/services/micro-template-service.js index 7f983380..2ea3aa87 100644 --- a/lib/services/micro-template-service.js +++ b/lib/services/micro-template-service.js @@ -7,7 +7,7 @@ const Traverser = require("./traverser"); const commentDirective = require("./comment-directive"); const PathCoveredTemplateStore = require("./path-covered-template-store"); -// eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function interop(obj) { if (obj && obj.__esModule) { return obj.default; diff --git a/package.json b/package.json index 49ee84b3..3bf1eaa9 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "lib/index.js", "scripts": { "lint": "npm run eslint", - "eslint": "eslint . --ext .js,.mts,.vue,.json", + "eslint": "eslint .", "test:lib": "mocha \"tests/lib/**/*.js\" --reporter dot --timeout 60000", "test:integration": "mocha \"tests/integration/**/*.js\" --reporter dot --timeout 60000", "test:all": "npm run test:lib && npm run test:integration", @@ -14,7 +14,7 @@ "test:rules": "mocha \"tests/lib/rules/**/*.js\" --reporter dot --timeout 60000", "update": "node ./tools/update.js && npm run lint:fix && npm run test", "updateonly": "node ./tools/update.js && npm run lint:fix", - "lint:fix": "eslint . --ext .js,.mts,.vue,.json --fix", + "lint:fix": "eslint . --fix", "test:sp": "mocha \"test_sp/**/*.js\" --reporter dot", "new": "node ./tools/new-rule.js", "copy:images": "cpx \"logo.*\" \"docs/\\.vitepress/public\" -u", @@ -63,23 +63,24 @@ "rules" ], "peerDependencies": { - "eslint": ">=8.0.0" + "eslint": "^9.0.0" }, "devDependencies": { "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.24.2", - "@eslint-community/eslint-utils": "^4.4.0", - "@ota-meshi/eslint-plugin": "^0.15.0", + "@eslint-community/eslint-utils": "^4.4.1", + "@ota-meshi/eslint-plugin": "^0.17.6", "@shikijs/vitepress-twoslash": "^3.0.0", - "@stylistic/eslint-plugin": "~2.0.0", - "@typescript-eslint/eslint-plugin": "^8.0.0", + "@stylistic/eslint-plugin": "^3.1.0", + "@stylistic/eslint-plugin-js": "^3.1.0", "cpx2": "^8.0.0", "cross-env": "^7.0.2", - "eslint": "~8.57.0", + "eslint": "^9.22.0", "eslint-config-prettier": "^10.0.0", "eslint-plugin-es": "^4.0.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^6.0.0", + "eslint-plugin-jsdoc": "^50.6.3", "eslint-plugin-json-schema-validator": "^5.0.0", "eslint-plugin-jsonc": "^2.0.0", "eslint-plugin-lodash-template": "file:.", @@ -99,14 +100,14 @@ "nyc": "^17.0.0", "pako": "^2.0.0", "prettier": "^3.0.3", - "semver": "^7.3.2", "twoslash-eslint": "^0.3.0", "typescript": "^5.0.0", + "typescript-eslint": "^8.26.0", "vitepress": "^1.0.1", "vue-eslint-parser": "^10.0.0" }, "dependencies": { - "eslint-compat-utils": "^0.6.0", + "eslint-compat-utils": "^0.6.4", "esquery": "^1.0.1", "parse5": "^7.0.0" }, @@ -118,7 +119,7 @@ ] }, "engines": { - "node": ">=18.0.0" + "node": ">=18.18.0" }, "publishConfig": { "access": "public" diff --git a/samples/ejs/.eslintrc.js b/samples/ejs/.eslintrc.js deleted file mode 100644 index 913469e3..00000000 --- a/samples/ejs/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018 - }, - env: {}, - extends: ["eslint:all", "plugin:lodash-template/all"], - overrides: [ - { - files: ["*.ejs"], - processor: "lodash-template/html", - parserOptions: { - templateSettings: { - evaluate: "(?:(?:<%_)|(?:<%(?!%)))([\\s\\S]*?)[_\\-]?%>", - interpolate: "<%-([\\s\\S]*?)[_\\-]?%>", - escape: "<%=([\\s\\S]*?)[_\\-]?%>" - } - } - } - ] -}; diff --git a/samples/ejs/hello.ejs b/samples/ejs/hello.ejs deleted file mode 100644 index 227f07bb..00000000 --- a/samples/ejs/hello.ejs +++ /dev/null @@ -1,14 +0,0 @@ -<%_ /* global users, hobbies, occupation */ _%>
    - -
      - <%# render list of users. %> - <%_ for (var user of users) { _%> -
    • <%= user _%>
    • - <%_ } _%> -
    - -
    -

    My name is <%= name _%>

    -

    I like <%= hobbies _%> but hate being a <%= occupation _%> -

    - diff --git a/samples/ejs/samples.ejs b/samples/ejs/samples.ejs deleted file mode 100644 index be060a80..00000000 --- a/samples/ejs/samples.ejs +++ /dev/null @@ -1,18 +0,0 @@ -<% if (user) { %> -

    <%= user.name %>

    -<% } %> - -
      - <% users.forEach(function(user){ %> - <%- include('user/show', {user: user}); %> - <% }); %> -
    - -<%- include('header'); -%> -

    - Title -

    -

    - My page -

    -<%- include('footer'); -%> diff --git a/samples/js/.eslintrc.js b/samples/js/.eslintrc.js deleted file mode 100644 index 9ced5b65..00000000 --- a/samples/js/.eslintrc.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module" - }, - env: {}, - extends: ["eslint:all"], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/all"], - processor: "lodash-template/script" - } - ] -}; diff --git a/samples/js/nuxt-community/axios-module/lib/plugin.js b/samples/js/nuxt-community/axios-module/lib/plugin.js deleted file mode 100644 index 3ada4d5d..00000000 --- a/samples/js/nuxt-community/axios-module/lib/plugin.js +++ /dev/null @@ -1,202 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { - if (!value) { - delete this.defaults.headers[scope][name]; - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest(fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse(fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError(fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError(fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError(fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (let method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = axios => { - for (let key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = axios => { - // request - axios.onRequestError(error => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError(error => { - log('error', 'Response error:', error) - }) - axios.onResponse(res => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = axios => { - // Send credentials only to relative and API Backend requests - axios.onRequest(config => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest(config => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse(response => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError(error => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = e => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common : { - 'Accept': 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (let h of options.proxyHeadersIgnore) { %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} \ No newline at end of file diff --git a/samples/std/.eslintrc.js b/samples/std/.eslintrc.js deleted file mode 100644 index a3c08cce..00000000 --- a/samples/std/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module" - }, - env: {}, - extends: [ - "eslint:all", - "plugin:lodash-template/base", - "plugin:lodash-template/recommended-with-script" - ], - rules: { - "no-undef": "off", - "indent": "off", - semi: ["error", "never"] - } -}; diff --git a/samples/std/sample.html b/samples/std/sample.html deleted file mode 100644 index 5ff10cde..00000000 --- a/samples/std/sample.html +++ /dev/null @@ -1,12 +0,0 @@ - -
    -
    - -
    -
    -

    <%= from_user %>: <%= text %>

    -
    -
    -<% for ( var i = 0; i < users.length; i++ ) { %> -
  • <%= users[i].name %>
  • -<% } %> diff --git a/samples/std/sample.js b/samples/std/sample.js deleted file mode 100644 index 1ab450f7..00000000 --- a/samples/std/sample.js +++ /dev/null @@ -1,7 +0,0 @@ -const obj = <%= JSON.stringify(options) %> - -<% for (const key of Object. keys(additionals)) { %> - obj[ <%= key %>] =<%= additionals[key] %> -<% } %> - -export default obj diff --git a/test_sp/.eslintrc.js b/test_sp/.eslintrc.js deleted file mode 100644 index b44caf34..00000000 --- a/test_sp/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = { - rules: { - "linebreak-style": "off", - }, -}; diff --git a/test_sp/all-rules.js b/test_sp/all-rules.js index f125b818..971e0269 100644 --- a/test_sp/all-rules.js +++ b/test_sp/all-rules.js @@ -6,27 +6,32 @@ const processor = require("../lib/processors/micro-template-processor"); const parser = require("../lib/parser/micro-template-eslint-parser"); const rules = require("../lib/utils/rules").rules; -const configRules = {}; const linter = new Linter(); -for (const rule of rules) { - const ruleId = rule.meta.docs.ruleId; - linter.defineRule(ruleId, rule); - configRules[ruleId] = "error"; -} -linter.defineParser("micro-template-eslint-parser", parser); + const config = { - parser: "micro-template-eslint-parser", - parserOptions: { - ecmaVersion: 2015, + languageOptions: { + parser, + parserOptions: { + ecmaVersion: 2015, + }, + }, + plugins: { + "lodash-template": { + rules: Object.fromEntries( + rules.map((rule) => [rule.meta.docs.ruleName, rule]), + ), + }, }, - rules: configRules, + rules: Object.fromEntries( + rules.map((rule) => [rule.meta.docs.ruleId, "error"]), + ), }; const options = { filename: "test.html", preprocess: processor.preprocess, postprocess: processor.postprocess, }; -describe("speed test.", () => { +describe("speed test", () => { const code = ` <% /* global accounts, users */ %> diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js deleted file mode 100644 index b44caf34..00000000 --- a/tests/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; - -module.exports = { - rules: { - "linebreak-style": "off", - }, -}; diff --git a/tests/eslint-compat.js b/tests/eslint-compat.js index c7ccb6e8..ea14805c 100644 --- a/tests/eslint-compat.js +++ b/tests/eslint-compat.js @@ -1,12 +1,13 @@ // @ts-check "use strict"; -const { getLegacyESLint, getESLint } = require("eslint-compat-utils/eslint"); +const { getESLint } = require("eslint-compat-utils/eslint"); const { getRuleTester } = require("eslint-compat-utils/rule-tester"); const { getLinter } = require("eslint-compat-utils/linter"); +// We are currently only supporting ESLint v9. But, we preserve this structure +// for future-proofing, perhaps for ESLint v10. module.exports = { - LegacyESLint: getLegacyESLint(), ESLint: getESLint(), RuleTester: getRuleTester(), Linter: getLinter(), diff --git a/tests/integration/script-with-repo.js b/tests/integration/script-with-repo.js index 6adabdd9..a6304a05 100644 --- a/tests/integration/script-with-repo.js +++ b/tests/integration/script-with-repo.js @@ -1,14 +1,10 @@ -// eslint-disable-next-line eslint-comments/disable-enable-pair -- ignore -/* eslint-disable require-jsdoc -- ignore */ "use strict"; -const assert = require("assert"); -const cp = require("child_process"); -const path = require("path"); -const fs = require("fs"); +const assert = require("node:assert"); +const cp = require("node:child_process"); +const path = require("node:path"); +const fs = require("node:fs"); const testUtils = require("../test-utils"); -const semver = require("semver"); -const eslintVersion = require("eslint/package.json").version; // cp.execSync("npm pack", { stdio: "inherit" }) // const orgTgzName = path.resolve( @@ -93,9 +89,6 @@ function setup(dir, outDir) { } describe("script test", () => { - if (!semver.satisfies(eslintVersion, ">=8")) { - return; - } for (const { fixtureDir, entryName } of iterateFixtures(FIXTURE_DIR)) { const OUT = path.join(fixtureDir, "output"); const OUT_WITH_FIX = path.join(fixtureDir, "output-with-fix"); @@ -122,7 +115,7 @@ describe("script test", () => { setup(fixtureDir, OUT); return new Promise((resolve, reject) => { cp.exec( - `${ESLINT} output -f json`, + `${ESLINT} output/ --format json`, { cwd: fixtureDir, maxBuffer: Infinity }, (error, stdout, stderr) => { let results; @@ -158,7 +151,7 @@ describe("script test", () => { setup(fixtureDir, OUT_WITH_FIX); return new Promise((resolve, reject) => { cp.exec( - `${ESLINT} output-with-fix --fix -f json`, + `${ESLINT} output-with-fix/ --fix --format json`, { cwd: fixtureDir, maxBuffer: Infinity }, (error, stdout, stderr) => { let results; diff --git a/tests/lib/index/ejs.js b/tests/lib/index/ejs.js index 184fb513..06badc61 100644 --- a/tests/lib/index/ejs.js +++ b/tests/lib/index/ejs.js @@ -1,11 +1,9 @@ "use strict"; -const assert = require("assert"); -const path = require("path"); -const { LegacyESLint } = require("../../eslint-compat"); -const semver = require("semver"); -const eslintVersion = require("eslint/package.json").version; -const fs = require("fs"); +const assert = require("node:assert"); +const path = require("node:path"); +const { ESLint } = require("../../eslint-compat"); +const fs = require("node:fs"); const testUtils = require("../../test-utils"); const FIXTURE_DIR = path.join(__dirname, "../../../tests_fixtures/ejs"); @@ -49,38 +47,35 @@ function stringifyMessages(messages) { } describe("ejs test", () => { - if (semver.satisfies(eslintVersion, ">=7.0.0-rc")) { - describe("should notify errors", () => { - for (const name of testUtils - .listupFiles(FIXTURE_DIR) - .filter((s) => s.endsWith(".ejs"))) { - it(name, async () => { - const eslint = new LegacyESLint({ - cwd: FIXTURE_DIR, - }); - const reportResults = await eslint.lintFiles([name]); - const messages = testUtils.sortMessages( - reportResults[0].messages, - ); + describe("should notify errors", () => { + for (const name of testUtils + .listupFiles(FIXTURE_DIR) + .filter((s) => s.endsWith(".ejs"))) { + it(name, async () => { + const eslint = new ESLint({ + cwd: path.join(FIXTURE_DIR, path.dirname(name)), + }); + const reportResults = await eslint.lintFiles([ + path.basename(name), + ]); + const messages = testUtils.sortMessages( + reportResults[0].messages, + ); - const expectFilepath = path.join( - FIXTURE_DIR, - `${name}.json`, + const expectFilepath = path.join(FIXTURE_DIR, `${name}.json`); + try { + assertMessages( + messages, + JSON.parse(fs.readFileSync(expectFilepath, "utf8")), ); - try { - assertMessages( - messages, - JSON.parse(fs.readFileSync(expectFilepath, "utf8")), - ); - } catch (e) { - testUtils.writeFile( - expectFilepath, - stringifyMessages(messages), - ); - throw e; - } - }); - } - }); - } + } catch (error) { + testUtils.writeFile( + expectFilepath, + stringifyMessages(messages), + ); + throw error; + } + }); + } + }); }); diff --git a/tests/lib/index/index.js b/tests/lib/index/index.js index a30a6c0a..d17d4ecf 100644 --- a/tests/lib/index/index.js +++ b/tests/lib/index/index.js @@ -2,15 +2,13 @@ const assert = require("assert"); const path = require("path"); -const { LegacyESLint, Linter } = require("../..//eslint-compat"); -const semver = require("semver"); -const eslintVersion = require("eslint/package.json").version; +const { ESLint, Linter } = require("../..//eslint-compat"); const fs = require("fs"); const plugin = require("../../.."); const rule = require("../../../lib/rules/no-empty-template-tag"); const FIXTURE_DIR = path.join(__dirname, "../../../tests_fixtures/index"); -const CONFIG_PATH = path.join(FIXTURE_DIR, ".eslintrc.js"); +const CONFIG_PATH = path.join(FIXTURE_DIR, "eslint.config.mjs"); /** * Assert the messages @@ -93,186 +91,180 @@ describe("index test", () => { }); describe("Basic tests", () => { - if (semver.satisfies(eslintVersion, ">=7.0.0-rc")) { - describe("About fixtures/hello.html", () => { - it("should notify errors", async () => { - const cli = new LegacyESLint({ - cwd: FIXTURE_DIR, - overrideConfigFile: CONFIG_PATH, - useEslintrc: false, - }); - const reportResults = await cli.lintFiles(["hello.html"]); - const messages = reportResults[0].messages; - - assertMessages(messages, [ - { - ruleId: "lodash-template/template-tag-spacing", - message: - "Expected 1 space after `<%`, but no spaces found.", - column: 5, - endColumn: 7, - endLine: 4, - line: 4, - }, - { - ruleId: "@stylistic/comma-spacing", - message: "A space is required after ','.", - column: 22, - endColumn: 23, - endLine: 4, - line: 4, - }, - { - ruleId: "@stylistic/function-call-argument-newline", - line: 4, - column: 23, - messageId: "missingLineBreak", - endLine: 4, - endColumn: 23, - }, - { - ruleId: "@stylistic/arrow-spacing", - message: "Missing space before =>.", - column: 28, - endColumn: 29, - endLine: 4, - line: 4, - }, - { - ruleId: "@stylistic/arrow-spacing", - message: "Missing space after =>.", - line: 4, - endLine: 4, - column: 31, - endColumn: 32, - }, - { - ruleId: "lodash-template/template-tag-spacing", - message: - "Expected 1 space before `%>`, but no spaces found.", - line: 5, - endLine: 5, - column: 21, - endColumn: 23, - }, - { - column: 11, - endColumn: 13, - endLine: 6, - line: 6, - message: - "Expected 1 space before `%>`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 20, - endColumn: 23, - endLine: 10, - line: 10, - message: - "Expected 1 space after `<%-`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 27, - endColumn: 29, - endLine: 10, - line: 10, - message: - "Expected 1 space before `%>`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 15, - endColumn: 18, - endLine: 11, - line: 11, - message: - "Expected 1 space after `<%-`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 25, - endColumn: 27, - endLine: 11, - line: 11, - message: - "Expected 1 space before `%>`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 45, - endColumn: 48, - endLine: 11, - line: 11, - message: - "Expected 1 space after `<%-`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 58, - endColumn: 60, - endLine: 11, - line: 11, - message: - "Expected 1 space before `%>`, but no spaces found.", - ruleId: "lodash-template/template-tag-spacing", - }, - { - column: 63, - line: 11, - message: "Irregular whitespace '\\u3000' not allowed.", - ruleId: "lodash-template/no-irregular-whitespace", - }, - { - column: 10, - endColumn: 52, - endLine: 14, - line: 14, - message: "Unexpected string concatenation.", - ruleId: "prefer-template", - }, - ]); + describe("About fixtures/hello.html", () => { + it("should notify errors", async () => { + const cli = new ESLint({ + cwd: FIXTURE_DIR, + overrideConfigFile: CONFIG_PATH, }); + const reportResults = await cli.lintFiles(["hello.html"]); + const messages = reportResults[0].messages; - if (semver.satisfies(eslintVersion, ">=7.0.0-rc")) { - it("should fix errors with --fix option", async () => { - const baseFilepath = path.join(FIXTURE_DIR, "hello.html"); - const testFilepath = path.join( - FIXTURE_DIR, - "hello.html.fixtarget.html", - ); - // copy - fs.copyFileSync(baseFilepath, testFilepath); + assertMessages(messages, [ + { + ruleId: "lodash-template/template-tag-spacing", + message: + "Expected 1 space after `<%`, but no spaces found.", + column: 5, + endColumn: 7, + endLine: 4, + line: 4, + }, + { + ruleId: "@stylistic/comma-spacing", + message: "A space is required after ','.", + column: 22, + endColumn: 23, + endLine: 4, + line: 4, + }, + { + ruleId: "@stylistic/function-call-argument-newline", + line: 4, + column: 23, + messageId: "missingLineBreak", + endLine: 4, + endColumn: 23, + }, + { + ruleId: "@stylistic/arrow-spacing", + message: "Missing space before =>.", + column: 28, + endColumn: 29, + endLine: 4, + line: 4, + }, + { + ruleId: "@stylistic/arrow-spacing", + message: "Missing space after =>.", + line: 4, + endLine: 4, + column: 31, + endColumn: 32, + }, + { + ruleId: "lodash-template/template-tag-spacing", + message: + "Expected 1 space before `%>`, but no spaces found.", + line: 5, + endLine: 5, + column: 21, + endColumn: 23, + }, + { + column: 11, + endColumn: 13, + endLine: 6, + line: 6, + message: + "Expected 1 space before `%>`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 20, + endColumn: 23, + endLine: 10, + line: 10, + message: + "Expected 1 space after `<%-`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 27, + endColumn: 29, + endLine: 10, + line: 10, + message: + "Expected 1 space before `%>`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 15, + endColumn: 18, + endLine: 11, + line: 11, + message: + "Expected 1 space after `<%-`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 25, + endColumn: 27, + endLine: 11, + line: 11, + message: + "Expected 1 space before `%>`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 45, + endColumn: 48, + endLine: 11, + line: 11, + message: + "Expected 1 space after `<%-`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 58, + endColumn: 60, + endLine: 11, + line: 11, + message: + "Expected 1 space before `%>`, but no spaces found.", + ruleId: "lodash-template/template-tag-spacing", + }, + { + column: 63, + line: 11, + message: "Irregular whitespace '\\u3000' not allowed.", + ruleId: "lodash-template/no-irregular-whitespace", + }, + { + column: 10, + endColumn: 52, + endLine: 14, + line: 14, + message: "Unexpected string concatenation.", + ruleId: "prefer-template", + }, + ]); + }); - const cli = new LegacyESLint({ - cwd: FIXTURE_DIR, - fix: true, - overrideConfigFile: CONFIG_PATH, - useEslintrc: false, - }); - await LegacyESLint.outputFixes( - await cli.lintFiles(["hello.html.fixtarget.html"]), - ); + it("should fix errors with --fix option", async () => { + const baseFilepath = path.join(FIXTURE_DIR, "hello.html"); + const testFilepath = path.join( + FIXTURE_DIR, + "hello.html.fixtarget.html", + ); + // copy + fs.copyFileSync(baseFilepath, testFilepath); - const actual = fs.readFileSync(testFilepath, "utf8"); - fs.unlinkSync(testFilepath); - const expected = fs.readFileSync( - path.join(FIXTURE_DIR, "hello.html.fixed.html"), - "utf8", - ); + const cli = new ESLint({ + cwd: FIXTURE_DIR, + fix: true, + overrideConfigFile: CONFIG_PATH, + }); + await ESLint.outputFixes( + await cli.lintFiles(["hello.html.fixtarget.html"]), + ); - assert.deepStrictEqual(actual.trim(), expected.trim()); - }); - } + const actual = fs.readFileSync(testFilepath, "utf8"); + fs.unlinkSync(testFilepath); + const expected = fs.readFileSync( + path.join(FIXTURE_DIR, "hello.html.fixed.html"), + "utf8", + ); + + assert.deepStrictEqual(actual.trim(), expected.trim()); }); - } + }); + describe("About fixtures/comment-directive.html", () => { it("should no errors", async () => { - const cli = new LegacyESLint({ + const cli = new ESLint({ cwd: FIXTURE_DIR, overrideConfigFile: CONFIG_PATH, - useEslintrc: false, }); const report = await cli.lintFiles(["comment-directive.html"]); const messages = report[0].messages; @@ -285,10 +277,9 @@ describe("Basic tests", () => { .readdirSync(FIXTURE_DIR) .filter((s) => s.indexOf("no-error-") === 0)) { it(`should no errors /${name}`, async () => { - const cli = new LegacyESLint({ + const cli = new ESLint({ cwd: FIXTURE_DIR, overrideConfigFile: CONFIG_PATH, - useEslintrc: false, }); const report = await cli.lintFiles([name]); const messages = report[0].messages; diff --git a/tests/lib/services/comment-directive.js b/tests/lib/services/comment-directive.js index d0448ceb..fec2dc1b 100644 --- a/tests/lib/services/comment-directive.js +++ b/tests/lib/services/comment-directive.js @@ -1,8 +1,10 @@ "use strict"; -const assert = require("assert"); -const { LegacyESLint } = require("../../eslint-compat"); +const assert = require("node:assert"); +const stylisticJs = require("@stylistic/eslint-plugin-js"); +const { ESLint } = require("../../eslint-compat"); const testUtils = require("../../test-utils"); +const eslintPluginLodashTemplate = require("../../../lib"); /** * Assert the messages @@ -27,27 +29,39 @@ function assertMessages(actual, expected) { describe("comment-directive test", () => { it("has description", async () => { - const cli = new LegacyESLint({ + const cli = new ESLint({ cwd: __dirname, - baseConfig: { - extends: ["plugin:lodash-template/base"], - parserOptions: { - sourceType: "script", - ecmaVersion: 2020, + overrideConfigFile: true, + overrideConfig: [ + { + files: ["*.html"], + ...eslintPluginLodashTemplate.configs.base, + processor: eslintPluginLodashTemplate.processors.html, }, - rules: { - semi: ["error", "never"], - "no-unused-vars": "error", + { + files: ["*.html"], + plugins: { + "@stylistic/js": stylisticJs, + }, + languageOptions: { + parserOptions: { + sourceType: "script", + ecmaVersion: 2020, + }, + }, + rules: { + "@stylistic/js/semi": ["error", "never"], + "no-unused-vars": "error", + }, }, - }, - useEslintrc: false, + ], }); const report = await cli.lintText( `
    - + <% const a = 1; %> - + <% const b = 1; %>
    `, diff --git a/tests_fixtures/ejs/def-array/.eslintrc.js b/tests_fixtures/ejs/def-array/.eslintrc.js deleted file mode 100644 index dcbcc5c6..00000000 --- a/tests_fixtures/ejs/def-array/.eslintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -/* globals module */ -module.exports = { - "env": {}, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": ["*.ejs"], - "globals": { - "include": true - }, - "processor": "lodash-template/html" - } - ], - "parserOptions": { - "ecmaVersion": 2018 - }, - "root": true -}; diff --git a/tests_fixtures/ejs/def-array/eslint.config.mjs b/tests_fixtures/ejs/def-array/eslint.config.mjs new file mode 100644 index 00000000..3e1113e7 --- /dev/null +++ b/tests_fixtures/ejs/def-array/eslint.config.mjs @@ -0,0 +1,29 @@ +import eslintPluginLodashTemplate from "eslint-plugin-lodash-template"; +import stylistic from "@stylistic/eslint-plugin"; +import eslintJs from "@eslint/js"; + +export default [ + eslintJs.configs.all, + eslintPluginLodashTemplate.configs.all, + stylistic.configs["all-flat"], + + { + languageOptions: { + ecmaVersion: 2018, + }, + }, + + { + files: ["*.ejs"], + languageOptions: { + globals: { + include: true, + }, + }, + processor: eslintPluginLodashTemplate.processors.html, + }, + { + files: ["*.ejs"], + ...eslintPluginLodashTemplate.configs.baseWithEjs, + }, +]; diff --git a/tests_fixtures/ejs/def-regexp/.eslintrc.js b/tests_fixtures/ejs/def-regexp/.eslintrc.js deleted file mode 100644 index 1a2d970c..00000000 --- a/tests_fixtures/ejs/def-regexp/.eslintrc.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018 - }, - env: {}, - extends: ["eslint:all", "plugin:lodash-template/base", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: ["*.ejs"], - processor: "lodash-template/html", - globals: { - include: true, - include: true - }, - parserOptions: { - templateSettings: { - evaluate: "(?:(?:<%_)|(?:<%(?!%)))([\\s\\S]*?)[_\\-]?%>", - interpolate: "<%-([\\s\\S]*?)[_\\-]?%>", - escape: "<%=([\\s\\S]*?)[_\\-]?%>" - } - } - } - ] -}; diff --git a/tests_fixtures/ejs/def-regexp/eslint.config.mjs b/tests_fixtures/ejs/def-regexp/eslint.config.mjs new file mode 100644 index 00000000..e2aa96ab --- /dev/null +++ b/tests_fixtures/ejs/def-regexp/eslint.config.mjs @@ -0,0 +1,36 @@ +import eslintJs from "@eslint/js"; +import eslintPluginLodashTemplate from "eslint-plugin-lodash-template"; +import stylistic from "@stylistic/eslint-plugin"; + +export default [ + eslintJs.configs.all, + eslintPluginLodashTemplate.configs.base, + stylistic.configs["all-flat"], + + { + languageOptions: { + ecmaVersion: 2018, + }, + }, + + { + files: ["*.ejs"], + languageOptions: { + globals: { + include: true, + }, + parserOptions: { + templateSettings: { + evaluate: "(?:(?:<%_)|(?:<%(?!%)))([\\s\\S]*?)[_\\-]?%>", + interpolate: "<%-([\\s\\S]*?)[_\\-]?%>", + escape: "<%=([\\s\\S]*?)[_\\-]?%>", + }, + }, + }, + processor: eslintPluginLodashTemplate.processors.html, + }, + { + files: ["*.ejs"], + ...eslintPluginLodashTemplate.configs.base, + }, +]; diff --git a/tests_fixtures/index/.eslintrc.js b/tests_fixtures/index/.eslintrc.js deleted file mode 100644 index a064a56d..00000000 --- a/tests_fixtures/index/.eslintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - }, - env: {}, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - rules: { - "linebreak-style": "off", - "max-len": "off", - "lodash-template/html-indent": "off", - }, - globals: { - _: true, - }, - "settings": { - "lodash-template/ignoreRules": ["no-tabs"], - "lodash-template/globals": ["name"], - } -} diff --git a/tests_fixtures/index/eslint.config.mjs b/tests_fixtures/index/eslint.config.mjs new file mode 100644 index 00000000..9a1f711a --- /dev/null +++ b/tests_fixtures/index/eslint.config.mjs @@ -0,0 +1,35 @@ +import eslintJs from "@eslint/js"; +import lodashTemplatePlugin from "eslint-plugin-lodash-template"; +import stylistic from "@stylistic/eslint-plugin"; + +export default [ + eslintJs.configs.all, + lodashTemplatePlugin.configs.all, + stylistic.configs["all-flat"], + + { + languageOptions: { + ecmaVersion: 2018, + + globals: { + _: true, + }, + }, + + settings: { + "lodash-template/ignoreRules": ["no-tabs"], + "lodash-template/globals": ["name"], + }, + + rules: { + "linebreak-style": "off", + "max-len": "off", + "lodash-template/html-indent": "off", + }, + }, + + { + files: ["*.html"], + processor: lodashTemplatePlugin.processors.html, + }, +]; diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.eslintrc.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.eslintrc.js deleted file mode 100644 index e5b4b395..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - env: { - browser: true, - node: true, - }, - extends: ['airbnb-base'], - // required to lint *.vue files - plugins: [], - // add your custom rules here - rules: { - 'import/no-dynamic-require': 0, - 'global-require': 0, - - }, - globals: {}, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - ecmaVersion: 2019, - }, - globals: { - options: true, - serialize: true, - } - } - ] - }; \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.npmrc b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.npmrc deleted file mode 100644 index 9cf94950..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin_no_package.js deleted file mode 100644 index 6121d607..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/all-rules-test/plugin_no_package.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package:pkg, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=pkg%>'; - <% }) %> - <% } else { %> - import <%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=pkg%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package:pkg, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin_no_package.js deleted file mode 100644 index 6121d607..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/input/plugin_no_package.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package:pkg, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=pkg%>'; - <% }) %> - <% } else { %> - import <%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=pkg%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package:pkg, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin_no_package.js deleted file mode 100644 index db023588..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/all-rules-test/plugin_no_package.js +++ /dev/null @@ -1,34 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import {config, library} from "@fortawesome/fontawesome-svg-core"; -import {FontAwesomeIcon} from "@fortawesome/vue-fontawesome"; - -<% options.packs.forEach(({"package": pkg, icons}) => { %> -<% if (icons) { %> -<% icons.forEach((icon) => { %> -import {<%= icon %>} from '<%= pkg %>'; -<% }) %> -<% } else { %> -import <%= pkg.split(/[\s\/]+/)[1].replace( - /-/g, - "" - ) %> from '<%= pkg %>'; -<% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({"package": pkg, icons}) => { %> -<% if (icons) { %> -library.add(<%= icons.join(',') %>); -<% } else { %> -library.add(<%= pkg.split(/[\s\/]+/)[1].replace( - /-/g, - "" - ) %>); -<% } %> -<% }) %> - -Vue.component( - '<%= options.componentName %>', - FontAwesomeIcon -); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin_no_package.js deleted file mode 100644 index 8244895d..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/plugin_no_package.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({ package: pkg, icons }) => { %> -<% if (icons) { %> -<% icons.forEach((icon) => { %> -import { <%= icon %> } from '<%= pkg %>'; -<% }) %> -<% } else { %> -import <%= pkg.split(/[\s\/]+/)[1].replace(/-/g, '') %> from '<%= pkg %>'; -<% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({ package: pkg, icons }) => { %> -<% if (icons) { %> -library.add(<%= icons.join(',') %>); -<% } else { %> -library.add(<%= pkg.split(/[\s\/]+/)[1].replace(/-/g, '') %>); -<% } %> -<% }) %> - -Vue.component('<%= options.componentName %>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/result.json b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/result.json deleted file mode 100644 index 3c0fd88f..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output-with-fix/result.json +++ /dev/null @@ -1,201 +0,0 @@ -[ - { - "filePath": "/output-with-fix/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": null, - "fatal": true, - "message": "Parsing error: The keyword 'package' is reserved", - "line": 5, - "column": 28 - } - ] - }, - { - "filePath": "/output-with-fix/all-rules-test/plugin_no_package.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 67 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 11, - "column": 22, - "endLine": 11, - "endColumn": 31 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 11, - "column": 26, - "endLine": 11, - "endColumn": 27 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 11, - "column": 33, - "endLine": 11, - "endColumn": 34 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 12, - "column": 5, - "endLine": 12, - "endColumn": 9 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 24, - "column": 27, - "endLine": 24, - "endColumn": 36 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 24, - "column": 31, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 24, - "column": 38, - "endLine": 24, - "endColumn": 39 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 25, - "column": 5, - "endLine": 25, - "endColumn": 9 - } - ] - }, - { - "filePath": "/output-with-fix/plugin.js", - "messages": [ - { - "ruleId": null, - "fatal": true, - "message": "Parsing error: The keyword 'package' is reserved", - "line": 5, - "column": 28 - } - ] - }, - { - "filePath": "/output-with-fix/plugin_no_package.js", - "messages": [ - { - "ruleId": "import/no-unresolved", - "message": "Unable to resolve path to module '@fortawesome/fontawesome-svg-core'.", - "line": 2, - "column": 33, - "endLine": 2, - "endColumn": 68 - }, - { - "ruleId": "import/no-unresolved", - "message": "Unable to resolve path to module '@fortawesome/vue-fontawesome'.", - "line": 3, - "column": 33, - "endLine": 3, - "endColumn": 63 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 11, - "column": 26, - "endLine": 11, - "endColumn": 27 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 21, - "column": 31, - "endLine": 21, - "endColumn": 32 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin_no_package.js deleted file mode 100644 index 6121d607..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/all-rules-test/plugin_no_package.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package:pkg, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=pkg%>'; - <% }) %> - <% } else { %> - import <%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=pkg%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package:pkg, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin.js deleted file mode 100644 index 3b1866af..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=package%>'; - <% }) %> - <% } else { %> - import <%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=package%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=package.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin_no_package.js b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin_no_package.js deleted file mode 100644 index 6121d607..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/plugin_no_package.js +++ /dev/null @@ -1,25 +0,0 @@ -import Vue from 'vue'; // eslint-disable-line -import { library, config } from '@fortawesome/fontawesome-svg-core'; -import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; - -<% options.packs.forEach(({package:pkg, icons}) => { %> - <% if (icons) { %> - <% icons.forEach((icon) => { %> - import { <%=icon%> } from '<%=pkg%>'; - <% }) %> - <% } else { %> - import <%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%> from '<%=pkg%>'; - <% } %> -<% }) %> - -config.autoAddCss = false; - -<% options.packs.forEach(({package:pkg, icons}) => { %> -<% if (icons) { %> - library.add(<%=icons.join(',')%>); - <% } else { %> - library.add(<%=pkg.split(/[\s\/]+/)[1].replace(/-/g, "")%>); - <% } %> -<% }) %> - -Vue.component('<%=options.componentName%>', FontAwesomeIcon); diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/result.json b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/result.json deleted file mode 100644 index 6ed2e63a..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/output/result.json +++ /dev/null @@ -1,1057 +0,0 @@ -[ - { - "filePath": "/output/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": null, - "fatal": true, - "message": "Parsing error: The keyword 'package' is reserved", - "line": 5, - "column": 28 - } - ] - }, - { - "filePath": "/output/all-rules-test/plugin_no_package.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 2, - "column": 9, - "endLine": 2, - "endColumn": 10 - }, - { - "ruleId": "sort-imports", - "message": "Member 'config' of the import declaration should be sorted alphabetically.", - "line": 2, - "column": 19, - "endLine": 2, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 2, - "column": 25, - "endLine": 2, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 33, - "endLine": 2, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 3, - "column": 9, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 3, - "column": 25, - "endLine": 3, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 33, - "endLine": 3, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'package' found.", - "line": 5, - "column": 28, - "endLine": 5, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/key-spacing", - "message": "Missing space before value for key 'package'.", - "line": 5, - "column": 36, - "endLine": 5, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 8, - "column": 15, - "endLine": 8, - "endColumn": 16 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 8, - "column": 16, - "endLine": 8, - "endColumn": 19 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 8, - "column": 23, - "endLine": 8, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 8, - "column": 25, - "endLine": 8, - "endColumn": 26 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 8, - "column": 34, - "endLine": 8, - "endColumn": 37 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 8, - "column": 40, - "endLine": 8, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 11, - "column": 12, - "endLine": 11, - "endColumn": 15 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 11, - "column": 25, - "endLine": 11, - "endColumn": 34 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 11, - "column": 29, - "endLine": 11, - "endColumn": 30 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 11, - "column": 36, - "endLine": 11, - "endColumn": 37 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 11, - "column": 47, - "endLine": 11, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 11, - "column": 52, - "endLine": 11, - "endColumn": 53 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 11, - "column": 56, - "endLine": 11, - "endColumn": 58 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 11, - "column": 65, - "endLine": 11, - "endColumn": 68 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 11, - "column": 71, - "endLine": 11, - "endColumn": 73 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'package' found.", - "line": 17, - "column": 28, - "endLine": 17, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/key-spacing", - "message": "Missing space before value for key 'package'.", - "line": 17, - "column": 36, - "endLine": 17, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 20 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 19, - "column": 35, - "endLine": 19, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 21, - "column": 17, - "endLine": 21, - "endColumn": 20 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 21, - "column": 30, - "endLine": 21, - "endColumn": 39 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 21, - "column": 34, - "endLine": 21, - "endColumn": 35 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 21, - "column": 41, - "endLine": 21, - "endColumn": 42 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 21, - "column": 52, - "endLine": 21, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 21, - "column": 57, - "endLine": 21, - "endColumn": 58 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 21, - "column": 61, - "endLine": 21, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 25, - "column": 16, - "endLine": 25, - "endColumn": 19 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 25, - "column": 40, - "endLine": 25, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 25, - "column": 44, - "endLine": 25, - "endColumn": 45 - } - ] - }, - { - "filePath": "/output/plugin.js", - "messages": [ - { - "ruleId": null, - "fatal": true, - "message": "Parsing error: The keyword 'package' is reserved", - "line": 5, - "column": 28 - } - ] - }, - { - "filePath": "/output/plugin_no_package.js", - "messages": [ - { - "ruleId": "import/no-unresolved", - "message": "Unable to resolve path to module '@fortawesome/fontawesome-svg-core'.", - "line": 2, - "column": 33, - "endLine": 2, - "endColumn": 68 - }, - { - "ruleId": "import/no-unresolved", - "message": "Unable to resolve path to module '@fortawesome/vue-fontawesome'.", - "line": 3, - "column": 33, - "endLine": 3, - "endColumn": 63 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required after '{'.", - "line": 5, - "column": 27, - "endLine": 5, - "endColumn": 28 - }, - { - "ruleId": "key-spacing", - "message": "Missing space before value for key 'package'.", - "line": 5, - "column": 36, - "endLine": 5, - "endColumn": 39 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 5, - "column": 46, - "endLine": 5, - "endColumn": 47 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 8, - "column": 16, - "endLine": 8, - "endColumn": 19 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 8, - "column": 23, - "endLine": 8, - "endColumn": 25 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 8, - "column": 34, - "endLine": 8, - "endColumn": 37 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 8, - "column": 40, - "endLine": 8, - "endColumn": 42 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 11, - "column": 12, - "endLine": 11, - "endColumn": 15 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 11, - "column": 29, - "endLine": 11, - "endColumn": 30 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 11, - "column": 53, - "endLine": 11, - "endColumn": 55 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 11, - "column": 56, - "endLine": 11, - "endColumn": 58 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 11, - "column": 65, - "endLine": 11, - "endColumn": 68 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 11, - "column": 71, - "endLine": 11, - "endColumn": 73 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required after '{'.", - "line": 17, - "column": 27, - "endLine": 17, - "endColumn": 28 - }, - { - "ruleId": "key-spacing", - "message": "Missing space before value for key 'package'.", - "line": 17, - "column": 36, - "endLine": 17, - "endColumn": 39 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 17, - "column": 46, - "endLine": 17, - "endColumn": 47 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 20 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 19, - "column": 35, - "endLine": 19, - "endColumn": 37 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 21, - "column": 17, - "endLine": 21, - "endColumn": 20 - }, - { - "ruleId": "no-useless-escape", - "message": "Unnecessary escape character: \\/.", - "line": 21, - "column": 34, - "endLine": 21, - "endColumn": 35 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 21, - "column": 58, - "endLine": 21, - "endColumn": 60 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 21, - "column": 61, - "endLine": 21, - "endColumn": 63 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%=`, but no spaces found.", - "line": 25, - "column": 16, - "endLine": 25, - "endColumn": 19 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 25, - "column": 40, - "endLine": 25, - "endColumn": 42 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/package.json b/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/package.json deleted file mode 100644 index 93fdfe91..00000000 --- a/tests_fixtures/script-processor-repos/Qonfucius/nuxt-fontawesome/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "devDependencies": { - "@stylistic/eslint-plugin": "~2.0.0", - "eslint": "~8.57.0", - "eslint-config-airbnb-base": "~15.0.0", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-lodash-template": "file:../../../.." - }, - "description": "test for https://github.com/Qonfucius/nuxt-fontawesome", - "repository": { - "type": "git", - "url": "git+https://github.com/ota-meshi/eslint-plugin-lodash-template.git" - }, - "private": true, - "license": "MIT" -} diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.eslintrc.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.eslintrc.js deleted file mode 100644 index f2451765..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.eslintrc.js +++ /dev/null @@ -1,53 +0,0 @@ -module.exports = { - root: true, - extends: ['standard', 'plugin:vue/recommended', 'plugin:prettier/recommended'], - plugins: ['jest', 'markdown', 'node', 'promise'], - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - es6: true, - 'jest/globals': true - }, - globals: { - Vue: true - }, - rules: { - 'spaced-comment': 'off', // needed to ignore `/*#__PURE__*/` comments - 'vue/html-self-closing': [ - 'error', - { - html: { - void: 'never', - normal: 'never', - component: 'never' - } - } - ], - 'vue/max-attributes-per-line': ['error', { singleline: 4 }], - 'vue/no-template-shadow': 'off', - 'vue/no-use-v-if-with-v-for': 'off', - 'vue/no-v-html': 'off', - 'vue/require-default-prop': 'off', - 'vue/require-prop-types': 'off', - 'vue/singleline-html-element-content-newline': 'off' - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - }, - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - rules: { - "prettier/prettier": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.npmrc b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.npmrc deleted file mode 100644 index 9cf94950..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/plugin.template.js deleted file mode 100644 index ebb0bf12..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/all-rules-test/plugin.template.js +++ /dev/null @@ -1,28 +0,0 @@ -import Vue from 'vue'; - -<% if (!options.treeShake) { %> -import BootstrapVue from 'bootstrap-vue'; - -Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config ? 'BVConfigPlugin' : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean).join(',\n ') %> -} from 'bootstrap-vue'; - -<% if (options.config) { %> -Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); -<% } %> - -<%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> -<%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/plugin.template.js deleted file mode 100644 index ebb0bf12..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/input/nuxt/plugin.template.js +++ /dev/null @@ -1,28 +0,0 @@ -import Vue from 'vue'; - -<% if (!options.treeShake) { %> -import BootstrapVue from 'bootstrap-vue'; - -Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config ? 'BVConfigPlugin' : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean).join(',\n ') %> -} from 'bootstrap-vue'; - -<% if (options.config) { %> -Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); -<% } %> - -<%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> -<%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/plugin.template.js deleted file mode 100644 index 3ef05bb9..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/all-rules-test/plugin.template.js +++ /dev/null @@ -1,60 +0,0 @@ -import Vue from "vue"; - -<% if (!options.treeShake) { %> -import BootstrapVue from "bootstrap-vue"; - -Vue.use( - BootstrapVue, - <%= JSON.stringify( - options.config || {}, - undefined, - 2 - ) %> -); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config - ? 'BVConfigPlugin' - : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean). - join(',\n ') %> -} from "bootstrap-vue"; - -<% if (options.config) { %> -Vue.use( - BVConfigPlugin, - <%= JSON.stringify( - options.config, - undefined, - 2 - ) %> -); -<% } %> - -<%= options.componentPlugins.reduce( - (acc, plugin) => acc += `Vue.use(${plugin});\n`, - '' - ) %>; -<%= options.directivePlugins.reduce( - (acc, plugin) => acc += `Vue.use(${plugin});\n`, - '' - ) %>; -<%= options.components.reduce( - (acc, c) => acc += `Vue.component('${c}', ${c});\n`, - '' - ) %>; -<%= options.directives.reduce( - (acc, d) => acc += `Vue.directive('${d.replace( - /^VB/, - 'B' - )}', ${d});\n`, - '' - ) %>; -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/plugin.template.js deleted file mode 100644 index 0a54dbcf..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/nuxt/plugin.template.js +++ /dev/null @@ -1,28 +0,0 @@ -import Vue from 'vue'; - -<% if (!options.treeShake) { %> -import BootstrapVue from 'bootstrap-vue'; - -Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config ? 'BVConfigPlugin' : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean).join(',\n ') %> -} from 'bootstrap-vue'; - -<% if (options.config) { %> -Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); -<% } %> - -<%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> -<%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/result.json b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/result.json deleted file mode 100644 index 93e59abd..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output-with-fix/result.json +++ /dev/null @@ -1,225 +0,0 @@ -[ - { - "filePath": "/output-with-fix/nuxt/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt/all-rules-test/plugin.template.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Imports should be sorted alphabetically.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 42 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 18 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 10 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 19, - "column": 9, - "endLine": 21, - "endColumn": 17 - }, - { - "ruleId": "no-undef", - "message": "'BVConfigPlugin' is not defined.", - "line": 32, - "column": 5, - "endLine": 32, - "endColumn": 19 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 35, - "column": 9, - "endLine": 35, - "endColumn": 18 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 36, - "column": 9, - "endLine": 36, - "endColumn": 10 - }, - { - "ruleId": "no-return-assign", - "message": "Arrow function should not return assignment.", - "line": 42, - "column": 5, - "endLine": 42, - "endColumn": 52 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 42, - "column": 22, - "endLine": 42, - "endColumn": 25 - }, - { - "ruleId": "no-return-assign", - "message": "Arrow function should not return assignment.", - "line": 46, - "column": 5, - "endLine": 46, - "endColumn": 52 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 46, - "column": 22, - "endLine": 46, - "endColumn": 25 - }, - { - "ruleId": "no-return-assign", - "message": "Arrow function should not return assignment.", - "line": 50, - "column": 5, - "endLine": 50, - "endColumn": 56 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'c' is too short (< 2).", - "line": 50, - "column": 11, - "endLine": 50, - "endColumn": 12 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 50, - "column": 17, - "endLine": 50, - "endColumn": 20 - }, - { - "ruleId": "no-return-assign", - "message": "Arrow function should not return assignment.", - "line": 54, - "column": 5, - "endLine": 57, - "endColumn": 19 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'd' is too short (< 2).", - "line": 54, - "column": 11, - "endLine": 54, - "endColumn": 12 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 54, - "column": 17, - "endLine": 54, - "endColumn": 20 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 55, - "column": 7, - "endLine": 55, - "endColumn": 12 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt/plugin.template.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'BVConfigPlugin' is not defined.", - "line": 21, - "column": 9, - "endLine": 21, - "endColumn": 23 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/plugin.template.js deleted file mode 100644 index ebb0bf12..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/all-rules-test/plugin.template.js +++ /dev/null @@ -1,28 +0,0 @@ -import Vue from 'vue'; - -<% if (!options.treeShake) { %> -import BootstrapVue from 'bootstrap-vue'; - -Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config ? 'BVConfigPlugin' : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean).join(',\n ') %> -} from 'bootstrap-vue'; - -<% if (options.config) { %> -Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); -<% } %> - -<%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> -<%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/plugin.template.js b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/plugin.template.js deleted file mode 100644 index ebb0bf12..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/nuxt/plugin.template.js +++ /dev/null @@ -1,28 +0,0 @@ -import Vue from 'vue'; - -<% if (!options.treeShake) { %> -import BootstrapVue from 'bootstrap-vue'; - -Vue.use(BootstrapVue, <%= JSON.stringify(options.config || {}, undefined, 2) %>); -<% } %> - -<% if (options.treeShake) { %> -import { - <%= [].concat( - options.config ? 'BVConfigPlugin' : null, - options.componentPlugins, - options.directivePlugins, - options.components, - options.directives - ).filter(Boolean).join(',\n ') %> -} from 'bootstrap-vue'; - -<% if (options.config) { %> -Vue.use(BVConfigPlugin, <%= JSON.stringify(options.config, undefined, 2) %>); -<% } %> - -<%= options.componentPlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.directivePlugins.reduce((acc, plugin) => (acc += `Vue.use(${plugin});\n` ), '') %> -<%= options.components.reduce((acc, c) => (acc += `Vue.component('${c}', ${c});\n` ), '') %> -<%= options.directives.reduce((acc, d) => (acc += `Vue.directive('${d.replace(/^VB/, 'B')}', ${d});\n` ), '') %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/result.json b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/result.json deleted file mode 100644 index 3cbdf886..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/output/result.json +++ /dev/null @@ -1,825 +0,0 @@ -[ - { - "filePath": "/output/nuxt/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt/all-rules-test/plugin.template.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "sort-imports", - "message": "Imports should be sorted alphabetically.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 4, - "column": 26, - "endLine": 4, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 22, - "endLine": 6, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 63, - "endLine": 6, - "endColumn": 64 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 6, - "column": 64, - "endLine": 6, - "endColumn": 73 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 74, - "endLine": 6, - "endColumn": 75 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 6, - "column": 75, - "endLine": 6, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 12, - "column": 5, - "endLine": 12, - "endColumn": 19 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 12, - "column": 5, - "endLine": 12, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 12, - "column": 22, - "endLine": 12, - "endColumn": 38 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 13, - "column": 3, - "endLine": 13, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 14, - "column": 3, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 15, - "column": 3, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 16, - "column": 3, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 3, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/newline-per-chained-call", - "message": "Expected line break before `.join`.", - "line": 17, - "column": 20, - "endLine": 17, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 18, - "column": 8, - "endLine": 18, - "endColumn": 23 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%`, but 3 spaces found.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "no-undef", - "message": "'BVConfigPlugin' is not defined.", - "line": 21, - "column": 9, - "endLine": 21, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 21, - "column": 24, - "endLine": 21, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 21, - "column": 59, - "endLine": 21, - "endColumn": 60 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 21, - "column": 60, - "endLine": 21, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 21, - "column": 70, - "endLine": 21, - "endColumn": 71 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 21, - "column": 71, - "endLine": 21, - "endColumn": 72 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%`, but 3 spaces found.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 24, - "column": 54, - "endLine": 24, - "endColumn": 55 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 24, - "column": 55, - "endLine": 24, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/space-in-parens", - "message": "There should be no space before this paren.", - "line": 24, - "column": 85, - "endLine": 24, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 24, - "column": 88, - "endLine": 24, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 95, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 25, - "column": 54, - "endLine": 25, - "endColumn": 55 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 25, - "column": 55, - "endLine": 25, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/space-in-parens", - "message": "There should be no space before this paren.", - "line": 25, - "column": 85, - "endLine": 25, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 25, - "column": 88, - "endLine": 25, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 95, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'c' is too short (< 2).", - "line": 26, - "column": 37, - "endLine": 26, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 26, - "column": 43, - "endLine": 26, - "endColumn": 44 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 26, - "column": 44, - "endLine": 26, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/space-in-parens", - "message": "There should be no space before this paren.", - "line": 26, - "column": 83, - "endLine": 26, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 26, - "column": 86, - "endLine": 26, - "endColumn": 87 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 93, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'd' is too short (< 2).", - "line": 27, - "column": 37, - "endLine": 27, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 27, - "column": 43, - "endLine": 27, - "endColumn": 44 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'acc'.", - "line": 27, - "column": 44, - "endLine": 27, - "endColumn": 47 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 27, - "column": 79, - "endLine": 27, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 27, - "column": 85, - "endLine": 27, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/space-in-parens", - "message": "There should be no space before this paren.", - "line": 27, - "column": 103, - "endLine": 27, - "endColumn": 104 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 27, - "column": 106, - "endLine": 27, - "endColumn": 107 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 113, - "endLine": 28, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt/plugin.template.js", - "messages": [ - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 13, - "column": 3, - "endLine": 13, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 14, - "column": 3, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 15, - "column": 3, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 16, - "column": 3, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 3, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%`, but 3 spaces found.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "no-undef", - "message": "'BVConfigPlugin' is not defined.", - "line": 21, - "column": 9, - "endLine": 21, - "endColumn": 23 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space after `<%`, but 3 spaces found.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/package.json b/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/package.json deleted file mode 100644 index 0bde3fd4..00000000 --- a/tests_fixtures/script-processor-repos/bootstrap-vue/bootstrap-vue/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "devDependencies": { - "@stylistic/eslint-plugin": "~2.0.0", - "eslint": "~8.57.0", - "eslint-config-standard": "~17.1.0", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-jest": "~28.11.0", - "eslint-plugin-lodash-template": "file:../../../..", - "eslint-plugin-n": "~17.16.0", - "eslint-plugin-promise": "~7.2.0" - }, - "description": "test for https://github.com/bootstrap-vue/bootstrap-vue", - "repository": { - "type": "git", - "url": "git+https://github.com/ota-meshi/eslint-plugin-lodash-template.git" - }, - "private": true, - "license": "MIT" -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/.eslintrc.js deleted file mode 100644 index ec0e5881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/.eslintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports ={ - root:true -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/.npmrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/.npmrc deleted file mode 100644 index 9cf94950..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/.eslintrc.js deleted file mode 100644 index 9ead54a8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: "module" - }, - extends: ["@nuxtjs"], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - }, - }, - globals: { - options: true, - serialize: true, - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 612fb64a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import VueAnalytics from 'vue-analytics' - -export default async (ctx, inject) => { - const options = <%= serialize(options) %> - - if (typeof options.asyncID === 'function') { - options.id = await options.asyncID(ctx) - } - - Vue.use(VueAnalytics, {...{ router: ctx.app.router }, ...options}) - - ctx.$ga = Vue.$ga - inject('ga', Vue.$ga) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/plugin.js deleted file mode 100644 index 612fb64a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/analytics-module/lib/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import VueAnalytics from 'vue-analytics' - -export default async (ctx, inject) => { - const options = <%= serialize(options) %> - - if (typeof options.asyncID === 'function') { - options.id = await options.asyncID(ctx) - } - - Vue.use(VueAnalytics, {...{ router: ctx.app.router }, ...options}) - - ctx.$ga = Vue.$ga - inject('ga', Vue.$ga) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/.eslintrc.js deleted file mode 100644 index e899f147..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 0 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/plugin.js deleted file mode 100644 index 4a489e87..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import VueApollo from 'vue-apollo' -import 'cross-fetch/polyfill' -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client' -import Cookie from 'universal-cookie' -import { InMemoryCache } from 'apollo-cache-inmemory' - -Vue.use(VueApollo) - -export default (ctx, inject) => { - const providerOptions = { clients: {} } - const { app, beforeNuxtRender, req } = ctx - const AUTH_TOKEN_NAME = '<%= options.tokenName %>' - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %> - const AUTH_TYPE = '<%= options.authenticationType %> ' - const cookies = new Cookie(req && req.headers.cookie) - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES - - function <%= key %>GetAuth () { - const token = cookies.get(<%= key %>TokenName) - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token : '' - } - - let <%= key %>ClientConfig - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify(options.clientConfigs[key], null, 2) %> - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>') - - if ('default' in <%= key %>ClientConfig) { - <%= key %>ClientConfig = <%= key %>ClientConfig.default - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx) - <% } %> - - const <%= key %>ValidateToken = () => true - - if (!<%= key %>ClientConfig.validateToken) { - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions: undefined) - - if (!process.server) { - <%= key %>Cache.restore(window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultClient' : key %> : null) - } - - if (!<%= key %>ClientConfig.getAuth) { - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth - } - <%= key %>ClientConfig.ssr = !!process.server - <%= key %>ClientConfig.cache = <%= key %>Cache - <%= key %>ClientConfig.tokenName = <%= key %>TokenName - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }) - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign(providerOptions, { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default(error, ctx) - <% } else { %> - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message) - <% } %> - } - }) - - const apolloProvider = new VueApollo(vueApolloOptions) - // Allow access to the provider in the context - app.apolloProvider = apolloProvider - - if (process.server) { - const ApolloSSR = require('vue-apollo/ssr') - beforeNuxtRender(({ nuxtState }) => { - nuxtState.apollo = ApolloSSR.getStates(apolloProvider) - }) - } - - inject('apolloHelpers', { - onLogin: async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - // Fallback for tokenExpires param - if (typeof cookieAttributes === 'number') cookieAttributes = { expires: cookieAttributes } - - if (typeof cookieAttributes.expires === 'number') { - cookieAttributes.expires = new Date(Date.now()+ 86400*1000*cookieAttributes.expires) - } - - if (token) { - cookies.set(AUTH_TOKEN_NAME, token, cookieAttributes) - } else { - cookies.remove(AUTH_TOKEN_NAME, cookieAttributes) - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (setToken)', 'color: orange;', e.message) - } - } - }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (logout)', 'color: orange;', e.message) - } - } - }, - getToken: (tokenName = AUTH_TOKEN_NAME) => { - return cookies.get(tokenName) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/plugin.js deleted file mode 100644 index 4a489e87..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/apollo-module/lib/templates/plugin.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import VueApollo from 'vue-apollo' -import 'cross-fetch/polyfill' -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client' -import Cookie from 'universal-cookie' -import { InMemoryCache } from 'apollo-cache-inmemory' - -Vue.use(VueApollo) - -export default (ctx, inject) => { - const providerOptions = { clients: {} } - const { app, beforeNuxtRender, req } = ctx - const AUTH_TOKEN_NAME = '<%= options.tokenName %>' - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %> - const AUTH_TYPE = '<%= options.authenticationType %> ' - const cookies = new Cookie(req && req.headers.cookie) - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES - - function <%= key %>GetAuth () { - const token = cookies.get(<%= key %>TokenName) - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token : '' - } - - let <%= key %>ClientConfig - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify(options.clientConfigs[key], null, 2) %> - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>') - - if ('default' in <%= key %>ClientConfig) { - <%= key %>ClientConfig = <%= key %>ClientConfig.default - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx) - <% } %> - - const <%= key %>ValidateToken = () => true - - if (!<%= key %>ClientConfig.validateToken) { - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions: undefined) - - if (!process.server) { - <%= key %>Cache.restore(window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultClient' : key %> : null) - } - - if (!<%= key %>ClientConfig.getAuth) { - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth - } - <%= key %>ClientConfig.ssr = !!process.server - <%= key %>ClientConfig.cache = <%= key %>Cache - <%= key %>ClientConfig.tokenName = <%= key %>TokenName - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }) - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign(providerOptions, { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default(error, ctx) - <% } else { %> - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message) - <% } %> - } - }) - - const apolloProvider = new VueApollo(vueApolloOptions) - // Allow access to the provider in the context - app.apolloProvider = apolloProvider - - if (process.server) { - const ApolloSSR = require('vue-apollo/ssr') - beforeNuxtRender(({ nuxtState }) => { - nuxtState.apollo = ApolloSSR.getStates(apolloProvider) - }) - } - - inject('apolloHelpers', { - onLogin: async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - // Fallback for tokenExpires param - if (typeof cookieAttributes === 'number') cookieAttributes = { expires: cookieAttributes } - - if (typeof cookieAttributes.expires === 'number') { - cookieAttributes.expires = new Date(Date.now()+ 86400*1000*cookieAttributes.expires) - } - - if (token) { - cookies.set(AUTH_TOKEN_NAME, token, cookieAttributes) - } else { - cookies.remove(AUTH_TOKEN_NAME, cookieAttributes) - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (setToken)', 'color: orange;', e.message) - } - } - }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (logout)', 'color: orange;', e.message) - } - } - }, - getToken: (tokenName = AUTH_TOKEN_NAME) => { - return cookies.get(tokenName) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/.eslintrc.js deleted file mode 100644 index 0546e2de..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: ['jest', 'vue'], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - hash: true - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/plugin.js deleted file mode 100644 index e1c4bdff..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/all-rules-test/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import Auth from './auth' - -import './middleware' - -// Active schemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path.replace(/\\/g,'/')}'`).join('\n') %> - -export default function (ctx, inject) { - // Options - const options = <%= JSON.stringify(options.options) %> - - // Create a new Auth instance - const $auth = new Auth(ctx, options) - - // Register strategies - <%= - options.strategies.map(strategy => { - const scheme = 'scheme_' + hash(options.strategyScheme.get(strategy)) - const schemeOptions = JSON.stringify(strategy) - const name = strategy._name - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))` - }).join('\n\n ') - %> - - // Inject it to nuxt context as $auth - inject('auth', $auth) - ctx.$auth = $auth - - // Initialize auth - return $auth.init().catch(error => { - if (process.client) { - console.error('[ERROR] [AUTH]', error) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/plugin.js deleted file mode 100644 index e1c4bdff..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/auth-module/lib/module/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import Auth from './auth' - -import './middleware' - -// Active schemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path.replace(/\\/g,'/')}'`).join('\n') %> - -export default function (ctx, inject) { - // Options - const options = <%= JSON.stringify(options.options) %> - - // Create a new Auth instance - const $auth = new Auth(ctx, options) - - // Register strategies - <%= - options.strategies.map(strategy => { - const scheme = 'scheme_' + hash(options.strategyScheme.get(strategy)) - const schemeOptions = JSON.stringify(strategy) - const name = strategy._name - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))` - }).join('\n\n ') - %> - - // Inject it to nuxt context as $auth - inject('auth', $auth) - ctx.$auth = $auth - - // Initialize auth - return $auth.init().catch(error => { - if (process.client) { - console.error('[ERROR] [AUTH]', error) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/.eslintrc.js deleted file mode 100644 index 09c890ce..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - parserOptions: { - }, - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 3ada4d5d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,202 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { - if (!value) { - delete this.defaults.headers[scope][name]; - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest(fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse(fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError(fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError(fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError(fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (let method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = axios => { - for (let key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = axios => { - // request - axios.onRequestError(error => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError(error => { - log('error', 'Response error:', error) - }) - axios.onResponse(res => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = axios => { - // Send credentials only to relative and API Backend requests - axios.onRequest(config => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest(config => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse(response => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError(error => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = e => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common : { - 'Accept': 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (let h of options.proxyHeadersIgnore) { %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/plugin.js deleted file mode 100644 index 3ada4d5d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/axios-module/lib/plugin.js +++ /dev/null @@ -1,202 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { - if (!value) { - delete this.defaults.headers[scope][name]; - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest(fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse(fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError(fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError(fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError(fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (let method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = axios => { - for (let key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = axios => { - // request - axios.onRequestError(error => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError(error => { - log('error', 'Response error:', error) - }) - axios.onResponse(res => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = axios => { - // Send credentials only to relative and API Backend requests - axios.onRequest(config => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest(config => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse(response => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError(error => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = e => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common : { - 'Accept': 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (let h of options.proxyHeadersIgnore) { %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/.eslintrc.js deleted file mode 100644 index d55b0f63..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 5a95bf54..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,95 +0,0 @@ -// these regular expressions are borrowed from below page. -// https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - -// eslint-disable-next-line -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr(0, 4)) -} - -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr(0, 4)) -} - -function isIos (a) { - return /iPad|iPhone|iPod/.test(a) -} - -function isWindows (a) { - return /Windows/.test(a) -} - -function isMacOS (a) { - return /Mac OS X/.test(a) -} - -const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36' - -export default async function (ctx, inject) { - let userAgent = '' - if (typeof ctx.req !== 'undefined') { - userAgent = ctx.req.headers['user-agent'] - } else if (typeof navigator !== 'undefined') { - userAgent = navigator.userAgent - } else { - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>' - <% } else { %> - userAgent = DEFAULT_USER_AGENT - <% } %> - } - // use default user-agent if user-agent header is not sent - if (!userAgent) { - userAgent = DEFAULT_USER_AGENT - } - let mobile = null - let mobileOrTablet = null - let ios = null - let windows = false - let macOS = true - - if (userAgent === 'Amazon CloudFront') { - if (ctx.req.headers['cloudfront-is-mobile-viewer'] === 'true') { - mobile = true - mobileOrTablet = true - } - if (ctx.req.headers['cloudfront-is-tablet-viewer'] === 'true') { - mobile = false - mobileOrTablet = true - } - } else { - mobile = isMobile(userAgent) - mobileOrTablet = isMobileOrTablet(userAgent) - ios = isIos(userAgent) - } - windows = isWindows(userAgent) - macOS = isMacOS(userAgent) - - ctx.isMobile = mobile - ctx.isMobileOrTablet = mobileOrTablet - ctx.isTablet = !mobile && mobileOrTablet - ctx.isDesktop = !mobileOrTablet - ctx.isDesktopOrTablet = !mobile - ctx.isIos = ios - ctx.isWindows = windows - ctx.isMacOS = macOS - inject('device', { - isMobile: mobile, - isMobileOrTablet: mobileOrTablet, - isTablet: !mobile && mobileOrTablet, - isDesktop: !mobileOrTablet, - isIos: ios, - isWindows: windows, - isMacOS: macOS, - isDesktopOrTablet: !mobile - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/plugin.js deleted file mode 100644 index 5a95bf54..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/device-module/lib/plugin.js +++ /dev/null @@ -1,95 +0,0 @@ -// these regular expressions are borrowed from below page. -// https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - -// eslint-disable-next-line -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr(0, 4)) -} - -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr(0, 4)) -} - -function isIos (a) { - return /iPad|iPhone|iPod/.test(a) -} - -function isWindows (a) { - return /Windows/.test(a) -} - -function isMacOS (a) { - return /Mac OS X/.test(a) -} - -const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36' - -export default async function (ctx, inject) { - let userAgent = '' - if (typeof ctx.req !== 'undefined') { - userAgent = ctx.req.headers['user-agent'] - } else if (typeof navigator !== 'undefined') { - userAgent = navigator.userAgent - } else { - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>' - <% } else { %> - userAgent = DEFAULT_USER_AGENT - <% } %> - } - // use default user-agent if user-agent header is not sent - if (!userAgent) { - userAgent = DEFAULT_USER_AGENT - } - let mobile = null - let mobileOrTablet = null - let ios = null - let windows = false - let macOS = true - - if (userAgent === 'Amazon CloudFront') { - if (ctx.req.headers['cloudfront-is-mobile-viewer'] === 'true') { - mobile = true - mobileOrTablet = true - } - if (ctx.req.headers['cloudfront-is-tablet-viewer'] === 'true') { - mobile = false - mobileOrTablet = true - } - } else { - mobile = isMobile(userAgent) - mobileOrTablet = isMobileOrTablet(userAgent) - ios = isIos(userAgent) - } - windows = isWindows(userAgent) - macOS = isMacOS(userAgent) - - ctx.isMobile = mobile - ctx.isMobileOrTablet = mobileOrTablet - ctx.isTablet = !mobile && mobileOrTablet - ctx.isDesktop = !mobileOrTablet - ctx.isDesktopOrTablet = !mobile - ctx.isIos = ios - ctx.isWindows = windows - ctx.isMacOS = macOS - inject('device', { - isMobile: mobile, - isMobileOrTablet: mobileOrTablet, - isTablet: !mobile && mobileOrTablet, - isDesktop: !mobileOrTablet, - isIos: ios, - isWindows: windows, - isMacOS: macOS, - isDesktopOrTablet: !mobile - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/.eslintrc.js deleted file mode 100644 index 6d47a84b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: "module" - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ["standard"], - plugins: ["jest", "vue"], - rules: { - // Allow paren-less arrow functions - "arrow-parens": 0, - // Allow async-await - "generator-star-spacing": 0, - // Allow debugger during development - "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, - // Do not allow console.logs etc... - "no-console": 2 - }, - globals: { - "jest/globals": true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/plugin.template.js deleted file mode 100644 index 750689d2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/all-rules-test/plugin.template.js +++ /dev/null @@ -1,130 +0,0 @@ -import Vue from 'vue' - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - return h( - 'ins', - { - 'class': ['adsbygoogle'], - style: this.adStyle, - attrs: { - 'data-ad-client': this.adClient, - 'data-ad-slot': this.adSlot || null, - 'data-ad-format': this.adFormat, - 'data-ad-region': this.show ? this.adRegion() : null, - 'data-ad-layout': this.adLayout || null, - 'data-ad-layout-key': this.adLayoutKey || null, - 'data-page-url': this.pageUrl ? this.pageUrl : null, - 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, - 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, - 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, - domProps: { - innerHTML: this.show ? '' : ' ' - }, - key: Math.random() - } - ) - }, - props: { - adClient: { - type: String, - default: '<%= options.id %>' - }, - adSlot: { - type: String - }, - adFormat: { - type: String, - default: 'auto' - }, - adLayout: { - type: String - }, - adLayoutKey: { - type: String - }, - adStyle: { - type: Object, - default () { - return { - display: 'block' - } - } - }, - pageUrl: { - type: String - }, - analyticsUacct: { - type: String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - type: String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - type: Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - return { - show: true - } - }, - mounted () { - this.showAd() - }, - watch: { - '$route' (to, from) { - if (to.fullPath === from.fullPath) { - return; - } - const keys = Object.keys - const toQuery = to.query - const fromQuery = from.query - let changed = false - if (to.path !== from.path) { - changed = true - } else if (this.includeQuery) { - // If we include query params, check to see if they are loosely unequal - changed = (keys(toQuery).length !== keys(fromQuery).length) || !keys(toQuery).every(k => toQuery[k] === fromQuery[k]) - } - if (changed) { - // If the route has changed, update the ad - this.updateAd() - } - } - }, - methods: { - adRegion () { - return 'page-' + Math.random() - }, - updateAd () { - if (this.isServer) { - return - } - // Reset the INS element - this.show = false - // Show new ad on nextTick - this.$nextTick(this.showAd) - }, - showAd () { - this.show = true - this.$nextTick(() => { - try { - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}) - } catch (error) { - console.error(error) - } - }) - } - } -} - -// Register our ad component under the desired tag name -Vue.component('<%= options.tag %>', adsbygoogle) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/plugin.template.js deleted file mode 100644 index 750689d2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-adsense-module/lib/plugin.template.js +++ /dev/null @@ -1,130 +0,0 @@ -import Vue from 'vue' - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - return h( - 'ins', - { - 'class': ['adsbygoogle'], - style: this.adStyle, - attrs: { - 'data-ad-client': this.adClient, - 'data-ad-slot': this.adSlot || null, - 'data-ad-format': this.adFormat, - 'data-ad-region': this.show ? this.adRegion() : null, - 'data-ad-layout': this.adLayout || null, - 'data-ad-layout-key': this.adLayoutKey || null, - 'data-page-url': this.pageUrl ? this.pageUrl : null, - 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, - 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, - 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, - domProps: { - innerHTML: this.show ? '' : ' ' - }, - key: Math.random() - } - ) - }, - props: { - adClient: { - type: String, - default: '<%= options.id %>' - }, - adSlot: { - type: String - }, - adFormat: { - type: String, - default: 'auto' - }, - adLayout: { - type: String - }, - adLayoutKey: { - type: String - }, - adStyle: { - type: Object, - default () { - return { - display: 'block' - } - } - }, - pageUrl: { - type: String - }, - analyticsUacct: { - type: String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - type: String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - type: Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - return { - show: true - } - }, - mounted () { - this.showAd() - }, - watch: { - '$route' (to, from) { - if (to.fullPath === from.fullPath) { - return; - } - const keys = Object.keys - const toQuery = to.query - const fromQuery = from.query - let changed = false - if (to.path !== from.path) { - changed = true - } else if (this.includeQuery) { - // If we include query params, check to see if they are loosely unequal - changed = (keys(toQuery).length !== keys(fromQuery).length) || !keys(toQuery).every(k => toQuery[k] === fromQuery[k]) - } - if (changed) { - // If the route has changed, update the ad - this.updateAd() - } - } - }, - methods: { - adRegion () { - return 'page-' + Math.random() - }, - updateAd () { - if (this.isServer) { - return - } - // Reset the INS element - this.show = false - // Show new ad on nextTick - this.$nextTick(this.showAd) - }, - showAd () { - this.show = true - this.$nextTick(() => { - try { - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}) - } catch (error) { - console.error(error) - } - }) - } - } -} - -// Register our ad component under the desired tag name -Vue.component('<%= options.tag %>', adsbygoogle) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/.eslintrc.js deleted file mode 100644 index 322f7df8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/plugin.js deleted file mode 100644 index 73e35233..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,132 +0,0 @@ -import weightedRandom from 'weighted-random' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' - -import experiments from '<%= options.experimentsDir %>' -const MAX_AGE = <%= options.maxAge %> - -export default function (ctx, inject) { - // Assign experiment and variant to user - assignExperiment(ctx) - - // Google optimize integration - googleOptimize(ctx) - - // Inject $exp - inject('exp', ctx.experiment) -} - -function assignExperiment(ctx) { - // Choose experiment and variant - let experimentIndex = -1 - let experiment = {} - let variantIndexes = [] - let classes = [] - - // Try to restore from cookie - const cookie = getCookie(ctx, 'exp') || '' // experimentID.var1-var2 - const [cookieExp, cookieVars] = cookie.split('.') - if (cookieExp && cookieVars) { - // Try to find experiment with that id - experimentIndex = experiments.findIndex(exp => exp.experimentID === cookieExp) - experiment = experiments[experimentIndex] - - // Variant indexes - variantIndexes = cookieVars.split('-').map(v => parseInt(v)) - } - - // Choose one experiment - const experimentWeights = experiments.map(exp => exp.weight === undefined ? 1 : exp.weight) - let retries = experiments.length - while (experimentIndex === -1 && retries-- > 0) { - experimentIndex = weightedRandom(experimentWeights) - experiment = experiments[experimentIndex] - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === 'function') { - if (!experiment.isEligible(ctx)) { - // Try another one - experimentWeights[experimentIndex] = 0 - experimentIndex = -1 - } - } - } - - if (experimentIndex !== -1) { - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter(index => experiment.variants[index]) - - // Choose enough variants - const variantWeights = experiment.variants.map(variant => variant.weight === undefined ? 1 : variant.weight) - while (variantIndexes.length < (experiment.sections || 1)) { - const index = weightedRandom(variantWeights) - variantWeights[index] = 0 - variantIndexes.push(index) - } - - // Write exp cookie if changed - const expCookie = experiment.experimentID + '.' + variantIndexes.join('-') - if (cookie !== expCookie) { - setCookie(ctx, 'exp', expCookie, experiment.maxAge) - } - - // Compute global classes to be injected - classes = variantIndexes.map(index => 'exp-' + experiment.name + '-' + index) - } else { - // No active experiment - experiment = {} - variantIndexes = [] - classes = [] - } - - ctx.experiment = { - $experimentIndex: experimentIndex, - $variantIndexes: variantIndexes, - $activeVariants: variantIndexes.map(index => experiment.variants[index]), - $classes: classes, - ...experiment - } -} - -function getCookie(ctx, name) { - if (process.server && !ctx.req) { - return - } - - // Get and parse cookies - const cookieStr = process.client ? document.cookie : ctx.req.headers.cookie - const cookies = parseCookie(cookieStr || '') || {} - - return cookies[name] -} - -function setCookie(ctx, name, value, maxAge = MAX_AGE) { - const serializedCookie = serializeCookie(name, value, { - path: '/', - maxAge - }) - - if (process.client) { - // Set in browser - document.cookie = serializedCookie - } else if (process.server && ctx.res) { - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader('Set-Cookie') - let value = serializedCookie - if (prev) { - value = Array.isArray(prev) ? prev.concat(serializedCookie) - : [prev, serializedCookie] - } - ctx.res.setHeader('Set-Cookie', value) - } -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize({ experiment }) { - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - return - } - - const exp = experiment.experimentID + '.' + experiment.$variantIndexes.join('-') - - window.ga('set', 'exp', exp) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/plugin.js deleted file mode 100644 index 73e35233..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/google-optimize/lib/plugin.js +++ /dev/null @@ -1,132 +0,0 @@ -import weightedRandom from 'weighted-random' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' - -import experiments from '<%= options.experimentsDir %>' -const MAX_AGE = <%= options.maxAge %> - -export default function (ctx, inject) { - // Assign experiment and variant to user - assignExperiment(ctx) - - // Google optimize integration - googleOptimize(ctx) - - // Inject $exp - inject('exp', ctx.experiment) -} - -function assignExperiment(ctx) { - // Choose experiment and variant - let experimentIndex = -1 - let experiment = {} - let variantIndexes = [] - let classes = [] - - // Try to restore from cookie - const cookie = getCookie(ctx, 'exp') || '' // experimentID.var1-var2 - const [cookieExp, cookieVars] = cookie.split('.') - if (cookieExp && cookieVars) { - // Try to find experiment with that id - experimentIndex = experiments.findIndex(exp => exp.experimentID === cookieExp) - experiment = experiments[experimentIndex] - - // Variant indexes - variantIndexes = cookieVars.split('-').map(v => parseInt(v)) - } - - // Choose one experiment - const experimentWeights = experiments.map(exp => exp.weight === undefined ? 1 : exp.weight) - let retries = experiments.length - while (experimentIndex === -1 && retries-- > 0) { - experimentIndex = weightedRandom(experimentWeights) - experiment = experiments[experimentIndex] - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === 'function') { - if (!experiment.isEligible(ctx)) { - // Try another one - experimentWeights[experimentIndex] = 0 - experimentIndex = -1 - } - } - } - - if (experimentIndex !== -1) { - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter(index => experiment.variants[index]) - - // Choose enough variants - const variantWeights = experiment.variants.map(variant => variant.weight === undefined ? 1 : variant.weight) - while (variantIndexes.length < (experiment.sections || 1)) { - const index = weightedRandom(variantWeights) - variantWeights[index] = 0 - variantIndexes.push(index) - } - - // Write exp cookie if changed - const expCookie = experiment.experimentID + '.' + variantIndexes.join('-') - if (cookie !== expCookie) { - setCookie(ctx, 'exp', expCookie, experiment.maxAge) - } - - // Compute global classes to be injected - classes = variantIndexes.map(index => 'exp-' + experiment.name + '-' + index) - } else { - // No active experiment - experiment = {} - variantIndexes = [] - classes = [] - } - - ctx.experiment = { - $experimentIndex: experimentIndex, - $variantIndexes: variantIndexes, - $activeVariants: variantIndexes.map(index => experiment.variants[index]), - $classes: classes, - ...experiment - } -} - -function getCookie(ctx, name) { - if (process.server && !ctx.req) { - return - } - - // Get and parse cookies - const cookieStr = process.client ? document.cookie : ctx.req.headers.cookie - const cookies = parseCookie(cookieStr || '') || {} - - return cookies[name] -} - -function setCookie(ctx, name, value, maxAge = MAX_AGE) { - const serializedCookie = serializeCookie(name, value, { - path: '/', - maxAge - }) - - if (process.client) { - // Set in browser - document.cookie = serializedCookie - } else if (process.server && ctx.res) { - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader('Set-Cookie') - let value = serializedCookie - if (prev) { - value = Array.isArray(prev) ? prev.concat(serializedCookie) - : [prev, serializedCookie] - } - ctx.res.setHeader('Set-Cookie', value) - } -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize({ experiment }) { - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - return - } - - const exp = experiment.experimentID + '.' + experiment.$variantIndexes.join('-') - - window.ga('set', 'exp', exp) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/.eslintrc.js deleted file mode 100644 index de536ec9..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/.eslintrc.js +++ /dev/null @@ -1,45 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 1, - // Disalow semicolons - 'semi': ['error', 'never'] - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - ecmaVersion: 2022 - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/main.js deleted file mode 100644 index c8dbce93..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/main.js +++ /dev/null @@ -1,260 +0,0 @@ -import Cookie from 'cookie' -import JsCookie from 'js-cookie' -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import { nuxtI18nSeo } from './seo-head' -import { validateRouteParams } from './utils' - -Vue.use(VueI18n) - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const lazy = <%= options.lazy %> -const vuex = <%= JSON.stringify(options.vuex) %> -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %> -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - -export default async (context) => { - const { app, route, store, req, res, redirect } = context - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const getHostname = <%= options.getHostname %> - const getForwarded = <%= options.getForwarded %> - const getLocaleDomain = <%= options.getLocaleDomain %> - const syncVuex = <%= options.syncVuex %> - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - store.registerModule(vuex.moduleName, { - namespaced: true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>locale: '',<% } %> - <% if (options.vuex.syncMessages) { %>messages: {},<% } %> - <% if (options.vuex.syncRouteParams) { %>routeParams: {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({ commit }, locale) { - commit('setLocale', locale) - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({ commit }, messages) { - commit('setMessages', messages) - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({ commit }, params) { - if (process.env.NODE_ENV === 'development') { - validateRouteParams(params) - } - commit('setRouteParams', params) - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - state.locale = locale - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - state.messages = messages - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - state.routeParams = params - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - localeRouteParams: ({ routeParams }) => locale => routeParams[locale] || {} - <% } %> - } - }, { preserveState: !!store.state[vuex.moduleName] }) - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - const { useCookie, cookieKey } = detectBrowserLanguage - - const getLocaleCookie = () => { - if (useCookie) { - if (process.client) { - return JsCookie.get(cookieKey) - } else if (req && typeof req.headers.cookie !== 'undefined') { - const cookies = req.headers && req.headers.cookie ? Cookie.parse(req.headers.cookie) : {} - return cookies[cookieKey] - } - } - } - - const setLocaleCookie = locale => { - if (!useCookie) { - return - } - const date = new Date() - if (process.client) { - JsCookie.set(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - } else if (res) { - let headers = res.getHeader('Set-Cookie') || [] - if (typeof headers == 'string') { - headers = [headers] - } - - const redirectCookie = Cookie.serialize(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - headers.push(redirectCookie) - - res.setHeader('Set-Cookie', headers) - } - } - - const loadAndSetLocale = async (newLocale, { initialSetup = false } = {}) => { - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - return - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - return - } - - const oldLocale = app.i18n.locale - - if (!initialSetup) { - app.i18n.beforeLanguageSwitch(oldLocale, newLocale) - - if (useCookie) { - app.i18n.setLocaleCookie(newLocale) - } - } - - // Lazy-loading enabled - if (lazy) { - const { loadLanguageAsync } = require('./utils') - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - await loadLanguageAsync(context, app.i18n.fallbackLocale) - } - - await loadLanguageAsync(context, newLocale) - } - - app.i18n.locale = newLocale - - if (!initialSetup) { - app.i18n.onLanguageSwitched(oldLocale, newLocale) - } - - await syncVuex(newLocale, app.i18n.getLocaleMessage(newLocale)) - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - const route = app.i18n.__route - const routeName = route && route.name ? app.getRouteBaseName(route) : 'index' - const redirectPath = app.localePath(Object.assign({}, route, { name: routeName }), newLocale) - - if (route && route.path !== redirectPath) { - redirect(redirectPath) - } - } - } - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>) - app.i18n.locales = <%= JSON.stringify(options.locales) %> - app.i18n.defaultLocale = '<%= options.defaultLocale %>' - app.i18n.differentDomains = <%= options.differentDomains %> - app.i18n.forwardedHost = <%= options.forwardedHost %> - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %> - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %> - app.i18n.setLocaleCookie = setLocaleCookie - app.i18n.getLocaleCookie = getLocaleCookie - app.i18n.setLocale = (locale) => loadAndSetLocale(locale) - - // Current route. Updated from middleware also. - app.i18n.__route = route - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo - - if (store && store.state.localeDomains) { - app.i18n.locales.forEach(locale => { - locale.domain = store.state.localeDomains[locale.code] - }) - } - - let locale = app.i18n.defaultLocale || null - - if (app.i18n.differentDomains) { - const domainLocale = getLocaleDomain() - locale = domainLocale ? domainLocale : locale - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, app.i18n.locales) - locale = routeLocale ? routeLocale : locale - } else if (useCookie) { - locale = getLocaleCookie() || locale - } - - await loadAndSetLocale(locale, { initialSetup: true }) - - app.i18n.__detectBrowserLanguage = async route => { - const { alwaysRedirect, fallbackLocale } = detectBrowserLanguage - - if (detectBrowserLanguage) { - let browserLocale - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== '1') { - // Get preferred language from cookie if present and enabled - // Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - } else if (process.client && typeof navigator !== 'undefined' && navigator.language) { - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring(0, 2) - } else if (req && typeof req.headers['accept-language'] !== 'undefined') { - browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) - } - - if (browserLocale) { - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - let redirectToLocale = fallbackLocale - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - redirectToLocale = browserLocale - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - if (redirectToLocale !== app.i18n.locale) { - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale) - } else if (useCookie && !getLocaleCookie()) { - app.i18n.setLocaleCookie(redirectToLocale) - } - } - - return true - } - } - } - - return false - } - - await app.i18n.__detectBrowserLanguage(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/routing.js deleted file mode 100644 index 54cd79af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/routing.js +++ /dev/null @@ -1,138 +0,0 @@ -import './middleware' -import Vue from 'vue' - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const vuex = <%= JSON.stringify(options.vuex) %> -const routesNameSeparator = '<%= options.routesNameSeparator %>' -const defaultLocale = '<%= options.defaultLocale %>' - -function localePathFactory (i18nPath, routerPath) { - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - return function localePath (route, locale) { - // Abort if no route or no locale - if (!route) return - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy') - } - - locale = locale || this[i18nPath].locale - - if (!locale) return - - // If route parameters is a string, use it as the route's name - if (typeof route === 'string') { - route = { name: route } - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX ? '' : routesNameSeparator + locale) - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - name += routesNameSeparator + defaultLocaleRouteNameSuffix - } - - const localizedRoute = Object.assign({}, route, { name }) - - const { params } = localizedRoute - if (params && params['0'] === undefined && params.pathMatch) { - params['0'] = params.pathMatch - } - - // Resolve localized route - const router = this[routerPath] - const { route: { fullPath } } = router.resolve(localizedRoute) - return fullPath - } -} - - -function switchLocalePathFactory (i18nPath) { - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - - return function switchLocalePath (locale) { - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy') - } - - const name = this.getRouteBaseName() - if (!name) { - return '' - } - - const { params, ...routeCopy } = this.$route - let langSwitchParams = {} - <% if (options.vuex) { %> - if (this.$store) { - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale) - } - <% } %> - const baseRoute = Object.assign({}, routeCopy, { - name, - params: { - ...params, - ...langSwitchParams, - '0': params.pathMatch - } - }) - let path = this.localePath(baseRoute, locale) - - // Handle different domains - if (this[i18nPath].differentDomains) { - const lang = this[i18nPath].locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (lang && lang[LOCALE_DOMAIN_KEY]) { - let protocol - if (process.server) { - const isHTTPS = require('is-https'); - const { req } = this.$options._parentVnode.ssrContext - protocol = isHTTPS(req) ? 'https' : 'http' - } else { - protocol = window.location.protocol.split(':')[0] - } - path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale) - } - } - return path - } -} - -function getRouteBaseNameFactory (contextRoute) { - - const routeGetter = contextRoute ? route => route || contextRoute : - function (route) { - return route || this.$route - } - - return function getRouteBaseName (route) { - route = routeGetter.call(this, route) - if (!route.name) { - return null - } - return route.name.split(routesNameSeparator)[0] - } -} - -const plugin = { - install(Vue) { - Vue.mixin({ - methods: { - localePath: localePathFactory('$i18n', '$router'), - switchLocalePath: switchLocalePathFactory('$i18n'), - getRouteBaseName: getRouteBaseNameFactory() - } - }) - } -} - -export default ({ app, route }) => { - Vue.use(plugin) - app.localePath = localePathFactory('i18n', 'router') - app.switchLocalePath = switchLocalePathFactory('i18n') - app.getRouteBaseName = getRouteBaseNameFactory(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/seo.js deleted file mode 100644 index 5f771822..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/all-rules-test/seo.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from 'vue' -import { nuxtI18nSeo } from './seo-head' - -const plugin = { - install(Vue) { - Vue.mixin({ - head: nuxtI18nSeo - }) - } -} - -Vue.use(plugin) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/main.js deleted file mode 100644 index c8dbce93..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/main.js +++ /dev/null @@ -1,260 +0,0 @@ -import Cookie from 'cookie' -import JsCookie from 'js-cookie' -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import { nuxtI18nSeo } from './seo-head' -import { validateRouteParams } from './utils' - -Vue.use(VueI18n) - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const lazy = <%= options.lazy %> -const vuex = <%= JSON.stringify(options.vuex) %> -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %> -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - -export default async (context) => { - const { app, route, store, req, res, redirect } = context - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const getHostname = <%= options.getHostname %> - const getForwarded = <%= options.getForwarded %> - const getLocaleDomain = <%= options.getLocaleDomain %> - const syncVuex = <%= options.syncVuex %> - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - store.registerModule(vuex.moduleName, { - namespaced: true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>locale: '',<% } %> - <% if (options.vuex.syncMessages) { %>messages: {},<% } %> - <% if (options.vuex.syncRouteParams) { %>routeParams: {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({ commit }, locale) { - commit('setLocale', locale) - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({ commit }, messages) { - commit('setMessages', messages) - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({ commit }, params) { - if (process.env.NODE_ENV === 'development') { - validateRouteParams(params) - } - commit('setRouteParams', params) - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - state.locale = locale - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - state.messages = messages - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - state.routeParams = params - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - localeRouteParams: ({ routeParams }) => locale => routeParams[locale] || {} - <% } %> - } - }, { preserveState: !!store.state[vuex.moduleName] }) - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - const { useCookie, cookieKey } = detectBrowserLanguage - - const getLocaleCookie = () => { - if (useCookie) { - if (process.client) { - return JsCookie.get(cookieKey) - } else if (req && typeof req.headers.cookie !== 'undefined') { - const cookies = req.headers && req.headers.cookie ? Cookie.parse(req.headers.cookie) : {} - return cookies[cookieKey] - } - } - } - - const setLocaleCookie = locale => { - if (!useCookie) { - return - } - const date = new Date() - if (process.client) { - JsCookie.set(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - } else if (res) { - let headers = res.getHeader('Set-Cookie') || [] - if (typeof headers == 'string') { - headers = [headers] - } - - const redirectCookie = Cookie.serialize(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - headers.push(redirectCookie) - - res.setHeader('Set-Cookie', headers) - } - } - - const loadAndSetLocale = async (newLocale, { initialSetup = false } = {}) => { - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - return - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - return - } - - const oldLocale = app.i18n.locale - - if (!initialSetup) { - app.i18n.beforeLanguageSwitch(oldLocale, newLocale) - - if (useCookie) { - app.i18n.setLocaleCookie(newLocale) - } - } - - // Lazy-loading enabled - if (lazy) { - const { loadLanguageAsync } = require('./utils') - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - await loadLanguageAsync(context, app.i18n.fallbackLocale) - } - - await loadLanguageAsync(context, newLocale) - } - - app.i18n.locale = newLocale - - if (!initialSetup) { - app.i18n.onLanguageSwitched(oldLocale, newLocale) - } - - await syncVuex(newLocale, app.i18n.getLocaleMessage(newLocale)) - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - const route = app.i18n.__route - const routeName = route && route.name ? app.getRouteBaseName(route) : 'index' - const redirectPath = app.localePath(Object.assign({}, route, { name: routeName }), newLocale) - - if (route && route.path !== redirectPath) { - redirect(redirectPath) - } - } - } - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>) - app.i18n.locales = <%= JSON.stringify(options.locales) %> - app.i18n.defaultLocale = '<%= options.defaultLocale %>' - app.i18n.differentDomains = <%= options.differentDomains %> - app.i18n.forwardedHost = <%= options.forwardedHost %> - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %> - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %> - app.i18n.setLocaleCookie = setLocaleCookie - app.i18n.getLocaleCookie = getLocaleCookie - app.i18n.setLocale = (locale) => loadAndSetLocale(locale) - - // Current route. Updated from middleware also. - app.i18n.__route = route - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo - - if (store && store.state.localeDomains) { - app.i18n.locales.forEach(locale => { - locale.domain = store.state.localeDomains[locale.code] - }) - } - - let locale = app.i18n.defaultLocale || null - - if (app.i18n.differentDomains) { - const domainLocale = getLocaleDomain() - locale = domainLocale ? domainLocale : locale - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, app.i18n.locales) - locale = routeLocale ? routeLocale : locale - } else if (useCookie) { - locale = getLocaleCookie() || locale - } - - await loadAndSetLocale(locale, { initialSetup: true }) - - app.i18n.__detectBrowserLanguage = async route => { - const { alwaysRedirect, fallbackLocale } = detectBrowserLanguage - - if (detectBrowserLanguage) { - let browserLocale - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== '1') { - // Get preferred language from cookie if present and enabled - // Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - } else if (process.client && typeof navigator !== 'undefined' && navigator.language) { - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring(0, 2) - } else if (req && typeof req.headers['accept-language'] !== 'undefined') { - browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) - } - - if (browserLocale) { - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - let redirectToLocale = fallbackLocale - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - redirectToLocale = browserLocale - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - if (redirectToLocale !== app.i18n.locale) { - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale) - } else if (useCookie && !getLocaleCookie()) { - app.i18n.setLocaleCookie(redirectToLocale) - } - } - - return true - } - } - } - - return false - } - - await app.i18n.__detectBrowserLanguage(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/routing.js deleted file mode 100644 index 54cd79af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/routing.js +++ /dev/null @@ -1,138 +0,0 @@ -import './middleware' -import Vue from 'vue' - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const vuex = <%= JSON.stringify(options.vuex) %> -const routesNameSeparator = '<%= options.routesNameSeparator %>' -const defaultLocale = '<%= options.defaultLocale %>' - -function localePathFactory (i18nPath, routerPath) { - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - return function localePath (route, locale) { - // Abort if no route or no locale - if (!route) return - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy') - } - - locale = locale || this[i18nPath].locale - - if (!locale) return - - // If route parameters is a string, use it as the route's name - if (typeof route === 'string') { - route = { name: route } - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX ? '' : routesNameSeparator + locale) - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - name += routesNameSeparator + defaultLocaleRouteNameSuffix - } - - const localizedRoute = Object.assign({}, route, { name }) - - const { params } = localizedRoute - if (params && params['0'] === undefined && params.pathMatch) { - params['0'] = params.pathMatch - } - - // Resolve localized route - const router = this[routerPath] - const { route: { fullPath } } = router.resolve(localizedRoute) - return fullPath - } -} - - -function switchLocalePathFactory (i18nPath) { - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - - return function switchLocalePath (locale) { - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy') - } - - const name = this.getRouteBaseName() - if (!name) { - return '' - } - - const { params, ...routeCopy } = this.$route - let langSwitchParams = {} - <% if (options.vuex) { %> - if (this.$store) { - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale) - } - <% } %> - const baseRoute = Object.assign({}, routeCopy, { - name, - params: { - ...params, - ...langSwitchParams, - '0': params.pathMatch - } - }) - let path = this.localePath(baseRoute, locale) - - // Handle different domains - if (this[i18nPath].differentDomains) { - const lang = this[i18nPath].locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (lang && lang[LOCALE_DOMAIN_KEY]) { - let protocol - if (process.server) { - const isHTTPS = require('is-https'); - const { req } = this.$options._parentVnode.ssrContext - protocol = isHTTPS(req) ? 'https' : 'http' - } else { - protocol = window.location.protocol.split(':')[0] - } - path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale) - } - } - return path - } -} - -function getRouteBaseNameFactory (contextRoute) { - - const routeGetter = contextRoute ? route => route || contextRoute : - function (route) { - return route || this.$route - } - - return function getRouteBaseName (route) { - route = routeGetter.call(this, route) - if (!route.name) { - return null - } - return route.name.split(routesNameSeparator)[0] - } -} - -const plugin = { - install(Vue) { - Vue.mixin({ - methods: { - localePath: localePathFactory('$i18n', '$router'), - switchLocalePath: switchLocalePathFactory('$i18n'), - getRouteBaseName: getRouteBaseNameFactory() - } - }) - } -} - -export default ({ app, route }) => { - Vue.use(plugin) - app.localePath = localePathFactory('i18n', 'router') - app.switchLocalePath = switchLocalePathFactory('i18n') - app.getRouteBaseName = getRouteBaseNameFactory(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/seo.js deleted file mode 100644 index 5f771822..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/plugins/seo.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from 'vue' -import { nuxtI18nSeo } from './seo-head' - -const plugin = { - install(Vue) { - Vue.mixin({ - head: nuxtI18nSeo - }) - } -} - -Vue.use(plugin) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 593e1262..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/middleware.js deleted file mode 100644 index ebe71f23..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/middleware.js +++ /dev/null @@ -1,39 +0,0 @@ -import middleware from '../middleware' - -middleware['i18n'] = async (context) => { - const { app, req, route, redirect, isHMR } = context - - if (isHMR) { - return - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - const getLocaleCodes = <%= options.getLocaleCodes %> - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>' - if (route.path === '/' && rootRedirect) { - redirect('/' + rootRedirect, route.query) - return - } - - // Update for setLocale to have up to date route - app.i18n.__route = route - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - return - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, locales) - - await app.i18n.setLocale(routeLocale ? routeLocale : locale) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/options.js deleted file mode 100644 index 765624e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/options.js +++ /dev/null @@ -1,15 +0,0 @@ -<% -function stringifyValue(value) { - if (typeof value === 'string') { - return `'${value}'` - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value); - } else { - return JSON.stringify(value) - } -} - -for (const [key, value] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/seo-head.js deleted file mode 100644 index 933e3e4d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/seo-head.js +++ /dev/null @@ -1,88 +0,0 @@ -import VueMeta from 'vue-meta' - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>' -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>' -const BASE_URL = '<%= options.baseUrl %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' - -export const nuxtI18nSeo = function () { - if ( - !(VueMeta.hasMetaInfo ? VueMeta.hasMetaInfo(this) : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - (this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false) - ) { - return {}; - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale) - const htmlAttrs = {} - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY] - } - - const link = [] - // hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - link.push(...this.$i18n.locales - .map(locale => { - if (locale[LOCALE_ISO_KEY]) { - return { - hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY], - rel: 'alternate', - href: BASE_URL + this.switchLocalePath(locale.code), - hreflang: locale[LOCALE_ISO_KEY] - } - } else { - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link') - return null - } - }) - .filter(item => !!item)) - } - - // canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]) - if (canonicalPath && canonicalPath !== this.$route.path) { - // Current page is not the canonical one -- add a canonical link - link.push({ - hid: 'canonical-lang-' + currentLocaleData[LOCALE_CODE_KEY], - rel: 'canonical', - href: BASE_URL + canonicalPath - }) - } - } - - // og:locale meta - const meta = [] - // og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - meta.push({ - hid: 'og:locale', - property: 'og:locale', - // Replace dash with underscore as defined in spec: language_TERRITORY - content: currentLocaleData[LOCALE_ISO_KEY].replace(/-/g, '_') - }) - } - // og:locale - alternate - meta.push( - ...this.$i18n.locales - .filter(l => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]) - .map(locale => ({ - hid: 'og:locale:alternate-' + locale[LOCALE_ISO_KEY], - property: 'og:locale:alternate', - content: locale[LOCALE_ISO_KEY].replace(/-/g, '_') - })) - ); - - return { - htmlAttrs, - link, - meta - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/utils.js deleted file mode 100644 index 8a50f52e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/all-rules-test/utils.js +++ /dev/null @@ -1,61 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>' -const getLocaleCodes = <%= options.getLocaleCodes %> -const locales = <%= JSON.stringify(options.locales) %> -const localeCodes = getLocaleCodes(locales) - -const isObject = value => value && !Array.isArray(value) && typeof value === 'object' - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - const { app } = context; - - if (!app.i18n.loadedLanguages) { - app.i18n.loadedLanguages = [] - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - const langOptions = app.i18n.locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (langOptions) { - const file = langOptions[LOCALE_FILE_KEY] - if (file) { - <% if (options.langDir) { %> - try { - const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file) - const messages = module.default ? module.default : module - const result = typeof messages === 'function' ? await Promise.resolve(messages(context)) : messages - app.i18n.setLocaleMessage(locale, result) - app.i18n.loadedLanguages.push(locale) - } catch (error) { - console.error(error) - } - <% } %> - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale) - } - } - } -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = routeParams => { - if (!isObject(routeParams)) { - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`) - return - } - Object.entries(routeParams).forEach(([key, value]) => { - if (!localeCodes.includes(key)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`) - } else if (!isObject(value)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/middleware.js deleted file mode 100644 index ebe71f23..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/middleware.js +++ /dev/null @@ -1,39 +0,0 @@ -import middleware from '../middleware' - -middleware['i18n'] = async (context) => { - const { app, req, route, redirect, isHMR } = context - - if (isHMR) { - return - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - const getLocaleCodes = <%= options.getLocaleCodes %> - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>' - if (route.path === '/' && rootRedirect) { - redirect('/' + rootRedirect, route.query) - return - } - - // Update for setLocale to have up to date route - app.i18n.__route = route - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - return - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, locales) - - await app.i18n.setLocale(routeLocale ? routeLocale : locale) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/options.js deleted file mode 100644 index 765624e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/options.js +++ /dev/null @@ -1,15 +0,0 @@ -<% -function stringifyValue(value) { - if (typeof value === 'string') { - return `'${value}'` - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value); - } else { - return JSON.stringify(value) - } -} - -for (const [key, value] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/seo-head.js deleted file mode 100644 index 933e3e4d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/seo-head.js +++ /dev/null @@ -1,88 +0,0 @@ -import VueMeta from 'vue-meta' - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>' -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>' -const BASE_URL = '<%= options.baseUrl %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' - -export const nuxtI18nSeo = function () { - if ( - !(VueMeta.hasMetaInfo ? VueMeta.hasMetaInfo(this) : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - (this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false) - ) { - return {}; - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale) - const htmlAttrs = {} - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY] - } - - const link = [] - // hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - link.push(...this.$i18n.locales - .map(locale => { - if (locale[LOCALE_ISO_KEY]) { - return { - hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY], - rel: 'alternate', - href: BASE_URL + this.switchLocalePath(locale.code), - hreflang: locale[LOCALE_ISO_KEY] - } - } else { - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link') - return null - } - }) - .filter(item => !!item)) - } - - // canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]) - if (canonicalPath && canonicalPath !== this.$route.path) { - // Current page is not the canonical one -- add a canonical link - link.push({ - hid: 'canonical-lang-' + currentLocaleData[LOCALE_CODE_KEY], - rel: 'canonical', - href: BASE_URL + canonicalPath - }) - } - } - - // og:locale meta - const meta = [] - // og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - meta.push({ - hid: 'og:locale', - property: 'og:locale', - // Replace dash with underscore as defined in spec: language_TERRITORY - content: currentLocaleData[LOCALE_ISO_KEY].replace(/-/g, '_') - }) - } - // og:locale - alternate - meta.push( - ...this.$i18n.locales - .filter(l => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]) - .map(locale => ({ - hid: 'og:locale:alternate-' + locale[LOCALE_ISO_KEY], - property: 'og:locale:alternate', - content: locale[LOCALE_ISO_KEY].replace(/-/g, '_') - })) - ); - - return { - htmlAttrs, - link, - meta - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/utils.js deleted file mode 100644 index 8a50f52e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-i18n/src/templates/utils.js +++ /dev/null @@ -1,61 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>' -const getLocaleCodes = <%= options.getLocaleCodes %> -const locales = <%= JSON.stringify(options.locales) %> -const localeCodes = getLocaleCodes(locales) - -const isObject = value => value && !Array.isArray(value) && typeof value === 'object' - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - const { app } = context; - - if (!app.i18n.loadedLanguages) { - app.i18n.loadedLanguages = [] - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - const langOptions = app.i18n.locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (langOptions) { - const file = langOptions[LOCALE_FILE_KEY] - if (file) { - <% if (options.langDir) { %> - try { - const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file) - const messages = module.default ? module.default : module - const result = typeof messages === 'function' ? await Promise.resolve(messages(context)) : messages - app.i18n.setLocaleMessage(locale, result) - app.i18n.loadedLanguages.push(locale) - } catch (error) { - console.error(error) - } - <% } %> - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale) - } - } - } -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = routeParams => { - if (!isObject(routeParams)) { - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`) - return - } - Object.entries(routeParams).forEach(([key, value]) => { - if (!localeCodes.includes(key)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`) - } else if (!isObject(value)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/.eslintrc.js deleted file mode 100644 index 322f7df8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/plugin.js deleted file mode 100644 index 95e54670..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -import LogRocket from 'logrocket'; -import createPlugin from 'logrocket-vuex'; - -const LOGROCKET_ID = '<%= options.logRocketId %>' -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %> - -export default function ({ app, store }, inject) { - // variable for detecting production mode - const isProduction = process.env.NODE_ENV === 'production'; - // only run on browser and when in production mode - // or when the developer enables devModeAllowed - if (LOGROCKET_ID && ((process.client && isProduction) || DEV_MODE_ALLOWED)) { - // initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID); - } - // if nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - const logrocketPlugin = createPlugin(LogRocket); - // add plugin to vuex store - logrocketPlugin(store); - } - // globally inject LogRocket instance - inject('logRocket', LogRocket); -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/plugin.js deleted file mode 100644 index 95e54670..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxt-logrocket/lib/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -import LogRocket from 'logrocket'; -import createPlugin from 'logrocket-vuex'; - -const LOGROCKET_ID = '<%= options.logRocketId %>' -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %> - -export default function ({ app, store }, inject) { - // variable for detecting production mode - const isProduction = process.env.NODE_ENV === 'production'; - // only run on browser and when in production mode - // or when the developer enables devModeAllowed - if (LOGROCKET_ID && ((process.client && isProduction) || DEV_MODE_ALLOWED)) { - // initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID); - } - // if nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - const logrocketPlugin = createPlugin(LogRocket); - // add plugin to vuex store - logrocketPlugin(store); - } - // globally inject LogRocket instance - inject('logRocket', LogRocket); -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/.eslintrc.js deleted file mode 100644 index 0d0120af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/.eslintrc.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = { - 'root': true, - 'parserOptions': { - 'ecmaVersion': 9, - 'sourceType': 'module' - }, - 'env': { - 'node': true, - 'es6': true, - 'jest': true - }, - 'plugins': [ - 'unicorn' - ], - 'extends': [ - 'standard', - 'plugin:unicorn/recommended', - // 'prettier/unicorn', - // 'prettier/standard' - 'prettier' - ], - 'rules': { - 'curly': [ - 'error', - 'all' - ], - 'no-console': 1, - 'no-debugger': 1, - 'valid-jsdoc': ['error'], - 'space-before-function-paren': 0, - }, - 'globals': { - 'jest/globals': true, - 'jasmine': true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js deleted file mode 100644 index 899f9dc2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Vue from 'vue' - -import { - interopDefault -} from './utils' - -const mdComps = { - <% options.components.forEach(([relativePath, filePath]) => { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),` - )}) -%> -} - - -Vue.component('nuxtent-body', { - name: 'NuxtentBody', - render(createElement) { - const body = this.body || '' - const tag = this.tag - - const dataObject = { - props: { - tag - }, - on: this.$listeners, - domProps: {}, - } - if (typeof body === 'object') { - if (body.relativePath) { - const MarkdownComponent = mdComps[body.relativePath] - dataObject.nativeOn = this.$listeners - return createElement(MarkdownComponent, dataObject) - } - dataObject.domProps.innerHTML = JSON.stringify(body) - return createElement(tag, dataObject) - } else { - dataObject.domProps.innerHTML = body - return createElement(tag, dataObject) - } - }, - props: { - tag: { - type: String, - default: 'div', - }, - body: { - type: [Object, String], - required: true - } - } -}); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js deleted file mode 100644 index a49cf439..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({api: (options || {}).api}) %> -export default config diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-components.template.js deleted file mode 100644 index 899f9dc2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-components.template.js +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Vue from 'vue' - -import { - interopDefault -} from './utils' - -const mdComps = { - <% options.components.forEach(([relativePath, filePath]) => { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),` - )}) -%> -} - - -Vue.component('nuxtent-body', { - name: 'NuxtentBody', - render(createElement) { - const body = this.body || '' - const tag = this.tag - - const dataObject = { - props: { - tag - }, - on: this.$listeners, - domProps: {}, - } - if (typeof body === 'object') { - if (body.relativePath) { - const MarkdownComponent = mdComps[body.relativePath] - dataObject.nativeOn = this.$listeners - return createElement(MarkdownComponent, dataObject) - } - dataObject.domProps.innerHTML = JSON.stringify(body) - return createElement(tag, dataObject) - } else { - dataObject.domProps.innerHTML = body - return createElement(tag, dataObject) - } - }, - props: { - tag: { - type: String, - default: 'div', - }, - body: { - type: [Object, String], - required: true - } - } -}); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-config.template.js deleted file mode 100644 index a49cf439..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/nuxtent-module/lib/plugins/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({api: (options || {}).api}) %> -export default config diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/.eslintrc deleted file mode 100644 index 685fa09c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/.eslintrc +++ /dev/null @@ -1,33 +0,0 @@ - -{ - "root": true, - "extends": ["standard", "plugin:lodash-template/base"], - "plugins": [ - "jest" - ], - "env": { - "jest/globals": true - }, - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "ecmaVersion": 2022 - }, - "globals": { - "options": true, - "serialize": true - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/plugin.js deleted file mode 100644 index c47e2881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/all-rules-test/plugin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default async function (ctx, inject) { - const icons = <%= JSON.stringify(options.icons) %> - const getIcon = size => icons[size + 'x' + size] || '' - inject('<%= options.iconProperty.replace('$', '') %>', getIcon) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/plugin.js deleted file mode 100644 index c47e2881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/icon/plugin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default async function (ctx, inject) { - const icons = <%= JSON.stringify(options.icons) %> - const getIcon = size => icons[size + 'x' + size] || '' - inject('<%= options.iconProperty.replace('$', '') %>', getIcon) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/plugin.js deleted file mode 100644 index ab7c9044..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/all-rules-test/plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || []; - -OneSignal.push(['init', <%= JSON.stringify(options.init, null, 2) %>]); - -export default function (ctx, inject) { - inject('OneSignal', OneSignal) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/plugin.js deleted file mode 100644 index ab7c9044..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/onesignal/plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || []; - -OneSignal.push(['init', <%= JSON.stringify(options.init, null, 2) %>]); - -export default function (ctx, inject) { - inject('OneSignal', OneSignal) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index e2a82636..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2020, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/sw.js deleted file mode 100644 index 6e4f7ae0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/sw.js +++ /dev/null @@ -1,73 +0,0 @@ -importScripts(<%= [options.workboxURL, ...options.importScripts].map((i) => `'${i}'`).join(', ') %>) - -// -------------------------------------------------- -// Configure -// -------------------------------------------------- - -<% if (options.config) {%> -// Set workbox config -workbox.setConfig(<%= JSON.stringify(options.config, null, 2) %>) -<% } %> - -<% if (options.cacheNames) {%> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify(options.cacheNames, null, 2) %>) -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim() -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting() -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches() -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize() -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>// -- End of workboxExtensions -- -<% } %> - -// -------------------------------------------------- -// Precaches -// -------------------------------------------------- - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null, 2) %>, <%= JSON.stringify(options.cacheOptions, null, 2) %>) -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>// -- End of cachingExtensions -- -<% } %> - -// -------------------------------------------------- -// Runtime Caching -// -------------------------------------------------- - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach(r => { %>workbox.routing.registerRoute(new RegExp('<%= r.urlPattern %>'), new workbox.strategies.<%= r.handler %> (<%= JSON.stringify(r.strategyOptions || {}) %>), '<%= r.method %>') -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => { - return new workbox.strategies.<%= options.offlineStrategy %>().handle({event}) - .catch(() => caches.match('<%= options.offlinePage %>')) -})<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/workbox.js deleted file mode 100644 index a332177d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/all-rules-test/workbox.js +++ /dev/null @@ -1,18 +0,0 @@ -async function register() { - if (!'serviceWorker' in navigator) { - throw new Error('serviceWorker is not supported in current browser!') - } - - const { Workbox } = await import('workbox-cdn/workbox/workbox-window.<%= options.dev ? 'dev' : 'prod' %>.es5.mjs') - - const workbox = new Workbox('<%= options.swURL %>', { - scope: '<%= options.swScope %>' - }) - - await workbox.register() - - return workbox -} - -window.$workbox = register() - .catch(error => {<% if (options.dev) { %> console.error('Error registering workbox:', error) <% } %>}) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/sw.js deleted file mode 100644 index 6e4f7ae0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/sw.js +++ /dev/null @@ -1,73 +0,0 @@ -importScripts(<%= [options.workboxURL, ...options.importScripts].map((i) => `'${i}'`).join(', ') %>) - -// -------------------------------------------------- -// Configure -// -------------------------------------------------- - -<% if (options.config) {%> -// Set workbox config -workbox.setConfig(<%= JSON.stringify(options.config, null, 2) %>) -<% } %> - -<% if (options.cacheNames) {%> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify(options.cacheNames, null, 2) %>) -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim() -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting() -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches() -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize() -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>// -- End of workboxExtensions -- -<% } %> - -// -------------------------------------------------- -// Precaches -// -------------------------------------------------- - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null, 2) %>, <%= JSON.stringify(options.cacheOptions, null, 2) %>) -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>// -- End of cachingExtensions -- -<% } %> - -// -------------------------------------------------- -// Runtime Caching -// -------------------------------------------------- - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach(r => { %>workbox.routing.registerRoute(new RegExp('<%= r.urlPattern %>'), new workbox.strategies.<%= r.handler %> (<%= JSON.stringify(r.strategyOptions || {}) %>), '<%= r.method %>') -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => { - return new workbox.strategies.<%= options.offlineStrategy %>().handle({event}) - .catch(() => caches.match('<%= options.offlinePage %>')) -})<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/workbox.js deleted file mode 100644 index a332177d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/pwa-module/lib/workbox/templates/workbox.js +++ /dev/null @@ -1,18 +0,0 @@ -async function register() { - if (!'serviceWorker' in navigator) { - throw new Error('serviceWorker is not supported in current browser!') - } - - const { Workbox } = await import('workbox-cdn/workbox/workbox-window.<%= options.dev ? 'dev' : 'prod' %>.es5.mjs') - - const workbox = new Workbox('<%= options.swURL %>', { - scope: '<%= options.swScope %>' - }) - - await workbox.register() - - return workbox -} - -window.$workbox = register() - .catch(error => {<% if (options.dev) { %> console.error('Error registering workbox:', error) <% } %>}) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/.eslintrc.js deleted file mode 100644 index 828e3f46..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/.eslintrc.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - ecmaVersion: 2022, - sourceType: 'module' - }, - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 5d0db292..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 69a78013..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,136 +0,0 @@ -import { EventEmitter } from 'events' -import Vue from 'vue' - -const API_URL = 'https://www.google.com/recaptcha/api.js' - -class ReCaptcha { - constructor ({ hideBadge, language, siteKey, version }) { - if (!siteKey) { - throw new Error('ReCaptcha error: No key provided') - } - - if (!version) { - throw new Error('ReCaptcha error: No version provided') - } - - this._elements = {} - - this._eventBus = null - this._ready = false - - this.hideBadge = hideBadge - this.language = language || 'en' - - this.siteKey = siteKey - this.version = version - } - - destroy () { - if (this._ready) { - this._ready = false - - const { head } = document - const { style } = this._elements - - const scripts = [...document.head.querySelectorAll('script')] - .filter(script => script.src.includes('recaptcha')) - - if (scripts.length) { - scripts.forEach(script => head.removeChild(script)) - } - - if (head.contains(style)) { - head.removeChild(style) - } - } - } - - async execute (action) { - try { - await this.init() - - if ('grecaptcha' in window) { - return window.grecaptcha.execute( - this.siteKey, - { action } - ) - } - } catch (error) { - throw new Error('ReCaptcha error: Failed to execute') - } - } - - getResponse () { - return new Promise((resolve, reject) => { - if ('grecaptcha' in window) { - const response = window.grecaptcha.getResponse() - - if (response) { - this._eventBus.emit('recaptcha-success', response) - resolve(response) - } else { - const errorMessage = 'Failed to execute' - - this._eventBus.emit('recaptcha-error', errorMessage) - reject(errorMessage) - } - } - }) - } - - init () { - if (this._ready) { - return Promise.resolve() - } - - this._eventBus = new EventEmitter() - this._elements = { - script: document.createElement('script'), - style: document.createElement('style') - } - - const { script, style } = this._elements - - script.addEventListener('error', () => { - document.head.removeChild(script) - throw new Error('ReCaptcha error: Failed to load script') - }) - - script.setAttribute('async', '') - script.setAttribute('defer', '') - - if (this.version === 2) { - script.setAttribute('src', API_URL + '?hl=' + this.language) - } else { - script.setAttribute('src', API_URL + '?render=' + this.siteKey) - } - - document.head.appendChild(script) - - window.recaptchaSuccessCallback = (token) => this._eventBus.emit('recaptcha-success', token) - window.recaptchaExpiredCallback = () => this._eventBus.emit('recaptcha-expired') - window.recaptchaErrorCallback = () => this._eventBus.emit('recaptcha-error', 'Failed to execute') - - this._ready = new Promise(resolve => { - script.addEventListener('load', () => { - if (this.version === 3 && this.hideBadge) { - style.innerHTML = '.grecaptcha-badge { display: none }' - document.head.appendChild(style) - } - - window.grecaptcha.ready(resolve) - }) - }) - - return this._ready - } - - on (event, callback) { - return this._eventBus.on(event, callback) - } -} - -export default function (_, inject) { - Vue.component('recaptcha', () => import('./recaptcha.vue')) - inject('recaptcha', new ReCaptcha(<%= serialize(options) %>)) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/plugin.js deleted file mode 100644 index 69a78013..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/recaptcha-module/lib/plugin.js +++ /dev/null @@ -1,136 +0,0 @@ -import { EventEmitter } from 'events' -import Vue from 'vue' - -const API_URL = 'https://www.google.com/recaptcha/api.js' - -class ReCaptcha { - constructor ({ hideBadge, language, siteKey, version }) { - if (!siteKey) { - throw new Error('ReCaptcha error: No key provided') - } - - if (!version) { - throw new Error('ReCaptcha error: No version provided') - } - - this._elements = {} - - this._eventBus = null - this._ready = false - - this.hideBadge = hideBadge - this.language = language || 'en' - - this.siteKey = siteKey - this.version = version - } - - destroy () { - if (this._ready) { - this._ready = false - - const { head } = document - const { style } = this._elements - - const scripts = [...document.head.querySelectorAll('script')] - .filter(script => script.src.includes('recaptcha')) - - if (scripts.length) { - scripts.forEach(script => head.removeChild(script)) - } - - if (head.contains(style)) { - head.removeChild(style) - } - } - } - - async execute (action) { - try { - await this.init() - - if ('grecaptcha' in window) { - return window.grecaptcha.execute( - this.siteKey, - { action } - ) - } - } catch (error) { - throw new Error('ReCaptcha error: Failed to execute') - } - } - - getResponse () { - return new Promise((resolve, reject) => { - if ('grecaptcha' in window) { - const response = window.grecaptcha.getResponse() - - if (response) { - this._eventBus.emit('recaptcha-success', response) - resolve(response) - } else { - const errorMessage = 'Failed to execute' - - this._eventBus.emit('recaptcha-error', errorMessage) - reject(errorMessage) - } - } - }) - } - - init () { - if (this._ready) { - return Promise.resolve() - } - - this._eventBus = new EventEmitter() - this._elements = { - script: document.createElement('script'), - style: document.createElement('style') - } - - const { script, style } = this._elements - - script.addEventListener('error', () => { - document.head.removeChild(script) - throw new Error('ReCaptcha error: Failed to load script') - }) - - script.setAttribute('async', '') - script.setAttribute('defer', '') - - if (this.version === 2) { - script.setAttribute('src', API_URL + '?hl=' + this.language) - } else { - script.setAttribute('src', API_URL + '?render=' + this.siteKey) - } - - document.head.appendChild(script) - - window.recaptchaSuccessCallback = (token) => this._eventBus.emit('recaptcha-success', token) - window.recaptchaExpiredCallback = () => this._eventBus.emit('recaptcha-expired') - window.recaptchaErrorCallback = () => this._eventBus.emit('recaptcha-error', 'Failed to execute') - - this._ready = new Promise(resolve => { - script.addEventListener('load', () => { - if (this.version === 3 && this.hideBadge) { - style.innerHTML = '.grecaptcha-badge { display: none }' - document.head.appendChild(style) - } - - window.grecaptcha.ready(resolve) - }) - }) - - return this._ready - } - - on (event, callback) { - return this._eventBus.on(event, callback) - } -} - -export default function (_, inject) { - Vue.component('recaptcha', () => import('./recaptcha.vue')) - inject('recaptcha', new ReCaptcha(<%= serialize(options) %>)) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/.eslintrc.js deleted file mode 100644 index d0b2d7cc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/plugin.js deleted file mode 100644 index e753a37b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createRouter as customCreateRouter } from '<%= options.routerFilePath %>' - -<% if (options.keepDefaultRouter) { %> -import { createRouter as createDefaultRouter, routerOptions } from './defaultRouter' -<% } else { %> -const createDefaultRouter = null -const routerOptions = null -<% } %> - -export function createRouter(ssrContext) { - return customCreateRouter(ssrContext, createDefaultRouter, routerOptions) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/plugin.js deleted file mode 100644 index e753a37b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/router-module/lib/plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createRouter as customCreateRouter } from '<%= options.routerFilePath %>' - -<% if (options.keepDefaultRouter) { %> -import { createRouter as createDefaultRouter, routerOptions } from './defaultRouter' -<% } else { %> -const createDefaultRouter = null -const routerOptions = null -<% } %> - -export function createRouter(ssrContext) { - return customCreateRouter(ssrContext, createDefaultRouter, routerOptions) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/.eslintrc deleted file mode 100644 index 37579354..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/.eslintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "root": true, - "extends": ["@nuxtjs", "plugin:lodash-template/base"], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "parser": "vue-eslint-parser", - "sourceType": "module", - "parserOptions": { - "ecmaVersion": 2019 - }, - }, - "globals": { - "options": true, - "serialize": true, - "serializeFunction": true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/sentry.client.js deleted file mode 100644 index 0e67143f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/all-rules-test/sentry.client.js +++ /dev/null @@ -1,24 +0,0 @@ -import VueLib from 'vue' -import * as Sentry from '@sentry/browser' -import { <%= Object.keys(options.integrations).map(integration => integration).join(', ') %> } from '@sentry/integrations' - -export default function (ctx, inject) { - const opts = Object.assign({}, <%= serialize(options.config) %>, { - integrations: [ - <%= Object.keys(options.integrations).map(name => { - const integration = options.integrations[name] - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})` - } - return `new ${name}({${Object.keys(integration).map(option => typeof integration[option] === 'function' ? - `${option}:${serializeFunction(integration[option])}` : `${option}:${serialize(integration[option])}`).join(',')}})` - }).join(',\n ') %> - ] - }) - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject('sentry', Sentry) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/sentry.client.js deleted file mode 100644 index 0e67143f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/sentry-module/lib/sentry.client.js +++ /dev/null @@ -1,24 +0,0 @@ -import VueLib from 'vue' -import * as Sentry from '@sentry/browser' -import { <%= Object.keys(options.integrations).map(integration => integration).join(', ') %> } from '@sentry/integrations' - -export default function (ctx, inject) { - const opts = Object.assign({}, <%= serialize(options.config) %>, { - integrations: [ - <%= Object.keys(options.integrations).map(name => { - const integration = options.integrations[name] - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})` - } - return `new ${name}({${Object.keys(integration).map(option => typeof integration[option] === 'function' ? - `${option}:${serializeFunction(integration[option])}` : `${option}:${serialize(integration[option])}`).join(',')}})` - }).join(',\n ') %> - ] - }) - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject('sentry', Sentry) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/.eslintrc.js deleted file mode 100644 index 591960f7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - globals: { - page: true, - browser: true, - context: true, - jestPuppeteer: true, - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 3b0ba5e8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from 'vue' -import { mergeData } from 'vue-functional-data-merge' - -function generateName (name) { - return name - .toLowerCase() - .replace(/\.svg$/, '') - .replace(/[^a-z0-9-]/g, '-') -} - -function getIcon (info) { - const { icon, sprite } = info - return require('<%= relativeToBuild(options._output) %>/' + sprite + '.svg') + - `#i-${generateName(icon)}` -} - -function getInfo (name) { - let [sprite, icon] = name.split('/') - - if (!icon) { - icon = sprite - sprite = '<%= options.defaultSprite %>' - } - - return { - icon, - sprite - } -} - -// @vue/component -const SvgIcon = { - name: 'SvgIcon', - functional: true, - props: { - name: { - type: String, - required: true - }, - title: { - type: String, - default: null - }, - desc: { - type: String, - default: null - }, - viewBox: { - type: String, - default: null, - validator (value) { - return value.split(' ').every((v) => { - return !isNaN(parseInt(v)) - }) - } - } - }, - render (h, { props, data }) { - const info = getInfo(props.name) - const icon = getIcon(info) - - const use = h('use', { - attrs: { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - href: icon, - // xlink:href can still be required in practice for cross-browser compatibility. - 'xlink:href': icon - } - }) - - const title = props.title ? h('title', props.title) : null - const desc = props.desc ? h('desc', props.desc) : null - - const { sprite } = info - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - attrs: { - xmlns: 'http://www.w3.org/2000/svg', - viewBox: props.viewBox - } - } - - return h('svg', - mergeData(data, componentData), - [ title, desc, use ].filter(Boolean) - ) - } -} - -Vue.component(SvgIcon.name, SvgIcon) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/plugin.js deleted file mode 100644 index 3b0ba5e8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/svg-sprite-module/lib/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from 'vue' -import { mergeData } from 'vue-functional-data-merge' - -function generateName (name) { - return name - .toLowerCase() - .replace(/\.svg$/, '') - .replace(/[^a-z0-9-]/g, '-') -} - -function getIcon (info) { - const { icon, sprite } = info - return require('<%= relativeToBuild(options._output) %>/' + sprite + '.svg') + - `#i-${generateName(icon)}` -} - -function getInfo (name) { - let [sprite, icon] = name.split('/') - - if (!icon) { - icon = sprite - sprite = '<%= options.defaultSprite %>' - } - - return { - icon, - sprite - } -} - -// @vue/component -const SvgIcon = { - name: 'SvgIcon', - functional: true, - props: { - name: { - type: String, - required: true - }, - title: { - type: String, - default: null - }, - desc: { - type: String, - default: null - }, - viewBox: { - type: String, - default: null, - validator (value) { - return value.split(' ').every((v) => { - return !isNaN(parseInt(v)) - }) - } - } - }, - render (h, { props, data }) { - const info = getInfo(props.name) - const icon = getIcon(info) - - const use = h('use', { - attrs: { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - href: icon, - // xlink:href can still be required in practice for cross-browser compatibility. - 'xlink:href': icon - } - }) - - const title = props.title ? h('title', props.title) : null - const desc = props.desc ? h('desc', props.desc) : null - - const { sprite } = info - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - attrs: { - xmlns: 'http://www.w3.org/2000/svg', - viewBox: props.viewBox - } - } - - return h('svg', - mergeData(data, componentData), - [ title, desc, use ].filter(Boolean) - ) - } -} - -Vue.component(SvgIcon.name, SvgIcon) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/.eslintrc.js deleted file mode 100644 index 3d0bfa4c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/.eslintrc.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - root: true, - extends: ["@nuxtjs/eslint-config-typescript"], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser' - }, - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/options.js deleted file mode 100644 index 507321f5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/plugin.js deleted file mode 100644 index 3c110992..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' -import Vuetify from '<%= options.treeShake ? 'vuetify/lib' : 'vuetify' %>' -<% -const libImports = [ - { key: 'components', location: 'vuetify/lib'}, - { key: 'transitions', location: 'vuetify/lib'}, - { key: 'directives', location: 'vuetify/lib/directives'} -] -if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import { <%= options.treeShake[lib.key].join(', ') %> } from '<%= lib.location %>' - <% - } - } -} -%> - -import options from './options' - -Vue.use(Vuetify, { -<% if (options.treeShake) { %> -<%= libImports.filter(lib => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) - .map(lib => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`) - .join(',\n') %> -<% } %> -}) - -export default (ctx) => { - const vuetifyOptions = typeof options === 'function' ? options(ctx) : options - -<% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {} - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>' -<% } %> - - const vuetify = new Vuetify(vuetifyOptions) - - ctx.app.vuetify = vuetify - ctx.$vuetify = vuetify.framework -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/options.js deleted file mode 100644 index 507321f5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/plugin.js deleted file mode 100644 index 3c110992..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/input/vuetify-module/src/templates/plugin.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' -import Vuetify from '<%= options.treeShake ? 'vuetify/lib' : 'vuetify' %>' -<% -const libImports = [ - { key: 'components', location: 'vuetify/lib'}, - { key: 'transitions', location: 'vuetify/lib'}, - { key: 'directives', location: 'vuetify/lib/directives'} -] -if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import { <%= options.treeShake[lib.key].join(', ') %> } from '<%= lib.location %>' - <% - } - } -} -%> - -import options from './options' - -Vue.use(Vuetify, { -<% if (options.treeShake) { %> -<%= libImports.filter(lib => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) - .map(lib => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`) - .join(',\n') %> -<% } %> -}) - -export default (ctx) => { - const vuetifyOptions = typeof options === 'function' ? options(ctx) : options - -<% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {} - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>' -<% } %> - - const vuetify = new Vuetify(vuetifyOptions) - - ctx.app.vuetify = vuetify - ctx.$vuetify = vuetify.framework -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/.eslintrc.js deleted file mode 100644 index 7a45b19c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - extends: ['@nuxtjs'], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - } - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 7d3b26b6..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,26 +0,0 @@ -import Vue from "vue"; -import VueAnalytics from "vue-analytics"; - -export default async (ctx, inject) => { - - const options = <%= serialize(options) %>; - - if (typeof options.asyncID === "function") { - - options.id = await options.asyncID(ctx); - - } - - Vue.use( - VueAnalytics, - {...{"router": ctx.app.router}, - ...options} - ); - - ctx.$ga = Vue.$ga; - inject( - "ga", - Vue.$ga - ); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/plugin.js deleted file mode 100644 index 413d34c6..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/analytics-module/lib/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import VueAnalytics from 'vue-analytics' - -export default async (ctx, inject) => { - const options = <%= serialize(options) %> - - if (typeof options.asyncID === 'function') { - options.id = await options.asyncID(ctx) - } - - Vue.use(VueAnalytics, { ...{ router: ctx.app.router }, ...options }) - - ctx.$ga = Vue.$ga - inject('ga', Vue.$ga) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/.eslintrc.js deleted file mode 100644 index dab8caf8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 0 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/plugin.js deleted file mode 100644 index f4e89696..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,228 +0,0 @@ -import Vue from "vue"; -import VueApollo from "vue-apollo"; -import "cross-fetch/polyfill"; -import {createApolloClient, restartWebsockets} from "vue-cli-plugin-apollo/graphql-client"; -import Cookie from "universal-cookie"; -import {InMemoryCache} from "apollo-cache-inmemory"; - -Vue.use(VueApollo); - -export default (ctx, inject) => { - - const providerOptions = {"clients": {}}; - const {app, beforeNuxtRender, req} = ctx; - const AUTH_TOKEN_NAME = '<%= options.tokenName %>'; - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %>; - const AUTH_TYPE = '<%= options.authenticationType %> '; - const cookies = new Cookie(req && req.headers.cookie); - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME; - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES; - - function <%= key %>GetAuth () { - - const token = cookies.get(<%= key %>TokenName); - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token - : ""; - - } - - let <%= key %>ClientConfig; - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify( - options.clientConfigs[key], - null, - 2 - ) %>; - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>'); - - if ("default" in <%= key %>ClientConfig) { - - <%= key %>ClientConfig = <%= key %>ClientConfig.default; - - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx); - <% } %> - - const <%= key %>ValidateToken = () => true; - - if (!<%= key %>ClientConfig.validateToken) { - - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken; - - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions : undefined); - - if (!process.server) { - - <%= key %>Cache.restore(window.__NUXT__ - ? window.__NUXT__.apollo.<%= key === 'default' - ? 'defaultClient' - : key %> : null); - - } - - if (!<%= key %>ClientConfig.getAuth) { - - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth; - - } - <%= key %>ClientConfig.ssr = Boolean(process.server); - <%= key %>ClientConfig.cache = <%= key %>Cache; - <%= key %>ClientConfig.tokenName = <%= key %>TokenName; - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }); - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient; - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient; - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient; - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign( - providerOptions, - { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default( - error, - ctx - ); - <% } else { %> - console.log( - "%cError", - "background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;", - error.message - ); - <% } %> - - } - } - ); - - const apolloProvider = new VueApollo(vueApolloOptions); - // Allow access to the provider in the context - app.apolloProvider = apolloProvider; - - if (process.server) { - - const ApolloSSR = require("vue-apollo/ssr"); - beforeNuxtRender(({nuxtState}) => { - - nuxtState.apollo = ApolloSSR.getStates(apolloProvider); - - }); - - } - - inject( - "apolloHelpers", - { - "onLogin": async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - - // Fallback for tokenExpires param - if (typeof cookieAttributes === "number") { - - cookieAttributes = {"expires": cookieAttributes}; - - } - - if (typeof cookieAttributes.expires === "number") { - - cookieAttributes.expires = new Date(Date.now() + 86400 * 1000 * cookieAttributes.expires); - - } - - if (token) { - - cookies.set( - AUTH_TOKEN_NAME, - token, - cookieAttributes - ); - - } else { - - cookies.remove( - AUTH_TOKEN_NAME, - cookieAttributes - ); - - } - if (apolloClient.wsClient) { - - restartWebsockets(apolloClient.wsClient); - - } - if (!skipResetStore) { - - try { - - await apolloClient.resetStore(); - - } catch (e) { - - // eslint-disable-next-line no-console - console.log( - "%cError on cache reset (setToken)", - "color: orange;", - e.message - ); - - } - - } - - }, - "onLogout": async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - - cookies.remove( - AUTH_TOKEN_NAME, - COOKIE_ATTRIBUTES - ); - if (apolloClient.wsClient) { - - restartWebsockets(apolloClient.wsClient); - - } - if (!skipResetStore) { - - try { - - await apolloClient.resetStore(); - - } catch (e) { - - // eslint-disable-next-line no-console - console.log( - "%cError on cache reset (logout)", - "color: orange;", - e.message - ); - - } - - } - - }, - "getToken": (tokenName = AUTH_TOKEN_NAME) => cookies.get(tokenName) - } - ); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/plugin.js deleted file mode 100644 index 44052bcc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/apollo-module/lib/templates/plugin.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import VueApollo from 'vue-apollo' -import 'cross-fetch/polyfill' -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client' -import Cookie from 'universal-cookie' -import { InMemoryCache } from 'apollo-cache-inmemory' - -Vue.use(VueApollo) - -export default (ctx, inject) => { - const providerOptions = { clients: {} } - const { app, beforeNuxtRender, req } = ctx - const AUTH_TOKEN_NAME = '<%= options.tokenName %>' - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %> - const AUTH_TYPE = '<%= options.authenticationType %> ' - const cookies = new Cookie(req && req.headers.cookie) - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES - - function <%= key %>GetAuth () { - const token = cookies.get(<%= key %>TokenName) - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token : '' - } - - let <%= key %>ClientConfig - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify(options.clientConfigs[key], null, 2) %> - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>') - - if ('default' in <%= key %>ClientConfig) { - <%= key %>ClientConfig = <%= key %>ClientConfig.default - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx) - <% } %> - - const <%= key %>ValidateToken = () => true - - if (!<%= key %>ClientConfig.validateToken) { - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions : undefined) - - if (!process.server) { - <%= key %>Cache.restore(window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultClient' : key %> : null) - } - - if (!<%= key %>ClientConfig.getAuth) { - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth - } - <%= key %>ClientConfig.ssr = !!process.server - <%= key %>ClientConfig.cache = <%= key %>Cache - <%= key %>ClientConfig.tokenName = <%= key %>TokenName - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }) - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign(providerOptions, { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default(error, ctx) - <% } else { %> - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message) - <% } %> - } - }) - - const apolloProvider = new VueApollo(vueApolloOptions) - // Allow access to the provider in the context - app.apolloProvider = apolloProvider - - if (process.server) { - const ApolloSSR = require('vue-apollo/ssr') - beforeNuxtRender(({ nuxtState }) => { - nuxtState.apollo = ApolloSSR.getStates(apolloProvider) - }) - } - - inject('apolloHelpers', { - onLogin: async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - // Fallback for tokenExpires param - if (typeof cookieAttributes === 'number') cookieAttributes = { expires: cookieAttributes } - - if (typeof cookieAttributes.expires === 'number') { - cookieAttributes.expires = new Date(Date.now() + 86400 * 1000 * cookieAttributes.expires) - } - - if (token) { - cookies.set(AUTH_TOKEN_NAME, token, cookieAttributes) - } else { - cookies.remove(AUTH_TOKEN_NAME, cookieAttributes) - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (setToken)', 'color: orange;', e.message) - } - } - }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (logout)', 'color: orange;', e.message) - } - } - }, - getToken: (tokenName = AUTH_TOKEN_NAME) => { - return cookies.get(tokenName) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/.eslintrc.js deleted file mode 100644 index 2783bdb0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: ['jest', 'vue'], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - globals: { - options: true, - serialize: true, - hash: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/plugin.js deleted file mode 100644 index 719545f8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/all-rules-test/plugin.js +++ /dev/null @@ -1,53 +0,0 @@ -import Auth from "./auth"; - -import "./middleware"; - -// Active schemes -<%= options.uniqueSchemes.map((path) => `import ${`scheme_${hash(path)}`} from '${path.replace( - /\\/g, - '/' - )}'`).join('\n') %>; - -export default function (ctx, inject) { - - // Options - const options = <%= JSON.stringify(options.options) %>; - - // Create a new Auth instance - const $auth = new Auth( - ctx, - options - ); - - // Register strategies - <%= - options.strategies.map((strategy) => { - const scheme = `scheme_${hash(options.strategyScheme.get(strategy))}`; - const schemeOptions = JSON.stringify(strategy); - const name = strategy._name; - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))`; - }).join('\n\n ') - %>; - - // Inject it to nuxt context as $auth - inject( - "auth", - $auth - ); - ctx.$auth = $auth; - - // Initialize auth - return $auth.init().catch((error) => { - - if (process.client) { - - console.error( - "[ERROR] [AUTH]", - error - ); - - } - - }); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/plugin.js deleted file mode 100644 index 460af07c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/auth-module/lib/module/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import Auth from './auth' - -import './middleware' - -// Active schemes -<%= options.uniqueSchemes.map(path => `import ${'scheme_' + hash(path)} from '${path.replace(/\\/g, '/')}'`).join('\n') %> - -export default function (ctx, inject) { - // Options - const options = <%= JSON.stringify(options.options) %> - - // Create a new Auth instance - const $auth = new Auth(ctx, options) - - // Register strategies - <%= - options.strategies.map(strategy => { - const scheme = 'scheme_' + hash(options.strategyScheme.get(strategy)) - const schemeOptions = JSON.stringify(strategy) - const name = strategy._name - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))` - }).join('\n\n ') - %> - - // Inject it to nuxt context as $auth - inject('auth', $auth) - ctx.$auth = $auth - - // Initialize auth - return $auth.init().catch(error => { - if (process.client) { - console.error('[ERROR] [AUTH]', error) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/.eslintrc.js deleted file mode 100644 index b4a697db..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - parserOptions: { - }, - sourceType: 'module' - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/plugin.js deleted file mode 100644 index e03420b5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,341 +0,0 @@ -import Axios from "axios"; -<% if (options.retry) { %>import axiosRetry from "axios-retry"<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = "common") { - - for (const scope of Array.isArray(scopes) - ? scopes - : [scopes]) { - - if (!value) { - - delete this.defaults.headers[scope][name]; - return; - - } - this.defaults.headers[scope][name] = value; - - } - - }, - setToken (token, type, scopes = "common") { - - const value = !token - ? null - : (type - ? `${type} ` - : "") + token; - this.setHeader( - "Authorization", - value, - scopes - ); - - }, - onRequest (fn) { - - this.interceptors.request.use((config) => fn(config) || config); - - }, - onResponse (fn) { - - this.interceptors.response.use((response) => fn(response) || response); - - }, - onRequestError (fn) { - - this.interceptors.request.use( - undefined, - (error) => fn(error) || Promise.reject(error) - ); - - }, - onResponseError (fn) { - - this.interceptors.response.use( - undefined, - (error) => fn(error) || Promise.reject(error) - ); - - }, - onError (fn) { - - this.onRequestError(fn); - this.onResponseError(fn); - - } -}; - -// Request helpers ($get, $post, ...) -for (const method of [ - "request", - "delete", - "get", - "head", - "options", - "post", - "put", - "patch" -]) { - - axiosExtra[`$${method}`] = function () { - - return this[method].apply( - this, - arguments - ).then((res) => res && res.data); - - }; - -} - -const extendAxiosInstance = (axios) => { - - for (const key in axiosExtra) { - - axios[key] = axiosExtra[key].bind(axios); - - } - -}; - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]( - "[Axios]", - ...messages -); - -const setupDebugInterceptor = (axios) => { - - // Request - axios.onRequestError((error) => { - - log( - "error", - "Request error:", - error - ); - - }); - - // Response - axios.onResponseError((error) => { - - log( - "error", - "Response error:", - error - ); - - }); - axios.onResponse((res) => { - - log( - "info", - `[${res.status} ${res.statusText}]`, - `[${res.config.method.toUpperCase()}]`, - res.config.url - ); - - if (process.browser) { - - console.log(res); - - } else { - - console.log(JSON.stringify( - res.data, - undefined, - 2 - )); - - } - - return res; - - }); - -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = (axios) => { - - // Send credentials only to relative and API Backend requests - axios.onRequest((config) => { - - if (config.withCredentials === undefined) { - - if (!(/^https?:\/\//i).test(config.url) || config.url.indexOf(config.baseURL) === 0) { - - config.withCredentials = true; - - } - - } - - }); - -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - - if (process.server) { - - return; - - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - "finish": () => { }, - "start": () => { }, - "fail": () => { }, - "set": () => { } - }; - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set ? window.$nuxt.$loading -: noopLoading); - - let currentRequests = 0; - - axios.onRequest((config) => { - - if (config && config.progress === false) { - - return; - - } - - currentRequests++; - - }); - - axios.onResponse((response) => { - - if (response && response.config && response.config.progress === false) { - - return; - - } - - currentRequests--; - if (currentRequests <= 0) { - - currentRequests = 0; - $loading().finish(); - - } - - }); - - axios.onError((error) => { - - if (error && error.config && error.config.progress === false) { - - return; - - } - - currentRequests--; - $loading().fail(); - $loading().finish(); - - }); - - const onProgress = (e) => { - - if (!currentRequests) { - - return; - - } - const progress = e.loaded * 100 / (e.total * currentRequests); - $loading().set(Math.min( - 100, - progress - )); - - }; - - axios.defaults.onUploadProgress = onProgress; - axios.defaults.onDownloadProgress = onProgress; - -}<% } %> - -export default (ctx, inject) => { - - // BaseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>'); - - /* - * Create fresh objects for all default header scopes - * Axios creates only one which is shared across SSR requests! - * https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - */ - const headers = { - "common": { - "Accept": "application/json, text/plain, */*" - }, - "delete": {}, - "get": {}, - "head": {}, - "post": {}, - "put": {}, - "patch": {} - }; - - const axiosOptions = { - baseURL, - headers - }; - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = ctx.req && ctx.req.headers - ? {...ctx.req.headers} - : {}; - <% for (const h of options.proxyHeadersIgnore) { - %>delete axiosOptions.headers.common['<%= h %>']; - <% } %><% - } %> - - if (process.server) { - - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common["accept-encoding"] = "gzip, deflate"; - - } - - // Create new axios instance - const axios = Axios.create(axiosOptions); - - // Extend axios proto - extendAxiosInstance(axios); - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios); <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress( - axios, - ctx - ); <% } %> - <% if (options.retry) { - %>axiosRetry( - axios, - <%= serialize(options.retry) %> - )<% - } %> - - // Inject axios to the context as $axios - ctx.$axios = axios; - inject( - "axios", - axios - ); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/plugin.js deleted file mode 100644 index b1bcadee..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/axios-module/lib/plugin.js +++ /dev/null @@ -1,204 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (const scope of Array.isArray(scopes) ? scopes : [scopes]) { - if (!value) { - delete this.defaults.headers[scope][name] - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest (fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse (fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError (fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError (fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError (fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (const method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = (axios) => { - for (const key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = (axios) => { - // request - axios.onRequestError((error) => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError((error) => { - log('error', 'Response error:', error) - }) - axios.onResponse((res) => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = (axios) => { - // Send credentials only to relative and API Backend requests - axios.onRequest((config) => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest((config) => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse((response) => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError((error) => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = (e) => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common: { - Accept: 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (const h of options.proxyHeadersIgnore) { - %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% - } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/.eslintrc.js deleted file mode 100644 index 658380c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 415725cb..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * These regular expressions are borrowed from below page. - * https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - */ - -// eslint-disable-next-line -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr( - 0, - 4 - )); - -} - -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr( - 0, - 4 - )); - -} - -function isIos (a) { - - return (/iPad|iPhone|iPod/).test(a); - -} - -function isWindows (a) { - - return (/Windows/).test(a); - -} - -function isMacOS (a) { - - return (/Mac OS X/).test(a); - -} - -const DEFAULT_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36"; - -export default async function (ctx, inject) { - - let userAgent = ""; - if (typeof ctx.req !== "undefined") { - - userAgent = ctx.req.headers["user-agent"]; - - } else if (typeof navigator !== "undefined") { - - userAgent = navigator.userAgent; - - } else { - - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>'; - <% } else { %> - userAgent = DEFAULT_USER_AGENT; - <% } %> - - } - // Use default user-agent if user-agent header is not sent - if (!userAgent) { - - userAgent = DEFAULT_USER_AGENT; - - } - let mobile = null; - let mobileOrTablet = null; - let ios = null; - let windows = false; - let macOS = true; - - if (userAgent === "Amazon CloudFront") { - - if (ctx.req.headers["cloudfront-is-mobile-viewer"] === "true") { - - mobile = true; - mobileOrTablet = true; - - } - if (ctx.req.headers["cloudfront-is-tablet-viewer"] === "true") { - - mobile = false; - mobileOrTablet = true; - - } - - } else { - - mobile = isMobile(userAgent); - mobileOrTablet = isMobileOrTablet(userAgent); - ios = isIos(userAgent); - - } - windows = isWindows(userAgent); - macOS = isMacOS(userAgent); - - ctx.isMobile = mobile; - ctx.isMobileOrTablet = mobileOrTablet; - ctx.isTablet = !mobile && mobileOrTablet; - ctx.isDesktop = !mobileOrTablet; - ctx.isDesktopOrTablet = !mobile; - ctx.isIos = ios; - ctx.isWindows = windows; - ctx.isMacOS = macOS; - inject( - "device", - { - "isMobile": mobile, - "isMobileOrTablet": mobileOrTablet, - "isTablet": !mobile && mobileOrTablet, - "isDesktop": !mobileOrTablet, - "isIos": ios, - "isWindows": windows, - "isMacOS": macOS, - "isDesktopOrTablet": !mobile - } - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/plugin.js deleted file mode 100644 index fe7bda63..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/device-module/lib/plugin.js +++ /dev/null @@ -1,93 +0,0 @@ -// these regular expressions are borrowed from below page. -// https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr(0, 4)) -} - -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr(0, 4)) -} - -function isIos (a) { - return /iPad|iPhone|iPod/.test(a) -} - -function isWindows (a) { - return /Windows/.test(a) -} - -function isMacOS (a) { - return /Mac OS X/.test(a) -} - -const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36' - -export default async function (ctx, inject) { - let userAgent = '' - if (typeof ctx.req !== 'undefined') { - userAgent = ctx.req.headers['user-agent'] - } else if (typeof navigator !== 'undefined') { - userAgent = navigator.userAgent - } else { - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>' - <% } else { %> - userAgent = DEFAULT_USER_AGENT - <% } %> - } - // use default user-agent if user-agent header is not sent - if (!userAgent) { - userAgent = DEFAULT_USER_AGENT - } - let mobile = null - let mobileOrTablet = null - let ios = null - let windows = false - let macOS = true - - if (userAgent === 'Amazon CloudFront') { - if (ctx.req.headers['cloudfront-is-mobile-viewer'] === 'true') { - mobile = true - mobileOrTablet = true - } - if (ctx.req.headers['cloudfront-is-tablet-viewer'] === 'true') { - mobile = false - mobileOrTablet = true - } - } else { - mobile = isMobile(userAgent) - mobileOrTablet = isMobileOrTablet(userAgent) - ios = isIos(userAgent) - } - windows = isWindows(userAgent) - macOS = isMacOS(userAgent) - - ctx.isMobile = mobile - ctx.isMobileOrTablet = mobileOrTablet - ctx.isTablet = !mobile && mobileOrTablet - ctx.isDesktop = !mobileOrTablet - ctx.isDesktopOrTablet = !mobile - ctx.isIos = ios - ctx.isWindows = windows - ctx.isMacOS = macOS - inject('device', { - isMobile: mobile, - isMobileOrTablet: mobileOrTablet, - isTablet: !mobile && mobileOrTablet, - isDesktop: !mobileOrTablet, - isIos: ios, - isWindows: windows, - isMacOS: macOS, - isDesktopOrTablet: !mobile - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/.eslintrc.js deleted file mode 100644 index 09fef701..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: ['jest', 'vue'], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/plugin.template.js deleted file mode 100644 index 1c992814..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/all-rules-test/plugin.template.js +++ /dev/null @@ -1,179 +0,0 @@ -import Vue from "vue"; - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - - return h( - "ins", - { - "class": ["adsbygoogle"], - "style": this.adStyle, - attrs: { - "data-ad-client": this.adClient, - "data-ad-slot": this.adSlot || null, - "data-ad-format": this.adFormat, - "data-ad-region": this.show - ? this.adRegion() - : null, - "data-ad-layout": this.adLayout || null, - "data-ad-layout-key": this.adLayoutKey || null, - "data-page-url": this.pageUrl - ? this.pageUrl - : null, - "data-analytics-uacct": this.analyticsUacct - ? this.analyticsUacct - : null, - "data-analytics-domain-name": this.analyticsDomainName - ? this.analyticsDomainName - : null, - "data-adtest": <%= options.test - ? '\'on\'' - : 'null' %>, - "data-adsbygoogle-status": this.show - ? null - : "" - }, - "domProps": { - "innerHTML": this.show - ? "" - : " " - }, - "key": Math.random() - } - ); - - }, - props: { - adClient: { - "type": String, - default: '<%= options.id %>' - }, - "adSlot": { - "type": String - }, - "adFormat": { - "type": String, - "default": "auto" - }, - "adLayout": { - "type": String - }, - "adLayoutKey": { - "type": String - }, - "adStyle": { - "type": Object, - default () { - - return { - "display": "block" - }; - - } - }, - "pageUrl": { - "type": String - }, - analyticsUacct: { - "type": String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - "type": String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - "type": Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - - return { - "show": true - }; - - }, - mounted () { - - this.showAd(); - - }, - "watch": { - "$route" (to, from) { - - if (to.fullPath === from.fullPath) { - - return; - - } - const {keys} = Object; - const toQuery = to.query; - const fromQuery = from.query; - let changed = false; - if (to.path !== from.path) { - - changed = true; - - } else if (this.includeQuery) { - - // If we include query params, check to see if they are loosely unequal - changed = keys(toQuery).length !== keys(fromQuery).length || !keys(toQuery).every((k) => toQuery[k] === fromQuery[k]); - - } - if (changed) { - - // If the route has changed, update the ad - this.updateAd(); - - } - - } - }, - "methods": { - adRegion () { - - return `page-${Math.random()}`; - - }, - updateAd () { - - if (this.isServer) { - - return; - - } - // Reset the INS element - this.show = false; - // Show new ad on nextTick - this.$nextTick(this.showAd); - - }, - showAd () { - - this.show = true; - this.$nextTick(() => { - - try { - - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}); - - } catch (error) { - - console.error(error); - - } - - }); - - } - } -}; - -// Register our ad component under the desired tag name -Vue.component( - '<%= options.tag %>', - adsbygoogle -); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/plugin.template.js deleted file mode 100644 index a17bdf61..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-adsense-module/lib/plugin.template.js +++ /dev/null @@ -1,130 +0,0 @@ -import Vue from 'vue' - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - return h( - 'ins', - { - class: ['adsbygoogle'], - style: this.adStyle, - attrs: { - 'data-ad-client': this.adClient, - 'data-ad-slot': this.adSlot || null, - 'data-ad-format': this.adFormat, - 'data-ad-region': this.show ? this.adRegion() : null, - 'data-ad-layout': this.adLayout || null, - 'data-ad-layout-key': this.adLayoutKey || null, - 'data-page-url': this.pageUrl ? this.pageUrl : null, - 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, - 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, - 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, - domProps: { - innerHTML: this.show ? '' : ' ' - }, - key: Math.random() - } - ) - }, - props: { - adClient: { - type: String, - default: '<%= options.id %>' - }, - adSlot: { - type: String - }, - adFormat: { - type: String, - default: 'auto' - }, - adLayout: { - type: String - }, - adLayoutKey: { - type: String - }, - adStyle: { - type: Object, - default () { - return { - display: 'block' - } - } - }, - pageUrl: { - type: String - }, - analyticsUacct: { - type: String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - type: String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - type: Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - return { - show: true - } - }, - mounted () { - this.showAd() - }, - watch: { - '$route' (to, from) { - if (to.fullPath === from.fullPath) { - return - } - const keys = Object.keys - const toQuery = to.query - const fromQuery = from.query - let changed = false - if (to.path !== from.path) { - changed = true - } else if (this.includeQuery) { - // If we include query params, check to see if they are loosely unequal - changed = (keys(toQuery).length !== keys(fromQuery).length) || !keys(toQuery).every(k => toQuery[k] === fromQuery[k]) - } - if (changed) { - // If the route has changed, update the ad - this.updateAd() - } - } - }, - methods: { - adRegion () { - return 'page-' + Math.random() - }, - updateAd () { - if (this.isServer) { - return - } - // Reset the INS element - this.show = false - // Show new ad on nextTick - this.$nextTick(this.showAd) - }, - showAd () { - this.show = true - this.$nextTick(() => { - try { - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}) - } catch (error) { - console.error(error) - } - }) - } - } -} - -// Register our ad component under the desired tag name -Vue.component('<%= options.tag %>', adsbygoogle) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/.eslintrc.js deleted file mode 100644 index 0b87afda..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/plugin.js deleted file mode 100644 index cf23f87e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,199 +0,0 @@ -import weightedRandom from "weighted-random"; -import {parse as parseCookie, serialize as serializeCookie} from "cookie"; - -import experiments from '<%= options.experimentsDir %>'; -const MAX_AGE = <%= options.maxAge %>; - -export default function (ctx, inject) { - - // Assign experiment and variant to user - assignExperiment(ctx); - - // Google optimize integration - googleOptimize(ctx); - - // Inject $exp - inject( - "exp", - ctx.experiment - ); - -} - -function assignExperiment (ctx) { - - // Choose experiment and variant - let experimentIndex = -1; - let experiment = {}; - let variantIndexes = []; - let classes = []; - - // Try to restore from cookie - const cookie = getCookie( - ctx, - "exp" - ) || ""; // ExperimentID.var1-var2 - const [ - cookieExp, - cookieVars - ] = cookie.split("."); - if (cookieExp && cookieVars) { - - // Try to find experiment with that id - experimentIndex = experiments.findIndex((exp) => exp.experimentID === cookieExp); - experiment = experiments[experimentIndex]; - - // Variant indexes - variantIndexes = cookieVars.split("-").map((v) => parseInt(v)); - - } - - // Choose one experiment - const experimentWeights = experiments.map((exp) => exp.weight === undefined ? 1 : exp.weight); - let retries = experiments.length; - while (experimentIndex === -1 && retries-- > 0) { - - experimentIndex = weightedRandom(experimentWeights); - experiment = experiments[experimentIndex]; - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === "function") { - - if (!experiment.isEligible(ctx)) { - - // Try another one - experimentWeights[experimentIndex] = 0; - experimentIndex = -1; - - } - - } - - } - - if (experimentIndex !== -1) { - - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter((index) => experiment.variants[index]); - - // Choose enough variants - const variantWeights = experiment.variants.map((variant) => variant.weight === undefined ? 1 : variant.weight); - while (variantIndexes.length < (experiment.sections || 1)) { - - const index = weightedRandom(variantWeights); - variantWeights[index] = 0; - variantIndexes.push(index); - - } - - // Write exp cookie if changed - const expCookie = `${experiment.experimentID}.${variantIndexes.join("-")}`; - if (cookie !== expCookie) { - - setCookie( - ctx, - "exp", - expCookie, - experiment.maxAge - ); - - } - - // Compute global classes to be injected - classes = variantIndexes.map((index) => `exp-${experiment.name}-${index}`); - - } else { - - // No active experiment - experiment = {}; - variantIndexes = []; - classes = []; - - } - - ctx.experiment = { - "$experimentIndex": experimentIndex, - "$variantIndexes": variantIndexes, - "$activeVariants": variantIndexes.map((index) => experiment.variants[index]), - "$classes": classes, - ...experiment - }; - -} - -function getCookie (ctx, name) { - - if (process.server && !ctx.req) { - - return; - - } - - // Get and parse cookies - const cookieStr = process.client - ? document.cookie - : ctx.req.headers.cookie; - const cookies = parseCookie(cookieStr || "") || {}; - - return cookies[name]; - -} - -function setCookie (ctx, name, value, maxAge = MAX_AGE) { - - const serializedCookie = serializeCookie( - name, - value, - { - "path": "/", - maxAge - } - ); - - if (process.client) { - - // Set in browser - document.cookie = serializedCookie; - - } else if (process.server && ctx.res) { - - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader("Set-Cookie"); - let value = serializedCookie; - if (prev) { - - value = Array.isArray(prev) - ? prev.concat(serializedCookie) - : [ - prev, - serializedCookie - ]; - - } - ctx.res.setHeader( - "Set-Cookie", - value - ); - - } - -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize ({experiment}) { - - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - - return; - - } - - const exp = `${experiment.experimentID}.${experiment.$variantIndexes.join("-")}`; - - window.ga( - "set", - "exp", - exp - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/plugin.js deleted file mode 100644 index 218dbdf7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/google-optimize/lib/plugin.js +++ /dev/null @@ -1,133 +0,0 @@ -import weightedRandom from 'weighted-random' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' - -import experiments from '<%= options.experimentsDir %>' -const MAX_AGE = <%= options.maxAge %> - -export default function (ctx, inject) { - // Assign experiment and variant to user - assignExperiment(ctx) - - // Google optimize integration - googleOptimize(ctx) - - // Inject $exp - inject('exp', ctx.experiment) -} - -function assignExperiment (ctx) { - // Choose experiment and variant - let experimentIndex = -1 - let experiment = {} - let variantIndexes = [] - let classes = [] - - // Try to restore from cookie - const cookie = getCookie(ctx, 'exp') || '' // experimentID.var1-var2 - const [cookieExp, cookieVars] = cookie.split('.') - if (cookieExp && cookieVars) { - // Try to find experiment with that id - experimentIndex = experiments.findIndex(exp => exp.experimentID === cookieExp) - experiment = experiments[experimentIndex] - - // Variant indexes - variantIndexes = cookieVars.split('-').map(v => parseInt(v)) - } - - // Choose one experiment - const experimentWeights = experiments.map(exp => exp.weight === undefined ? 1 : exp.weight) - let retries = experiments.length - while (experimentIndex === -1 && retries-- > 0) { - experimentIndex = weightedRandom(experimentWeights) - experiment = experiments[experimentIndex] - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === 'function') { - if (!experiment.isEligible(ctx)) { - // Try another one - experimentWeights[experimentIndex] = 0 - experimentIndex = -1 - } - } - } - - if (experimentIndex !== -1) { - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter(index => experiment.variants[index]) - - // Choose enough variants - const variantWeights = experiment.variants.map(variant => variant.weight === undefined ? 1 : variant.weight) - while (variantIndexes.length < (experiment.sections || 1)) { - const index = weightedRandom(variantWeights) - variantWeights[index] = 0 - variantIndexes.push(index) - } - - // Write exp cookie if changed - const expCookie = experiment.experimentID + '.' + variantIndexes.join('-') - if (cookie !== expCookie) { - setCookie(ctx, 'exp', expCookie, experiment.maxAge) - } - - // Compute global classes to be injected - classes = variantIndexes.map(index => 'exp-' + experiment.name + '-' + index) - } else { - // No active experiment - experiment = {} - variantIndexes = [] - classes = [] - } - - ctx.experiment = { - $experimentIndex: experimentIndex, - $variantIndexes: variantIndexes, - $activeVariants: variantIndexes.map(index => experiment.variants[index]), - $classes: classes, - ...experiment - } -} - -function getCookie (ctx, name) { - if (process.server && !ctx.req) { - return - } - - // Get and parse cookies - const cookieStr = process.client ? document.cookie : ctx.req.headers.cookie - const cookies = parseCookie(cookieStr || '') || {} - - return cookies[name] -} - -function setCookie (ctx, name, value, maxAge = MAX_AGE) { - const serializedCookie = serializeCookie(name, value, { - path: '/', - maxAge - }) - - if (process.client) { - // Set in browser - document.cookie = serializedCookie - } else if (process.server && ctx.res) { - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader('Set-Cookie') - let value = serializedCookie - if (prev) { - value = Array.isArray(prev) - ? prev.concat(serializedCookie) - : [prev, serializedCookie] - } - ctx.res.setHeader('Set-Cookie', value) - } -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize ({ experiment }) { - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - return - } - - const exp = experiment.experimentID + '.' + experiment.$variantIndexes.join('-') - - window.ga('set', 'exp', exp) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/.eslintrc.js deleted file mode 100644 index b69885e1..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/.eslintrc.js +++ /dev/null @@ -1,45 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 1, - // Disalow semicolons - semi: ['error', 'never'] - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - ecmaVersion: 2022 - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/main.js deleted file mode 100644 index 2615cf99..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/main.js +++ /dev/null @@ -1,414 +0,0 @@ -import Cookie from "cookie"; -import JsCookie from "js-cookie"; -import Vue from "vue"; -import VueI18n from "vue-i18n"; -import {nuxtI18nSeo} from "./seo-head"; -import {validateRouteParams} from "./utils"; - -Vue.use(VueI18n); - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'; -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>'; -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %>; -const STRATEGY = '<%= options.strategy %>'; -const lazy = <%= options.lazy %>; -const vuex = <%= JSON.stringify(options.vuex) %>; -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %>; -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>); - -export default async (context) => { - - const {app, route, store, req, res, redirect} = context; - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %>; - const getHostname = <%= options.getHostname %>; - const getForwarded = <%= options.getForwarded %>; - const getLocaleDomain = <%= options.getLocaleDomain %>; - const syncVuex = <%= options.syncVuex %>; - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - - store.registerModule( - vuex.moduleName, - { - "namespaced": true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>"locale": "", <% } %> - <% if (options.vuex.syncMessages) { %>"messages": {}, <% } %> - <% if (options.vuex.syncRouteParams) { %>"routeParams": {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({commit}, locale) { - - commit( - "setLocale", - locale - ); - - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({commit}, messages) { - - commit( - "setMessages", - messages - ); - - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({commit}, params) { - - if (process.env.NODE_ENV === "development") { - - validateRouteParams(params); - - } - commit( - "setRouteParams", - params - ); - - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - - state.locale = locale; - - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - - state.messages = messages; - - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - - state.routeParams = params; - - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - "localeRouteParams": ({routeParams}) => (locale) => routeParams[locale] || {} - <% } %> - } - }, - {"preserveState": Boolean(store.state[vuex.moduleName])} - ); - - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %>; - const {useCookie, cookieKey} = detectBrowserLanguage; - - const getLocaleCookie = () => { - - if (useCookie) { - - if (process.client) { - - return JsCookie.get(cookieKey); - - } else if (req && typeof req.headers.cookie !== "undefined") { - - const cookies = req.headers && req.headers.cookie - ? Cookie.parse(req.headers.cookie) - : {}; - return cookies[cookieKey]; - - } - - } - - }; - - const setLocaleCookie = (locale) => { - - if (!useCookie) { - - return; - - } - const date = new Date(); - if (process.client) { - - JsCookie.set( - cookieKey, - locale, - { - "expires": new Date(date.setDate(date.getDate() + 365)), - "path": "/" - } - ); - - } else if (res) { - - let headers = res.getHeader("Set-Cookie") || []; - if (typeof headers === "string") { - - headers = [headers]; - - } - - const redirectCookie = Cookie.serialize( - cookieKey, - locale, - { - "expires": new Date(date.setDate(date.getDate() + 365)), - "path": "/" - } - ); - headers.push(redirectCookie); - - res.setHeader( - "Set-Cookie", - headers - ); - - } - - }; - - const loadAndSetLocale = async (newLocale, {initialSetup = false} = {}) => { - - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - - return; - - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - - return; - - } - - const oldLocale = app.i18n.locale; - - if (!initialSetup) { - - app.i18n.beforeLanguageSwitch( - oldLocale, - newLocale - ); - - if (useCookie) { - - app.i18n.setLocaleCookie(newLocale); - - } - - } - - // Lazy-loading enabled - if (lazy) { - - const {loadLanguageAsync} = require("./utils"); - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - - await loadLanguageAsync( - context, - app.i18n.fallbackLocale - ); - - } - - await loadLanguageAsync( - context, - newLocale - ); - - } - - app.i18n.locale = newLocale; - - if (!initialSetup) { - - app.i18n.onLanguageSwitched( - oldLocale, - newLocale - ); - - } - - await syncVuex( - newLocale, - app.i18n.getLocaleMessage(newLocale) - ); - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - - const route = app.i18n.__route; - const routeName = route && route.name - ? app.getRouteBaseName(route) - : "index"; - const redirectPath = app.localePath( - {...route, - "name": routeName}, - newLocale - ); - - if (route && route.path !== redirectPath) { - - redirect(redirectPath); - - } - - } - - }; - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>); - app.i18n.locales = <%= JSON.stringify(options.locales) %>; - app.i18n.defaultLocale = '<%= options.defaultLocale %>'; - app.i18n.differentDomains = <%= options.differentDomains %>; - app.i18n.forwardedHost = <%= options.forwardedHost %>; - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %>; - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %>; - app.i18n.setLocaleCookie = setLocaleCookie; - app.i18n.getLocaleCookie = getLocaleCookie; - app.i18n.setLocale = (locale) => loadAndSetLocale(locale); - - // Current route. Updated from middleware also. - app.i18n.__route = route; - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo; - - if (store && store.state.localeDomains) { - - app.i18n.locales.forEach((locale) => { - - locale.domain = store.state.localeDomains[locale.code]; - - }); - - } - - let locale = app.i18n.defaultLocale || null; - - if (app.i18n.differentDomains) { - - const domainLocale = getLocaleDomain(); - locale = domainLocale - ? domainLocale - : locale; - - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - - const routesNameSeparator = '<%= options.routesNameSeparator %>'; - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>'; - - const routeLocale = getLocaleFromRoute( - route, - routesNameSeparator, - defaultLocaleRouteNameSuffix, - app.i18n.locales - ); - locale = routeLocale - ? routeLocale - : locale; - - } else if (useCookie) { - - locale = getLocaleCookie() || locale; - - } - - await loadAndSetLocale( - locale, - {"initialSetup": true} - ); - - app.i18n.__detectBrowserLanguage = async (route) => { - - const {alwaysRedirect, fallbackLocale} = detectBrowserLanguage; - - if (detectBrowserLanguage) { - - let browserLocale; - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== "1") { - - /* - * Get preferred language from cookie if present and enabled - * Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - */ - } else if (process.client && typeof navigator !== "undefined" && navigator.language) { - - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring( - 0, - 2 - ); - - } else if (req && typeof req.headers["accept-language"] !== "undefined") { - - browserLocale = req.headers["accept-language"].split(",")[0].toLocaleLowerCase().substring( - 0, - 2 - ); - - } - - if (browserLocale) { - - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - - let redirectToLocale = fallbackLocale; - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - - redirectToLocale = browserLocale; - - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - - if (redirectToLocale !== app.i18n.locale) { - - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale); - - } else if (useCookie && !getLocaleCookie()) { - - app.i18n.setLocaleCookie(redirectToLocale); - - } - - } - - return true; - - } - - } - - } - - return false; - - }; - - await app.i18n.__detectBrowserLanguage(route); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/routing.js deleted file mode 100644 index ddf568e0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/routing.js +++ /dev/null @@ -1,168 +0,0 @@ -import "./middleware" -import Vue from "vue" - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %>; -const STRATEGY = '<%= options.strategy %>'; -const vuex = <%= JSON.stringify(options.vuex) %>; -const routesNameSeparator = '<%= options.routesNameSeparator %>'; -const defaultLocale = '<%= options.defaultLocale %>'; - -function localePathFactory (i18nPath, routerPath) { - - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>'; - - return function localePath (route, locale) { - - // Abort if no route or no locale - if (!route) {return} - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy'); - } - - locale ||= this[i18nPath].locale; - - if (!locale) {return} - - // If route parameters is a string, use it as the route's name - if (typeof route === "string") { - - route = {name: route}; - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX -? "" : routesNameSeparator + locale); - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - - name += routesNameSeparator + defaultLocaleRouteNameSuffix; - } - - const localizedRoute = { ...route, name} - - const {params} = localizedRoute; - if (params && params["0"] === undefined && params.pathMatch) { - - params["0"] = params.pathMatch; - } - - // Resolve localized route - const router = this[routerPath]; - const {route: {fullPath}} = router.resolve(localizedRoute); - return fullPath; - }; - -} - - -function switchLocalePathFactory (i18nPath) { - - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>'; - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'; - - return function switchLocalePath (locale) { - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy'); - } - - const name = this.getRouteBaseName(); - if (!name) { - - return "" - } - - const {params, ...routeCopy} = this.$route; - let langSwitchParams = {}; - <% if (options.vuex) { %> - if (this.$store) { - - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale); - } - <% } %> - const baseRoute = { ...routeCopy, name, - params: { - ...params, - ...langSwitchParams, - '0': params.pathMatch - }} - let path = this.localePath(baseRoute, -locale); - - // Handle different domains - if (this[i18nPath].differentDomains) { - - const lang = this[i18nPath].locales.find((l) => l[LOCALE_CODE_KEY] === locale); - if (lang && lang[LOCALE_DOMAIN_KEY]) { - - let protocol; - if (process.server) { - - const isHTTPS = require("is-https"); - const {req} = this.$options._parentVnode.ssrContext; - protocol = isHTTPS(req) -? "https" : "http" - } else { - - protocol = window.location.protocol.split(":")[0]; - } - path = `${protocol }://${ lang[LOCALE_DOMAIN_KEY] }${path}` - } else { - - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale); - } - } - return path; - }; - -} - -function getRouteBaseNameFactory (contextRoute) { - - const routeGetter = contextRoute -? (route) => route || contextRoute - : function (route) { - - return route || this.$route; - }; - - return function getRouteBaseName (route) { - - route = routeGetter.call(this, -route); - if (!route.name) { - - return null; - } - return route.name.split(routesNameSeparator)[0]; - }; - -} - -const plugin = { - install (Vue) { - - Vue.mixin({ - methods: { - localePath: localePathFactory("$i18n", -'$router'), - switchLocalePath: switchLocalePathFactory("$i18n"), - getRouteBaseName: getRouteBaseNameFactory() - } - }); - } -}; - -export default ({app, route}) => { - - Vue.use(plugin); - app.localePath = localePathFactory("i18n", -'router'); - app.switchLocalePath = switchLocalePathFactory("i18n"); - app.getRouteBaseName = getRouteBaseNameFactory(route); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/seo.js deleted file mode 100644 index 9a1893d9..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/seo.js +++ /dev/null @@ -1,14 +0,0 @@ -import Vue from "vue"; -import {nuxtI18nSeo} from "./seo-head"; - -const plugin = { - install (Vue) { - - Vue.mixin({ - "head": nuxtI18nSeo - }); - - } -}; - -Vue.use(plugin); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/main.js deleted file mode 100644 index 6b71a6f3..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/main.js +++ /dev/null @@ -1,260 +0,0 @@ -import Cookie from 'cookie' -import JsCookie from 'js-cookie' -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import { nuxtI18nSeo } from './seo-head' -import { validateRouteParams } from './utils' - -Vue.use(VueI18n) - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const lazy = <%= options.lazy %> -const vuex = <%= JSON.stringify(options.vuex) %> -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %> -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - -export default async (context) => { - const { app, route, store, req, res, redirect } = context - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const getHostname = <%= options.getHostname %> - const getForwarded = <%= options.getForwarded %> - const getLocaleDomain = <%= options.getLocaleDomain %> - const syncVuex = <%= options.syncVuex %> - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - store.registerModule(vuex.moduleName, { - namespaced: true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>locale: '', <% } %> - <% if (options.vuex.syncMessages) { %>messages: {}, <% } %> - <% if (options.vuex.syncRouteParams) { %>routeParams: {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({ commit }, locale) { - commit('setLocale', locale) - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({ commit }, messages) { - commit('setMessages', messages) - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({ commit }, params) { - if (process.env.NODE_ENV === 'development') { - validateRouteParams(params) - } - commit('setRouteParams', params) - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - state.locale = locale - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - state.messages = messages - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - state.routeParams = params - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - localeRouteParams: ({ routeParams }) => locale => routeParams[locale] || {} - <% } %> - } - }, { preserveState: !!store.state[vuex.moduleName] }) - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - const { useCookie, cookieKey } = detectBrowserLanguage - - const getLocaleCookie = () => { - if (useCookie) { - if (process.client) { - return JsCookie.get(cookieKey) - } else if (req && typeof req.headers.cookie !== 'undefined') { - const cookies = req.headers && req.headers.cookie ? Cookie.parse(req.headers.cookie) : {} - return cookies[cookieKey] - } - } - } - - const setLocaleCookie = locale => { - if (!useCookie) { - return - } - const date = new Date() - if (process.client) { - JsCookie.set(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - } else if (res) { - let headers = res.getHeader('Set-Cookie') || [] - if (typeof headers === 'string') { - headers = [headers] - } - - const redirectCookie = Cookie.serialize(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - headers.push(redirectCookie) - - res.setHeader('Set-Cookie', headers) - } - } - - const loadAndSetLocale = async (newLocale, { initialSetup = false } = {}) => { - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - return - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - return - } - - const oldLocale = app.i18n.locale - - if (!initialSetup) { - app.i18n.beforeLanguageSwitch(oldLocale, newLocale) - - if (useCookie) { - app.i18n.setLocaleCookie(newLocale) - } - } - - // Lazy-loading enabled - if (lazy) { - const { loadLanguageAsync } = require('./utils') - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - await loadLanguageAsync(context, app.i18n.fallbackLocale) - } - - await loadLanguageAsync(context, newLocale) - } - - app.i18n.locale = newLocale - - if (!initialSetup) { - app.i18n.onLanguageSwitched(oldLocale, newLocale) - } - - await syncVuex(newLocale, app.i18n.getLocaleMessage(newLocale)) - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - const route = app.i18n.__route - const routeName = route && route.name ? app.getRouteBaseName(route) : 'index' - const redirectPath = app.localePath(Object.assign({}, route, { name: routeName }), newLocale) - - if (route && route.path !== redirectPath) { - redirect(redirectPath) - } - } - } - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>) - app.i18n.locales = <%= JSON.stringify(options.locales) %> - app.i18n.defaultLocale = '<%= options.defaultLocale %>' - app.i18n.differentDomains = <%= options.differentDomains %> - app.i18n.forwardedHost = <%= options.forwardedHost %> - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %> - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %> - app.i18n.setLocaleCookie = setLocaleCookie - app.i18n.getLocaleCookie = getLocaleCookie - app.i18n.setLocale = (locale) => loadAndSetLocale(locale) - - // Current route. Updated from middleware also. - app.i18n.__route = route - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo - - if (store && store.state.localeDomains) { - app.i18n.locales.forEach(locale => { - locale.domain = store.state.localeDomains[locale.code] - }) - } - - let locale = app.i18n.defaultLocale || null - - if (app.i18n.differentDomains) { - const domainLocale = getLocaleDomain() - locale = domainLocale || locale - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, app.i18n.locales) - locale = routeLocale || locale - } else if (useCookie) { - locale = getLocaleCookie() || locale - } - - await loadAndSetLocale(locale, { initialSetup: true }) - - app.i18n.__detectBrowserLanguage = async route => { - const { alwaysRedirect, fallbackLocale } = detectBrowserLanguage - - if (detectBrowserLanguage) { - let browserLocale - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== '1') { - // Get preferred language from cookie if present and enabled - // Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - } else if (process.client && typeof navigator !== 'undefined' && navigator.language) { - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring(0, 2) - } else if (req && typeof req.headers['accept-language'] !== 'undefined') { - browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) - } - - if (browserLocale) { - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - let redirectToLocale = fallbackLocale - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - redirectToLocale = browserLocale - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - if (redirectToLocale !== app.i18n.locale) { - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale) - } else if (useCookie && !getLocaleCookie()) { - app.i18n.setLocaleCookie(redirectToLocale) - } - } - - return true - } - } - } - - return false - } - - await app.i18n.__detectBrowserLanguage(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/routing.js deleted file mode 100644 index 46b2941b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/routing.js +++ /dev/null @@ -1,137 +0,0 @@ -import './middleware' -import Vue from 'vue' - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const vuex = <%= JSON.stringify(options.vuex) %> -const routesNameSeparator = '<%= options.routesNameSeparator %>' -const defaultLocale = '<%= options.defaultLocale %>' - -function localePathFactory (i18nPath, routerPath) { - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - return function localePath (route, locale) { - // Abort if no route or no locale - if (!route) return - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy') - } - - locale = locale || this[i18nPath].locale - - if (!locale) return - - // If route parameters is a string, use it as the route's name - if (typeof route === 'string') { - route = { name: route } - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX ? '' : routesNameSeparator + locale) - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - name += routesNameSeparator + defaultLocaleRouteNameSuffix - } - - const localizedRoute = Object.assign({}, route, { name }) - - const { params } = localizedRoute - if (params && params['0'] === undefined && params.pathMatch) { - params['0'] = params.pathMatch - } - - // Resolve localized route - const router = this[routerPath] - const { route: { fullPath } } = router.resolve(localizedRoute) - return fullPath - } -} - -function switchLocalePathFactory (i18nPath) { - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - - return function switchLocalePath (locale) { - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy') - } - - const name = this.getRouteBaseName() - if (!name) { - return '' - } - - const { params, ...routeCopy } = this.$route - let langSwitchParams = {} - <% if (options.vuex) { %> - if (this.$store) { - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale) - } - <% } %> - const baseRoute = Object.assign({}, routeCopy, { - name, - params: { - ...params, - ...langSwitchParams, - 0: params.pathMatch - } - }) - let path = this.localePath(baseRoute, locale) - - // Handle different domains - if (this[i18nPath].differentDomains) { - const lang = this[i18nPath].locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (lang && lang[LOCALE_DOMAIN_KEY]) { - let protocol - if (process.server) { - const isHTTPS = require('is-https') - const { req } = this.$options._parentVnode.ssrContext - protocol = isHTTPS(req) ? 'https' : 'http' - } else { - protocol = window.location.protocol.split(':')[0] - } - path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale) - } - } - return path - } -} - -function getRouteBaseNameFactory (contextRoute) { - const routeGetter = contextRoute - ? route => route || contextRoute - : function (route) { - return route || this.$route - } - - return function getRouteBaseName (route) { - route = routeGetter.call(this, route) - if (!route.name) { - return null - } - return route.name.split(routesNameSeparator)[0] - } -} - -const plugin = { - install (Vue) { - Vue.mixin({ - methods: { - localePath: localePathFactory('$i18n', '$router'), - switchLocalePath: switchLocalePathFactory('$i18n'), - getRouteBaseName: getRouteBaseNameFactory() - } - }) - } -} - -export default ({ app, route }) => { - Vue.use(plugin) - app.localePath = localePathFactory('i18n', 'router') - app.switchLocalePath = switchLocalePathFactory('i18n') - app.getRouteBaseName = getRouteBaseNameFactory(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/seo.js deleted file mode 100644 index ed7159e3..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/plugins/seo.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from 'vue' -import { nuxtI18nSeo } from './seo-head' - -const plugin = { - install (Vue) { - Vue.mixin({ - head: nuxtI18nSeo - }) - } -} - -Vue.use(plugin) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 4638d582..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2022, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/middleware.js deleted file mode 100644 index 43a7d877..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/middleware.js +++ /dev/null @@ -1,57 +0,0 @@ -import middleware from "../middleware"; - -middleware.i18n = async (context) => { - - const {app, req, route, redirect, isHMR} = context; - - if (isHMR) { - - return; - - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'; - const getLocaleCodes = <%= options.getLocaleCodes %>; - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>'; - if (route.path === "/" && rootRedirect) { - - redirect( - `/${rootRedirect}`, - route.query - ); - return; - - } - - // Update for setLocale to have up to date route - app.i18n.__route = route; - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %>; - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - - return; - - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null; - const getLocaleFromRoute = <%= options.getLocaleFromRoute %>; - const routesNameSeparator = '<%= options.routesNameSeparator %>'; - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>'; - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>); - - const routeLocale = getLocaleFromRoute( - route, - routesNameSeparator, - defaultLocaleRouteNameSuffix, - locales - ); - - await app.i18n.setLocale(routeLocale - ? routeLocale - : locale); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/options.js deleted file mode 100644 index 7ce9c660..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/options.js +++ /dev/null @@ -1,18 +0,0 @@ -<% - function stringifyValue (value) { - if (typeof value === 'string') { - return `'${value}'`; - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value); - } - return JSON.stringify(value); - - } - - for (const [ - key, - value - ] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %>; -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/seo-head.js deleted file mode 100644 index 15546cdc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/seo-head.js +++ /dev/null @@ -1,114 +0,0 @@ -import VueMeta from "vue-meta"; - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>'; -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'; -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>'; -const BASE_URL = '<%= options.baseUrl %>'; -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %>; -const STRATEGY = '<%= options.strategy %>'; - -export const nuxtI18nSeo = function () { - - if ( - !(VueMeta.hasMetaInfo - ? VueMeta.hasMetaInfo(this) - : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false - ) { - - return {}; - - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find((l) => l[LOCALE_CODE_KEY] === this.$i18n.locale); - const htmlAttrs = {}; - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY]; - - } - - const link = []; - // Hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - - link.push(...this.$i18n.locales. - map((locale) => { - - if (locale[LOCALE_ISO_KEY]) { - - return { - "hid": `alternate-hreflang-${locale[LOCALE_ISO_KEY]}`, - "rel": "alternate", - "href": BASE_URL + this.switchLocalePath(locale.code), - "hreflang": locale[LOCALE_ISO_KEY] - }; - - } else { - - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link'); - return null; - - } - - }). - filter((item) => Boolean(item))); - - } - - // Canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]); - if (canonicalPath && canonicalPath !== this.$route.path) { - - // Current page is not the canonical one -- add a canonical link - link.push({ - "hid": `canonical-lang-${currentLocaleData[LOCALE_CODE_KEY]}`, - "rel": "canonical", - "href": BASE_URL + canonicalPath - }); - - } - - } - - // Og:locale meta - const meta = []; - // Og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - - meta.push({ - "hid": "og:locale", - "property": "og:locale", - // Replace dash with underscore as defined in spec: language_TERRITORY - "content": currentLocaleData[LOCALE_ISO_KEY].replace( - /-/g, - "_" - ) - }); - - } - // Og:locale - alternate - meta.push(...this.$i18n.locales. - filter((l) => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]). - map((locale) => ({ - "hid": `og:locale:alternate-${locale[LOCALE_ISO_KEY]}`, - "property": "og:locale:alternate", - "content": locale[LOCALE_ISO_KEY].replace( - /-/g, - "_" - ) - }))); - - return { - htmlAttrs, - link, - meta - }; - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/utils.js deleted file mode 100644 index 74952fde..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/all-rules-test/utils.js +++ /dev/null @@ -1,97 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>'; -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>'; -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>'; -const getLocaleCodes = <%= options.getLocaleCodes %>; -const locales = <%= JSON.stringify(options.locales) %>; -const localeCodes = getLocaleCodes(locales); - -const isObject = (value) => value && !Array.isArray(value) && typeof value === "object"; - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - - const {app} = context; - - if (!app.i18n.loadedLanguages) { - - app.i18n.loadedLanguages = []; - - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - - const langOptions = app.i18n.locales.find((l) => l[LOCALE_CODE_KEY] === locale); - if (langOptions) { - - const file = langOptions[LOCALE_FILE_KEY]; - if (file) { - - <% if (options.langDir) { %> - try { - - const module = await import(/* WebpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file); - const messages = module.default - ? module.default - : module; - const result = typeof messages === "function" - ? await Promise.resolve(messages(context)) - : messages; - app.i18n.setLocaleMessage( - locale, - result - ); - app.i18n.loadedLanguages.push(locale); - - } catch (error) { - - console.error(error); - - } - <% } %> - - } else { - - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale); - - } - - } - - } - -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = (routeParams) => { - - if (!isObject(routeParams)) { - - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`); - return; - - } - Object.entries(routeParams).forEach(([ - key, - value - ]) => { - - if (!localeCodes.includes(key)) { - - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`); - - } else if (!isObject(value)) { - - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`); - - } - - }); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/middleware.js deleted file mode 100644 index d6e8f059..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/middleware.js +++ /dev/null @@ -1,39 +0,0 @@ -import middleware from '../middleware' - -middleware.i18n = async (context) => { - const { app, req, route, redirect, isHMR } = context - - if (isHMR) { - return - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - const getLocaleCodes = <%= options.getLocaleCodes %> - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>' - if (route.path === '/' && rootRedirect) { - redirect('/' + rootRedirect, route.query) - return - } - - // Update for setLocale to have up to date route - app.i18n.__route = route - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - return - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, locales) - - await app.i18n.setLocale(routeLocale || locale) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/options.js deleted file mode 100644 index 70d4be5f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/options.js +++ /dev/null @@ -1,15 +0,0 @@ -<% - function stringifyValue (value) { - if (typeof value === 'string') { - return `'${value}'` - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value) - } else { - return JSON.stringify(value) - } - } - - for (const [key, value] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/seo-head.js deleted file mode 100644 index 62fbb83a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/seo-head.js +++ /dev/null @@ -1,88 +0,0 @@ -import VueMeta from 'vue-meta' - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>' -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>' -const BASE_URL = '<%= options.baseUrl %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' - -export const nuxtI18nSeo = function () { - if ( - !(VueMeta.hasMetaInfo ? VueMeta.hasMetaInfo(this) : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - (this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false) - ) { - return {} - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale) - const htmlAttrs = {} - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY] - } - - const link = [] - // hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - link.push(...this.$i18n.locales - .map(locale => { - if (locale[LOCALE_ISO_KEY]) { - return { - hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY], - rel: 'alternate', - href: BASE_URL + this.switchLocalePath(locale.code), - hreflang: locale[LOCALE_ISO_KEY] - } - } else { - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link') - return null - } - }) - .filter(item => !!item)) - } - - // canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]) - if (canonicalPath && canonicalPath !== this.$route.path) { - // Current page is not the canonical one -- add a canonical link - link.push({ - hid: 'canonical-lang-' + currentLocaleData[LOCALE_CODE_KEY], - rel: 'canonical', - href: BASE_URL + canonicalPath - }) - } - } - - // og:locale meta - const meta = [] - // og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - meta.push({ - hid: 'og:locale', - property: 'og:locale', - // Replace dash with underscore as defined in spec: language_TERRITORY - content: currentLocaleData[LOCALE_ISO_KEY].replace(/-/g, '_') - }) - } - // og:locale - alternate - meta.push( - ...this.$i18n.locales - .filter(l => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]) - .map(locale => ({ - hid: 'og:locale:alternate-' + locale[LOCALE_ISO_KEY], - property: 'og:locale:alternate', - content: locale[LOCALE_ISO_KEY].replace(/-/g, '_') - })) - ) - - return { - htmlAttrs, - link, - meta - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/utils.js deleted file mode 100644 index 5b80726a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-i18n/src/templates/utils.js +++ /dev/null @@ -1,61 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>' -const getLocaleCodes = <%= options.getLocaleCodes %> -const locales = <%= JSON.stringify(options.locales) %> -const localeCodes = getLocaleCodes(locales) - -const isObject = value => value && !Array.isArray(value) && typeof value === 'object' - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - const { app } = context - - if (!app.i18n.loadedLanguages) { - app.i18n.loadedLanguages = [] - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - const langOptions = app.i18n.locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (langOptions) { - const file = langOptions[LOCALE_FILE_KEY] - if (file) { - <% if (options.langDir) { %> - try { - const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file) - const messages = module.default ? module.default : module - const result = typeof messages === 'function' ? await Promise.resolve(messages(context)) : messages - app.i18n.setLocaleMessage(locale, result) - app.i18n.loadedLanguages.push(locale) - } catch (error) { - console.error(error) - } - <% } %> - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale) - } - } - } -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = routeParams => { - if (!isObject(routeParams)) { - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`) - return - } - Object.entries(routeParams).forEach(([key, value]) => { - if (!localeCodes.includes(key)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`) - } else if (!isObject(value)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/.eslintrc.js deleted file mode 100644 index 0b87afda..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/plugin.js deleted file mode 100644 index 3d87a070..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,36 +0,0 @@ -import LogRocket from "logrocket"; -import createPlugin from "logrocket-vuex"; - -const LOGROCKET_ID = '<%= options.logRocketId %>'; -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %>; - -export default function ({app, store}, inject) { - - // Variable for detecting production mode - const isProduction = process.env.NODE_ENV === "production"; - - /* - * Only run on browser and when in production mode - * or when the developer enables devModeAllowed - */ - if (LOGROCKET_ID && (process.client && isProduction || DEV_MODE_ALLOWED)) { - - // Initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID); - - } - // If nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - - const logrocketPlugin = createPlugin(LogRocket); - // Add plugin to vuex store - logrocketPlugin(store); - - } - // Globally inject LogRocket instance - inject( - "logRocket", - LogRocket - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/plugin.js deleted file mode 100644 index ebc7ab35..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxt-logrocket/lib/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -import LogRocket from 'logrocket' -import createPlugin from 'logrocket-vuex' - -const LOGROCKET_ID = '<%= options.logRocketId %>' -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %> - -export default function ({ app, store }, inject) { - // variable for detecting production mode - const isProduction = process.env.NODE_ENV === 'production' - // only run on browser and when in production mode - // or when the developer enables devModeAllowed - if (LOGROCKET_ID && ((process.client && isProduction) || DEV_MODE_ALLOWED)) { - // initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID) - } - // if nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - const logrocketPlugin = createPlugin(LogRocket) - // add plugin to vuex store - logrocketPlugin(store) - } - // globally inject LogRocket instance - inject('logRocket', LogRocket) -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/.eslintrc.js deleted file mode 100644 index 0d0120af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/.eslintrc.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = { - 'root': true, - 'parserOptions': { - 'ecmaVersion': 9, - 'sourceType': 'module' - }, - 'env': { - 'node': true, - 'es6': true, - 'jest': true - }, - 'plugins': [ - 'unicorn' - ], - 'extends': [ - 'standard', - 'plugin:unicorn/recommended', - // 'prettier/unicorn', - // 'prettier/standard' - 'prettier' - ], - 'rules': { - 'curly': [ - 'error', - 'all' - ], - 'no-console': 1, - 'no-debugger': 1, - 'valid-jsdoc': ['error'], - 'space-before-function-paren': 0, - }, - 'globals': { - 'jest/globals': true, - 'jasmine': true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js deleted file mode 100644 index 883012b7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js +++ /dev/null @@ -1,77 +0,0 @@ -// @ts-nocheck -import Vue from "vue"; - -import { - interopDefault -} from "./utils"; - -const mdComps = { - <% options.components.forEach(([ - relativePath, - filePath - ]) => { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),`); - }); -%> -}; - - -Vue.component( - "nuxtent-body", - { - "name": "NuxtentBody", - render (createElement) { - - const body = this.body || ""; - const {tag} = this; - - const dataObject = { - "props": { - tag - }, - "on": this.$listeners, - "domProps": {} - }; - if (typeof body === "object") { - - if (body.relativePath) { - - const MarkdownComponent = mdComps[body.relativePath]; - dataObject.nativeOn = this.$listeners; - return createElement( - MarkdownComponent, - dataObject - ); - - } - dataObject.domProps.innerHTML = JSON.stringify(body); - return createElement( - tag, - dataObject - ); - - } - - dataObject.domProps.innerHTML = body; - return createElement( - tag, - dataObject - ); - - }, - "props": { - "tag": { - "type": String, - "default": "div" - }, - "body": { - "type": [ - Object, - String - ], - "required": true - } - } - } -); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js deleted file mode 100644 index 3daa5fbc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({"api": (options || {}).api}) %>; -export default config; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-components.template.js deleted file mode 100644 index 3925b40a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-components.template.js +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Vue from 'vue' - -import { - interopDefault -} from './utils' - -const mdComps = { - <% for (const [relativePath, filePath] of options.components) { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),` - )} -%> -} - - -Vue.component('nuxtent-body', { - name: 'NuxtentBody', - render(createElement) { - const body = this.body || '' - const tag = this.tag - - const dataObject = { - props: { - tag - }, - on: this.$listeners, - domProps: {}, - } - if (typeof body === 'object') { - if (body.relativePath) { - const MarkdownComponent = mdComps[body.relativePath] - dataObject.nativeOn = this.$listeners - return createElement(MarkdownComponent, dataObject) - } - dataObject.domProps.innerHTML = JSON.stringify(body) - return createElement(tag, dataObject) - } else { - dataObject.domProps.innerHTML = body - return createElement(tag, dataObject) - } - }, - props: { - tag: { - type: String, - default: 'div', - }, - body: { - type: [Object, String], - required: true - } - } -}); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-config.template.js deleted file mode 100644 index a49cf439..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/nuxtent-module/lib/plugins/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({api: (options || {}).api}) %> -export default config diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/.eslintrc deleted file mode 100644 index 685fa09c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/.eslintrc +++ /dev/null @@ -1,33 +0,0 @@ - -{ - "root": true, - "extends": ["standard", "plugin:lodash-template/base"], - "plugins": [ - "jest" - ], - "env": { - "jest/globals": true - }, - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "ecmaVersion": 2022 - }, - "globals": { - "options": true, - "serialize": true - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/plugin.js deleted file mode 100644 index 4feb51dc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/all-rules-test/plugin.js +++ /dev/null @@ -1,13 +0,0 @@ -export default async function (ctx, inject) { - - const icons = <%= JSON.stringify(options.icons) %>; - const getIcon = (size) => icons[`${size}x${size}`] || ""; - inject( - '<%= options.iconProperty.replace( - '$', - '' - ) %>', - getIcon - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/plugin.js deleted file mode 100644 index c47e2881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/icon/plugin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default async function (ctx, inject) { - const icons = <%= JSON.stringify(options.icons) %> - const getIcon = size => icons[size + 'x' + size] || '' - inject('<%= options.iconProperty.replace('$', '') %>', getIcon) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/plugin.js deleted file mode 100644 index bfb834b9..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/all-rules-test/plugin.js +++ /dev/null @@ -1,19 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || []; - -OneSignal.push([ - "init", - <%= JSON.stringify( - options.init, - null, - 2 - ) %> -]); - -export default function (ctx, inject) { - - inject( - "OneSignal", - OneSignal - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/plugin.js deleted file mode 100644 index 9f2e9eed..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/onesignal/plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || [] - -OneSignal.push(['init', <%= JSON.stringify(options.init, null, 2) %>]) - -export default function (ctx, inject) { - inject('OneSignal', OneSignal) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 11bebfa1..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2022, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/sw.js deleted file mode 100644 index 2d710a51..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/sw.js +++ /dev/null @@ -1,111 +0,0 @@ -importScripts(<%= [ - options.workboxURL, - ...options.importScripts - ].map((i) => `'${i}'`).join(', ') %>); - -/* - * -------------------------------------------------- - * Configure - * -------------------------------------------------- - */ - -<% if (options.config) { %> -// Set workbox config -workbox.setConfig(<%= JSON.stringify( - options.config, - null, - 2 - ) %>); -<% } %> - -<% if (options.cacheNames) { %> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify( - options.cacheNames, - null, - 2 - ) %>); -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim(); -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting(); -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches(); -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize(); -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>;// -- End of workboxExtensions -- -<% } %> - -/* - * -------------------------------------------------- - * Precaches - * -------------------------------------------------- - */ - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute( - <%= JSON.stringify( - options.preCaching, - null, - 2 - ) %>, - <%= JSON.stringify( - options.cacheOptions, - null, - 2 - ) %> -); -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>;// -- End of cachingExtensions -- -<% } %> - -/* - * -------------------------------------------------- - * Runtime Caching - * -------------------------------------------------- - */ - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach((r) => { - %>workbox.routing.registerRoute( - new RegExp('<%= r.urlPattern %>'), - new workbox.strategies.<%= r.handler %>(<%= JSON.stringify(r.strategyOptions || {}) %>), - '<%= r.method %>' -); -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute( - new RegExp('<%= options.pagesURLPattern %>'), - ({event}) => { - - return new workbox.strategies.<%= options.offlineStrategy %>().handle({event}). - catch(() => caches.match('<%= options.offlinePage %>')); - - } -)<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>;// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/workbox.js deleted file mode 100644 index 097c235d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/workbox.js +++ /dev/null @@ -1,34 +0,0 @@ -async function register () { - - if (!"serviceWorker" in navigator) { - - throw new Error("serviceWorker is not supported in current browser!"); - - } - - const {Workbox} = await import('workbox-cdn/workbox/workbox-window.<%= options.dev - ? 'dev' - : 'prod' %>.es5.mjs'); - - const workbox = new Workbox( - '<%= options.swURL %>', - { - scope: '<%= options.swScope %>' - } - ); - - await workbox.register(); - - return workbox; - -} - -window.$workbox = register(). - catch((error) => { - - <% if (options.dev) { %> console.error( - "Error registering workbox:", - error - ); - - <% } %> }); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/sw.js deleted file mode 100644 index 3ffb66db..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/sw.js +++ /dev/null @@ -1,74 +0,0 @@ -importScripts(<%= [options.workboxURL, ...options.importScripts].map((i) => `'${i}'`).join(', ') %>) - -// -------------------------------------------------- -// Configure -// -------------------------------------------------- - -<% if (options.config) { %> -// Set workbox config -workbox.setConfig(<%= JSON.stringify(options.config, null, 2) %>) -<% } %> - -<% if (options.cacheNames) { %> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify(options.cacheNames, null, 2) %>) -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim() -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting() -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches() -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize() -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>// -- End of workboxExtensions -- -<% } %> - -// -------------------------------------------------- -// Precaches -// -------------------------------------------------- - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null, 2) %>, <%= JSON.stringify(options.cacheOptions, null, 2) %>) -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>// -- End of cachingExtensions -- -<% } %> - -// -------------------------------------------------- -// Runtime Caching -// -------------------------------------------------- - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach(r => { - %>workbox.routing.registerRoute(new RegExp('<%= r.urlPattern %>'), new workbox.strategies.<%= r.handler %>(<%= JSON.stringify(r.strategyOptions || {}) %>), '<%= r.method %>') -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({ event }) => { - return new workbox.strategies.<%= options.offlineStrategy %>().handle({ event }) - .catch(() => caches.match('<%= options.offlinePage %>')) -})<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/workbox.js deleted file mode 100644 index 3faffb2a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/pwa-module/lib/workbox/templates/workbox.js +++ /dev/null @@ -1,18 +0,0 @@ -async function register () { - if (!'serviceWorker' in navigator) { - throw new Error('serviceWorker is not supported in current browser!') - } - - const { Workbox } = await import('workbox-cdn/workbox/workbox-window.<%= options.dev ? 'dev' : 'prod' %>.es5.mjs') - - const workbox = new Workbox('<%= options.swURL %>', { - scope: '<%= options.swScope %>' - }) - - await workbox.register() - - return workbox -} - -window.$workbox = register() - .catch(error => { <% if (options.dev) { %> console.error('Error registering workbox:', error) <% } %> }) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/.eslintrc.js deleted file mode 100644 index 11474f7d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/.eslintrc.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - ecmaVersion: 2022, - sourceType: 'module' - } - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 4e0acc35..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2022, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2022, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 4f0db5d6..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,229 +0,0 @@ -import {EventEmitter} from "events"; -import Vue from "vue"; - -const API_URL = "https://www.google.com/recaptcha/api.js"; - -class ReCaptcha { - - constructor ({hideBadge, language, siteKey, version}) { - - if (!siteKey) { - - throw new Error("ReCaptcha error: No key provided"); - - } - - if (!version) { - - throw new Error("ReCaptcha error: No version provided"); - - } - - this._elements = {}; - - this._eventBus = null; - this._ready = false; - - this.hideBadge = hideBadge; - this.language = language || "en"; - - this.siteKey = siteKey; - this.version = version; - - } - - destroy () { - - if (this._ready) { - - this._ready = false; - - const {head} = document; - const {style} = this._elements; - - const scripts = [...document.head.querySelectorAll("script")]. - filter((script) => script.src.includes("recaptcha")); - - if (scripts.length) { - - scripts.forEach((script) => head.removeChild(script)); - - } - - if (head.contains(style)) { - - head.removeChild(style); - - } - - } - - } - - async execute (action) { - - try { - - await this.init(); - - if ("grecaptcha" in window) { - - return window.grecaptcha.execute( - this.siteKey, - {action} - ); - - } - - } catch (error) { - - throw new Error("ReCaptcha error: Failed to execute"); - - } - - } - - getResponse () { - - return new Promise((resolve, reject) => { - - if ("grecaptcha" in window) { - - const response = window.grecaptcha.getResponse(); - - if (response) { - - this._eventBus.emit( - "recaptcha-success", - response - ); - resolve(response); - - } else { - - const errorMessage = "Failed to execute"; - - this._eventBus.emit( - "recaptcha-error", - errorMessage - ); - reject(errorMessage); - - } - - } - - }); - - } - - init () { - - if (this._ready) { - - return Promise.resolve(); - - } - - this._eventBus = new EventEmitter(); - this._elements = { - "script": document.createElement("script"), - "style": document.createElement("style") - }; - - const {script, style} = this._elements; - - script.addEventListener( - "error", - () => { - - document.head.removeChild(script); - throw new Error("ReCaptcha error: Failed to load script"); - - } - ); - - script.setAttribute( - "async", - "" - ); - script.setAttribute( - "defer", - "" - ); - - if (this.version === 2) { - - script.setAttribute( - "src", - `${API_URL}?hl=${this.language}` - ); - - } else { - - script.setAttribute( - "src", - `${API_URL}?render=${this.siteKey}` - ); - - } - - document.head.appendChild(script); - - window.recaptchaSuccessCallback = (token) => this._eventBus.emit( - "recaptcha-success", - token - ); - window.recaptchaExpiredCallback = () => this._eventBus.emit("recaptcha-expired"); - window.recaptchaErrorCallback = () => this._eventBus.emit( - "recaptcha-error", - "Failed to execute" - ); - - this._ready = new Promise((resolve) => { - - script.addEventListener( - "load", - () => { - - if (this.version === 3 && this.hideBadge) { - - style.innerHTML = ".grecaptcha-badge { display: none }"; - document.head.appendChild(style); - - } - - window.grecaptcha.ready(resolve); - - } - ); - - }); - - return this._ready; - - } - - on (event, callback) { - - return this._eventBus.on( - event, - callback - ); - - } - -} - -export default function (_, inject) { - - Vue.component( - "recaptcha", - () => import("./recaptcha.vue") - ); - inject( - "recaptcha", - new ReCaptcha(<%= serialize(options) %>) - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/plugin.js deleted file mode 100644 index 7e2f7f44..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/recaptcha-module/lib/plugin.js +++ /dev/null @@ -1,136 +0,0 @@ -import { EventEmitter } from 'events' -import Vue from 'vue' - -const API_URL = 'https://www.google.com/recaptcha/api.js' - -class ReCaptcha { - constructor ({ hideBadge, language, siteKey, version }) { - if (!siteKey) { - throw new Error('ReCaptcha error: No key provided') - } - - if (!version) { - throw new Error('ReCaptcha error: No version provided') - } - - this._elements = {} - - this._eventBus = null - this._ready = false - - this.hideBadge = hideBadge - this.language = language || 'en' - - this.siteKey = siteKey - this.version = version - } - - destroy () { - if (this._ready) { - this._ready = false - - const { head } = document - const { style } = this._elements - - const scripts = [...document.head.querySelectorAll('script')] - .filter(script => script.src.includes('recaptcha')) - - if (scripts.length) { - scripts.forEach(script => head.removeChild(script)) - } - - if (head.contains(style)) { - head.removeChild(style) - } - } - } - - async execute (action) { - try { - await this.init() - - if ('grecaptcha' in window) { - return window.grecaptcha.execute( - this.siteKey, - { action } - ) - } - } catch (error) { - throw new Error('ReCaptcha error: Failed to execute') - } - } - - getResponse () { - return new Promise((resolve, reject) => { - if ('grecaptcha' in window) { - const response = window.grecaptcha.getResponse() - - if (response) { - this._eventBus.emit('recaptcha-success', response) - resolve(response) - } else { - const errorMessage = 'Failed to execute' - - this._eventBus.emit('recaptcha-error', errorMessage) - reject(errorMessage) - } - } - }) - } - - init () { - if (this._ready) { - return Promise.resolve() - } - - this._eventBus = new EventEmitter() - this._elements = { - script: document.createElement('script'), - style: document.createElement('style') - } - - const { script, style } = this._elements - - script.addEventListener('error', () => { - document.head.removeChild(script) - throw new Error('ReCaptcha error: Failed to load script') - }) - - script.setAttribute('async', '') - script.setAttribute('defer', '') - - if (this.version === 2) { - script.setAttribute('src', API_URL + '?hl=' + this.language) - } else { - script.setAttribute('src', API_URL + '?render=' + this.siteKey) - } - - document.head.appendChild(script) - - window.recaptchaSuccessCallback = token => this._eventBus.emit('recaptcha-success', token) - window.recaptchaExpiredCallback = () => this._eventBus.emit('recaptcha-expired') - window.recaptchaErrorCallback = () => this._eventBus.emit('recaptcha-error', 'Failed to execute') - - this._ready = new Promise((resolve) => { - script.addEventListener('load', () => { - if (this.version === 3 && this.hideBadge) { - style.innerHTML = '.grecaptcha-badge { display: none }' - document.head.appendChild(style) - } - - window.grecaptcha.ready(resolve) - }) - }) - - return this._ready - } - - on (event, callback) { - return this._eventBus.on(event, callback) - } -} - -export default function (_, inject) { - Vue.component('Recaptcha', () => import('./recaptcha.vue')) - inject('recaptcha', new ReCaptcha(<%= serialize(options) %>)) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/result.json b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/result.json deleted file mode 100644 index fb53094f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/result.json +++ /dev/null @@ -1,4755 +0,0 @@ -[ - { - "filePath": "/output-with-fix/analytics-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/analytics-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/analytics-module/lib/all-rules-test/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/analytics-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 11 - } - ] - }, - { - "filePath": "/output-with-fix/apollo-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/apollo-module/lib/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/apollo-module/lib/templates/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'none' syntax before 'single' syntax.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 31 - }, - { - "ruleId": "max-lines-per-function", - "message": "Arrow function has too many lines (73). Maximum allowed is 50.", - "line": 20, - "column": 51, - "endLine": 92, - "endColumn": 9 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (46). Maximum allowed is 10.", - "line": 20, - "column": 51, - "endLine": 92, - "endColumn": 9 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 37, - "column": 9, - "endLine": 37, - "endColumn": 10 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 61, - "column": 121, - "endLine": 61, - "endColumn": 130 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__NUXT__'.", - "line": 65, - "column": 33, - "endLine": 65, - "endColumn": 48 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__NUXT__'.", - "line": 66, - "column": 15, - "endLine": 66, - "endColumn": 30 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 66, - "column": 42, - "endLine": 68, - "endColumn": 22 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 108, - "column": 17, - "endLine": 108, - "endColumn": 28 - }, - { - "ruleId": "max-params", - "message": "Async method 'onLogin' has too many parameters (4). Maximum allowed is 3.", - "line": 137, - "column": 13, - "endLine": 137, - "endColumn": 30 - }, - { - "ruleId": "max-lines-per-function", - "message": "Async method 'onLogin' has too many lines (56). Maximum allowed is 50.", - "line": 137, - "column": 24, - "endLine": 192, - "endColumn": 14 - }, - { - "ruleId": "max-statements", - "message": "Async method 'onLogin' has too many statements (13). Maximum allowed is 10.", - "line": 137, - "column": 24, - "endLine": 192, - "endColumn": 14 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'cookieAttributes'.", - "line": 142, - "column": 21, - "endLine": 142, - "endColumn": 37 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 86400.", - "line": 148, - "column": 70, - "endLine": 148, - "endColumn": 75 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1000.", - "line": 148, - "column": 78, - "endLine": 148, - "endColumn": 82 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 179, - "column": 30, - "endLine": 179, - "endColumn": 31 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 210, - "column": 30, - "endLine": 210, - "endColumn": 31 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'getToken' should be before 'onLogout'.", - "line": 224, - "column": 13, - "endLine": 224, - "endColumn": 23 - } - ] - }, - { - "filePath": "/output-with-fix/apollo-module/lib/templates/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/auth-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/auth-module/lib/module/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/auth-module/lib/module/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'none' syntax before 'single' syntax.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 23 - }, - { - "ruleId": "no-undef", - "message": "'hash' is not defined.", - "line": 6, - "column": 61, - "endLine": 6, - "endColumn": 65 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 7, - "column": 5, - "endLine": 7, - "endColumn": 10 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 11, - "column": 16, - "endLine": 11, - "endColumn": 25 - }, - { - "ruleId": "no-undef", - "message": "'hash' is not defined.", - "line": 25, - "column": 34, - "endLine": 25, - "endColumn": 38 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_name'.", - "line": 27, - "column": 22, - "endLine": 27, - "endColumn": 36 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 44, - "column": 13, - "endLine": 44, - "endColumn": 26 - } - ] - }, - { - "filePath": "/output-with-fix/auth-module/lib/module/plugin.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 32, - "column": 7, - "endLine": 32, - "endColumn": 20 - } - ] - }, - { - "filePath": "/output-with-fix/axios-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/axios-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/axios-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 8, - "column": 29, - "endLine": 10, - "endColumn": 23 - }, - { - "ruleId": "no-negated-condition", - "message": "Unexpected negated condition.", - "line": 25, - "column": 23, - "endLine": 29, - "endColumn": 30 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 25, - "column": 23, - "endLine": 29, - "endColumn": 30 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 27, - "column": 16, - "endLine": 29, - "endColumn": 21 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onRequest' should be before 'setToken'.", - "line": 37, - "column": 5, - "endLine": 37, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onRequestError' should be before 'onResponse'.", - "line": 47, - "column": 5, - "endLine": 47, - "endColumn": 19 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 50, - "column": 13, - "endLine": 50, - "endColumn": 22 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 58, - "column": 13, - "endLine": 58, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onError' should be before 'onResponseError'.", - "line": 63, - "column": 5, - "endLine": 63, - "endColumn": 12 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 83, - "column": 32, - "endLine": 83, - "endColumn": 41 - }, - { - "ruleId": "prefer-spread", - "message": "Use the spread operator instead of '.apply()'.", - "line": 85, - "column": 16, - "endLine": 88, - "endColumn": 10 - }, - { - "ruleId": "prefer-rest-params", - "message": "Use the rest parameters instead of 'arguments'.", - "line": 87, - "column": 13, - "endLine": 87, - "endColumn": 22 - }, - { - "ruleId": "guard-for-in", - "message": "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.", - "line": 96, - "column": 5, - "endLine": 100, - "endColumn": 6 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 105, - "column": 37, - "endLine": 105, - "endColumn": 51 - }, - { - "ruleId": "max-lines-per-function", - "message": "Arrow function has too many lines (51). Maximum allowed is 50.", - "line": 110, - "column": 31, - "endLine": 160, - "endColumn": 2 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 144, - "column": 13, - "endLine": 144, - "endColumn": 24 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 148, - "column": 13, - "endLine": 148, - "endColumn": 24 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 150, - "column": 17, - "endLine": 150, - "endColumn": 26 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 151, - "column": 17, - "endLine": 151, - "endColumn": 18 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 168, - "column": 40, - "endLine": 168, - "endColumn": 49 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 170, - "column": 19, - "endLine": 170, - "endColumn": 34 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 170, - "column": 95, - "endLine": 170, - "endColumn": 96 - }, - { - "ruleId": "max-lines-per-function", - "message": "Arrow function has too many lines (84). Maximum allowed is 50.", - "line": 183, - "column": 23, - "endLine": 266, - "endColumn": 2 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (11). Maximum allowed is 10.", - "line": 183, - "column": 23, - "endLine": 266, - "endColumn": 2 - }, - { - "ruleId": "no-unused-vars", - "message": "'ctx' is defined but never used.", - "line": 183, - "column": 31, - "endLine": 183, - "endColumn": 34 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'finish'.", - "line": 193, - "column": 25, - "endLine": 193, - "endColumn": 28 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'start'.", - "line": 194, - "column": 24, - "endLine": 194, - "endColumn": 27 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'fail' should be before 'start'.", - "line": 195, - "column": 9, - "endLine": 195, - "endColumn": 15 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'fail'.", - "line": 195, - "column": 23, - "endLine": 195, - "endColumn": 26 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'set'.", - "line": 196, - "column": 22, - "endLine": 196, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 199, - "column": 28, - "endLine": 199, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 199, - "column": 29, - "endLine": 199, - "endColumn": 95 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 199, - "column": 29, - "endLine": 200, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 0.", - "line": 200, - "column": 1, - "endLine": 200, - "endColumn": 1 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '++' used.", - "line": 212, - "column": 9, - "endLine": 212, - "endColumn": 26 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 224, - "column": 9, - "endLine": 224, - "endColumn": 26 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 225, - "column": 32, - "endLine": 225, - "endColumn": 33 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 227, - "column": 31, - "endLine": 227, - "endColumn": 32 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 242, - "column": 9, - "endLine": 242, - "endColumn": 26 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 248, - "column": 25, - "endLine": 248, - "endColumn": 26 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 100.", - "line": 255, - "column": 37, - "endLine": 255, - "endColumn": 40 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 100.", - "line": 257, - "column": 13, - "endLine": 257, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 273, - "column": 11, - "endLine": 273, - "endColumn": 12 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_AXIOS_BASE_URL_'.", - "line": 273, - "column": 12, - "endLine": 273, - "endColumn": 40 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'patch' should be before 'put'.", - "line": 289, - "column": 9, - "endLine": 289, - "endColumn": 16 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 299, - "column": 35, - "endLine": 301, - "endColumn": 13 - }, - { - "ruleId": "max-lines", - "message": "File has too many lines (341). Maximum allowed is 300.", - "line": 301, - "column": 1, - "endLine": 342, - "endColumn": 1 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 302, - "column": 19, - "endLine": 302, - "endColumn": 20 - } - ] - }, - { - "filePath": "/output-with-fix/axios-module/lib/plugin.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 49, - "column": 37, - "endLine": 49, - "endColumn": 51 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 69, - "column": 7, - "endLine": 69, - "endColumn": 18 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 71, - "column": 7, - "endLine": 71, - "endColumn": 18 - } - ] - }, - { - "filePath": "/output-with-fix/device-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/device-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/device-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 12, - "column": 1, - "endLine": 19, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 12, - "column": 20, - "endLine": 12, - "endColumn": 21 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 15, - "column": 9, - "endLine": 15, - "endColumn": 10 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 4.", - "line": 16, - "column": 9, - "endLine": 16, - "endColumn": 10 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 26, - "column": 1, - "endLine": 33, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 26, - "column": 28, - "endLine": 26, - "endColumn": 29 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 29, - "column": 9, - "endLine": 29, - "endColumn": 10 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 4.", - "line": 30, - "column": 9, - "endLine": 30, - "endColumn": 10 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 35, - "column": 1, - "endLine": 39, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 35, - "column": 17, - "endLine": 35, - "endColumn": 18 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 37, - "column": 13, - "endLine": 37, - "endColumn": 31 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 41, - "column": 1, - "endLine": 45, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 41, - "column": 21, - "endLine": 41, - "endColumn": 22 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 43, - "column": 13, - "endLine": 43, - "endColumn": 22 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 47, - "column": 1, - "endLine": 51, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 47, - "column": 19, - "endLine": 47, - "endColumn": 20 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 49, - "column": 13, - "endLine": 49, - "endColumn": 23 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed async function.", - "line": 55, - "column": 16, - "endLine": 55, - "endColumn": 31 - }, - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 55, - "column": 16, - "endLine": 55, - "endColumn": 31 - }, - { - "ruleId": "prefer-destructuring", - "message": "Use object destructuring.", - "line": 64, - "column": 9, - "endLine": 64, - "endColumn": 40 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isDesktop' should be before 'isTablet'.", - "line": 126, - "column": 13, - "endLine": 126, - "endColumn": 24 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isMacOS' should be before 'isWindows'.", - "line": 129, - "column": 13, - "endLine": 129, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isDesktopOrTablet' should be before 'isMacOS'.", - "line": 130, - "column": 13, - "endLine": 130, - "endColumn": 32 - } - ] - }, - { - "filePath": "/output-with-fix/device-module/lib/plugin.js", - "messages": [ - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 35, - "column": 16, - "endLine": 35, - "endColumn": 31 - } - ] - }, - { - "filePath": "/output-with-fix/google-adsense-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/google-adsense-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/google-adsense-module/lib/all-rules-test/plugin.template.js", - "messages": [ - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 5, - "column": 13, - "endLine": 5, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'attrs' should be before 'style'.", - "line": 12, - "column": 17, - "endLine": 12, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-ad-format' should be before 'data-ad-slot'.", - "line": 15, - "column": 21, - "endLine": 15, - "endColumn": 37 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 16, - "column": 39, - "endLine": 18, - "endColumn": 31 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-ad-layout' should be before 'data-ad-region'.", - "line": 19, - "column": 21, - "endLine": 19, - "endColumn": 37 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 21, - "column": 38, - "endLine": 23, - "endColumn": 31 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-analytics-uacct' should be before 'data-page-url'.", - "line": 24, - "column": 21, - "endLine": 24, - "endColumn": 43 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 24, - "column": 45, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-analytics-domain-name' should be before 'data-analytics-uacct'.", - "line": 27, - "column": 21, - "endLine": 27, - "endColumn": 49 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 27, - "column": 51, - "endLine": 29, - "endColumn": 31 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-adtest' should be before 'data-analytics-domain-name'.", - "line": 30, - "column": 21, - "endLine": 30, - "endColumn": 34 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 30, - "column": 40, - "endLine": 32, - "endColumn": 33 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-adsbygoogle-status' should be before 'data-adtest'.", - "line": 33, - "column": 21, - "endLine": 33, - "endColumn": 46 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 33, - "column": 48, - "endLine": 35, - "endColumn": 29 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 38, - "column": 34, - "endLine": 40, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'props' should be before 'render'.", - "line": 47, - "column": 5, - "endLine": 47, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 50, - "column": 13, - "endLine": 50, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'adFormat' should be before 'adSlot'.", - "line": 55, - "column": 9, - "endLine": 55, - "endColumn": 19 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 57, - "column": 13, - "endLine": 57, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 67, - "column": 13, - "endLine": 67, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'analyticsUacct' should be before 'pageUrl'.", - "line": 78, - "column": 9, - "endLine": 78, - "endColumn": 23 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 80, - "column": 13, - "endLine": 80, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'analyticsDomainName' should be before 'analyticsUacct'.", - "line": 82, - "column": 9, - "endLine": 82, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 84, - "column": 13, - "endLine": 84, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 88, - "column": 13, - "endLine": 88, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data' should be before 'props'.", - "line": 91, - "column": 5, - "endLine": 91, - "endColumn": 9 - }, - { - "ruleId": "max-statements", - "message": "Method '$route' has too many statements (11). Maximum allowed is 10.", - "line": 104, - "column": 18, - "endLine": 132, - "endColumn": 10 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'k' is too short (< 2).", - "line": 122, - "column": 100, - "endLine": 122, - "endColumn": 101 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'methods' should be before 'watch'.", - "line": 134, - "column": 5, - "endLine": 134, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'showAd' should be before 'updateAd'.", - "line": 153, - "column": 9, - "endLine": 153, - "endColumn": 15 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 161, - "column": 22, - "endLine": 161, - "endColumn": 67 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 165, - "column": 21, - "endLine": 165, - "endColumn": 34 - } - ] - }, - { - "filePath": "/output-with-fix/google-adsense-module/lib/plugin.template.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 122, - "column": 11, - "endLine": 122, - "endColumn": 24 - } - ] - }, - { - "filePath": "/output-with-fix/google-optimize/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/google-optimize/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/google-optimize/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 75 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 7, - "column": 16, - "endLine": 7, - "endColumn": 25 - }, - { - "ruleId": "no-use-before-define", - "message": "'assignExperiment' was used before it was defined.", - "line": 10, - "column": 5, - "endLine": 10, - "endColumn": 21 - }, - { - "ruleId": "no-use-before-define", - "message": "'googleOptimize' was used before it was defined.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 19 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 23, - "column": 1, - "endLine": 122, - "endColumn": 2 - }, - { - "ruleId": "max-lines-per-function", - "message": "Function 'assignExperiment' has too many lines (100). Maximum allowed is 50.", - "line": 23, - "column": 1, - "endLine": 122, - "endColumn": 2 - }, - { - "ruleId": "max-statements", - "message": "Function 'assignExperiment' has too many statements (34). Maximum allowed is 10.", - "line": 23, - "column": 1, - "endLine": 122, - "endColumn": 2 - }, - { - "ruleId": "no-use-before-define", - "message": "'getCookie' was used before it was defined.", - "line": 32, - "column": 20, - "endLine": 32, - "endColumn": 29 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 35, - "column": 14, - "endLine": 35, - "endColumn": 39 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 35, - "column": 14, - "endLine": 35, - "endColumn": 39 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'v' is too short (< 2).", - "line": 47, - "column": 53, - "endLine": 47, - "endColumn": 54 - }, - { - "ruleId": "radix", - "message": "Missing radix parameter.", - "line": 47, - "column": 59, - "endLine": 47, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 52, - "column": 47, - "endLine": 52, - "endColumn": 97 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 52, - "column": 56, - "endLine": 52, - "endColumn": 80 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 52, - "column": 56, - "endLine": 52, - "endColumn": 97 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 52, - "column": 71, - "endLine": 52, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 52, - "column": 83, - "endLine": 52, - "endColumn": 84 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 52, - "column": 83, - "endLine": 52, - "endColumn": 84 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 54, - "column": 32, - "endLine": 54, - "endColumn": 34 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 54, - "column": 38, - "endLine": 54, - "endColumn": 47 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 54, - "column": 50, - "endLine": 54, - "endColumn": 51 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 66, - "column": 35, - "endLine": 66, - "endColumn": 37 - }, - { - "ruleId": "no-negated-condition", - "message": "Unexpected negated condition.", - "line": 74, - "column": 5, - "endLine": 112, - "endColumn": 6 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 74, - "column": 29, - "endLine": 74, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 80, - "column": 56, - "endLine": 80, - "endColumn": 118 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 80, - "column": 69, - "endLine": 80, - "endColumn": 97 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 80, - "column": 69, - "endLine": 80, - "endColumn": 118 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 80, - "column": 88, - "endLine": 80, - "endColumn": 97 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 80, - "column": 100, - "endLine": 80, - "endColumn": 101 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 80, - "column": 100, - "endLine": 80, - "endColumn": 101 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 81, - "column": 64, - "endLine": 81, - "endColumn": 65 - }, - { - "ruleId": "no-use-before-define", - "message": "'setCookie' was used before it was defined.", - "line": 93, - "column": 13, - "endLine": 93, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. '$activeVariants' should be before '$variantIndexes'.", - "line": 117, - "column": 9, - "endLine": 117, - "endColumn": 26 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 124, - "column": 1, - "endLine": 140, - "endColumn": 2 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 133, - "column": 23, - "endLine": 135, - "endColumn": 33 - }, - { - "ruleId": "consistent-return", - "message": "Function 'getCookie' expected no return value.", - "line": 138, - "column": 5, - "endLine": 138, - "endColumn": 26 - }, - { - "ruleId": "max-params", - "message": "Function 'setCookie' has too many parameters (4). Maximum allowed is 3.", - "line": 142, - "column": 1, - "endLine": 142, - "endColumn": 20 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 142, - "column": 1, - "endLine": 180, - "endColumn": 2 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'maxAge' should be before 'path'.", - "line": 149, - "column": 13, - "endLine": 149, - "endColumn": 19 - }, - { - "ruleId": "no-shadow", - "message": "'value' is already declared in the upper scope on line 142 column 32.", - "line": 162, - "column": 13, - "endLine": 162, - "endColumn": 18 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 165, - "column": 21, - "endLine": 170, - "endColumn": 18 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 183, - "column": 1, - "endLine": 199, - "endColumn": 2 - } - ] - }, - { - "filePath": "/output-with-fix/google-optimize/lib/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/main.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 22 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 24 - }, - { - "ruleId": "no-unused-vars", - "message": "'getHostname' is assigned a value but never used.", - "line": 27, - "column": 11, - "endLine": 27, - "endColumn": 22 - }, - { - "ruleId": "no-unused-vars", - "message": "'getForwarded' is assigned a value but never used.", - "line": 28, - "column": 11, - "endLine": 28, - "endColumn": 23 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'actions' should be before 'state'.", - "line": 45, - "column": 17, - "endLine": 45, - "endColumn": 24 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'getters' should be before 'mutations'.", - "line": 101, - "column": 17, - "endLine": 101, - "endColumn": 24 - }, - { - "ruleId": "consistent-return", - "message": "Expected to return a value at the end of arrow function.", - "line": 116, - "column": 32, - "endLine": 116, - "endColumn": 34 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 126, - "column": 33, - "endLine": 128, - "endColumn": 25 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (11). Maximum allowed is 10.", - "line": 137, - "column": 29, - "endLine": 182, - "endColumn": 6 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 365.", - "line": 151, - "column": 71, - "endLine": 151, - "endColumn": 74 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 365.", - "line": 169, - "column": 71, - "endLine": 169, - "endColumn": 74 - }, - { - "ruleId": "max-lines-per-function", - "message": "Async arrow function has too many lines (92). Maximum allowed is 50.", - "line": 184, - "column": 30, - "endLine": 275, - "endColumn": 6 - }, - { - "ruleId": "max-statements", - "message": "Async arrow function has too many statements (24). Maximum allowed is 10.", - "line": 184, - "column": 30, - "endLine": 275, - "endColumn": 6 - }, - { - "ruleId": "require-atomic-updates", - "message": "Possible race condition: `app.i18n.locale` might be assigned based on an outdated state of `app`.", - "line": 239, - "column": 9, - "endLine": 239, - "endColumn": 36 - }, - { - "ruleId": "no-shadow", - "message": "'route' is already declared in the upper scope on line 23 column 17.", - "line": 257, - "column": 19, - "endLine": 257, - "endColumn": 24 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 257, - "column": 27, - "endLine": 257, - "endColumn": 43 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 258, - "column": 31, - "endLine": 260, - "endColumn": 26 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 290, - "column": 5, - "endLine": 290, - "endColumn": 21 - }, - { - "ruleId": "max-lines", - "message": "File has too many lines (414). Maximum allowed is 300.", - "line": 301, - "column": 1, - "endLine": 415, - "endColumn": 1 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 310, - "column": 18, - "endLine": 312, - "endColumn": 21 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 325, - "column": 18, - "endLine": 327, - "endColumn": 21 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 340, - "column": 5, - "endLine": 340, - "endColumn": 37 - }, - { - "ruleId": "complexity", - "message": "Async arrow function has a complexity of 21. Maximum allowed is 20.", - "line": 340, - "column": 40, - "endLine": 410, - "endColumn": 6 - }, - { - "ruleId": "max-lines-per-function", - "message": "Async arrow function has too many lines (71). Maximum allowed is 50.", - "line": 340, - "column": 40, - "endLine": 410, - "endColumn": 6 - }, - { - "ruleId": "max-statements", - "message": "Async arrow function has too many statements (17). Maximum allowed is 10.", - "line": 340, - "column": 40, - "endLine": 410, - "endColumn": 6 - }, - { - "ruleId": "no-shadow", - "message": "'route' is already declared in the upper scope on line 23 column 17.", - "line": 340, - "column": 47, - "endLine": 340, - "endColumn": 52 - }, - { - "ruleId": "no-unused-vars", - "message": "'route' is defined but never used.", - "line": 340, - "column": 47, - "endLine": 340, - "endColumn": 52 - }, - { - "ruleId": "init-declarations", - "message": "Variable 'browserLocale' should be initialized on declaration.", - "line": 346, - "column": 17, - "endLine": 346, - "endColumn": 30 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 348, - "column": 87, - "endLine": 348, - "endColumn": 88 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 358, - "column": 21, - "endLine": 358, - "endColumn": 22 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 359, - "column": 21, - "endLine": 359, - "endColumn": 22 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 364, - "column": 75, - "endLine": 364, - "endColumn": 76 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 365, - "column": 21, - "endLine": 365, - "endColumn": 22 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 366, - "column": 21, - "endLine": 366, - "endColumn": 22 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 412, - "column": 11, - "endLine": 412, - "endColumn": 43 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/routing.js", - "messages": [ - { - "ruleId": "lodash-template/no-script-parsing-error", - "message": "Parsing error: Unexpected token =.", - "line": 24, - "column": 18 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/all-rules-test/seo.js", - "messages": [ - { - "ruleId": "no-shadow", - "message": "'Vue' is already declared in the upper scope on line 1 column 8.", - "line": 5, - "column": 14, - "endLine": 5, - "endColumn": 17 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/main.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 22 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 24 - }, - { - "ruleId": "no-unused-vars", - "message": "'getHostname' is assigned a value but never used.", - "line": 26, - "column": 9, - "endLine": 26, - "endColumn": 20 - }, - { - "ruleId": "no-unused-vars", - "message": "'getForwarded' is assigned a value but never used.", - "line": 27, - "column": 9, - "endLine": 27, - "endColumn": 21 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/routing.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 18, - "column": 7, - "endLine": 18, - "endColumn": 19 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 58, - "column": 7, - "endLine": 58, - "endColumn": 19 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 97, - "column": 9, - "endLine": 97, - "endColumn": 21 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/plugins/seo.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/all-rules-test/middleware.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'req' is assigned a value but never used.", - "line": 5, - "column": 17, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 14, - "column": 11, - "endLine": 14, - "endColumn": 26 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 30, - "column": 5, - "endLine": 30, - "endColumn": 21 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 34, - "column": 40, - "endLine": 34, - "endColumn": 72 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 53, - "column": 30, - "endLine": 55, - "endColumn": 17 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/all-rules-test/options.js", - "messages": [ - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 2, - "column": 3, - "endLine": 10, - "endColumn": 4 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 5, - "column": 26, - "endLine": 5, - "endColumn": 35 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/all-rules-test/seo-head.js", - "messages": [ - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 10, - "column": 28, - "endLine": 10, - "endColumn": 37 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 13, - "column": 11, - "endLine": 15, - "endColumn": 32 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 14, - "column": 35, - "endLine": 14, - "endColumn": 39 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 15, - "column": 15, - "endLine": 15, - "endColumn": 19 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_hasMetaInfo'.", - "line": 15, - "column": 15, - "endLine": 15, - "endColumn": 32 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 16, - "column": 14, - "endLine": 16, - "endColumn": 18 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 17, - "column": 14, - "endLine": 17, - "endColumn": 18 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 18, - "column": 14, - "endLine": 18, - "endColumn": 18 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 19, - "column": 13, - "endLine": 19, - "endColumn": 17 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 20, - "column": 13, - "endLine": 20, - "endColumn": 17 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 20, - "column": 53, - "endLine": 20, - "endColumn": 57 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 27, - "column": 31, - "endLine": 27, - "endColumn": 35 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 27, - "column": 56, - "endLine": 27, - "endColumn": 57 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 27, - "column": 85, - "endLine": 27, - "endColumn": 89 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 39, - "column": 22, - "endLine": 39, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'href' should be before 'rel'.", - "line": 47, - "column": 25, - "endLine": 47, - "endColumn": 31 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 47, - "column": 44, - "endLine": 47, - "endColumn": 48 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 53, - "column": 21, - "endLine": 53, - "endColumn": 33 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 66, - "column": 31, - "endLine": 66, - "endColumn": 35 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 67, - "column": 48, - "endLine": 67, - "endColumn": 52 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'href' should be before 'rel'.", - "line": 73, - "column": 17, - "endLine": 73, - "endColumn": 23 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'content' should be before 'property'.", - "line": 89, - "column": 13, - "endLine": 89, - "endColumn": 22 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 90, - "column": 17, - "endLine": 90, - "endColumn": 21 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 97, - "column": 18, - "endLine": 97, - "endColumn": 22 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 98, - "column": 17, - "endLine": 98, - "endColumn": 18 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'content' should be before 'property'.", - "line": 102, - "column": 13, - "endLine": 102, - "endColumn": 22 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 103, - "column": 17, - "endLine": 103, - "endColumn": 21 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/all-rules-test/utils.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 24 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 27, - "column": 52, - "endLine": 27, - "endColumn": 53 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 36, - "column": 49, - "endLine": 36, - "endColumn": 89 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 37, - "column": 38, - "endLine": 39, - "endColumn": 33 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 40, - "column": 36, - "endLine": 42, - "endColumn": 35 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 51, - "column": 21, - "endLine": 51, - "endColumn": 34 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 58, - "column": 17, - "endLine": 58, - "endColumn": 29 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 76, - "column": 9, - "endLine": 76, - "endColumn": 21 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 87, - "column": 13, - "endLine": 87, - "endColumn": 25 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 91, - "column": 13, - "endLine": 91, - "endColumn": 25 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/middleware.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'req' is assigned a value but never used.", - "line": 4, - "column": 16, - "endLine": 4, - "endColumn": 19 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 24 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/options.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/seo-head.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 41, - "column": 11, - "endLine": 41, - "endColumn": 23 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-i18n/src/templates/utils.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 24 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 35, - "column": 11, - "endLine": 35, - "endColumn": 24 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 39, - "column": 9, - "endLine": 39, - "endColumn": 21 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 51, - "column": 5, - "endLine": 51, - "endColumn": 17 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 56, - "column": 7, - "endLine": 56, - "endColumn": 19 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 58, - "column": 7, - "endLine": 58, - "endColumn": 19 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-logrocket/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxt-logrocket/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-logrocket/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 7, - "column": 16, - "endLine": 7, - "endColumn": 25 - }, - { - "ruleId": "no-unused-vars", - "message": "'app' is defined but never used.", - "line": 7, - "column": 27, - "endLine": 7, - "endColumn": 30 - } - ] - }, - { - "filePath": "/output-with-fix/nuxt-logrocket/lib/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxtent-module/.eslintrc.js", - "messages": [ - { - "ruleId": "unicorn/prefer-module", - "message": "Do not use \"module\".", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 7 - } - ] - }, - { - "filePath": "/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'interopDefault' is defined but never used.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 19 - }, - { - "ruleId": "max-statements", - "message": "Method 'render' has too many statements (12). Maximum allowed is 10.", - "line": 24, - "column": 16, - "endLine": 62, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'on' should be before 'props'.", - "line": 33, - "column": 17, - "endLine": 33, - "endColumn": 21 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'domProps' should be before 'on'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 27 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'props' should be before 'render'.", - "line": 63, - "column": 9, - "endLine": 63, - "endColumn": 16 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 66, - "column": 17, - "endLine": 66, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'body' should be before 'tag'.", - "line": 68, - "column": 13, - "endLine": 68, - "endColumn": 19 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'required' should be before 'type'.", - "line": 73, - "column": 17, - "endLine": 73, - "endColumn": 27 - } - ] - }, - { - "filePath": "/output-with-fix/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/nuxtent-module/lib/plugins/nuxtent-components.template.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'interopDefault' is defined but never used.", - "line": 5, - "column": 3, - "endLine": 5, - "endColumn": 17 - } - ] - }, - { - "filePath": "/output-with-fix/nuxtent-module/lib/plugins/nuxtent-config.template.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/icon/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/icon/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "func-names", - "message": "Unexpected unnamed async function.", - "line": 1, - "column": 16, - "endLine": 1, - "endColumn": 31 - }, - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 1, - "column": 16, - "endLine": 1, - "endColumn": 31 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/icon/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/onesignal/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 1, - "column": 21, - "endLine": 1, - "endColumn": 62 - }, - { - "ruleId": "no-multi-assign", - "message": "Unexpected chained assignment.", - "line": 1, - "column": 21, - "endLine": 1, - "endColumn": 62 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 8, - "column": 9, - "endLine": 8, - "endColumn": 10 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 12, - "column": 16, - "endLine": 12, - "endColumn": 25 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 16, - "column": 9, - "endLine": 16, - "endColumn": 18 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/onesignal/plugin.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 6, - "column": 23, - "endLine": 6, - "endColumn": 32 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/sw.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'importScripts' is not defined.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'i' is too short (< 2).", - "line": 4, - "column": 10, - "endLine": 4, - "endColumn": 11 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 8 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 17, - "column": 5, - "endLine": 17, - "endColumn": 6 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 8 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 26, - "column": 5, - "endLine": 26, - "endColumn": 6 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 8 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 51, - "column": 34, - "endLine": 51, - "endColumn": 67 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 51, - "column": 34, - "endLine": 51, - "endColumn": 67 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 8 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 66, - "column": 9, - "endLine": 66, - "endColumn": 10 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 71, - "column": 9, - "endLine": 71, - "endColumn": 10 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 78, - "column": 34, - "endLine": 78, - "endColumn": 67 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 78, - "column": 34, - "endLine": 78, - "endColumn": 67 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'r' is too short (< 2).", - "line": 88, - "column": 36, - "endLine": 88, - "endColumn": 37 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 89, - "column": 4, - "endLine": 89, - "endColumn": 11 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 91, - "column": 9, - "endLine": 91, - "endColumn": 16 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 98, - "column": 1, - "endLine": 98, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 102, - "column": 20, - "endLine": 102, - "endColumn": 27 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 110, - "column": 34, - "endLine": 110, - "endColumn": 67 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 110, - "column": 34, - "endLine": 110, - "endColumn": 67 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/workbox/templates/all-rules-test/workbox.js", - "messages": [ - { - "ruleId": "no-unsafe-negation", - "message": "Unexpected negating the left operand of 'in' operator.", - "line": 3, - "column": 9, - "endLine": 3, - "endColumn": 25 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 9, - "column": 76, - "endLine": 11, - "endColumn": 17 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 29, - "column": 34, - "endLine": 29, - "endColumn": 47 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/workbox/templates/sw.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'importScripts' is not defined.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 61, - "column": 4, - "endLine": 61, - "endColumn": 11 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 61, - "column": 73, - "endLine": 61, - "endColumn": 80 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 67, - "column": 14, - "endLine": 67, - "endColumn": 21 - }, - { - "ruleId": "no-undef", - "message": "'caches' is not defined.", - "line": 68, - "column": 18, - "endLine": 68, - "endColumn": 24 - } - ] - }, - { - "filePath": "/output-with-fix/pwa-module/lib/workbox/templates/workbox.js", - "messages": [ - { - "ruleId": "no-unsafe-negation", - "message": "Unexpected negating the left operand of 'in' operator.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 23 - } - ] - }, - { - "filePath": "/output-with-fix/recaptcha-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/recaptcha-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/recaptcha-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "max-statements", - "message": "Constructor has too many statements (11). Maximum allowed is 10.", - "line": 8, - "column": 17, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 22, - "column": 9, - "endLine": 22, - "endColumn": 23 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 24, - "column": 9, - "endLine": 24, - "endColumn": 23 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 25, - "column": 9, - "endLine": 25, - "endColumn": 20 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 37, - "column": 13, - "endLine": 37, - "endColumn": 24 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 39, - "column": 13, - "endLine": 39, - "endColumn": 24 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 42, - "column": 29, - "endLine": 42, - "endColumn": 43 - }, - { - "ruleId": "consistent-return", - "message": "Expected to return a value at the end of async method 'execute'.", - "line": 63, - "column": 11, - "endLine": 63, - "endColumn": 18 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 96, - "column": 21, - "endLine": 96, - "endColumn": 35 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 106, - "column": 21, - "endLine": 106, - "endColumn": 35 - }, - { - "ruleId": "max-lines-per-function", - "message": "Method 'init' has too many lines (86). Maximum allowed is 50.", - "line": 120, - "column": 5, - "endLine": 205, - "endColumn": 6 - }, - { - "ruleId": "max-statements", - "message": "Method 'init' has too many statements (17). Maximum allowed is 10.", - "line": 120, - "column": 10, - "endLine": 205, - "endColumn": 6 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 122, - "column": 13, - "endLine": 122, - "endColumn": 24 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 128, - "column": 9, - "endLine": 128, - "endColumn": 23 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 129, - "column": 9, - "endLine": 129, - "endColumn": 23 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 134, - "column": 33, - "endLine": 134, - "endColumn": 47 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 155, - "column": 30, - "endLine": 155, - "endColumn": 31 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 173, - "column": 54, - "endLine": 173, - "endColumn": 68 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 177, - "column": 49, - "endLine": 177, - "endColumn": 63 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 178, - "column": 47, - "endLine": 178, - "endColumn": 61 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 183, - "column": 9, - "endLine": 183, - "endColumn": 20 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 3.", - "line": 189, - "column": 42, - "endLine": 189, - "endColumn": 43 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 203, - "column": 16, - "endLine": 203, - "endColumn": 27 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 209, - "column": 16, - "endLine": 209, - "endColumn": 30 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 218, - "column": 16, - "endLine": 218, - "endColumn": 25 - }, - { - "ruleId": "id-length", - "message": "Identifier name '_' is too short (< 2).", - "line": 218, - "column": 26, - "endLine": 218, - "endColumn": 27 - } - ] - }, - { - "filePath": "/output-with-fix/recaptcha-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 2, - "column": 8, - "endLine": 2, - "endColumn": 11 - }, - { - "ruleId": "vue/multi-word-component-names", - "message": "Component name \"Recaptcha\" should always be multi-word.", - "line": 134, - "column": 17, - "endLine": 134, - "endColumn": 28 - } - ] - }, - { - "filePath": "/output-with-fix/router-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/router-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/router-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 84 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 10, - "column": 8, - "endLine": 18, - "endColumn": 2 - } - ] - }, - { - "filePath": "/output-with-fix/router-module/lib/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/sentry-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/sentry-module/lib/all-rules-test/sentry.client.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'VueLib' is defined but never used.", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'all' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 43 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 6, - "column": 16, - "endLine": 6, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 18, - "column": 73, - "endLine": 19, - "endColumn": 112 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 18, - "column": 85, - "endLine": 19, - "endColumn": 112 - }, - { - "ruleId": "@stylistic/operator-linebreak", - "message": "'?' should be placed at the beginning of the line.", - "line": 18, - "column": 127, - "endLine": 18, - "endColumn": 128 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected base point indentation of \" \", but found \" \".", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 19, - "column": 11, - "endLine": 19, - "endColumn": 64 - }, - { - "ruleId": "no-undef", - "message": "'serializeFunction' is not defined.", - "line": 19, - "column": 24, - "endLine": 19, - "endColumn": 41 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 27, - "column": 36, - "endLine": 27, - "endColumn": 56 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 27, - "column": 36, - "endLine": 27, - "endColumn": 56 - } - ] - }, - { - "filePath": "/output-with-fix/sentry-module/lib/sentry.client.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "no-unused-vars", - "message": "'VueLib' is defined but never used.", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - } - ] - }, - { - "filePath": "/output-with-fix/svg-sprite-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/svg-sprite-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/svg-sprite-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 4, - "column": 1, - "endLine": 17, - "endColumn": 2 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 9, - "column": 13, - "endLine": 9, - "endColumn": 21 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 13, - "column": 13, - "endLine": 13, - "endColumn": 26 - }, - { - "ruleId": "no-undef", - "message": "'relativeToBuild' is not defined.", - "line": 22, - "column": 25, - "endLine": 22, - "endColumn": 40 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_output'.", - "line": 22, - "column": 41, - "endLine": 22, - "endColumn": 56 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'functional' should be before 'name'.", - "line": 51, - "column": 5, - "endLine": 51, - "endColumn": 17 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'required' should be before 'type'.", - "line": 55, - "column": 13, - "endLine": 55, - "endColumn": 23 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 59, - "column": 13, - "endLine": 59, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'desc' should be before 'title'.", - "line": 61, - "column": 9, - "endLine": 61, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 63, - "column": 13, - "endLine": 63, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 67, - "column": 13, - "endLine": 67, - "endColumn": 22 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'v' is too short (< 2).", - "line": 70, - "column": 48, - "endLine": 70, - "endColumn": 49 - }, - { - "ruleId": "radix", - "message": "Missing radix parameter.", - "line": 70, - "column": 61, - "endLine": 70, - "endColumn": 72 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 75, - "column": 13, - "endLine": 75, - "endColumn": 14 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 92, - "column": 23, - "endLine": 97, - "endColumn": 19 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 98, - "column": 22, - "endLine": 103, - "endColumn": 19 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'attrs' should be before 'class'.", - "line": 109, - "column": 13, - "endLine": 109, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'viewBox' should be before 'xmlns'.", - "line": 111, - "column": 17, - "endLine": 111, - "endColumn": 26 - } - ] - }, - { - "filePath": "/output-with-fix/svg-sprite-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 11 - }, - { - "ruleId": "no-undef", - "message": "'relativeToBuild' is not defined.", - "line": 13, - "column": 23, - "endLine": 13, - "endColumn": 38 - } - ] - }, - { - "filePath": "/output-with-fix/vuetify-module/.eslintrc.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/vuetify-module/src/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/vuetify-module/src/templates/all-rules-test/options.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'serializeFunction' is not defined.", - "line": 1, - "column": 20, - "endLine": 1, - "endColumn": 37 - } - ] - }, - { - "filePath": "/output-with-fix/vuetify-module/src/templates/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 2, - "column": 26, - "endLine": 4, - "endColumn": 16 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 16, - "column": 77, - "endLine": 16, - "endColumn": 78 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 31, - "column": 106, - "endLine": 31, - "endColumn": 107 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 40, - "column": 28, - "endLine": 42, - "endColumn": 18 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 45, - "column": 5, - "endLine": 45, - "endColumn": 54 - } - ] - }, - { - "filePath": "/output-with-fix/vuetify-module/src/templates/options.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/vuetify-module/src/templates/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/namespace", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/no-named-as-default", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/no-named-as-default-member", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/.eslintrc.js deleted file mode 100644 index 658380c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 69f2d478..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,18 +0,0 @@ -import {createRouter as customCreateRouter} from '<%= options.routerFilePath %>'; - -<% if (options.keepDefaultRouter) { %> -import {createRouter as createDefaultRouter, routerOptions} from "./defaultRouter"; -<% } else { %> -const createDefaultRouter = null; -const routerOptions = null; -<% } %> - -export function createRouter (ssrContext) { - - return customCreateRouter( - ssrContext, - createDefaultRouter, - routerOptions - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/plugin.js deleted file mode 100644 index 2591b405..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/router-module/lib/plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createRouter as customCreateRouter } from '<%= options.routerFilePath %>' - -<% if (options.keepDefaultRouter) { %> -import { createRouter as createDefaultRouter, routerOptions } from './defaultRouter' -<% } else { %> -const createDefaultRouter = null -const routerOptions = null -<% } %> - -export function createRouter (ssrContext) { - return customCreateRouter(ssrContext, createDefaultRouter, routerOptions) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/.eslintrc deleted file mode 100644 index 37579354..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/.eslintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "root": true, - "extends": ["@nuxtjs", "plugin:lodash-template/base"], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "parser": "vue-eslint-parser", - "sourceType": "module", - "parserOptions": { - "ecmaVersion": 2019 - }, - }, - "globals": { - "options": true, - "serialize": true, - "serializeFunction": true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/sentry.client.js deleted file mode 100644 index d1043a3b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/all-rules-test/sentry.client.js +++ /dev/null @@ -1,36 +0,0 @@ -import VueLib from "vue"; -import * as Sentry from "@sentry/browser"; -import {<%= Object.keys(options.integrations).map((integration) => integration). - join(', ') %>} from "@sentry/integrations"; - -export default function (ctx, inject) { - - const opts = Object.assign( - {}, - <%= serialize(options.config) %>, - { - integrations: [ - <%= Object.keys(options.integrations).map((name) => { - const integration = options.integrations[name]; - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})`; - } - return `new ${name}({${Object.keys(integration).map((option) => typeof integration[option] === 'function' ? - `${option}:${serializeFunction(integration[option])}` : `${option}:${serialize(integration[option])}`). - join(',')}})`; - }). - join(',\n ') %> - ] - } - ); - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject( - "sentry", - Sentry - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/sentry.client.js deleted file mode 100644 index f683948e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/sentry-module/lib/sentry.client.js +++ /dev/null @@ -1,25 +0,0 @@ -import VueLib from 'vue' -import * as Sentry from '@sentry/browser' -import { <%= Object.keys(options.integrations).map(integration => integration).join(', ') %> } from '@sentry/integrations' - -export default function (ctx, inject) { - const opts = Object.assign({}, <%= serialize(options.config) %>, { - integrations: [ - <%= Object.keys(options.integrations).map((name) => { - const integration = options.integrations[name] - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})` - } - return `new ${name}({${Object.keys(integration).map(option => typeof integration[option] === 'function' - ? `${option}:${serializeFunction(integration[option])}` - : `${option}:${serialize(integration[option])}`).join(',')}})` - }).join(',\n ') %> - ] - }) - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject('sentry', Sentry) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/.eslintrc.js deleted file mode 100644 index ac375ec1..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - globals: { - page: true, - browser: true, - context: true, - jestPuppeteer: true - }, - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 976defae..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,134 +0,0 @@ -import Vue from "vue"; -import {mergeData} from "vue-functional-data-merge"; - -function generateName (name) { - - return name. - toLowerCase(). - replace( - /\.svg$/, - "" - ). - replace( - /[^a-z0-9-]/g, - "-" - ); - -} - -function getIcon (info) { - - const {icon, sprite} = info; - return require('<%= relativeToBuild(options._output) %>/' + sprite + ".svg") + - `#i-${generateName(icon)}`; - -} - -function getInfo (name) { - - let [ - sprite, - icon - ] = name.split("/"); - - if (!icon) { - - icon = sprite; - sprite = '<%= options.defaultSprite %>'; - - } - - return { - icon, - sprite - }; - -} - -// @vue/component -const SvgIcon = { - "name": "SvgIcon", - "functional": true, - "props": { - "name": { - "type": String, - "required": true - }, - "title": { - "type": String, - "default": null - }, - "desc": { - "type": String, - "default": null - }, - "viewBox": { - "type": String, - "default": null, - validator (value) { - - return value.split(" ").every((v) => !isNaN(parseInt(v))); - - } - } - }, - render (h, {props, data}) { - - const info = getInfo(props.name); - const icon = getIcon(info); - - const use = h( - "use", - { - "attrs": { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - "href": icon, - // Xlink:href can still be required in practice for cross-browser compatibility. - "xlink:href": icon - } - } - ); - - const title = props.title - ? h( - "title", - props.title - ) - : null; - const desc = props.desc - ? h( - "desc", - props.desc - ) - : null; - - const {sprite} = info; - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - "attrs": { - "xmlns": "http://www.w3.org/2000/svg", - "viewBox": props.viewBox - } - }; - - return h( - "svg", - mergeData( - data, - componentData - ), - [ - title, - desc, - use - ].filter(Boolean) - ); - - } -}; - -Vue.component( - SvgIcon.name, - SvgIcon -); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/plugin.js deleted file mode 100644 index 9d8eac3a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/svg-sprite-module/lib/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from 'vue' -import { mergeData } from 'vue-functional-data-merge' - -function generateName (name) { - return name - .toLowerCase() - .replace(/\.svg$/, '') - .replace(/[^a-z0-9-]/g, '-') -} - -function getIcon (info) { - const { icon, sprite } = info - return require('<%= relativeToBuild(options._output) %>/' + sprite + '.svg') + - `#i-${generateName(icon)}` -} - -function getInfo (name) { - let [sprite, icon] = name.split('/') - - if (!icon) { - icon = sprite - sprite = '<%= options.defaultSprite %>' - } - - return { - icon, - sprite - } -} - -// @vue/component -const SvgIcon = { - name: 'SvgIcon', - functional: true, - props: { - name: { - type: String, - required: true - }, - title: { - type: String, - default: null - }, - desc: { - type: String, - default: null - }, - viewBox: { - type: String, - default: null, - validator (value) { - return value.split(' ').every((v) => { - return !isNaN(parseInt(v)) - }) - } - } - }, - render (h, { props, data }) { - const info = getInfo(props.name) - const icon = getIcon(info) - - const use = h('use', { - attrs: { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - href: icon, - // xlink:href can still be required in practice for cross-browser compatibility. - 'xlink:href': icon - } - }) - - const title = props.title ? h('title', props.title) : null - const desc = props.desc ? h('desc', props.desc) : null - - const { sprite } = info - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - attrs: { - xmlns: 'http://www.w3.org/2000/svg', - viewBox: props.viewBox - } - } - - return h('svg', - mergeData(data, componentData), - [title, desc, use].filter(Boolean) - ) - } -} - -Vue.component(SvgIcon.name, SvgIcon) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/.eslintrc.js deleted file mode 100644 index e9ef6a3f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/.eslintrc.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - root: true, - extends: ['@nuxtjs/eslint-config-typescript'], - overrides: [ - { - files: '*.js', - extends: ['plugin:lodash-template/recommended-with-script'], - parserOptions: { - parser: 'vue-eslint-parser' - }, - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/options.js deleted file mode 100644 index 0337c415..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %>; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/plugin.js deleted file mode 100644 index 235a90b5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,54 +0,0 @@ -import Vue from "vue"; -import Vuetify from '<%= options.treeShake - ? 'vuetify/lib' - : 'vuetify' %>'; -<% - const libImports = [ - {"key": 'components', - "location": 'vuetify/lib'}, - {"key": 'transitions', - "location": 'vuetify/lib'}, - {"key": 'directives', - "location": 'vuetify/lib/directives'} - ]; - if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import {<%= options.treeShake[lib.key].join(', ') %>} from '<%= lib.location %>'; -<% - } - } - } -%> - -import options from "./options"; - -Vue.use( - Vuetify, - { - <% if (options.treeShake) { %> - <%= libImports.filter((lib) => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0). - map((lib) => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`). - join(',\n') %> - <% } %> - } -); - -export default (ctx) => { - - const vuetifyOptions = typeof options === "function" - ? options(ctx) - : options; - - <% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {}; - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>'; - <% } %> - - const vuetify = new Vuetify(vuetifyOptions); - - ctx.app.vuetify = vuetify; - ctx.$vuetify = vuetify.framework; - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/options.js deleted file mode 100644 index 507321f5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/plugin.js deleted file mode 100644 index c60e47a3..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output-with-fix/vuetify-module/src/templates/plugin.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' -import Vuetify from '<%= options.treeShake ? 'vuetify/lib' : 'vuetify' %>' -<% - const libImports = [ - { key: 'components', location: 'vuetify/lib' }, - { key: 'transitions', location: 'vuetify/lib' }, - { key: 'directives', location: 'vuetify/lib/directives' } - ] - if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import { <%= options.treeShake[lib.key].join(', ') %> } from '<%= lib.location %>' -<% - } - } - } -%> - -import options from './options' - -Vue.use(Vuetify, { -<% if (options.treeShake) { %> - <%= libImports.filter(lib => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) - .map(lib => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`) - .join(',\n') %> -<% } %> -}) - -export default (ctx) => { - const vuetifyOptions = typeof options === 'function' ? options(ctx) : options - - <% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {} - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>' - <% } %> - - const vuetify = new Vuetify(vuetifyOptions) - - ctx.app.vuetify = vuetify - ctx.$vuetify = vuetify.framework -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/.eslintrc.js deleted file mode 100644 index 9ead54a8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: "module" - }, - extends: ["@nuxtjs"], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - }, - }, - globals: { - options: true, - serialize: true, - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 612fb64a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import VueAnalytics from 'vue-analytics' - -export default async (ctx, inject) => { - const options = <%= serialize(options) %> - - if (typeof options.asyncID === 'function') { - options.id = await options.asyncID(ctx) - } - - Vue.use(VueAnalytics, {...{ router: ctx.app.router }, ...options}) - - ctx.$ga = Vue.$ga - inject('ga', Vue.$ga) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/plugin.js deleted file mode 100644 index 612fb64a..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/analytics-module/lib/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import VueAnalytics from 'vue-analytics' - -export default async (ctx, inject) => { - const options = <%= serialize(options) %> - - if (typeof options.asyncID === 'function') { - options.id = await options.asyncID(ctx) - } - - Vue.use(VueAnalytics, {...{ router: ctx.app.router }, ...options}) - - ctx.$ga = Vue.$ga - inject('ga', Vue.$ga) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/.eslintrc.js deleted file mode 100644 index e899f147..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 0 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/plugin.js deleted file mode 100644 index 4a489e87..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import VueApollo from 'vue-apollo' -import 'cross-fetch/polyfill' -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client' -import Cookie from 'universal-cookie' -import { InMemoryCache } from 'apollo-cache-inmemory' - -Vue.use(VueApollo) - -export default (ctx, inject) => { - const providerOptions = { clients: {} } - const { app, beforeNuxtRender, req } = ctx - const AUTH_TOKEN_NAME = '<%= options.tokenName %>' - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %> - const AUTH_TYPE = '<%= options.authenticationType %> ' - const cookies = new Cookie(req && req.headers.cookie) - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES - - function <%= key %>GetAuth () { - const token = cookies.get(<%= key %>TokenName) - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token : '' - } - - let <%= key %>ClientConfig - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify(options.clientConfigs[key], null, 2) %> - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>') - - if ('default' in <%= key %>ClientConfig) { - <%= key %>ClientConfig = <%= key %>ClientConfig.default - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx) - <% } %> - - const <%= key %>ValidateToken = () => true - - if (!<%= key %>ClientConfig.validateToken) { - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions: undefined) - - if (!process.server) { - <%= key %>Cache.restore(window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultClient' : key %> : null) - } - - if (!<%= key %>ClientConfig.getAuth) { - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth - } - <%= key %>ClientConfig.ssr = !!process.server - <%= key %>ClientConfig.cache = <%= key %>Cache - <%= key %>ClientConfig.tokenName = <%= key %>TokenName - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }) - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign(providerOptions, { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default(error, ctx) - <% } else { %> - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message) - <% } %> - } - }) - - const apolloProvider = new VueApollo(vueApolloOptions) - // Allow access to the provider in the context - app.apolloProvider = apolloProvider - - if (process.server) { - const ApolloSSR = require('vue-apollo/ssr') - beforeNuxtRender(({ nuxtState }) => { - nuxtState.apollo = ApolloSSR.getStates(apolloProvider) - }) - } - - inject('apolloHelpers', { - onLogin: async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - // Fallback for tokenExpires param - if (typeof cookieAttributes === 'number') cookieAttributes = { expires: cookieAttributes } - - if (typeof cookieAttributes.expires === 'number') { - cookieAttributes.expires = new Date(Date.now()+ 86400*1000*cookieAttributes.expires) - } - - if (token) { - cookies.set(AUTH_TOKEN_NAME, token, cookieAttributes) - } else { - cookies.remove(AUTH_TOKEN_NAME, cookieAttributes) - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (setToken)', 'color: orange;', e.message) - } - } - }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (logout)', 'color: orange;', e.message) - } - } - }, - getToken: (tokenName = AUTH_TOKEN_NAME) => { - return cookies.get(tokenName) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/plugin.js deleted file mode 100644 index 4a489e87..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/apollo-module/lib/templates/plugin.js +++ /dev/null @@ -1,139 +0,0 @@ -import Vue from 'vue' -import VueApollo from 'vue-apollo' -import 'cross-fetch/polyfill' -import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client' -import Cookie from 'universal-cookie' -import { InMemoryCache } from 'apollo-cache-inmemory' - -Vue.use(VueApollo) - -export default (ctx, inject) => { - const providerOptions = { clients: {} } - const { app, beforeNuxtRender, req } = ctx - const AUTH_TOKEN_NAME = '<%= options.tokenName %>' - const COOKIE_ATTRIBUTES = <%= serialize(options.cookieAttributes) %> - const AUTH_TYPE = '<%= options.authenticationType %> ' - const cookies = new Cookie(req && req.headers.cookie) - - // Config - <% Object.keys(options.clientConfigs).forEach((key) => { %> - const <%= key %>TokenName = '<%= options.clientConfigs[key].tokenName %>' || AUTH_TOKEN_NAME - const <%= key %>CookieAttributes = '<%= options.clientConfigs[key].cookieAttributes %>' || COOKIE_ATTRIBUTES - - function <%= key %>GetAuth () { - const token = cookies.get(<%= key %>TokenName) - return token && <%= key %>ClientConfig.validateToken(token) ? AUTH_TYPE + token : '' - } - - let <%= key %>ClientConfig - <% if (typeof options.clientConfigs[key] === 'object') { %> - <%= key %>ClientConfig = <%= JSON.stringify(options.clientConfigs[key], null, 2) %> - <% } else if (typeof options.clientConfigs[key] === 'string') { %> - <%= key %>ClientConfig = require('<%= options.clientConfigs[key] %>') - - if ('default' in <%= key %>ClientConfig) { - <%= key %>ClientConfig = <%= key %>ClientConfig.default - } - - <%= key %>ClientConfig = <%= key %>ClientConfig(ctx) - <% } %> - - const <%= key %>ValidateToken = () => true - - if (!<%= key %>ClientConfig.validateToken) { - <%= key %>ClientConfig.validateToken = <%= key %>ValidateToken - } - - const <%= key %>Cache = <%= key %>ClientConfig.cache - ? <%= key %>ClientConfig.cache - : new InMemoryCache(<%= key %>ClientConfig.inMemoryCacheOptions ? <%= key %>ClientConfig.inMemoryCacheOptions: undefined) - - if (!process.server) { - <%= key %>Cache.restore(window.__NUXT__ ? window.__NUXT__.apollo.<%= key === 'default' ? 'defaultClient' : key %> : null) - } - - if (!<%= key %>ClientConfig.getAuth) { - <%= key %>ClientConfig.getAuth = <%= key %>GetAuth - } - <%= key %>ClientConfig.ssr = !!process.server - <%= key %>ClientConfig.cache = <%= key %>Cache - <%= key %>ClientConfig.tokenName = <%= key %>TokenName - - // Create apollo client - let <%= key %>ApolloCreation = createApolloClient({ - ...<%= key %>ClientConfig - }) - <%= key %>ApolloCreation.apolloClient.wsClient = <%= key %>ApolloCreation.wsClient - - <% if (key === 'default') { %> - providerOptions.<%= key %>Client = <%= key %>ApolloCreation.apolloClient - <% } else { %> - providerOptions.clients.<%= key %> = <%= key %>ApolloCreation.apolloClient - <% } %> - <% }) %> - - const vueApolloOptions = Object.assign(providerOptions, { - <% if (options.defaultOptions) { %> - defaultOptions: <%= JSON.stringify(options.defaultOptions) %>, - <% } %> - errorHandler (error) { - <% if (options.errorHandler) { %> - require('<%= options.errorHandler %>').default(error, ctx) - <% } else { %> - console.log('%cError', 'background: red; color: white; padding: 2px 4px; border-radius: 3px; font-weight: bold;', error.message) - <% } %> - } - }) - - const apolloProvider = new VueApollo(vueApolloOptions) - // Allow access to the provider in the context - app.apolloProvider = apolloProvider - - if (process.server) { - const ApolloSSR = require('vue-apollo/ssr') - beforeNuxtRender(({ nuxtState }) => { - nuxtState.apollo = ApolloSSR.getStates(apolloProvider) - }) - } - - inject('apolloHelpers', { - onLogin: async (token, apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { - // Fallback for tokenExpires param - if (typeof cookieAttributes === 'number') cookieAttributes = { expires: cookieAttributes } - - if (typeof cookieAttributes.expires === 'number') { - cookieAttributes.expires = new Date(Date.now()+ 86400*1000*cookieAttributes.expires) - } - - if (token) { - cookies.set(AUTH_TOKEN_NAME, token, cookieAttributes) - } else { - cookies.remove(AUTH_TOKEN_NAME, cookieAttributes) - } - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (setToken)', 'color: orange;', e.message) - } - } - }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) - if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) - if (!skipResetStore) { - try { - await apolloClient.resetStore() - } catch (e) { - // eslint-disable-next-line no-console - console.log('%cError on cache reset (logout)', 'color: orange;', e.message) - } - } - }, - getToken: (tokenName = AUTH_TOKEN_NAME) => { - return cookies.get(tokenName) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/.eslintrc.js deleted file mode 100644 index 0546e2de..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: ['jest', 'vue'], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - hash: true - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/plugin.js deleted file mode 100644 index e1c4bdff..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/all-rules-test/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import Auth from './auth' - -import './middleware' - -// Active schemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path.replace(/\\/g,'/')}'`).join('\n') %> - -export default function (ctx, inject) { - // Options - const options = <%= JSON.stringify(options.options) %> - - // Create a new Auth instance - const $auth = new Auth(ctx, options) - - // Register strategies - <%= - options.strategies.map(strategy => { - const scheme = 'scheme_' + hash(options.strategyScheme.get(strategy)) - const schemeOptions = JSON.stringify(strategy) - const name = strategy._name - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))` - }).join('\n\n ') - %> - - // Inject it to nuxt context as $auth - inject('auth', $auth) - ctx.$auth = $auth - - // Initialize auth - return $auth.init().catch(error => { - if (process.client) { - console.error('[ERROR] [AUTH]', error) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/plugin.js deleted file mode 100644 index e1c4bdff..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/auth-module/lib/module/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import Auth from './auth' - -import './middleware' - -// Active schemes -<%= options.uniqueSchemes.map(path =>`import ${'scheme_' + hash(path)} from '${path.replace(/\\/g,'/')}'`).join('\n') %> - -export default function (ctx, inject) { - // Options - const options = <%= JSON.stringify(options.options) %> - - // Create a new Auth instance - const $auth = new Auth(ctx, options) - - // Register strategies - <%= - options.strategies.map(strategy => { - const scheme = 'scheme_' + hash(options.strategyScheme.get(strategy)) - const schemeOptions = JSON.stringify(strategy) - const name = strategy._name - return `// ${name}\n $auth.registerStrategy('${name}', new ${scheme}($auth, ${schemeOptions}))` - }).join('\n\n ') - %> - - // Inject it to nuxt context as $auth - inject('auth', $auth) - ctx.$auth = $auth - - // Initialize auth - return $auth.init().catch(error => { - if (process.client) { - console.error('[ERROR] [AUTH]', error) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/.eslintrc.js deleted file mode 100644 index 09c890ce..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - parserOptions: { - }, - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 3ada4d5d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,202 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { - if (!value) { - delete this.defaults.headers[scope][name]; - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest(fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse(fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError(fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError(fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError(fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (let method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = axios => { - for (let key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = axios => { - // request - axios.onRequestError(error => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError(error => { - log('error', 'Response error:', error) - }) - axios.onResponse(res => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = axios => { - // Send credentials only to relative and API Backend requests - axios.onRequest(config => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest(config => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse(response => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError(error => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = e => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common : { - 'Accept': 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (let h of options.proxyHeadersIgnore) { %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/plugin.js deleted file mode 100644 index 3ada4d5d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/axios-module/lib/plugin.js +++ /dev/null @@ -1,202 +0,0 @@ -import Axios from 'axios' -<% if (options.retry) { %>import axiosRetry from 'axios-retry'<% } %> - -// Axios.prototype cannot be modified -const axiosExtra = { - setHeader (name, value, scopes = 'common') { - for (let scope of Array.isArray(scopes) ? scopes : [ scopes ]) { - if (!value) { - delete this.defaults.headers[scope][name]; - return - } - this.defaults.headers[scope][name] = value - } - }, - setToken (token, type, scopes = 'common') { - const value = !token ? null : (type ? type + ' ' : '') + token - this.setHeader('Authorization', value, scopes) - }, - onRequest(fn) { - this.interceptors.request.use(config => fn(config) || config) - }, - onResponse(fn) { - this.interceptors.response.use(response => fn(response) || response) - }, - onRequestError(fn) { - this.interceptors.request.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onResponseError(fn) { - this.interceptors.response.use(undefined, error => fn(error) || Promise.reject(error)) - }, - onError(fn) { - this.onRequestError(fn) - this.onResponseError(fn) - } -} - -// Request helpers ($get, $post, ...) -for (let method of ['request', 'delete', 'get', 'head', 'options', 'post', 'put', 'patch']) { - axiosExtra['$' + method] = function () { return this[method].apply(this, arguments).then(res => res && res.data) } -} - -const extendAxiosInstance = axios => { - for (let key in axiosExtra) { - axios[key] = axiosExtra[key].bind(axios) - } -} - -<% if (options.debug) { %> -const log = (level, ...messages) => console[level]('[Axios]', ...messages) - -const setupDebugInterceptor = axios => { - // request - axios.onRequestError(error => { - log('error', 'Request error:', error) - }) - - // response - axios.onResponseError(error => { - log('error', 'Response error:', error) - }) - axios.onResponse(res => { - log( - 'info', - '[' + (res.status + ' ' + res.statusText) + ']', - '[' + res.config.method.toUpperCase() + ']', - res.config.url) - - if (process.browser) { - console.log(res) - } else { - console.log(JSON.stringify(res.data, undefined, 2)) - } - - return res - }) -}<% } %> - -<% if (options.credentials) { %> -const setupCredentialsInterceptor = axios => { - // Send credentials only to relative and API Backend requests - axios.onRequest(config => { - if (config.withCredentials === undefined) { - if (!/^https?:\/\//i.test(config.url) || config.url.indexOf(config.baseURL) === 0) { - config.withCredentials = true - } - } - }) -}<% } %> - -<% if (options.progress) { %> -const setupProgress = (axios, ctx) => { - if (process.server) { - return - } - - // A noop loading inteterface for when $nuxt is not yet ready - const noopLoading = { - finish: () => { }, - start: () => { }, - fail: () => { }, - set: () => { } - } - - const $loading = () => (window.$nuxt && window.$nuxt.$loading && window.$nuxt.$loading.set) ? window.$nuxt.$loading : noopLoading - - let currentRequests = 0 - - axios.onRequest(config => { - if (config && config.progress === false) { - return - } - - currentRequests++ - }) - - axios.onResponse(response => { - if (response && response.config && response.config.progress === false) { - return - } - - currentRequests-- - if (currentRequests <= 0) { - currentRequests = 0 - $loading().finish() - } - }) - - axios.onError(error => { - if (error && error.config && error.config.progress === false) { - return - } - - currentRequests-- - $loading().fail() - $loading().finish() - }) - - const onProgress = e => { - if (!currentRequests) { - return - } - const progress = ((e.loaded * 100) / (e.total * currentRequests)) - $loading().set(Math.min(100, progress)) - } - - axios.defaults.onUploadProgress = onProgress - axios.defaults.onDownloadProgress = onProgress -}<% } %> - -export default (ctx, inject) => { - // baseURL - const baseURL = process.browser - ? '<%= options.browserBaseURL %>' - : (process.env._AXIOS_BASE_URL_ || '<%= options.baseURL %>') - - // Create fresh objects for all default header scopes - // Axios creates only one which is shared across SSR requests! - // https://github.com/mzabriskie/axios/blob/master/lib/defaults.js - const headers = { - common : { - 'Accept': 'application/json, text/plain, */*' - }, - delete: {}, - get: {}, - head: {}, - post: {}, - put: {}, - patch: {} - } - - const axiosOptions = { - baseURL, - headers - } - - <% if (options.proxyHeaders) { %> - // Proxy SSR request headers headers - axiosOptions.headers.common = (ctx.req && ctx.req.headers) ? Object.assign({}, ctx.req.headers) : {} - <% for (let h of options.proxyHeadersIgnore) { %>delete axiosOptions.headers.common['<%= h %>'] - <% } %><% } %> - - if (process.server) { - // Don't accept brotli encoding because Node can't parse it - axiosOptions.headers.common['accept-encoding'] = 'gzip, deflate' - } - - // Create new axios instance - const axios = Axios.create(axiosOptions) - - // Extend axios proto - extendAxiosInstance(axios) - - // Setup interceptors - <% if (options.debug) { %>setupDebugInterceptor(axios) <% } %> - <% if (options.credentials) { %>setupCredentialsInterceptor(axios)<% } %> - <% if (options.progress) { %>setupProgress(axios, ctx) <% } %> - <% if (options.retry) { %>axiosRetry(axios, <%= serialize(options.retry) %>)<% } %> - - // Inject axios to the context as $axios - ctx.$axios = axios - inject('axios', axios) -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/.eslintrc.js deleted file mode 100644 index d55b0f63..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 5a95bf54..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,95 +0,0 @@ -// these regular expressions are borrowed from below page. -// https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - -// eslint-disable-next-line -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr(0, 4)) -} - -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr(0, 4)) -} - -function isIos (a) { - return /iPad|iPhone|iPod/.test(a) -} - -function isWindows (a) { - return /Windows/.test(a) -} - -function isMacOS (a) { - return /Mac OS X/.test(a) -} - -const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36' - -export default async function (ctx, inject) { - let userAgent = '' - if (typeof ctx.req !== 'undefined') { - userAgent = ctx.req.headers['user-agent'] - } else if (typeof navigator !== 'undefined') { - userAgent = navigator.userAgent - } else { - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>' - <% } else { %> - userAgent = DEFAULT_USER_AGENT - <% } %> - } - // use default user-agent if user-agent header is not sent - if (!userAgent) { - userAgent = DEFAULT_USER_AGENT - } - let mobile = null - let mobileOrTablet = null - let ios = null - let windows = false - let macOS = true - - if (userAgent === 'Amazon CloudFront') { - if (ctx.req.headers['cloudfront-is-mobile-viewer'] === 'true') { - mobile = true - mobileOrTablet = true - } - if (ctx.req.headers['cloudfront-is-tablet-viewer'] === 'true') { - mobile = false - mobileOrTablet = true - } - } else { - mobile = isMobile(userAgent) - mobileOrTablet = isMobileOrTablet(userAgent) - ios = isIos(userAgent) - } - windows = isWindows(userAgent) - macOS = isMacOS(userAgent) - - ctx.isMobile = mobile - ctx.isMobileOrTablet = mobileOrTablet - ctx.isTablet = !mobile && mobileOrTablet - ctx.isDesktop = !mobileOrTablet - ctx.isDesktopOrTablet = !mobile - ctx.isIos = ios - ctx.isWindows = windows - ctx.isMacOS = macOS - inject('device', { - isMobile: mobile, - isMobileOrTablet: mobileOrTablet, - isTablet: !mobile && mobileOrTablet, - isDesktop: !mobileOrTablet, - isIos: ios, - isWindows: windows, - isMacOS: macOS, - isDesktopOrTablet: !mobile - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/plugin.js deleted file mode 100644 index 5a95bf54..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/device-module/lib/plugin.js +++ /dev/null @@ -1,95 +0,0 @@ -// these regular expressions are borrowed from below page. -// https://stackoverflow.com/questions/11381673/detecting-a-mobile-browser - -// eslint-disable-next-line -const REGEX_MOBILE1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i - -// eslint-disable-next-line -const REGEX_MOBILE2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobile (a) { - return REGEX_MOBILE1.test(a) || REGEX_MOBILE2.test(a.substr(0, 4)) -} - -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i -// eslint-disable-next-line -const REGEX_MOBILE_OR_TABLET2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i - -function isMobileOrTablet (a) { - return REGEX_MOBILE_OR_TABLET1.test(a) || REGEX_MOBILE_OR_TABLET2.test(a.substr(0, 4)) -} - -function isIos (a) { - return /iPad|iPhone|iPod/.test(a) -} - -function isWindows (a) { - return /Windows/.test(a) -} - -function isMacOS (a) { - return /Mac OS X/.test(a) -} - -const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.39 Safari/537.36' - -export default async function (ctx, inject) { - let userAgent = '' - if (typeof ctx.req !== 'undefined') { - userAgent = ctx.req.headers['user-agent'] - } else if (typeof navigator !== 'undefined') { - userAgent = navigator.userAgent - } else { - <% if (options.defaultUserAgent) { %> - userAgent = '<%= options.defaultUserAgent %>' - <% } else { %> - userAgent = DEFAULT_USER_AGENT - <% } %> - } - // use default user-agent if user-agent header is not sent - if (!userAgent) { - userAgent = DEFAULT_USER_AGENT - } - let mobile = null - let mobileOrTablet = null - let ios = null - let windows = false - let macOS = true - - if (userAgent === 'Amazon CloudFront') { - if (ctx.req.headers['cloudfront-is-mobile-viewer'] === 'true') { - mobile = true - mobileOrTablet = true - } - if (ctx.req.headers['cloudfront-is-tablet-viewer'] === 'true') { - mobile = false - mobileOrTablet = true - } - } else { - mobile = isMobile(userAgent) - mobileOrTablet = isMobileOrTablet(userAgent) - ios = isIos(userAgent) - } - windows = isWindows(userAgent) - macOS = isMacOS(userAgent) - - ctx.isMobile = mobile - ctx.isMobileOrTablet = mobileOrTablet - ctx.isTablet = !mobile && mobileOrTablet - ctx.isDesktop = !mobileOrTablet - ctx.isDesktopOrTablet = !mobile - ctx.isIos = ios - ctx.isWindows = windows - ctx.isMacOS = macOS - inject('device', { - isMobile: mobile, - isMobileOrTablet: mobileOrTablet, - isTablet: !mobile && mobileOrTablet, - isDesktop: !mobileOrTablet, - isIos: ios, - isWindows: windows, - isMacOS: macOS, - isDesktopOrTablet: !mobile - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/.eslintrc.js deleted file mode 100644 index 6d47a84b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: "module" - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ["standard"], - plugins: ["jest", "vue"], - rules: { - // Allow paren-less arrow functions - "arrow-parens": 0, - // Allow async-await - "generator-star-spacing": 0, - // Allow debugger during development - "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, - // Do not allow console.logs etc... - "no-console": 2 - }, - globals: { - "jest/globals": true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/plugin.template.js deleted file mode 100644 index 750689d2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/all-rules-test/plugin.template.js +++ /dev/null @@ -1,130 +0,0 @@ -import Vue from 'vue' - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - return h( - 'ins', - { - 'class': ['adsbygoogle'], - style: this.adStyle, - attrs: { - 'data-ad-client': this.adClient, - 'data-ad-slot': this.adSlot || null, - 'data-ad-format': this.adFormat, - 'data-ad-region': this.show ? this.adRegion() : null, - 'data-ad-layout': this.adLayout || null, - 'data-ad-layout-key': this.adLayoutKey || null, - 'data-page-url': this.pageUrl ? this.pageUrl : null, - 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, - 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, - 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, - domProps: { - innerHTML: this.show ? '' : ' ' - }, - key: Math.random() - } - ) - }, - props: { - adClient: { - type: String, - default: '<%= options.id %>' - }, - adSlot: { - type: String - }, - adFormat: { - type: String, - default: 'auto' - }, - adLayout: { - type: String - }, - adLayoutKey: { - type: String - }, - adStyle: { - type: Object, - default () { - return { - display: 'block' - } - } - }, - pageUrl: { - type: String - }, - analyticsUacct: { - type: String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - type: String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - type: Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - return { - show: true - } - }, - mounted () { - this.showAd() - }, - watch: { - '$route' (to, from) { - if (to.fullPath === from.fullPath) { - return; - } - const keys = Object.keys - const toQuery = to.query - const fromQuery = from.query - let changed = false - if (to.path !== from.path) { - changed = true - } else if (this.includeQuery) { - // If we include query params, check to see if they are loosely unequal - changed = (keys(toQuery).length !== keys(fromQuery).length) || !keys(toQuery).every(k => toQuery[k] === fromQuery[k]) - } - if (changed) { - // If the route has changed, update the ad - this.updateAd() - } - } - }, - methods: { - adRegion () { - return 'page-' + Math.random() - }, - updateAd () { - if (this.isServer) { - return - } - // Reset the INS element - this.show = false - // Show new ad on nextTick - this.$nextTick(this.showAd) - }, - showAd () { - this.show = true - this.$nextTick(() => { - try { - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}) - } catch (error) { - console.error(error) - } - }) - } - } -} - -// Register our ad component under the desired tag name -Vue.component('<%= options.tag %>', adsbygoogle) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/plugin.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/plugin.template.js deleted file mode 100644 index 750689d2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-adsense-module/lib/plugin.template.js +++ /dev/null @@ -1,130 +0,0 @@ -import Vue from 'vue' - -// Custom AdSense Ad Component -const adsbygoogle = { - render (h) { - return h( - 'ins', - { - 'class': ['adsbygoogle'], - style: this.adStyle, - attrs: { - 'data-ad-client': this.adClient, - 'data-ad-slot': this.adSlot || null, - 'data-ad-format': this.adFormat, - 'data-ad-region': this.show ? this.adRegion() : null, - 'data-ad-layout': this.adLayout || null, - 'data-ad-layout-key': this.adLayoutKey || null, - 'data-page-url': this.pageUrl ? this.pageUrl : null, - 'data-analytics-uacct': this.analyticsUacct ? this.analyticsUacct : null, - 'data-analytics-domain-name': this.analyticsDomainName ? this.analyticsDomainName : null, - 'data-adtest': <%= options.test ? '\'on\'' : 'null' %>, - 'data-adsbygoogle-status': this.show ? null : '' - }, - domProps: { - innerHTML: this.show ? '' : ' ' - }, - key: Math.random() - } - ) - }, - props: { - adClient: { - type: String, - default: '<%= options.id %>' - }, - adSlot: { - type: String - }, - adFormat: { - type: String, - default: 'auto' - }, - adLayout: { - type: String - }, - adLayoutKey: { - type: String - }, - adStyle: { - type: Object, - default () { - return { - display: 'block' - } - } - }, - pageUrl: { - type: String - }, - analyticsUacct: { - type: String, - default: '<%= options.analyticsUacct %>' - }, - analyticsDomainName: { - type: String, - default: '<%= options.analyticsDomainName %>' - }, - includeQuery: { - type: Boolean, - default: <%= options.includeQuery %> - } - }, - data () { - return { - show: true - } - }, - mounted () { - this.showAd() - }, - watch: { - '$route' (to, from) { - if (to.fullPath === from.fullPath) { - return; - } - const keys = Object.keys - const toQuery = to.query - const fromQuery = from.query - let changed = false - if (to.path !== from.path) { - changed = true - } else if (this.includeQuery) { - // If we include query params, check to see if they are loosely unequal - changed = (keys(toQuery).length !== keys(fromQuery).length) || !keys(toQuery).every(k => toQuery[k] === fromQuery[k]) - } - if (changed) { - // If the route has changed, update the ad - this.updateAd() - } - } - }, - methods: { - adRegion () { - return 'page-' + Math.random() - }, - updateAd () { - if (this.isServer) { - return - } - // Reset the INS element - this.show = false - // Show new ad on nextTick - this.$nextTick(this.showAd) - }, - showAd () { - this.show = true - this.$nextTick(() => { - try { - // Once ad container () DOM has (re-)rendered, requesst a new advert - (window.adsbygoogle = window.adsbygoogle || []).push({}) - } catch (error) { - console.error(error) - } - }) - } - } -} - -// Register our ad component under the desired tag name -Vue.component('<%= options.tag %>', adsbygoogle) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/.eslintrc.js deleted file mode 100644 index 322f7df8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/plugin.js deleted file mode 100644 index 73e35233..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,132 +0,0 @@ -import weightedRandom from 'weighted-random' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' - -import experiments from '<%= options.experimentsDir %>' -const MAX_AGE = <%= options.maxAge %> - -export default function (ctx, inject) { - // Assign experiment and variant to user - assignExperiment(ctx) - - // Google optimize integration - googleOptimize(ctx) - - // Inject $exp - inject('exp', ctx.experiment) -} - -function assignExperiment(ctx) { - // Choose experiment and variant - let experimentIndex = -1 - let experiment = {} - let variantIndexes = [] - let classes = [] - - // Try to restore from cookie - const cookie = getCookie(ctx, 'exp') || '' // experimentID.var1-var2 - const [cookieExp, cookieVars] = cookie.split('.') - if (cookieExp && cookieVars) { - // Try to find experiment with that id - experimentIndex = experiments.findIndex(exp => exp.experimentID === cookieExp) - experiment = experiments[experimentIndex] - - // Variant indexes - variantIndexes = cookieVars.split('-').map(v => parseInt(v)) - } - - // Choose one experiment - const experimentWeights = experiments.map(exp => exp.weight === undefined ? 1 : exp.weight) - let retries = experiments.length - while (experimentIndex === -1 && retries-- > 0) { - experimentIndex = weightedRandom(experimentWeights) - experiment = experiments[experimentIndex] - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === 'function') { - if (!experiment.isEligible(ctx)) { - // Try another one - experimentWeights[experimentIndex] = 0 - experimentIndex = -1 - } - } - } - - if (experimentIndex !== -1) { - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter(index => experiment.variants[index]) - - // Choose enough variants - const variantWeights = experiment.variants.map(variant => variant.weight === undefined ? 1 : variant.weight) - while (variantIndexes.length < (experiment.sections || 1)) { - const index = weightedRandom(variantWeights) - variantWeights[index] = 0 - variantIndexes.push(index) - } - - // Write exp cookie if changed - const expCookie = experiment.experimentID + '.' + variantIndexes.join('-') - if (cookie !== expCookie) { - setCookie(ctx, 'exp', expCookie, experiment.maxAge) - } - - // Compute global classes to be injected - classes = variantIndexes.map(index => 'exp-' + experiment.name + '-' + index) - } else { - // No active experiment - experiment = {} - variantIndexes = [] - classes = [] - } - - ctx.experiment = { - $experimentIndex: experimentIndex, - $variantIndexes: variantIndexes, - $activeVariants: variantIndexes.map(index => experiment.variants[index]), - $classes: classes, - ...experiment - } -} - -function getCookie(ctx, name) { - if (process.server && !ctx.req) { - return - } - - // Get and parse cookies - const cookieStr = process.client ? document.cookie : ctx.req.headers.cookie - const cookies = parseCookie(cookieStr || '') || {} - - return cookies[name] -} - -function setCookie(ctx, name, value, maxAge = MAX_AGE) { - const serializedCookie = serializeCookie(name, value, { - path: '/', - maxAge - }) - - if (process.client) { - // Set in browser - document.cookie = serializedCookie - } else if (process.server && ctx.res) { - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader('Set-Cookie') - let value = serializedCookie - if (prev) { - value = Array.isArray(prev) ? prev.concat(serializedCookie) - : [prev, serializedCookie] - } - ctx.res.setHeader('Set-Cookie', value) - } -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize({ experiment }) { - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - return - } - - const exp = experiment.experimentID + '.' + experiment.$variantIndexes.join('-') - - window.ga('set', 'exp', exp) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/plugin.js deleted file mode 100644 index 73e35233..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/google-optimize/lib/plugin.js +++ /dev/null @@ -1,132 +0,0 @@ -import weightedRandom from 'weighted-random' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' - -import experiments from '<%= options.experimentsDir %>' -const MAX_AGE = <%= options.maxAge %> - -export default function (ctx, inject) { - // Assign experiment and variant to user - assignExperiment(ctx) - - // Google optimize integration - googleOptimize(ctx) - - // Inject $exp - inject('exp', ctx.experiment) -} - -function assignExperiment(ctx) { - // Choose experiment and variant - let experimentIndex = -1 - let experiment = {} - let variantIndexes = [] - let classes = [] - - // Try to restore from cookie - const cookie = getCookie(ctx, 'exp') || '' // experimentID.var1-var2 - const [cookieExp, cookieVars] = cookie.split('.') - if (cookieExp && cookieVars) { - // Try to find experiment with that id - experimentIndex = experiments.findIndex(exp => exp.experimentID === cookieExp) - experiment = experiments[experimentIndex] - - // Variant indexes - variantIndexes = cookieVars.split('-').map(v => parseInt(v)) - } - - // Choose one experiment - const experimentWeights = experiments.map(exp => exp.weight === undefined ? 1 : exp.weight) - let retries = experiments.length - while (experimentIndex === -1 && retries-- > 0) { - experimentIndex = weightedRandom(experimentWeights) - experiment = experiments[experimentIndex] - - // Check if current user is eligible for experiment - if (typeof experiment.isEligible === 'function') { - if (!experiment.isEligible(ctx)) { - // Try another one - experimentWeights[experimentIndex] = 0 - experimentIndex = -1 - } - } - } - - if (experimentIndex !== -1) { - // Validate variantIndexes against experiment (coming from cookie) - variantIndexes = variantIndexes.filter(index => experiment.variants[index]) - - // Choose enough variants - const variantWeights = experiment.variants.map(variant => variant.weight === undefined ? 1 : variant.weight) - while (variantIndexes.length < (experiment.sections || 1)) { - const index = weightedRandom(variantWeights) - variantWeights[index] = 0 - variantIndexes.push(index) - } - - // Write exp cookie if changed - const expCookie = experiment.experimentID + '.' + variantIndexes.join('-') - if (cookie !== expCookie) { - setCookie(ctx, 'exp', expCookie, experiment.maxAge) - } - - // Compute global classes to be injected - classes = variantIndexes.map(index => 'exp-' + experiment.name + '-' + index) - } else { - // No active experiment - experiment = {} - variantIndexes = [] - classes = [] - } - - ctx.experiment = { - $experimentIndex: experimentIndex, - $variantIndexes: variantIndexes, - $activeVariants: variantIndexes.map(index => experiment.variants[index]), - $classes: classes, - ...experiment - } -} - -function getCookie(ctx, name) { - if (process.server && !ctx.req) { - return - } - - // Get and parse cookies - const cookieStr = process.client ? document.cookie : ctx.req.headers.cookie - const cookies = parseCookie(cookieStr || '') || {} - - return cookies[name] -} - -function setCookie(ctx, name, value, maxAge = MAX_AGE) { - const serializedCookie = serializeCookie(name, value, { - path: '/', - maxAge - }) - - if (process.client) { - // Set in browser - document.cookie = serializedCookie - } else if (process.server && ctx.res) { - // Send Set-Cookie header from server side - const prev = ctx.res.getHeader('Set-Cookie') - let value = serializedCookie - if (prev) { - value = Array.isArray(prev) ? prev.concat(serializedCookie) - : [prev, serializedCookie] - } - ctx.res.setHeader('Set-Cookie', value) - } -} - -// https://developers.google.com/optimize/devguides/experiments -function googleOptimize({ experiment }) { - if (process.server || !window.ga || !experiment || !experiment.experimentID) { - return - } - - const exp = experiment.experimentID + '.' + experiment.$variantIndexes.join('-') - - window.ga('set', 'exp', exp) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/.eslintrc.js deleted file mode 100644 index de536ec9..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/.eslintrc.js +++ /dev/null @@ -1,45 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: ['standard'], - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 1, - // Disalow semicolons - 'semi': ['error', 'never'] - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - ecmaVersion: 2022 - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/main.js deleted file mode 100644 index c8dbce93..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/main.js +++ /dev/null @@ -1,260 +0,0 @@ -import Cookie from 'cookie' -import JsCookie from 'js-cookie' -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import { nuxtI18nSeo } from './seo-head' -import { validateRouteParams } from './utils' - -Vue.use(VueI18n) - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const lazy = <%= options.lazy %> -const vuex = <%= JSON.stringify(options.vuex) %> -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %> -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - -export default async (context) => { - const { app, route, store, req, res, redirect } = context - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const getHostname = <%= options.getHostname %> - const getForwarded = <%= options.getForwarded %> - const getLocaleDomain = <%= options.getLocaleDomain %> - const syncVuex = <%= options.syncVuex %> - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - store.registerModule(vuex.moduleName, { - namespaced: true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>locale: '',<% } %> - <% if (options.vuex.syncMessages) { %>messages: {},<% } %> - <% if (options.vuex.syncRouteParams) { %>routeParams: {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({ commit }, locale) { - commit('setLocale', locale) - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({ commit }, messages) { - commit('setMessages', messages) - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({ commit }, params) { - if (process.env.NODE_ENV === 'development') { - validateRouteParams(params) - } - commit('setRouteParams', params) - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - state.locale = locale - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - state.messages = messages - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - state.routeParams = params - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - localeRouteParams: ({ routeParams }) => locale => routeParams[locale] || {} - <% } %> - } - }, { preserveState: !!store.state[vuex.moduleName] }) - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - const { useCookie, cookieKey } = detectBrowserLanguage - - const getLocaleCookie = () => { - if (useCookie) { - if (process.client) { - return JsCookie.get(cookieKey) - } else if (req && typeof req.headers.cookie !== 'undefined') { - const cookies = req.headers && req.headers.cookie ? Cookie.parse(req.headers.cookie) : {} - return cookies[cookieKey] - } - } - } - - const setLocaleCookie = locale => { - if (!useCookie) { - return - } - const date = new Date() - if (process.client) { - JsCookie.set(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - } else if (res) { - let headers = res.getHeader('Set-Cookie') || [] - if (typeof headers == 'string') { - headers = [headers] - } - - const redirectCookie = Cookie.serialize(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - headers.push(redirectCookie) - - res.setHeader('Set-Cookie', headers) - } - } - - const loadAndSetLocale = async (newLocale, { initialSetup = false } = {}) => { - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - return - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - return - } - - const oldLocale = app.i18n.locale - - if (!initialSetup) { - app.i18n.beforeLanguageSwitch(oldLocale, newLocale) - - if (useCookie) { - app.i18n.setLocaleCookie(newLocale) - } - } - - // Lazy-loading enabled - if (lazy) { - const { loadLanguageAsync } = require('./utils') - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - await loadLanguageAsync(context, app.i18n.fallbackLocale) - } - - await loadLanguageAsync(context, newLocale) - } - - app.i18n.locale = newLocale - - if (!initialSetup) { - app.i18n.onLanguageSwitched(oldLocale, newLocale) - } - - await syncVuex(newLocale, app.i18n.getLocaleMessage(newLocale)) - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - const route = app.i18n.__route - const routeName = route && route.name ? app.getRouteBaseName(route) : 'index' - const redirectPath = app.localePath(Object.assign({}, route, { name: routeName }), newLocale) - - if (route && route.path !== redirectPath) { - redirect(redirectPath) - } - } - } - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>) - app.i18n.locales = <%= JSON.stringify(options.locales) %> - app.i18n.defaultLocale = '<%= options.defaultLocale %>' - app.i18n.differentDomains = <%= options.differentDomains %> - app.i18n.forwardedHost = <%= options.forwardedHost %> - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %> - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %> - app.i18n.setLocaleCookie = setLocaleCookie - app.i18n.getLocaleCookie = getLocaleCookie - app.i18n.setLocale = (locale) => loadAndSetLocale(locale) - - // Current route. Updated from middleware also. - app.i18n.__route = route - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo - - if (store && store.state.localeDomains) { - app.i18n.locales.forEach(locale => { - locale.domain = store.state.localeDomains[locale.code] - }) - } - - let locale = app.i18n.defaultLocale || null - - if (app.i18n.differentDomains) { - const domainLocale = getLocaleDomain() - locale = domainLocale ? domainLocale : locale - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, app.i18n.locales) - locale = routeLocale ? routeLocale : locale - } else if (useCookie) { - locale = getLocaleCookie() || locale - } - - await loadAndSetLocale(locale, { initialSetup: true }) - - app.i18n.__detectBrowserLanguage = async route => { - const { alwaysRedirect, fallbackLocale } = detectBrowserLanguage - - if (detectBrowserLanguage) { - let browserLocale - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== '1') { - // Get preferred language from cookie if present and enabled - // Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - } else if (process.client && typeof navigator !== 'undefined' && navigator.language) { - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring(0, 2) - } else if (req && typeof req.headers['accept-language'] !== 'undefined') { - browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) - } - - if (browserLocale) { - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - let redirectToLocale = fallbackLocale - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - redirectToLocale = browserLocale - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - if (redirectToLocale !== app.i18n.locale) { - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale) - } else if (useCookie && !getLocaleCookie()) { - app.i18n.setLocaleCookie(redirectToLocale) - } - } - - return true - } - } - } - - return false - } - - await app.i18n.__detectBrowserLanguage(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/routing.js deleted file mode 100644 index 54cd79af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/routing.js +++ /dev/null @@ -1,138 +0,0 @@ -import './middleware' -import Vue from 'vue' - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const vuex = <%= JSON.stringify(options.vuex) %> -const routesNameSeparator = '<%= options.routesNameSeparator %>' -const defaultLocale = '<%= options.defaultLocale %>' - -function localePathFactory (i18nPath, routerPath) { - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - return function localePath (route, locale) { - // Abort if no route or no locale - if (!route) return - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy') - } - - locale = locale || this[i18nPath].locale - - if (!locale) return - - // If route parameters is a string, use it as the route's name - if (typeof route === 'string') { - route = { name: route } - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX ? '' : routesNameSeparator + locale) - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - name += routesNameSeparator + defaultLocaleRouteNameSuffix - } - - const localizedRoute = Object.assign({}, route, { name }) - - const { params } = localizedRoute - if (params && params['0'] === undefined && params.pathMatch) { - params['0'] = params.pathMatch - } - - // Resolve localized route - const router = this[routerPath] - const { route: { fullPath } } = router.resolve(localizedRoute) - return fullPath - } -} - - -function switchLocalePathFactory (i18nPath) { - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - - return function switchLocalePath (locale) { - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy') - } - - const name = this.getRouteBaseName() - if (!name) { - return '' - } - - const { params, ...routeCopy } = this.$route - let langSwitchParams = {} - <% if (options.vuex) { %> - if (this.$store) { - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale) - } - <% } %> - const baseRoute = Object.assign({}, routeCopy, { - name, - params: { - ...params, - ...langSwitchParams, - '0': params.pathMatch - } - }) - let path = this.localePath(baseRoute, locale) - - // Handle different domains - if (this[i18nPath].differentDomains) { - const lang = this[i18nPath].locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (lang && lang[LOCALE_DOMAIN_KEY]) { - let protocol - if (process.server) { - const isHTTPS = require('is-https'); - const { req } = this.$options._parentVnode.ssrContext - protocol = isHTTPS(req) ? 'https' : 'http' - } else { - protocol = window.location.protocol.split(':')[0] - } - path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale) - } - } - return path - } -} - -function getRouteBaseNameFactory (contextRoute) { - - const routeGetter = contextRoute ? route => route || contextRoute : - function (route) { - return route || this.$route - } - - return function getRouteBaseName (route) { - route = routeGetter.call(this, route) - if (!route.name) { - return null - } - return route.name.split(routesNameSeparator)[0] - } -} - -const plugin = { - install(Vue) { - Vue.mixin({ - methods: { - localePath: localePathFactory('$i18n', '$router'), - switchLocalePath: switchLocalePathFactory('$i18n'), - getRouteBaseName: getRouteBaseNameFactory() - } - }) - } -} - -export default ({ app, route }) => { - Vue.use(plugin) - app.localePath = localePathFactory('i18n', 'router') - app.switchLocalePath = switchLocalePathFactory('i18n') - app.getRouteBaseName = getRouteBaseNameFactory(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/seo.js deleted file mode 100644 index 5f771822..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/all-rules-test/seo.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from 'vue' -import { nuxtI18nSeo } from './seo-head' - -const plugin = { - install(Vue) { - Vue.mixin({ - head: nuxtI18nSeo - }) - } -} - -Vue.use(plugin) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/main.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/main.js deleted file mode 100644 index c8dbce93..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/main.js +++ /dev/null @@ -1,260 +0,0 @@ -import Cookie from 'cookie' -import JsCookie from 'js-cookie' -import Vue from 'vue' -import VueI18n from 'vue-i18n' -import { nuxtI18nSeo } from './seo-head' -import { validateRouteParams } from './utils' - -Vue.use(VueI18n) - -// Options -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const lazy = <%= options.lazy %> -const vuex = <%= JSON.stringify(options.vuex) %> -// Helpers -const getLocaleCodes = <%= options.getLocaleCodes %> -const localeCodes = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - -export default async (context) => { - const { app, route, store, req, res, redirect } = context - - // Helpers - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const getHostname = <%= options.getHostname %> - const getForwarded = <%= options.getForwarded %> - const getLocaleDomain = <%= options.getLocaleDomain %> - const syncVuex = <%= options.syncVuex %> - - <% if (options.vuex) { %> - // Register Vuex module - if (store) { - store.registerModule(vuex.moduleName, { - namespaced: true, - state: () => ({ - <% if (options.vuex.syncLocale) { %>locale: '',<% } %> - <% if (options.vuex.syncMessages) { %>messages: {},<% } %> - <% if (options.vuex.syncRouteParams) { %>routeParams: {}<% } %> - }), - actions: { - <% if (options.vuex.syncLocale) { %> - setLocale ({ commit }, locale) { - commit('setLocale', locale) - }, - <% } if (options.vuex.syncMessages) { %> - setMessages ({ commit }, messages) { - commit('setMessages', messages) - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams ({ commit }, params) { - if (process.env.NODE_ENV === 'development') { - validateRouteParams(params) - } - commit('setRouteParams', params) - } - <% } %> - }, - mutations: { - <% if (options.vuex.syncLocale) { %> - setLocale (state, locale) { - state.locale = locale - }, - <% } if (options.vuex.syncMessages) { %> - setMessages (state, messages) { - state.messages = messages - }, - <% } if (options.vuex.syncRouteParams) { %> - setRouteParams (state, params) { - state.routeParams = params - } - <% } %> - }, - getters: { - <% if (options.vuex.syncRouteParams) { %> - localeRouteParams: ({ routeParams }) => locale => routeParams[locale] || {} - <% } %> - } - }, { preserveState: !!store.state[vuex.moduleName] }) - } - <% } %> - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - const { useCookie, cookieKey } = detectBrowserLanguage - - const getLocaleCookie = () => { - if (useCookie) { - if (process.client) { - return JsCookie.get(cookieKey) - } else if (req && typeof req.headers.cookie !== 'undefined') { - const cookies = req.headers && req.headers.cookie ? Cookie.parse(req.headers.cookie) : {} - return cookies[cookieKey] - } - } - } - - const setLocaleCookie = locale => { - if (!useCookie) { - return - } - const date = new Date() - if (process.client) { - JsCookie.set(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - } else if (res) { - let headers = res.getHeader('Set-Cookie') || [] - if (typeof headers == 'string') { - headers = [headers] - } - - const redirectCookie = Cookie.serialize(cookieKey, locale, { - expires: new Date(date.setDate(date.getDate() + 365)), - path: '/' - }) - headers.push(redirectCookie) - - res.setHeader('Set-Cookie', headers) - } - } - - const loadAndSetLocale = async (newLocale, { initialSetup = false } = {}) => { - // Abort if different domains option enabled - if (!initialSetup && app.i18n.differentDomains) { - return - } - - // Abort if newLocale did not change - if (newLocale === app.i18n.locale) { - return - } - - const oldLocale = app.i18n.locale - - if (!initialSetup) { - app.i18n.beforeLanguageSwitch(oldLocale, newLocale) - - if (useCookie) { - app.i18n.setLocaleCookie(newLocale) - } - } - - // Lazy-loading enabled - if (lazy) { - const { loadLanguageAsync } = require('./utils') - - // Load fallback locale. - if (app.i18n.fallbackLocale && newLocale !== app.i18n.fallbackLocale) { - await loadLanguageAsync(context, app.i18n.fallbackLocale) - } - - await loadLanguageAsync(context, newLocale) - } - - app.i18n.locale = newLocale - - if (!initialSetup) { - app.i18n.onLanguageSwitched(oldLocale, newLocale) - } - - await syncVuex(newLocale, app.i18n.getLocaleMessage(newLocale)) - - if (!initialSetup && STRATEGY !== STRATEGIES.NO_PREFIX) { - const route = app.i18n.__route - const routeName = route && route.name ? app.getRouteBaseName(route) : 'index' - const redirectPath = app.localePath(Object.assign({}, route, { name: routeName }), newLocale) - - if (route && route.path !== redirectPath) { - redirect(redirectPath) - } - } - } - - // Set instance options - app.i18n = new VueI18n(<%= JSON.stringify(options.vueI18n) %>) - app.i18n.locales = <%= JSON.stringify(options.locales) %> - app.i18n.defaultLocale = '<%= options.defaultLocale %>' - app.i18n.differentDomains = <%= options.differentDomains %> - app.i18n.forwardedHost = <%= options.forwardedHost %> - app.i18n.beforeLanguageSwitch = <%= options.beforeLanguageSwitch %> - app.i18n.onLanguageSwitched = <%= options.onLanguageSwitched %> - app.i18n.setLocaleCookie = setLocaleCookie - app.i18n.getLocaleCookie = getLocaleCookie - app.i18n.setLocale = (locale) => loadAndSetLocale(locale) - - // Current route. Updated from middleware also. - app.i18n.__route = route - - // Inject seo function - Vue.prototype.$nuxtI18nSeo = nuxtI18nSeo - - if (store && store.state.localeDomains) { - app.i18n.locales.forEach(locale => { - locale.domain = store.state.localeDomains[locale.code] - }) - } - - let locale = app.i18n.defaultLocale || null - - if (app.i18n.differentDomains) { - const domainLocale = getLocaleDomain() - locale = domainLocale ? domainLocale : locale - } else if (STRATEGY !== STRATEGIES.NO_PREFIX) { - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, app.i18n.locales) - locale = routeLocale ? routeLocale : locale - } else if (useCookie) { - locale = getLocaleCookie() || locale - } - - await loadAndSetLocale(locale, { initialSetup: true }) - - app.i18n.__detectBrowserLanguage = async route => { - const { alwaysRedirect, fallbackLocale } = detectBrowserLanguage - - if (detectBrowserLanguage) { - let browserLocale - - if (useCookie && (browserLocale = getLocaleCookie()) && browserLocale !== 1 && browserLocale !== '1') { - // Get preferred language from cookie if present and enabled - // Exclude 1 for backwards compatibility and fallback when fallbackLocale is empty - } else if (process.client && typeof navigator !== 'undefined' && navigator.language) { - // Get browser language either from navigator if running on client side, or from the headers - browserLocale = navigator.language.toLocaleLowerCase().substring(0, 2) - } else if (req && typeof req.headers['accept-language'] !== 'undefined') { - browserLocale = req.headers['accept-language'].split(',')[0].toLocaleLowerCase().substring(0, 2) - } - - if (browserLocale) { - // Handle cookie option to prevent multiple redirections - if (!useCookie || alwaysRedirect || !getLocaleCookie()) { - let redirectToLocale = fallbackLocale - - // Use browserLocale if we support it, otherwise use fallbackLocale - if (localeCodes.includes(browserLocale)) { - redirectToLocale = browserLocale - } - - if (redirectToLocale && localeCodes.includes(redirectToLocale)) { - if (redirectToLocale !== app.i18n.locale) { - // We switch the locale before redirect to prevent loops - await app.i18n.setLocale(redirectToLocale) - } else if (useCookie && !getLocaleCookie()) { - app.i18n.setLocaleCookie(redirectToLocale) - } - } - - return true - } - } - } - - return false - } - - await app.i18n.__detectBrowserLanguage(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/routing.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/routing.js deleted file mode 100644 index 54cd79af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/routing.js +++ /dev/null @@ -1,138 +0,0 @@ -import './middleware' -import Vue from 'vue' - -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' -const vuex = <%= JSON.stringify(options.vuex) %> -const routesNameSeparator = '<%= options.routesNameSeparator %>' -const defaultLocale = '<%= options.defaultLocale %>' - -function localePathFactory (i18nPath, routerPath) { - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - - return function localePath (route, locale) { - // Abort if no route or no locale - if (!route) return - - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to localePath is unsupported when using no_prefix strategy') - } - - locale = locale || this[i18nPath].locale - - if (!locale) return - - // If route parameters is a string, use it as the route's name - if (typeof route === 'string') { - route = { name: route } - } - - // Build localized route options - let name = route.name + (STRATEGY === STRATEGIES.NO_PREFIX ? '' : routesNameSeparator + locale) - - // Match route without prefix for default locale - if (locale === defaultLocale && STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - name += routesNameSeparator + defaultLocaleRouteNameSuffix - } - - const localizedRoute = Object.assign({}, route, { name }) - - const { params } = localizedRoute - if (params && params['0'] === undefined && params.pathMatch) { - params['0'] = params.pathMatch - } - - // Resolve localized route - const router = this[routerPath] - const { route: { fullPath } } = router.resolve(localizedRoute) - return fullPath - } -} - - -function switchLocalePathFactory (i18nPath) { - const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - - return function switchLocalePath (locale) { - if (STRATEGY === STRATEGIES.NO_PREFIX && locale && locale !== this[i18nPath].locale) { - console.warn('[<%= options.MODULE_NAME %>] Passing non-current locale to switchLocalePath is unsupported when using no_prefix strategy') - } - - const name = this.getRouteBaseName() - if (!name) { - return '' - } - - const { params, ...routeCopy } = this.$route - let langSwitchParams = {} - <% if (options.vuex) { %> - if (this.$store) { - langSwitchParams = this.$store.getters[`${vuex.moduleName}/localeRouteParams`](locale) - } - <% } %> - const baseRoute = Object.assign({}, routeCopy, { - name, - params: { - ...params, - ...langSwitchParams, - '0': params.pathMatch - } - }) - let path = this.localePath(baseRoute, locale) - - // Handle different domains - if (this[i18nPath].differentDomains) { - const lang = this[i18nPath].locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (lang && lang[LOCALE_DOMAIN_KEY]) { - let protocol - if (process.server) { - const isHTTPS = require('is-https'); - const { req } = this.$options._parentVnode.ssrContext - protocol = isHTTPS(req) ? 'https' : 'http' - } else { - protocol = window.location.protocol.split(':')[0] - } - path = protocol + '://' + lang[LOCALE_DOMAIN_KEY] + path - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find domain name for locale ' + locale) - } - } - return path - } -} - -function getRouteBaseNameFactory (contextRoute) { - - const routeGetter = contextRoute ? route => route || contextRoute : - function (route) { - return route || this.$route - } - - return function getRouteBaseName (route) { - route = routeGetter.call(this, route) - if (!route.name) { - return null - } - return route.name.split(routesNameSeparator)[0] - } -} - -const plugin = { - install(Vue) { - Vue.mixin({ - methods: { - localePath: localePathFactory('$i18n', '$router'), - switchLocalePath: switchLocalePathFactory('$i18n'), - getRouteBaseName: getRouteBaseNameFactory() - } - }) - } -} - -export default ({ app, route }) => { - Vue.use(plugin) - app.localePath = localePathFactory('i18n', 'router') - app.switchLocalePath = switchLocalePathFactory('i18n') - app.getRouteBaseName = getRouteBaseNameFactory(route) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/seo.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/seo.js deleted file mode 100644 index 5f771822..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/plugins/seo.js +++ /dev/null @@ -1,12 +0,0 @@ -import Vue from 'vue' -import { nuxtI18nSeo } from './seo-head' - -const plugin = { - install(Vue) { - Vue.mixin({ - head: nuxtI18nSeo - }) - } -} - -Vue.use(plugin) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index 593e1262..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/middleware.js deleted file mode 100644 index ebe71f23..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/middleware.js +++ /dev/null @@ -1,39 +0,0 @@ -import middleware from '../middleware' - -middleware['i18n'] = async (context) => { - const { app, req, route, redirect, isHMR } = context - - if (isHMR) { - return - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - const getLocaleCodes = <%= options.getLocaleCodes %> - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>' - if (route.path === '/' && rootRedirect) { - redirect('/' + rootRedirect, route.query) - return - } - - // Update for setLocale to have up to date route - app.i18n.__route = route - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - return - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, locales) - - await app.i18n.setLocale(routeLocale ? routeLocale : locale) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/options.js deleted file mode 100644 index 765624e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/options.js +++ /dev/null @@ -1,15 +0,0 @@ -<% -function stringifyValue(value) { - if (typeof value === 'string') { - return `'${value}'` - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value); - } else { - return JSON.stringify(value) - } -} - -for (const [key, value] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/seo-head.js deleted file mode 100644 index 933e3e4d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/seo-head.js +++ /dev/null @@ -1,88 +0,0 @@ -import VueMeta from 'vue-meta' - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>' -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>' -const BASE_URL = '<%= options.baseUrl %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' - -export const nuxtI18nSeo = function () { - if ( - !(VueMeta.hasMetaInfo ? VueMeta.hasMetaInfo(this) : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - (this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false) - ) { - return {}; - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale) - const htmlAttrs = {} - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY] - } - - const link = [] - // hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - link.push(...this.$i18n.locales - .map(locale => { - if (locale[LOCALE_ISO_KEY]) { - return { - hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY], - rel: 'alternate', - href: BASE_URL + this.switchLocalePath(locale.code), - hreflang: locale[LOCALE_ISO_KEY] - } - } else { - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link') - return null - } - }) - .filter(item => !!item)) - } - - // canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]) - if (canonicalPath && canonicalPath !== this.$route.path) { - // Current page is not the canonical one -- add a canonical link - link.push({ - hid: 'canonical-lang-' + currentLocaleData[LOCALE_CODE_KEY], - rel: 'canonical', - href: BASE_URL + canonicalPath - }) - } - } - - // og:locale meta - const meta = [] - // og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - meta.push({ - hid: 'og:locale', - property: 'og:locale', - // Replace dash with underscore as defined in spec: language_TERRITORY - content: currentLocaleData[LOCALE_ISO_KEY].replace(/-/g, '_') - }) - } - // og:locale - alternate - meta.push( - ...this.$i18n.locales - .filter(l => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]) - .map(locale => ({ - hid: 'og:locale:alternate-' + locale[LOCALE_ISO_KEY], - property: 'og:locale:alternate', - content: locale[LOCALE_ISO_KEY].replace(/-/g, '_') - })) - ); - - return { - htmlAttrs, - link, - meta - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/utils.js deleted file mode 100644 index 8a50f52e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/all-rules-test/utils.js +++ /dev/null @@ -1,61 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>' -const getLocaleCodes = <%= options.getLocaleCodes %> -const locales = <%= JSON.stringify(options.locales) %> -const localeCodes = getLocaleCodes(locales) - -const isObject = value => value && !Array.isArray(value) && typeof value === 'object' - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - const { app } = context; - - if (!app.i18n.loadedLanguages) { - app.i18n.loadedLanguages = [] - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - const langOptions = app.i18n.locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (langOptions) { - const file = langOptions[LOCALE_FILE_KEY] - if (file) { - <% if (options.langDir) { %> - try { - const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file) - const messages = module.default ? module.default : module - const result = typeof messages === 'function' ? await Promise.resolve(messages(context)) : messages - app.i18n.setLocaleMessage(locale, result) - app.i18n.loadedLanguages.push(locale) - } catch (error) { - console.error(error) - } - <% } %> - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale) - } - } - } -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = routeParams => { - if (!isObject(routeParams)) { - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`) - return - } - Object.entries(routeParams).forEach(([key, value]) => { - if (!localeCodes.includes(key)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`) - } else if (!isObject(value)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/middleware.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/middleware.js deleted file mode 100644 index ebe71f23..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/middleware.js +++ /dev/null @@ -1,39 +0,0 @@ -import middleware from '../middleware' - -middleware['i18n'] = async (context) => { - const { app, req, route, redirect, isHMR } = context - - if (isHMR) { - return - } - - // Helpers - const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' - const getLocaleCodes = <%= options.getLocaleCodes %> - - // Handle root path redirect - const rootRedirect = '<%= options.rootRedirect %>' - if (route.path === '/' && rootRedirect) { - redirect('/' + rootRedirect, route.query) - return - } - - // Update for setLocale to have up to date route - app.i18n.__route = route - - const detectBrowserLanguage = <%= JSON.stringify(options.detectBrowserLanguage) %> - - if (detectBrowserLanguage && await app.i18n.__detectBrowserLanguage(route)) { - return - } - - const locale = app.i18n.locale || app.i18n.defaultLocale || null - const getLocaleFromRoute = <%= options.getLocaleFromRoute %> - const routesNameSeparator = '<%= options.routesNameSeparator %>' - const defaultLocaleRouteNameSuffix = '<%= options.defaultLocaleRouteNameSuffix %>' - const locales = getLocaleCodes(<%= JSON.stringify(options.locales) %>) - - const routeLocale = getLocaleFromRoute(route, routesNameSeparator, defaultLocaleRouteNameSuffix, locales) - - await app.i18n.setLocale(routeLocale ? routeLocale : locale) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/options.js deleted file mode 100644 index 765624e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/options.js +++ /dev/null @@ -1,15 +0,0 @@ -<% -function stringifyValue(value) { - if (typeof value === 'string') { - return `'${value}'` - } else if (value === undefined || value === null || typeof value === 'boolean' || typeof value === 'function') { - return String(value); - } else { - return JSON.stringify(value) - } -} - -for (const [key, value] of Object.entries(options)) { -%> -export const <%= key %> = <%= stringifyValue(value) %> -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/seo-head.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/seo-head.js deleted file mode 100644 index 933e3e4d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/seo-head.js +++ /dev/null @@ -1,88 +0,0 @@ -import VueMeta from 'vue-meta' - -const COMPONENT_OPTIONS_KEY = '<%= options.COMPONENT_OPTIONS_KEY %>' -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_ISO_KEY = '<%= options.LOCALE_ISO_KEY %>' -const BASE_URL = '<%= options.baseUrl %>' -const STRATEGIES = <%= JSON.stringify(options.STRATEGIES) %> -const STRATEGY = '<%= options.strategy %>' - -export const nuxtI18nSeo = function () { - if ( - !(VueMeta.hasMetaInfo ? VueMeta.hasMetaInfo(this) : this._hasMetaInfo) || - !this.$i18n || - !this.$i18n.locale || - !this.$i18n.locales || - this.$options[COMPONENT_OPTIONS_KEY] === false || - (this.$options[COMPONENT_OPTIONS_KEY] && this.$options[COMPONENT_OPTIONS_KEY].seo === false) - ) { - return {}; - } - // Prepare html lang attribute - const currentLocaleData = this.$i18n.locales.find(l => l[LOCALE_CODE_KEY] === this.$i18n.locale) - const htmlAttrs = {} - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - htmlAttrs.lang = currentLocaleData[LOCALE_ISO_KEY] - } - - const link = [] - // hreflang tags - if (STRATEGY !== STRATEGIES.NO_PREFIX) { - link.push(...this.$i18n.locales - .map(locale => { - if (locale[LOCALE_ISO_KEY]) { - return { - hid: 'alternate-hreflang-' + locale[LOCALE_ISO_KEY], - rel: 'alternate', - href: BASE_URL + this.switchLocalePath(locale.code), - hreflang: locale[LOCALE_ISO_KEY] - } - } else { - console.warn('[<%= options.MODULE_NAME %>] Locale ISO code is required to generate alternate link') - return null - } - }) - .filter(item => !!item)) - } - - // canonical links - if (STRATEGY === STRATEGIES.PREFIX_AND_DEFAULT) { - const canonicalPath = this.switchLocalePath(currentLocaleData[LOCALE_CODE_KEY]) - if (canonicalPath && canonicalPath !== this.$route.path) { - // Current page is not the canonical one -- add a canonical link - link.push({ - hid: 'canonical-lang-' + currentLocaleData[LOCALE_CODE_KEY], - rel: 'canonical', - href: BASE_URL + canonicalPath - }) - } - } - - // og:locale meta - const meta = [] - // og:locale - current - if (currentLocaleData && currentLocaleData[LOCALE_ISO_KEY]) { - meta.push({ - hid: 'og:locale', - property: 'og:locale', - // Replace dash with underscore as defined in spec: language_TERRITORY - content: currentLocaleData[LOCALE_ISO_KEY].replace(/-/g, '_') - }) - } - // og:locale - alternate - meta.push( - ...this.$i18n.locales - .filter(l => l[LOCALE_ISO_KEY] && l[LOCALE_ISO_KEY] !== currentLocaleData[LOCALE_ISO_KEY]) - .map(locale => ({ - hid: 'og:locale:alternate-' + locale[LOCALE_ISO_KEY], - property: 'og:locale:alternate', - content: locale[LOCALE_ISO_KEY].replace(/-/g, '_') - })) - ); - - return { - htmlAttrs, - link, - meta - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/utils.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/utils.js deleted file mode 100644 index 8a50f52e..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-i18n/src/templates/utils.js +++ /dev/null @@ -1,61 +0,0 @@ -const LOCALE_CODE_KEY = '<%= options.LOCALE_CODE_KEY %>' -const LOCALE_DOMAIN_KEY = '<%= options.LOCALE_DOMAIN_KEY %>' -const LOCALE_FILE_KEY = '<%= options.LOCALE_FILE_KEY %>' -const getLocaleCodes = <%= options.getLocaleCodes %> -const locales = <%= JSON.stringify(options.locales) %> -const localeCodes = getLocaleCodes(locales) - -const isObject = value => value && !Array.isArray(value) && typeof value === 'object' - -/** - * Asynchronously load messages from translation files - * @param {Context} context Nuxt context - * @param {String} locale Language code to load - */ -export async function loadLanguageAsync (context, locale) { - const { app } = context; - - if (!app.i18n.loadedLanguages) { - app.i18n.loadedLanguages = [] - } - - if (!app.i18n.loadedLanguages.includes(locale)) { - const langOptions = app.i18n.locales.find(l => l[LOCALE_CODE_KEY] === locale) - if (langOptions) { - const file = langOptions[LOCALE_FILE_KEY] - if (file) { - <% if (options.langDir) { %> - try { - const module = await import(/* webpackChunkName: "lang-[request]" */ '~/<%= options.langDir %>' + file) - const messages = module.default ? module.default : module - const result = typeof messages === 'function' ? await Promise.resolve(messages(context)) : messages - app.i18n.setLocaleMessage(locale, result) - app.i18n.loadedLanguages.push(locale) - } catch (error) { - console.error(error) - } - <% } %> - } else { - console.warn('[<%= options.MODULE_NAME %>] Could not find lang file for locale ' + locale) - } - } - } -} - -/** - * Validate setRouteParams action's payload - * @param {*} routeParams The action's payload - */ -export const validateRouteParams = routeParams => { - if (!isObject(routeParams)) { - console.warn(`[<%= options.MODULE_NAME %>] Route params should be an object`) - return - } - Object.entries(routeParams).forEach(([key, value]) => { - if (!localeCodes.includes(key)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for key ${key} which is not a valid locale`) - } else if (!isObject(value)) { - console.warn(`[<%= options.MODULE_NAME %>] Trying to set route params for locale ${key} with a non-object value`) - } - }) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/.eslintrc.js deleted file mode 100644 index 322f7df8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/.eslintrc.js +++ /dev/null @@ -1,40 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - node: true, - jest: true - }, - extends: 'standard', - plugins: [ - 'jest', - 'vue' - ], - rules: { - // Allow paren-less arrow functions - 'arrow-parens': 0, - // Allow async-await - 'generator-star-spacing': 0, - // Allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - // Do not allow console.logs etc... - 'no-console': 2 - }, - globals: { - 'jest/globals': true, - jasmine: true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/plugin.js deleted file mode 100644 index 95e54670..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -import LogRocket from 'logrocket'; -import createPlugin from 'logrocket-vuex'; - -const LOGROCKET_ID = '<%= options.logRocketId %>' -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %> - -export default function ({ app, store }, inject) { - // variable for detecting production mode - const isProduction = process.env.NODE_ENV === 'production'; - // only run on browser and when in production mode - // or when the developer enables devModeAllowed - if (LOGROCKET_ID && ((process.client && isProduction) || DEV_MODE_ALLOWED)) { - // initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID); - } - // if nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - const logrocketPlugin = createPlugin(LogRocket); - // add plugin to vuex store - logrocketPlugin(store); - } - // globally inject LogRocket instance - inject('logRocket', LogRocket); -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/plugin.js deleted file mode 100644 index 95e54670..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxt-logrocket/lib/plugin.js +++ /dev/null @@ -1,24 +0,0 @@ -import LogRocket from 'logrocket'; -import createPlugin from 'logrocket-vuex'; - -const LOGROCKET_ID = '<%= options.logRocketId %>' -const DEV_MODE_ALLOWED = <%= options.devModeAllowed %> - -export default function ({ app, store }, inject) { - // variable for detecting production mode - const isProduction = process.env.NODE_ENV === 'production'; - // only run on browser and when in production mode - // or when the developer enables devModeAllowed - if (LOGROCKET_ID && ((process.client && isProduction) || DEV_MODE_ALLOWED)) { - // initialize LogRocket with the provided id - LogRocket.init(LOGROCKET_ID); - } - // if nuxt app has a store initialized, load the logrocket-vuex plugin - if (store) { - const logrocketPlugin = createPlugin(LogRocket); - // add plugin to vuex store - logrocketPlugin(store); - } - // globally inject LogRocket instance - inject('logRocket', LogRocket); -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/.eslintrc.js deleted file mode 100644 index 0d0120af..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/.eslintrc.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = { - 'root': true, - 'parserOptions': { - 'ecmaVersion': 9, - 'sourceType': 'module' - }, - 'env': { - 'node': true, - 'es6': true, - 'jest': true - }, - 'plugins': [ - 'unicorn' - ], - 'extends': [ - 'standard', - 'plugin:unicorn/recommended', - // 'prettier/unicorn', - // 'prettier/standard' - 'prettier' - ], - 'rules': { - 'curly': [ - 'error', - 'all' - ], - 'no-console': 1, - 'no-debugger': 1, - 'valid-jsdoc': ['error'], - 'space-before-function-paren': 0, - }, - 'globals': { - 'jest/globals': true, - 'jasmine': true - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - globals: { - options: true, - serialize: true, - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js deleted file mode 100644 index 899f9dc2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Vue from 'vue' - -import { - interopDefault -} from './utils' - -const mdComps = { - <% options.components.forEach(([relativePath, filePath]) => { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),` - )}) -%> -} - - -Vue.component('nuxtent-body', { - name: 'NuxtentBody', - render(createElement) { - const body = this.body || '' - const tag = this.tag - - const dataObject = { - props: { - tag - }, - on: this.$listeners, - domProps: {}, - } - if (typeof body === 'object') { - if (body.relativePath) { - const MarkdownComponent = mdComps[body.relativePath] - dataObject.nativeOn = this.$listeners - return createElement(MarkdownComponent, dataObject) - } - dataObject.domProps.innerHTML = JSON.stringify(body) - return createElement(tag, dataObject) - } else { - dataObject.domProps.innerHTML = body - return createElement(tag, dataObject) - } - }, - props: { - tag: { - type: String, - default: 'div', - }, - body: { - type: [Object, String], - required: true - } - } -}); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js deleted file mode 100644 index a49cf439..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({api: (options || {}).api}) %> -export default config diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-components.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-components.template.js deleted file mode 100644 index 899f9dc2..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-components.template.js +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Vue from 'vue' - -import { - interopDefault -} from './utils' - -const mdComps = { - <% options.components.forEach(([relativePath, filePath]) => { - print(` - '${relativePath}': () => interopDefault(import('${filePath}')),` - )}) -%> -} - - -Vue.component('nuxtent-body', { - name: 'NuxtentBody', - render(createElement) { - const body = this.body || '' - const tag = this.tag - - const dataObject = { - props: { - tag - }, - on: this.$listeners, - domProps: {}, - } - if (typeof body === 'object') { - if (body.relativePath) { - const MarkdownComponent = mdComps[body.relativePath] - dataObject.nativeOn = this.$listeners - return createElement(MarkdownComponent, dataObject) - } - dataObject.domProps.innerHTML = JSON.stringify(body) - return createElement(tag, dataObject) - } else { - dataObject.domProps.innerHTML = body - return createElement(tag, dataObject) - } - }, - props: { - tag: { - type: String, - default: 'div', - }, - body: { - type: [Object, String], - required: true - } - } -}); diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-config.template.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-config.template.js deleted file mode 100644 index a49cf439..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/nuxtent-module/lib/plugins/nuxtent-config.template.js +++ /dev/null @@ -1,2 +0,0 @@ -const config = <%= JSON.stringify({api: (options || {}).api}) %> -export default config diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/.eslintrc deleted file mode 100644 index 685fa09c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/.eslintrc +++ /dev/null @@ -1,33 +0,0 @@ - -{ - "root": true, - "extends": ["standard", "plugin:lodash-template/base"], - "plugins": [ - "jest" - ], - "env": { - "jest/globals": true - }, - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "ecmaVersion": 2022 - }, - "globals": { - "options": true, - "serialize": true - } - } - ] -} \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/plugin.js deleted file mode 100644 index c47e2881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/all-rules-test/plugin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default async function (ctx, inject) { - const icons = <%= JSON.stringify(options.icons) %> - const getIcon = size => icons[size + 'x' + size] || '' - inject('<%= options.iconProperty.replace('$', '') %>', getIcon) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/plugin.js deleted file mode 100644 index c47e2881..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/icon/plugin.js +++ /dev/null @@ -1,5 +0,0 @@ -export default async function (ctx, inject) { - const icons = <%= JSON.stringify(options.icons) %> - const getIcon = size => icons[size + 'x' + size] || '' - inject('<%= options.iconProperty.replace('$', '') %>', getIcon) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/plugin.js deleted file mode 100644 index ab7c9044..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/all-rules-test/plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || []; - -OneSignal.push(['init', <%= JSON.stringify(options.init, null, 2) %>]); - -export default function (ctx, inject) { - inject('OneSignal', OneSignal) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/plugin.js deleted file mode 100644 index ab7c9044..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/onesignal/plugin.js +++ /dev/null @@ -1,7 +0,0 @@ -window.$OneSignal = window.OneSignal = window.OneSignal || []; - -OneSignal.push(['init', <%= JSON.stringify(options.init, null, 2) %>]); - -export default function (ctx, inject) { - inject('OneSignal', OneSignal) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index e2a82636..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2020, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/sw.js deleted file mode 100644 index 6e4f7ae0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/sw.js +++ /dev/null @@ -1,73 +0,0 @@ -importScripts(<%= [options.workboxURL, ...options.importScripts].map((i) => `'${i}'`).join(', ') %>) - -// -------------------------------------------------- -// Configure -// -------------------------------------------------- - -<% if (options.config) {%> -// Set workbox config -workbox.setConfig(<%= JSON.stringify(options.config, null, 2) %>) -<% } %> - -<% if (options.cacheNames) {%> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify(options.cacheNames, null, 2) %>) -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim() -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting() -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches() -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize() -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>// -- End of workboxExtensions -- -<% } %> - -// -------------------------------------------------- -// Precaches -// -------------------------------------------------- - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null, 2) %>, <%= JSON.stringify(options.cacheOptions, null, 2) %>) -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>// -- End of cachingExtensions -- -<% } %> - -// -------------------------------------------------- -// Runtime Caching -// -------------------------------------------------- - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach(r => { %>workbox.routing.registerRoute(new RegExp('<%= r.urlPattern %>'), new workbox.strategies.<%= r.handler %> (<%= JSON.stringify(r.strategyOptions || {}) %>), '<%= r.method %>') -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => { - return new workbox.strategies.<%= options.offlineStrategy %>().handle({event}) - .catch(() => caches.match('<%= options.offlinePage %>')) -})<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/workbox.js deleted file mode 100644 index a332177d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/all-rules-test/workbox.js +++ /dev/null @@ -1,18 +0,0 @@ -async function register() { - if (!'serviceWorker' in navigator) { - throw new Error('serviceWorker is not supported in current browser!') - } - - const { Workbox } = await import('workbox-cdn/workbox/workbox-window.<%= options.dev ? 'dev' : 'prod' %>.es5.mjs') - - const workbox = new Workbox('<%= options.swURL %>', { - scope: '<%= options.swScope %>' - }) - - await workbox.register() - - return workbox -} - -window.$workbox = register() - .catch(error => {<% if (options.dev) { %> console.error('Error registering workbox:', error) <% } %>}) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/sw.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/sw.js deleted file mode 100644 index 6e4f7ae0..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/sw.js +++ /dev/null @@ -1,73 +0,0 @@ -importScripts(<%= [options.workboxURL, ...options.importScripts].map((i) => `'${i}'`).join(', ') %>) - -// -------------------------------------------------- -// Configure -// -------------------------------------------------- - -<% if (options.config) {%> -// Set workbox config -workbox.setConfig(<%= JSON.stringify(options.config, null, 2) %>) -<% } %> - -<% if (options.cacheNames) {%> -// Set workbox cache names -workbox.core.setCacheNameDetails(<%= JSON.stringify(options.cacheNames, null, 2) %>) -<% } %> - -<% if (options.clientsClaim) { %> -// Start controlling any existing clients as soon as it activates -workbox.core.clientsClaim() -<% } %> - -<% if (options.skipWaiting) { %> -// Skip over the SW waiting lifecycle stage -workbox.core.skipWaiting() -<% } %> - -<% if (options.cleanupOutdatedCaches) { %> -workbox.precaching.cleanupOutdatedCaches() -<% } %> - -<% if (options.offlineAnalytics) { %> -// Enable offline Google Analytics tracking -workbox.googleAnalytics.initialize() -<% } %> - -<% if (options.workboxExtensions) { %> -// -- Start of workboxExtensions -- -<%= options.workboxExtensions %>// -- End of workboxExtensions -- -<% } %> - -// -------------------------------------------------- -// Precaches -// -------------------------------------------------- - -// Precache assets -<% if (options.preCaching.length) { %> -workbox.precaching.precacheAndRoute(<%= JSON.stringify(options.preCaching, null, 2) %>, <%= JSON.stringify(options.cacheOptions, null, 2) %>) -<% } %> - -<% if (options.cachingExtensions) { %> -// -- Start of cachingExtensions -- -<%= options.cachingExtensions %>// -- End of cachingExtensions -- -<% } %> - -// -------------------------------------------------- -// Runtime Caching -// -------------------------------------------------- - -// Register route handlers for runtimeCaching -<% options.runtimeCaching.forEach(r => { %>workbox.routing.registerRoute(new RegExp('<%= r.urlPattern %>'), new workbox.strategies.<%= r.handler %> (<%= JSON.stringify(r.strategyOptions || {}) %>), '<%= r.method %>') -<% }) %> - -<% if (options.offlinePage) { %> -// Register router handler for offlinePage -workbox.routing.registerRoute(new RegExp('<%= options.pagesURLPattern %>'), ({event}) => { - return new workbox.strategies.<%= options.offlineStrategy %>().handle({event}) - .catch(() => caches.match('<%= options.offlinePage %>')) -})<% } %> - -<% if (options.routingExtensions) { %> -// -- Start of routingExtensions -- -<%= options.routingExtensions %>// -- End of routingExtensions -- -<% } %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/workbox.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/workbox.js deleted file mode 100644 index a332177d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/pwa-module/lib/workbox/templates/workbox.js +++ /dev/null @@ -1,18 +0,0 @@ -async function register() { - if (!'serviceWorker' in navigator) { - throw new Error('serviceWorker is not supported in current browser!') - } - - const { Workbox } = await import('workbox-cdn/workbox/workbox-window.<%= options.dev ? 'dev' : 'prod' %>.es5.mjs') - - const workbox = new Workbox('<%= options.swURL %>', { - scope: '<%= options.swScope %>' - }) - - await workbox.register() - - return workbox -} - -window.$workbox = register() - .catch(error => {<% if (options.dev) { %> console.error('Error registering workbox:', error) <% } %>}) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/.eslintrc.js deleted file mode 100644 index 828e3f46..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/.eslintrc.js +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module', - parserOptions: { - ecmaVersion: 2022, - sourceType: 'module' - }, - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index 5d0db292..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 69a78013..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,136 +0,0 @@ -import { EventEmitter } from 'events' -import Vue from 'vue' - -const API_URL = 'https://www.google.com/recaptcha/api.js' - -class ReCaptcha { - constructor ({ hideBadge, language, siteKey, version }) { - if (!siteKey) { - throw new Error('ReCaptcha error: No key provided') - } - - if (!version) { - throw new Error('ReCaptcha error: No version provided') - } - - this._elements = {} - - this._eventBus = null - this._ready = false - - this.hideBadge = hideBadge - this.language = language || 'en' - - this.siteKey = siteKey - this.version = version - } - - destroy () { - if (this._ready) { - this._ready = false - - const { head } = document - const { style } = this._elements - - const scripts = [...document.head.querySelectorAll('script')] - .filter(script => script.src.includes('recaptcha')) - - if (scripts.length) { - scripts.forEach(script => head.removeChild(script)) - } - - if (head.contains(style)) { - head.removeChild(style) - } - } - } - - async execute (action) { - try { - await this.init() - - if ('grecaptcha' in window) { - return window.grecaptcha.execute( - this.siteKey, - { action } - ) - } - } catch (error) { - throw new Error('ReCaptcha error: Failed to execute') - } - } - - getResponse () { - return new Promise((resolve, reject) => { - if ('grecaptcha' in window) { - const response = window.grecaptcha.getResponse() - - if (response) { - this._eventBus.emit('recaptcha-success', response) - resolve(response) - } else { - const errorMessage = 'Failed to execute' - - this._eventBus.emit('recaptcha-error', errorMessage) - reject(errorMessage) - } - } - }) - } - - init () { - if (this._ready) { - return Promise.resolve() - } - - this._eventBus = new EventEmitter() - this._elements = { - script: document.createElement('script'), - style: document.createElement('style') - } - - const { script, style } = this._elements - - script.addEventListener('error', () => { - document.head.removeChild(script) - throw new Error('ReCaptcha error: Failed to load script') - }) - - script.setAttribute('async', '') - script.setAttribute('defer', '') - - if (this.version === 2) { - script.setAttribute('src', API_URL + '?hl=' + this.language) - } else { - script.setAttribute('src', API_URL + '?render=' + this.siteKey) - } - - document.head.appendChild(script) - - window.recaptchaSuccessCallback = (token) => this._eventBus.emit('recaptcha-success', token) - window.recaptchaExpiredCallback = () => this._eventBus.emit('recaptcha-expired') - window.recaptchaErrorCallback = () => this._eventBus.emit('recaptcha-error', 'Failed to execute') - - this._ready = new Promise(resolve => { - script.addEventListener('load', () => { - if (this.version === 3 && this.hideBadge) { - style.innerHTML = '.grecaptcha-badge { display: none }' - document.head.appendChild(style) - } - - window.grecaptcha.ready(resolve) - }) - }) - - return this._ready - } - - on (event, callback) { - return this._eventBus.on(event, callback) - } -} - -export default function (_, inject) { - Vue.component('recaptcha', () => import('./recaptcha.vue')) - inject('recaptcha', new ReCaptcha(<%= serialize(options) %>)) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/plugin.js deleted file mode 100644 index 69a78013..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/recaptcha-module/lib/plugin.js +++ /dev/null @@ -1,136 +0,0 @@ -import { EventEmitter } from 'events' -import Vue from 'vue' - -const API_URL = 'https://www.google.com/recaptcha/api.js' - -class ReCaptcha { - constructor ({ hideBadge, language, siteKey, version }) { - if (!siteKey) { - throw new Error('ReCaptcha error: No key provided') - } - - if (!version) { - throw new Error('ReCaptcha error: No version provided') - } - - this._elements = {} - - this._eventBus = null - this._ready = false - - this.hideBadge = hideBadge - this.language = language || 'en' - - this.siteKey = siteKey - this.version = version - } - - destroy () { - if (this._ready) { - this._ready = false - - const { head } = document - const { style } = this._elements - - const scripts = [...document.head.querySelectorAll('script')] - .filter(script => script.src.includes('recaptcha')) - - if (scripts.length) { - scripts.forEach(script => head.removeChild(script)) - } - - if (head.contains(style)) { - head.removeChild(style) - } - } - } - - async execute (action) { - try { - await this.init() - - if ('grecaptcha' in window) { - return window.grecaptcha.execute( - this.siteKey, - { action } - ) - } - } catch (error) { - throw new Error('ReCaptcha error: Failed to execute') - } - } - - getResponse () { - return new Promise((resolve, reject) => { - if ('grecaptcha' in window) { - const response = window.grecaptcha.getResponse() - - if (response) { - this._eventBus.emit('recaptcha-success', response) - resolve(response) - } else { - const errorMessage = 'Failed to execute' - - this._eventBus.emit('recaptcha-error', errorMessage) - reject(errorMessage) - } - } - }) - } - - init () { - if (this._ready) { - return Promise.resolve() - } - - this._eventBus = new EventEmitter() - this._elements = { - script: document.createElement('script'), - style: document.createElement('style') - } - - const { script, style } = this._elements - - script.addEventListener('error', () => { - document.head.removeChild(script) - throw new Error('ReCaptcha error: Failed to load script') - }) - - script.setAttribute('async', '') - script.setAttribute('defer', '') - - if (this.version === 2) { - script.setAttribute('src', API_URL + '?hl=' + this.language) - } else { - script.setAttribute('src', API_URL + '?render=' + this.siteKey) - } - - document.head.appendChild(script) - - window.recaptchaSuccessCallback = (token) => this._eventBus.emit('recaptcha-success', token) - window.recaptchaExpiredCallback = () => this._eventBus.emit('recaptcha-expired') - window.recaptchaErrorCallback = () => this._eventBus.emit('recaptcha-error', 'Failed to execute') - - this._ready = new Promise(resolve => { - script.addEventListener('load', () => { - if (this.version === 3 && this.hideBadge) { - style.innerHTML = '.grecaptcha-badge { display: none }' - document.head.appendChild(style) - } - - window.grecaptcha.ready(resolve) - }) - }) - - return this._ready - } - - on (event, callback) { - return this._eventBus.on(event, callback) - } -} - -export default function (_, inject) { - Vue.component('recaptcha', () => import('./recaptcha.vue')) - inject('recaptcha', new ReCaptcha(<%= serialize(options) %>)) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/result.json b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/result.json deleted file mode 100644 index 5f5ce7ea..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/result.json +++ /dev/null @@ -1,40514 +0,0 @@ -[ - { - "filePath": "/output/analytics-module/.eslintrc.js", - "messages": [ - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 4, - "column": 17, - "endLine": 4, - "endColumn": 25 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 6, - "column": 13, - "endLine": 6, - "endColumn": 22 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 9, - "column": 14, - "endLine": 9, - "endColumn": 20 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 10, - "column": 17, - "endLine": 10, - "endColumn": 65 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 15, - "column": 10, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 19, - "column": 24, - "endLine": 19, - "endColumn": 25 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 23, - "column": 2, - "endLine": 23, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/analytics-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/analytics-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 26, - "endLine": 2, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 41, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 4, - "column": 39, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 44, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 7, - "column": 34, - "endLine": 7, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 46, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 44, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 44, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 11, - "column": 24, - "endLine": 11, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 11, - "column": 30, - "endLine": 11, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'router' found.", - "line": 11, - "column": 31, - "endLine": 11, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 11, - "column": 53, - "endLine": 11, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 11, - "column": 57, - "endLine": 11, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 69, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 20, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 14, - "column": 10, - "endLine": 14, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 14, - "column": 15, - "endLine": 14, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 24, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 24, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 2, - "endLine": 16, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/analytics-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 11 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required after '{'.", - "line": 11, - "column": 25, - "endLine": 11, - "endColumn": 26 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 11, - "column": 67, - "endLine": 11, - "endColumn": 68 - } - ] - }, - { - "filePath": "/output/apollo-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 32, - "column": 16, - "endLine": 32, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 33, - "column": 19, - "endLine": 33, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 36, - "column": 26, - "endLine": 36, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 40, - "column": 4 - } - ] - }, - { - "filePath": "/output/apollo-module/lib/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/apollo-module/lib/templates/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 23, - "endLine": 2, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 35, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'none' syntax before 'single' syntax.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 8, - "endLine": 3, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 30, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 4, - "column": 9, - "endLine": 4, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 4, - "column": 47, - "endLine": 4, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 4, - "column": 55, - "endLine": 4, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 93, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 5, - "column": 20, - "endLine": 5, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 38, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 6, - "column": 23, - "endLine": 6, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 6, - "column": 31, - "endLine": 6, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 54, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 19, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 33, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 11, - "column": 28, - "endLine": 11, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'clients' found.", - "line": 11, - "column": 29, - "endLine": 11, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 11, - "column": 40, - "endLine": 11, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 42, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 12, - "column": 10, - "endLine": 12, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 12, - "column": 37, - "endLine": 12, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 45, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 53, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 71, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 57, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 16, - "column": 56, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "max-lines-per-function", - "message": "Arrow function has too many lines (55). Maximum allowed is 50.", - "line": 19, - "column": 49, - "endLine": 73, - "endColumn": 7 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (46). Maximum allowed is 10.", - "line": 19, - "column": 49, - "endLine": 73, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/no-multi-spaces", - "message": "Multiple spaces found before '||'.", - "line": 20, - "column": 80, - "endLine": 20, - "endColumn": 82 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 100, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/no-multi-spaces", - "message": "Multiple spaces found before '||'.", - "line": 21, - "column": 94, - "endLine": 21, - "endColumn": 96 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 116, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 37, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 55, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 25, - "column": 71, - "endLine": 25, - "endColumn": 88 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 25, - "column": 91, - "endLine": 25, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 93, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 25, - "column": 93, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 33, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 30, - "column": 80, - "endLine": 30, - "endColumn": 81 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 30, - "column": 86, - "endLine": 30, - "endColumn": 87 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 30, - "column": 87, - "endLine": 30, - "endColumn": 88 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 92, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 78, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 34, - "column": 13, - "endLine": 34, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 50, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 66, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 35, - "column": 66, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 61, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 41, - "column": 49, - "endLine": 42, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 50, - "endLine": 44, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 44, - "column": 71, - "endLine": 45, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 44, - "column": 71, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/space-infix-ops", - "message": "Operator ':' must be spaced.", - "line": 49, - "column": 118, - "endLine": 49, - "endColumn": 119 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 49, - "column": 120, - "endLine": 49, - "endColumn": 129 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 49, - "column": 130, - "endLine": 50, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 28, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 52, - "column": 33, - "endLine": 52, - "endColumn": 48 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__NUXT__'.", - "line": 52, - "column": 33, - "endLine": 52, - "endColumn": 48 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__NUXT__'.", - "line": 52, - "column": 51, - "endLine": 52, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 52, - "column": 78, - "endLine": 52, - "endColumn": 95 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 52, - "column": 78, - "endLine": 52, - "endColumn": 119 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 52, - "column": 98, - "endLine": 52, - "endColumn": 113 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 52, - "column": 130, - "endLine": 53, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 130, - "endLine": 53, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 55, - "column": 44, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 59, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 56, - "column": 59, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "no-implicit-coercion", - "message": "use `Boolean(process.server)` instead.", - "line": 58, - "column": 36, - "endLine": 58, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 58, - "column": 52, - "endLine": 59, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 53, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 61, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 65, - "column": 9, - "endLine": 66, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 66, - "column": 89, - "endLine": 67, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 10.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 69, - "column": 83, - "endLine": 70, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 10.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 71, - "column": 85, - "endLine": 72, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 75, - "column": 58, - "endLine": 75, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 79, - "column": 28, - "endLine": 80, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 10.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 81, - "column": 64, - "endLine": 81, - "endColumn": 65 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 81, - "column": 69, - "endLine": 82, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 10.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 11 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 83, - "column": 11, - "endLine": 83, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 83, - "column": 23, - "endLine": 83, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 83, - "column": 33, - "endLine": 83, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 83, - "column": 34, - "endLine": 83, - "endColumn": 123 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 83, - "column": 124, - "endLine": 83, - "endColumn": 125 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 83, - "column": 139, - "endLine": 84, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 84, - "column": 16, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 86, - "column": 5, - "endLine": 87, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 88, - "column": 57, - "endLine": 89, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 90, - "column": 38, - "endLine": 91, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 23, - "endLine": 93, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 93, - "column": 31, - "endLine": 93, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 93, - "column": 48, - "endLine": 94, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 94, - "column": 24, - "endLine": 94, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 94, - "column": 34, - "endLine": 94, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 41, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 95, - "column": 61, - "endLine": 96, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 95, - "column": 61, - "endLine": 96, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 96, - "column": 7, - "endLine": 97, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 96, - "column": 7, - "endLine": 97, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 99, - "column": 10, - "endLine": 99, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 99, - "column": 26, - "endLine": 99, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "max-params", - "message": "Async method 'onLogin' has too many parameters (4). Maximum allowed is 3.", - "line": 100, - "column": 5, - "endLine": 100, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'onLogin' found.", - "line": 100, - "column": 5, - "endLine": 122, - "endColumn": 6 - }, - { - "ruleId": "max-statements", - "message": "Async method 'onLogin' has too many statements (11). Maximum allowed is 10.", - "line": 100, - "column": 14, - "endLine": 122, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 100, - "column": 138, - "endLine": 101, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 101, - "column": 1, - "endLine": 101, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 102, - "column": 39, - "endLine": 102, - "endColumn": 47 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'cookieAttributes'.", - "line": 102, - "column": 49, - "endLine": 102, - "endColumn": 65 - }, - { - "ruleId": "curly", - "message": "Expected { after 'if' condition.", - "line": 102, - "column": 49, - "endLine": 102, - "endColumn": 97 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 102, - "column": 69, - "endLine": 102, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'expires' found.", - "line": 102, - "column": 70, - "endLine": 102, - "endColumn": 95 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 102, - "column": 95, - "endLine": 102, - "endColumn": 96 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 102, - "column": 97, - "endLine": 103, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 104, - "column": 47, - "endLine": 104, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 104, - "column": 57, - "endLine": 105, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 105, - "column": 1, - "endLine": 105, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/space-infix-ops", - "message": "Operator '+' must be spaced.", - "line": 105, - "column": 55, - "endLine": 105, - "endColumn": 56 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 86400.", - "line": 105, - "column": 57, - "endLine": 105, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/space-infix-ops", - "message": "Operator '*' must be spaced.", - "line": 105, - "column": 62, - "endLine": 105, - "endColumn": 63 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1000.", - "line": 105, - "column": 63, - "endLine": 105, - "endColumn": 67 - }, - { - "ruleId": "@stylistic/space-infix-ops", - "message": "Operator '*' must be spaced.", - "line": 105, - "column": 67, - "endLine": 105, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 105, - "column": 93, - "endLine": 106, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 105, - "column": 93, - "endLine": 106, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 108, - "column": 18, - "endLine": 109, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 109, - "column": 37, - "endLine": 109, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 109, - "column": 44, - "endLine": 109, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 109, - "column": 62, - "endLine": 110, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 109, - "column": 62, - "endLine": 110, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 110, - "column": 14, - "endLine": 111, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 111, - "column": 40, - "endLine": 111, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 111, - "column": 58, - "endLine": 112, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 111, - "column": 58, - "endLine": 112, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 112, - "column": 1, - "endLine": 112, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 7 - }, - { - "ruleId": "curly", - "message": "Expected { after 'if' condition.", - "line": 113, - "column": 34, - "endLine": 113, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 113, - "column": 74, - "endLine": 114, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 114, - "column": 28, - "endLine": 115, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 115, - "column": 13, - "endLine": 116, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 116, - "column": 42, - "endLine": 117, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 116, - "column": 42, - "endLine": 117, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 9 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 117, - "column": 18, - "endLine": 117, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 117, - "column": 21, - "endLine": 118, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 119, - "column": 23, - "endLine": 119, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 119, - "column": 59, - "endLine": 119, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 119, - "column": 60, - "endLine": 119, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 119, - "column": 77, - "endLine": 119, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 119, - "column": 88, - "endLine": 120, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 119, - "column": 88, - "endLine": 120, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 120, - "column": 1, - "endLine": 120, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 120, - "column": 10, - "endLine": 121, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 121, - "column": 1, - "endLine": 121, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 121, - "column": 8, - "endLine": 122, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 122, - "column": 1, - "endLine": 122, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'onLogout' found.", - "line": 123, - "column": 5, - "endLine": 134, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 123, - "column": 94, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 124, - "column": 1, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 124, - "column": 38, - "endLine": 124, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 124, - "column": 57, - "endLine": 125, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 7 - }, - { - "ruleId": "curly", - "message": "Expected { after 'if' condition.", - "line": 125, - "column": 34, - "endLine": 125, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 125, - "column": 74, - "endLine": 126, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 126, - "column": 28, - "endLine": 127, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 127, - "column": 1, - "endLine": 127, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 127, - "column": 13, - "endLine": 128, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 128, - "column": 1, - "endLine": 128, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 128, - "column": 42, - "endLine": 129, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 128, - "column": 42, - "endLine": 129, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 9 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 129, - "column": 18, - "endLine": 129, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 129, - "column": 21, - "endLine": 130, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 130, - "column": 1, - "endLine": 130, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 131, - "column": 1, - "endLine": 131, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 131, - "column": 23, - "endLine": 131, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 131, - "column": 57, - "endLine": 131, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 131, - "column": 58, - "endLine": 131, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 131, - "column": 75, - "endLine": 131, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 131, - "column": 86, - "endLine": 132, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 131, - "column": 86, - "endLine": 132, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 132, - "column": 1, - "endLine": 132, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 132, - "column": 10, - "endLine": 133, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 133, - "column": 1, - "endLine": 133, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 133, - "column": 8, - "endLine": 134, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 134, - "column": 1, - "endLine": 134, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 135, - "column": 1, - "endLine": 135, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'getToken' should be before 'onLogout'.", - "line": 135, - "column": 5, - "endLine": 135, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'getToken' found.", - "line": 135, - "column": 5, - "endLine": 137, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 135, - "column": 48, - "endLine": 136, - "endColumn": 7 - }, - { - "ruleId": "arrow-body-style", - "message": "Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.", - "line": 135, - "column": 48, - "endLine": 137, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 136, - "column": 1, - "endLine": 136, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 136, - "column": 36, - "endLine": 137, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 136, - "column": 36, - "endLine": 137, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 137, - "column": 1, - "endLine": 137, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 138, - "column": 1, - "endLine": 138, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 138, - "column": 5, - "endLine": 139, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 138, - "column": 5, - "endLine": 139, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 139, - "column": 2, - "endLine": 140, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/apollo-module/lib/templates/plugin.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "no-multi-spaces", - "message": "Multiple spaces found before '||'.", - "line": 20, - "column": 80, - "endLine": 20, - "endColumn": 82 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 7 - }, - { - "ruleId": "no-multi-spaces", - "message": "Multiple spaces found before '||'.", - "line": 21, - "column": 94, - "endLine": 21, - "endColumn": 96 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 8.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 8.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 8.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 9 - }, - { - "ruleId": "space-infix-ops", - "message": "Operator ':' must be spaced.", - "line": 49, - "column": 118, - "endLine": 49, - "endColumn": 119 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 10.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 10.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 6.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 10.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 10.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "space-infix-ops", - "message": "Operator '+' must be spaced.", - "line": 105, - "column": 55, - "endLine": 105, - "endColumn": 56 - }, - { - "ruleId": "space-infix-ops", - "message": "Operator '*' must be spaced.", - "line": 105, - "column": 62, - "endLine": 105, - "endColumn": 63 - }, - { - "ruleId": "space-infix-ops", - "message": "Operator '*' must be spaced.", - "line": 105, - "column": 67, - "endLine": 105, - "endColumn": 68 - } - ] - }, - { - "filePath": "/output/auth-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 29, - "column": 16, - "endLine": 29, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 30, - "column": 19, - "endLine": 30, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 38, - "column": 4 - } - ] - }, - { - "filePath": "/output/auth-module/lib/module/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/auth-module/lib/module/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 18, - "endLine": 1, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 26, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'none' syntax before 'single' syntax.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 8, - "endLine": 3, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 22, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 6, - "column": 31, - "endLine": 6, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/arrow-spacing", - "message": "Missing space after =>.", - "line": 6, - "column": 38, - "endLine": 6, - "endColumn": 48 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 6, - "column": 48, - "endLine": 6, - "endColumn": 70 - }, - { - "ruleId": "no-undef", - "message": "'hash' is not defined.", - "line": 6, - "column": 60, - "endLine": 6, - "endColumn": 64 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 6, - "column": 93, - "endLine": 6, - "endColumn": 98 - }, - { - "ruleId": "@stylistic/comma-spacing", - "message": "A space is required after ','.", - "line": 6, - "column": 98, - "endLine": 6, - "endColumn": 99 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 99, - "endLine": 6, - "endColumn": 99 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 121, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 8, - "column": 16, - "endLine": 8, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 39, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 57, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 13, - "column": 30, - "endLine": 13, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 39, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 3, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 17, - "column": 26, - "endLine": 17, - "endColumn": 34 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 18, - "column": 3, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 18, - "column": 20, - "endLine": 18, - "endColumn": 74 - }, - { - "ruleId": "no-undef", - "message": "'hash' is not defined.", - "line": 18, - "column": 32, - "endLine": 18, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 74, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 19, - "column": 3, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 51, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 20, - "column": 3, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_name'.", - "line": 20, - "column": 18, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 32, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 21, - "column": 3, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 101, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 22, - "column": 3, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 23, - "column": 3, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 5, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 26, - "column": 10, - "endLine": 26, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 24, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 20, - "endLine": 28, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 30, - "column": 29, - "endLine": 30, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 38, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 25, - "endLine": 32, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 32, - "column": 7, - "endLine": 32, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 32, - "column": 21, - "endLine": 32, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 32, - "column": 38, - "endLine": 32, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 45, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 32, - "column": 45, - "endLine": 33, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 33, - "column": 6, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 5, - "endLine": 35, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 5, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/auth-module/lib/module/plugin.js", - "messages": [ - { - "ruleId": "arrow-spacing", - "message": "Missing space after =>.", - "line": 6, - "column": 38, - "endLine": 6, - "endColumn": 48 - }, - { - "ruleId": "comma-spacing", - "message": "A space is required after ','.", - "line": 6, - "column": 98, - "endLine": 6, - "endColumn": 99 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 3, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 18, - "column": 3, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 19, - "column": 3, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 20, - "column": 3, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 21, - "column": 3, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 22, - "column": 3, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 23, - "column": 3, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 32, - "column": 7, - "endLine": 32, - "endColumn": 20 - } - ] - }, - { - "filePath": "/output/axios-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 11, - "column": 16, - "endLine": 11, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 12, - "column": 19, - "endLine": 12, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 21, - "column": 26, - "endLine": 21, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 25, - "column": 4 - } - ] - }, - { - "filePath": "/output/axios-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/axios-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 19, - "endLine": 1, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 26, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 50, - "endLine": 2, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 6, - "column": 36, - "endLine": 6, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 46, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "prefer-const", - "message": "'scope' is never reassigned. Use 'const' instead.", - "line": 7, - "column": 14, - "endLine": 7, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 7, - "column": 23, - "endLine": 7, - "endColumn": 44 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 7, - "column": 23, - "endLine": 7, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 7, - "column": 47, - "endLine": 7, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/array-bracket-spacing", - "message": "There should be no space after '['.", - "line": 7, - "column": 57, - "endLine": 7, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/array-bracket-spacing", - "message": "There should be no space before ']'.", - "line": 7, - "column": 64, - "endLine": 7, - "endColumn": 65 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 68, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 19, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 15, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 15, - "endLine": 11, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 49, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 12, - "column": 49, - "endLine": 13, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 13, - "column": 6, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 15, - "column": 35, - "endLine": 15, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 15, - "column": 45, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 16, - "column": 19, - "endLine": 16, - "endColumn": 25 - }, - { - "ruleId": "no-negated-condition", - "message": "Unexpected negated condition.", - "line": 16, - "column": 19, - "endLine": 16, - "endColumn": 67 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 16, - "column": 19, - "endLine": 16, - "endColumn": 67 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 16, - "column": 28, - "endLine": 16, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 16, - "column": 36, - "endLine": 16, - "endColumn": 40 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 16, - "column": 36, - "endLine": 16, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 16, - "column": 43, - "endLine": 16, - "endColumn": 53 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 16, - "column": 43, - "endLine": 16, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 16, - "column": 50, - "endLine": 16, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 16, - "column": 56, - "endLine": 16, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 16, - "column": 67, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 17, - "column": 20, - "endLine": 17, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 17, - "column": 36, - "endLine": 17, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 17, - "column": 43, - "endLine": 17, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 17, - "column": 51, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 17, - "column": 51, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onRequest' should be before 'setToken'.", - "line": 19, - "column": 3, - "endLine": 19, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 19, - "column": 12, - "endLine": 19, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 17, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 20, - "column": 35, - "endLine": 20, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 66, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 20, - "column": 66, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 22, - "column": 18, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 23, - "column": 36, - "endLine": 23, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 73, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 73, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onRequestError' should be before 'onResponse'.", - "line": 25, - "column": 3, - "endLine": 25, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 25, - "column": 22, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 26, - "column": 35, - "endLine": 26, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 26, - "column": 45, - "endLine": 26, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 26, - "column": 46, - "endLine": 26, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 90, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 90, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 28, - "column": 18, - "endLine": 28, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 23, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 29, - "column": 36, - "endLine": 29, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 29, - "column": 46, - "endLine": 29, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 29, - "column": 47, - "endLine": 29, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 29, - "column": 91, - "endLine": 30, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 29, - "column": 91, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'onError' should be before 'onResponseError'.", - "line": 31, - "column": 3, - "endLine": 31, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 31, - "column": 10, - "endLine": 31, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 15, - "endLine": 32, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 28, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 29, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 33, - "column": 29, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 2, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "prefer-const", - "message": "'method' is never reassigned. Use 'const' instead.", - "line": 38, - "column": 10, - "endLine": 38, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 21, - "endLine": 38, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 31, - "endLine": 38, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 32, - "endLine": 38, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 41, - "endLine": 38, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 42, - "endLine": 38, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 48, - "endLine": 38, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 49, - "endLine": 38, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 56, - "endLine": 38, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 57, - "endLine": 38, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 67, - "endLine": 38, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 68, - "endLine": 38, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 75, - "endLine": 38, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 76, - "endLine": 38, - "endColumn": 81 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 38, - "column": 82, - "endLine": 38, - "endColumn": 83 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 83, - "endLine": 38, - "endColumn": 90 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 93, - "endLine": 39, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 39, - "column": 14, - "endLine": 39, - "endColumn": 17 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 39, - "column": 14, - "endLine": 39, - "endColumn": 26 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 39, - "column": 30, - "endLine": 39, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 39, - "column": 42, - "endLine": 39, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 42, - "endLine": 39, - "endColumn": 44 - }, - { - "ruleId": "prefer-spread", - "message": "Use the spread operator instead of '.apply()'.", - "line": 39, - "column": 51, - "endLine": 39, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 39, - "column": 75, - "endLine": 39, - "endColumn": 76 - }, - { - "ruleId": "prefer-rest-params", - "message": "Use the rest parameters instead of 'arguments'.", - "line": 39, - "column": 76, - "endLine": 39, - "endColumn": 85 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 39, - "column": 92, - "endLine": 39, - "endColumn": 95 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 115, - "endLine": 39, - "endColumn": 116 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 115, - "endLine": 39, - "endColumn": 116 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 39, - "column": 116, - "endLine": 39, - "endColumn": 117 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 117, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 117, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 42, - "column": 29, - "endLine": 42, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 38, - "endLine": 43, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 3 - }, - { - "ruleId": "guard-for-in", - "message": "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.", - "line": 43, - "column": 3, - "endLine": 45, - "endColumn": 4 - }, - { - "ruleId": "prefer-const", - "message": "'key' is never reassigned. Use 'const' instead.", - "line": 43, - "column": 12, - "endLine": 43, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 31, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 44, - "column": 45, - "endLine": 45, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 44, - "column": 45, - "endLine": 45, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 45, - "column": 4, - "endLine": 46, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 46, - "column": 2, - "endLine": 47, - "endColumn": 1 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 49, - "column": 37, - "endLine": 49, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 49, - "column": 52, - "endLine": 49, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 49, - "column": 62, - "endLine": 49, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 49, - "column": 75, - "endLine": 50, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 51, - "column": 31, - "endLine": 51, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 40, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 52, - "column": 3, - "endLine": 52, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 53, - "column": 24, - "endLine": 53, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 53, - "column": 33, - "endLine": 54, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 54, - "column": 9, - "endLine": 54, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 54, - "column": 17, - "endLine": 54, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 54, - "column": 18, - "endLine": 54, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 54, - "column": 35, - "endLine": 54, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 54, - "column": 42, - "endLine": 55, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 54, - "column": 42, - "endLine": 55, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 55, - "column": 5, - "endLine": 56, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 57, - "column": 3, - "endLine": 57, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 58, - "column": 25, - "endLine": 58, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 34, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 59, - "column": 9, - "endLine": 59, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 59, - "column": 17, - "endLine": 59, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 59, - "column": 18, - "endLine": 59, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 59, - "column": 36, - "endLine": 59, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 43, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 59, - "column": 43, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 5, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 61, - "column": 20, - "endLine": 61, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 61, - "column": 27, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 63, - "column": 9, - "endLine": 63, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 64, - "column": 9, - "endLine": 64, - "endColumn": 12 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 64, - "column": 9, - "endLine": 64, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 64, - "column": 29, - "endLine": 64, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 64, - "column": 53, - "endLine": 64, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 65, - "column": 9, - "endLine": 65, - "endColumn": 12 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 65, - "column": 9, - "endLine": 65, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 65, - "column": 49, - "endLine": 65, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-paren-newline", - "message": "Expected newline before ')'.", - "line": 66, - "column": 23, - "endLine": 66, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 66, - "column": 24, - "endLine": 67, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 68, - "column": 28, - "endLine": 69, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 69, - "column": 9, - "endLine": 69, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 69, - "column": 25, - "endLine": 70, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 69, - "column": 25, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 70, - "column": 14, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 8.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 71, - "column": 9, - "endLine": 71, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 71, - "column": 45, - "endLine": 71, - "endColumn": 46 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 71, - "column": 46, - "endLine": 71, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 71, - "column": 56, - "endLine": 71, - "endColumn": 57 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 71, - "column": 57, - "endLine": 71, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 71, - "column": 60, - "endLine": 72, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 71, - "column": 60, - "endLine": 72, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 74, - "column": 17, - "endLine": 75, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 74, - "column": 17, - "endLine": 75, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 75, - "column": 5, - "endLine": 76, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 75, - "column": 5, - "endLine": 76, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 79, - "column": 37, - "endLine": 79, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 79, - "column": 46, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 81, - "column": 19, - "endLine": 81, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 81, - "column": 29, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 82, - "column": 36, - "endLine": 82, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 82, - "column": 47, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/wrap-regex", - "message": "Wrap the regexp literal in parens to disambiguate the slash.", - "line": 83, - "column": 12, - "endLine": 83, - "endColumn": 27 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 83, - "column": 12, - "endLine": 83, - "endColumn": 27 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 83, - "column": 87, - "endLine": 83, - "endColumn": 88 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 83, - "column": 90, - "endLine": 84, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 84, - "column": 38, - "endLine": 85, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 84, - "column": 38, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 85, - "column": 8, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 86, - "column": 6, - "endLine": 87, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 5, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 87, - "column": 5, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "max-lines-per-function", - "message": "Arrow function has too many lines (58). Maximum allowed is 50.", - "line": 91, - "column": 23, - "endLine": 148, - "endColumn": 2 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (11). Maximum allowed is 10.", - "line": 91, - "column": 23, - "endLine": 148, - "endColumn": 2 - }, - { - "ruleId": "no-unused-vars", - "message": "'ctx' is defined but never used.", - "line": 91, - "column": 31, - "endLine": 91, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 91, - "column": 39, - "endLine": 92, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 23, - "endLine": 93, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 93, - "column": 11, - "endLine": 94, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 93, - "column": 11, - "endLine": 94, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 98, - "column": 1, - "endLine": 98, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'finish' found.", - "line": 98, - "column": 5, - "endLine": 98, - "endColumn": 22 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'finish'.", - "line": 98, - "column": 19, - "endLine": 98, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'start' found.", - "line": 99, - "column": 5, - "endLine": 99, - "endColumn": 21 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'start'.", - "line": 99, - "column": 18, - "endLine": 99, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'fail' should be before 'start'.", - "line": 100, - "column": 5, - "endLine": 100, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'fail' found.", - "line": 100, - "column": 5, - "endLine": 100, - "endColumn": 20 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'fail'.", - "line": 100, - "column": 17, - "endLine": 100, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 101, - "column": 1, - "endLine": 101, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'set' found.", - "line": 101, - "column": 5, - "endLine": 101, - "endColumn": 19 - }, - { - "ruleId": "no-empty-function", - "message": "Unexpected empty method 'set'.", - "line": 101, - "column": 16, - "endLine": 101, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 102, - "column": 4, - "endLine": 103, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 104, - "column": 20, - "endLine": 104, - "endColumn": 132 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 104, - "column": 26, - "endLine": 104, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 104, - "column": 26, - "endLine": 104, - "endColumn": 94 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 104, - "column": 26, - "endLine": 104, - "endColumn": 132 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 104, - "column": 97, - "endLine": 104, - "endColumn": 118 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 104, - "column": 132, - "endLine": 105, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 106, - "column": 26, - "endLine": 107, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 108, - "column": 19, - "endLine": 108, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 108, - "column": 29, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 109, - "column": 46, - "endLine": 110, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 110, - "column": 13, - "endLine": 111, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 110, - "column": 13, - "endLine": 111, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 5 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '++' used.", - "line": 113, - "column": 5, - "endLine": 113, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 113, - "column": 22, - "endLine": 114, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 113, - "column": 22, - "endLine": 114, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 114, - "column": 5, - "endLine": 115, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 116, - "column": 20, - "endLine": 116, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 116, - "column": 32, - "endLine": 117, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 117, - "column": 76, - "endLine": 118, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 118, - "column": 13, - "endLine": 119, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 118, - "column": 13, - "endLine": 119, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 121, - "column": 1, - "endLine": 121, - "endColumn": 5 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 121, - "column": 5, - "endLine": 121, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 121, - "column": 22, - "endLine": 122, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 122, - "column": 1, - "endLine": 122, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 122, - "column": 28, - "endLine": 122, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 122, - "column": 31, - "endLine": 123, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 7 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 123, - "column": 25, - "endLine": 123, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 123, - "column": 26, - "endLine": 124, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 124, - "column": 1, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 124, - "column": 26, - "endLine": 125, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 124, - "column": 26, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 125, - "column": 6, - "endLine": 126, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 126, - "column": 5, - "endLine": 127, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 128, - "column": 1, - "endLine": 128, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 128, - "column": 17, - "endLine": 128, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 128, - "column": 26, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 129, - "column": 67, - "endLine": 130, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 130, - "column": 1, - "endLine": 130, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 130, - "column": 13, - "endLine": 131, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 130, - "column": 13, - "endLine": 131, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 131, - "column": 1, - "endLine": 131, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 133, - "column": 1, - "endLine": 133, - "endColumn": 5 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 133, - "column": 5, - "endLine": 133, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 133, - "column": 22, - "endLine": 134, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 134, - "column": 1, - "endLine": 134, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 134, - "column": 22, - "endLine": 135, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 135, - "column": 1, - "endLine": 135, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 135, - "column": 24, - "endLine": 136, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 135, - "column": 24, - "endLine": 136, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 136, - "column": 1, - "endLine": 136, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 136, - "column": 5, - "endLine": 137, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 138, - "column": 1, - "endLine": 138, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 138, - "column": 22, - "endLine": 138, - "endColumn": 23 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'e' is too short (< 2).", - "line": 138, - "column": 22, - "endLine": 138, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 138, - "column": 27, - "endLine": 139, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 139, - "column": 1, - "endLine": 139, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 139, - "column": 27, - "endLine": 140, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 140, - "column": 1, - "endLine": 140, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 140, - "column": 13, - "endLine": 141, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 140, - "column": 13, - "endLine": 141, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 141, - "column": 1, - "endLine": 141, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 142, - "column": 1, - "endLine": 142, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 142, - "column": 22, - "endLine": 142, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 142, - "column": 23, - "endLine": 142, - "endColumn": 24 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 100.", - "line": 142, - "column": 35, - "endLine": 142, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 142, - "column": 70, - "endLine": 143, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 143, - "column": 1, - "endLine": 143, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 100.", - "line": 143, - "column": 29, - "endLine": 143, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 143, - "column": 33, - "endLine": 143, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 143, - "column": 44, - "endLine": 144, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 143, - "column": 44, - "endLine": 144, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 144, - "column": 1, - "endLine": 144, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 144, - "column": 4, - "endLine": 145, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 146, - "column": 1, - "endLine": 146, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 146, - "column": 47, - "endLine": 147, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 147, - "column": 1, - "endLine": 147, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 147, - "column": 49, - "endLine": 148, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 147, - "column": 49, - "endLine": 148, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 150, - "column": 33, - "endLine": 151, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 151, - "column": 1, - "endLine": 151, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 151, - "column": 3, - "endLine": 151, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 152, - "column": 1, - "endLine": 152, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 153, - "column": 1, - "endLine": 153, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 154, - "column": 1, - "endLine": 154, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 154, - "column": 9, - "endLine": 154, - "endColumn": 10 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_AXIOS_BASE_URL_'.", - "line": 154, - "column": 10, - "endLine": 154, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 154, - "column": 67, - "endLine": 155, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 156, - "column": 1, - "endLine": 156, - "endColumn": 3 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 156, - "column": 3, - "endLine": 158, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 157, - "column": 1, - "endLine": 157, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 158, - "column": 1, - "endLine": 158, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 159, - "column": 1, - "endLine": 159, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 160, - "column": 1, - "endLine": 160, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'common' found.", - "line": 160, - "column": 5, - "endLine": 162, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/key-spacing", - "message": "Extra space after key 'common'.", - "line": 160, - "column": 11, - "endLine": 160, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 161, - "column": 1, - "endLine": 161, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 161, - "column": 7, - "endLine": 161, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 161, - "column": 17, - "endLine": 161, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 162, - "column": 1, - "endLine": 162, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 163, - "column": 1, - "endLine": 163, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'delete' found.", - "line": 163, - "column": 5, - "endLine": 163, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 164, - "column": 1, - "endLine": 164, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'get' found.", - "line": 164, - "column": 5, - "endLine": 164, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 165, - "column": 1, - "endLine": 165, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'head' found.", - "line": 165, - "column": 5, - "endLine": 165, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 166, - "column": 1, - "endLine": 166, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'post' found.", - "line": 166, - "column": 5, - "endLine": 166, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 167, - "column": 1, - "endLine": 167, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'put' found.", - "line": 167, - "column": 5, - "endLine": 167, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 168, - "column": 1, - "endLine": 168, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'patch' should be before 'put'.", - "line": 168, - "column": 5, - "endLine": 168, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'patch' found.", - "line": 168, - "column": 5, - "endLine": 168, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 169, - "column": 1, - "endLine": 169, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 169, - "column": 4, - "endLine": 170, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 171, - "column": 1, - "endLine": 171, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 172, - "column": 1, - "endLine": 172, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 173, - "column": 1, - "endLine": 173, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 174, - "column": 1, - "endLine": 174, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 174, - "column": 4, - "endLine": 175, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 176, - "column": 1, - "endLine": 176, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 177, - "column": 1, - "endLine": 177, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 178, - "column": 1, - "endLine": 178, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 178, - "column": 33, - "endLine": 178, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 178, - "column": 33, - "endLine": 178, - "endColumn": 61 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 178, - "column": 33, - "endLine": 178, - "endColumn": 103 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 178, - "column": 64, - "endLine": 178, - "endColumn": 98 - }, - { - "ruleId": "prefer-object-spread", - "message": "Use an object spread instead of `Object.assign` eg: `{ ...foo }`.", - "line": 178, - "column": 64, - "endLine": 178, - "endColumn": 98 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 178, - "column": 81, - "endLine": 178, - "endColumn": 82 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 178, - "column": 103, - "endLine": 179, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 179, - "column": 1, - "endLine": 179, - "endColumn": 3 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 179, - "column": 15, - "endLine": 179, - "endColumn": 16 - }, - { - "ruleId": "prefer-const", - "message": "'h' is never reassigned. Use 'const' instead.", - "line": 179, - "column": 15, - "endLine": 179, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 179, - "column": 48, - "endLine": 179, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 179, - "column": 98, - "endLine": 180, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 180, - "column": 1, - "endLine": 180, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 180, - "column": 13, - "endLine": 180, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 182, - "column": 1, - "endLine": 182, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 182, - "column": 23, - "endLine": 183, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 184, - "column": 1, - "endLine": 184, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 184, - "column": 33, - "endLine": 184, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 184, - "column": 54, - "endLine": 184, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 184, - "column": 69, - "endLine": 185, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 184, - "column": 69, - "endLine": 185, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 185, - "column": 1, - "endLine": 185, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 187, - "column": 1, - "endLine": 187, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 188, - "column": 1, - "endLine": 188, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 188, - "column": 43, - "endLine": 189, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 190, - "column": 1, - "endLine": 190, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 191, - "column": 1, - "endLine": 191, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 191, - "column": 29, - "endLine": 192, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 193, - "column": 1, - "endLine": 193, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 194, - "column": 1, - "endLine": 194, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 194, - "column": 57, - "endLine": 194, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 195, - "column": 1, - "endLine": 195, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 196, - "column": 1, - "endLine": 196, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 196, - "column": 52, - "endLine": 196, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 196, - "column": 57, - "endLine": 196, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 197, - "column": 1, - "endLine": 197, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 197, - "column": 25, - "endLine": 197, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 197, - "column": 46, - "endLine": 197, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 197, - "column": 82, - "endLine": 197, - "endColumn": 83 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 199, - "column": 1, - "endLine": 199, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 200, - "column": 1, - "endLine": 200, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 200, - "column": 21, - "endLine": 201, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 201, - "column": 1, - "endLine": 201, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 201, - "column": 10, - "endLine": 201, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 201, - "column": 18, - "endLine": 201, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 201, - "column": 25, - "endLine": 202, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 201, - "column": 25, - "endLine": 202, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/eol-last", - "message": "Newline required at end of file but not found.", - "line": 202, - "column": 2 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 202, - "column": 2 - } - ] - }, - { - "filePath": "/output/axios-module/lib/plugin.js", - "messages": [ - { - "ruleId": "prefer-const", - "message": "'scope' is never reassigned. Use 'const' instead.", - "line": 7, - "column": 14, - "endLine": 7, - "endColumn": 19 - }, - { - "ruleId": "array-bracket-spacing", - "message": "There should be no space after '['.", - "line": 7, - "column": 57, - "endLine": 7, - "endColumn": 58 - }, - { - "ruleId": "array-bracket-spacing", - "message": "There should be no space before ']'.", - "line": 7, - "column": 64, - "endLine": 7, - "endColumn": 65 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 9, - "column": 50, - "endLine": 9, - "endColumn": 51 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 19, - "column": 12, - "endLine": 19, - "endColumn": 13 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 14 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 18 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 28, - "column": 18, - "endLine": 28, - "endColumn": 19 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 31, - "column": 10, - "endLine": 31, - "endColumn": 11 - }, - { - "ruleId": "prefer-const", - "message": "'method' is never reassigned. Use 'const' instead.", - "line": 38, - "column": 10, - "endLine": 38, - "endColumn": 16 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 42, - "column": 29, - "endLine": 42, - "endColumn": 34 - }, - { - "ruleId": "prefer-const", - "message": "'key' is never reassigned. Use 'const' instead.", - "line": 43, - "column": 12, - "endLine": 43, - "endColumn": 15 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 49, - "column": 37, - "endLine": 49, - "endColumn": 51 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 51, - "column": 31, - "endLine": 51, - "endColumn": 36 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 53, - "column": 24, - "endLine": 53, - "endColumn": 29 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 58, - "column": 25, - "endLine": 58, - "endColumn": 30 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 61, - "column": 20, - "endLine": 61, - "endColumn": 23 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 69, - "column": 9, - "endLine": 69, - "endColumn": 20 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 71, - "column": 9, - "endLine": 71, - "endColumn": 20 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 7 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 79, - "column": 37, - "endLine": 79, - "endColumn": 42 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 81, - "column": 19, - "endLine": 81, - "endColumn": 25 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 108, - "column": 19, - "endLine": 108, - "endColumn": 25 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 116, - "column": 20, - "endLine": 116, - "endColumn": 28 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 128, - "column": 17, - "endLine": 128, - "endColumn": 22 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 138, - "column": 22, - "endLine": 138, - "endColumn": 23 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 153, - "column": 1, - "endLine": 153, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 154, - "column": 1, - "endLine": 154, - "endColumn": 7 - }, - { - "ruleId": "key-spacing", - "message": "Extra space after key 'common'.", - "line": 160, - "column": 11, - "endLine": 160, - "endColumn": 12 - }, - { - "ruleId": "quote-props", - "message": "Unnecessarily quoted property 'Accept' found.", - "line": 161, - "column": 7, - "endLine": 161, - "endColumn": 52 - }, - { - "ruleId": "prefer-const", - "message": "'h' is never reassigned. Use 'const' instead.", - "line": 179, - "column": 15, - "endLine": 179, - "endColumn": 16 - }, - { - "ruleId": "brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 179, - "column": 48, - "endLine": 179, - "endColumn": 49 - }, - { - "ruleId": "brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 180, - "column": 13, - "endLine": 180, - "endColumn": 14 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 202, - "column": 2 - } - ] - }, - { - "filePath": "/output/device-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 8, - "column": 16, - "endLine": 8, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 9, - "column": 19, - "endLine": 9, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 16, - "column": 26, - "endLine": 16, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 20, - "column": 4 - } - ] - }, - { - "filePath": "/output/device-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/device-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 59 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 1, - "column": 1, - "endLine": 2, - "endColumn": 75 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 10, - "column": 1, - "endLine": 12, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 10, - "column": 20, - "endLine": 10, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 23, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 11, - "column": 63, - "endLine": 11, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 11, - "column": 65, - "endLine": 11, - "endColumn": 66 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 4.", - "line": 11, - "column": 66, - "endLine": 11, - "endColumn": 67 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 11, - "column": 69, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 69, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 19, - "column": 1, - "endLine": 21, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 19, - "column": 28, - "endLine": 19, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 31, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 20, - "column": 83, - "endLine": 20, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 20, - "column": 85, - "endLine": 20, - "endColumn": 86 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 4.", - "line": 20, - "column": 86, - "endLine": 20, - "endColumn": 87 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 20, - "column": 89, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 89, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 23, - "column": 1, - "endLine": 25, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 20, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/wrap-regex", - "message": "Wrap the regexp literal in parens to disambiguate the slash.", - "line": 24, - "column": 10, - "endLine": 24, - "endColumn": 28 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 24, - "column": 10, - "endLine": 24, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 24, - "column": 36, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 36, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 27, - "column": 1, - "endLine": 29, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 27, - "column": 21, - "endLine": 27, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 27, - "column": 24, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/wrap-regex", - "message": "Wrap the regexp literal in parens to disambiguate the slash.", - "line": 28, - "column": 10, - "endLine": 28, - "endColumn": 19 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 28, - "column": 10, - "endLine": 28, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 27, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 27, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 31, - "column": 1, - "endLine": 33, - "endColumn": 2 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'a' is too short (< 2).", - "line": 31, - "column": 19, - "endLine": 31, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 22, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/wrap-regex", - "message": "Wrap the regexp literal in parens to disambiguate the slash.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 20 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 32, - "column": 28, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 28, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 35, - "column": 28, - "endLine": 35, - "endColumn": 150 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 150, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed async function.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 31 - }, - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 37, - "column": 45, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 19, - "endLine": 38, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 21, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 39, - "column": 26, - "endLine": 39, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 39, - "endLine": 40, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 40, - "column": 33, - "endLine": 40, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 40, - "column": 46, - "endLine": 41, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 46, - "endLine": 41, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 41, - "column": 35, - "endLine": 41, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 48, - "endLine": 42, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 5 - }, - { - "ruleId": "prefer-destructuring", - "message": "Use object destructuring.", - "line": 42, - "column": 5, - "endLine": 42, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 36, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 36, - "endLine": 43, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 10, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 45, - "column": 52, - "endLine": 46, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 47, - "column": 37, - "endLine": 48, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 48, - "column": 12, - "endLine": 49, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 50, - "column": 3, - "endLine": 50, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 19, - "endLine": 52, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 52, - "column": 35, - "endLine": 53, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 35, - "endLine": 53, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 54, - "column": 20, - "endLine": 55, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 55, - "column": 28, - "endLine": 56, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 17, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 57, - "column": 22, - "endLine": 58, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 58, - "column": 19, - "endLine": 59, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 60, - "column": 21, - "endLine": 60, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 60, - "column": 42, - "endLine": 61, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 61, - "column": 25, - "endLine": 61, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 61, - "column": 60, - "endLine": 61, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 61, - "column": 68, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 20, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 63, - "column": 28, - "endLine": 64, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 63, - "column": 28, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 65, - "column": 25, - "endLine": 65, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 65, - "column": 60, - "endLine": 65, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 65, - "column": 68, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 66, - "column": 21, - "endLine": 67, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 67, - "column": 28, - "endLine": 68, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 67, - "column": 28, - "endLine": 68, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 68, - "column": 6, - "endLine": 69, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 69, - "column": 10, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 70, - "column": 33, - "endLine": 71, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 71, - "column": 49, - "endLine": 72, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 72, - "column": 27, - "endLine": 73, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 72, - "column": 27, - "endLine": 73, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 74, - "column": 33, - "endLine": 75, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 75, - "column": 29, - "endLine": 76, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 77, - "column": 24, - "endLine": 78, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 78, - "column": 40, - "endLine": 79, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 79, - "column": 43, - "endLine": 80, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 80, - "column": 34, - "endLine": 81, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 81, - "column": 34, - "endLine": 82, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 82, - "column": 18, - "endLine": 83, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 83, - "column": 26, - "endLine": 84, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 84, - "column": 22, - "endLine": 85, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 85, - "column": 10, - "endLine": 85, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 85, - "column": 19, - "endLine": 85, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isMobile' found.", - "line": 86, - "column": 5, - "endLine": 86, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isMobileOrTablet' found.", - "line": 87, - "column": 5, - "endLine": 87, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isTablet' found.", - "line": 88, - "column": 5, - "endLine": 88, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isDesktop' should be before 'isTablet'.", - "line": 89, - "column": 5, - "endLine": 89, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isDesktop' found.", - "line": 89, - "column": 5, - "endLine": 89, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isIos' found.", - "line": 90, - "column": 5, - "endLine": 90, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 91, - "column": 1, - "endLine": 91, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isWindows' found.", - "line": 91, - "column": 5, - "endLine": 91, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isMacOS' should be before 'isWindows'.", - "line": 92, - "column": 5, - "endLine": 92, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isMacOS' found.", - "line": 92, - "column": 5, - "endLine": 92, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'isDesktopOrTablet' should be before 'isMacOS'.", - "line": 93, - "column": 5, - "endLine": 93, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'isDesktopOrTablet' found.", - "line": 93, - "column": 5, - "endLine": 93, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 5, - "endLine": 95, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 94, - "column": 5, - "endLine": 95, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/device-module/lib/plugin.js", - "messages": [ - { - "ruleId": null, - "message": "Unused eslint-disable directive (no problems were reported).", - "line": 4, - "column": 1 - }, - { - "ruleId": null, - "message": "Unused eslint-disable directive (no problems were reported).", - "line": 14, - "column": 1 - }, - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 31 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 7 - } - ] - }, - { - "filePath": "/output/google-adsense-module/.eslintrc.js", - "messages": [ - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 4, - "column": 17, - "endLine": 4, - "endColumn": 25 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 11, - "column": 13, - "endLine": 11, - "endColumn": 23 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 12, - "column": 13, - "endLine": 12, - "endColumn": 19 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 12, - "column": 21, - "endLine": 12, - "endColumn": 26 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 15, - "column": 5, - "endLine": 15, - "endColumn": 19 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 17, - "column": 5, - "endLine": 17, - "endColumn": 29 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 19, - "column": 5, - "endLine": 19, - "endColumn": 18 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 19, - "column": 45, - "endLine": 19, - "endColumn": 57 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 21, - "column": 5, - "endLine": 21, - "endColumn": 17 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 24, - "column": 5, - "endLine": 24, - "endColumn": 19 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 29, - "column": 14, - "endLine": 29, - "endColumn": 20 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 65 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 38, - "column": 2, - "endLine": 38, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/google-adsense-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/google-adsense-module/lib/all-rules-test/plugin.template.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 5, - "column": 11, - "endLine": 5, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 5, - "column": 14, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 7, - "column": 7, - "endLine": 7, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 9, - "column": 9, - "endLine": 9, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 9, - "column": 19, - "endLine": 9, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'style' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 9 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'attrs' should be before 'style'.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 12, - "column": 11, - "endLine": 12, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 13, - "column": 11, - "endLine": 13, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 14, - "column": 11, - "endLine": 14, - "endColumn": 27 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-ad-format' should be before 'data-ad-slot'.", - "line": 14, - "column": 11, - "endLine": 14, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 15, - "column": 11, - "endLine": 15, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 15, - "column": 29, - "endLine": 15, - "endColumn": 38 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 15, - "column": 29, - "endLine": 15, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 15, - "column": 41, - "endLine": 15, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 16, - "column": 11, - "endLine": 16, - "endColumn": 27 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-ad-layout' should be before 'data-ad-region'.", - "line": 16, - "column": 11, - "endLine": 16, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 17, - "column": 11, - "endLine": 17, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 18, - "column": 11, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 18, - "column": 28, - "endLine": 18, - "endColumn": 40 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 18, - "column": 28, - "endLine": 18, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 18, - "column": 43, - "endLine": 18, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 19, - "column": 11, - "endLine": 19, - "endColumn": 33 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-analytics-uacct' should be before 'data-page-url'.", - "line": 19, - "column": 11, - "endLine": 19, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 19, - "column": 35, - "endLine": 19, - "endColumn": 54 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 19, - "column": 35, - "endLine": 19, - "endColumn": 83 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 19, - "column": 57, - "endLine": 19, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 20, - "column": 11, - "endLine": 20, - "endColumn": 39 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-analytics-domain-name' should be before 'data-analytics-uacct'.", - "line": 20, - "column": 11, - "endLine": 20, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 20, - "column": 41, - "endLine": 20, - "endColumn": 65 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 20, - "column": 41, - "endLine": 20, - "endColumn": 99 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 20, - "column": 68, - "endLine": 20, - "endColumn": 92 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 21, - "column": 11, - "endLine": 21, - "endColumn": 24 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-adtest' should be before 'data-analytics-domain-name'.", - "line": 21, - "column": 11, - "endLine": 21, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 21, - "column": 30, - "endLine": 21, - "endColumn": 42 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 21, - "column": 30, - "endLine": 21, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 21, - "column": 45, - "endLine": 21, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 22, - "column": 11, - "endLine": 22, - "endColumn": 36 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data-adsbygoogle-status' should be before 'data-adtest'.", - "line": 22, - "column": 11, - "endLine": 22, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 22, - "column": 38, - "endLine": 22, - "endColumn": 47 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 22, - "column": 38, - "endLine": 22, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 22, - "column": 50, - "endLine": 22, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 22, - "column": 57, - "endLine": 22, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'domProps' found.", - "line": 24, - "column": 9, - "endLine": 26, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'innerHTML' found.", - "line": 25, - "column": 11, - "endLine": 25, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 25, - "column": 22, - "endLine": 25, - "endColumn": 31 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 25, - "column": 22, - "endLine": 25, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 25, - "column": 34, - "endLine": 25, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 25, - "column": 34, - "endLine": 25, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 25, - "column": 39, - "endLine": 25, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'key' found.", - "line": 27, - "column": 9, - "endLine": 27, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 29, - "column": 6, - "endLine": 30, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 29, - "column": 6, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'props' should be before 'render'.", - "line": 31, - "column": 3, - "endLine": 31, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 33, - "column": 7, - "endLine": 33, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 34, - "column": 7, - "endLine": 34, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'adSlot' found.", - "line": 36, - "column": 5, - "endLine": 38, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 37, - "column": 7, - "endLine": 37, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'adFormat' should be before 'adSlot'.", - "line": 39, - "column": 5, - "endLine": 39, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'adFormat' found.", - "line": 39, - "column": 5, - "endLine": 42, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 40, - "column": 7, - "endLine": 40, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 41, - "column": 7, - "endLine": 41, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'default' found.", - "line": 41, - "column": 7, - "endLine": 41, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 41, - "column": 16, - "endLine": 41, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'adLayout' found.", - "line": 43, - "column": 5, - "endLine": 45, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 44, - "column": 7, - "endLine": 44, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'adLayoutKey' found.", - "line": 46, - "column": 5, - "endLine": 48, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 47, - "column": 7, - "endLine": 47, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'adStyle' found.", - "line": 49, - "column": 5, - "endLine": 56, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 50, - "column": 7, - "endLine": 50, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 51, - "column": 7, - "endLine": 51, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 18, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'display' found.", - "line": 53, - "column": 11, - "endLine": 53, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 53, - "column": 20, - "endLine": 53, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 54, - "column": 10, - "endLine": 55, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 54, - "column": 10, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'pageUrl' found.", - "line": 57, - "column": 5, - "endLine": 59, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 58, - "column": 7, - "endLine": 58, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'analyticsUacct' should be before 'pageUrl'.", - "line": 60, - "column": 5, - "endLine": 60, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 61, - "column": 7, - "endLine": 61, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 62, - "column": 7, - "endLine": 62, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'analyticsDomainName' should be before 'analyticsUacct'.", - "line": 64, - "column": 5, - "endLine": 64, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 65, - "column": 7, - "endLine": 65, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 66, - "column": 7, - "endLine": 66, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 69, - "column": 7, - "endLine": 69, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 70, - "column": 7, - "endLine": 70, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'data' should be before 'props'.", - "line": 73, - "column": 3, - "endLine": 73, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 73, - "column": 11, - "endLine": 74, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'show' found.", - "line": 75, - "column": 7, - "endLine": 75, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 76, - "column": 6, - "endLine": 77, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 76, - "column": 6, - "endLine": 77, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 78, - "column": 14, - "endLine": 79, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 79, - "column": 18, - "endLine": 80, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 79, - "column": 18, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'watch' found.", - "line": 81, - "column": 3, - "endLine": 101, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 82, - "column": 5, - "endLine": 82, - "endColumn": 13 - }, - { - "ruleId": "max-statements", - "message": "Method '$route' has too many statements (11). Maximum allowed is 10.", - "line": 82, - "column": 14, - "endLine": 100, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 82, - "column": 25, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 83, - "column": 42, - "endLine": 84, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 84, - "column": 16, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 7 - }, - { - "ruleId": "prefer-destructuring", - "message": "Use object destructuring.", - "line": 86, - "column": 13, - "endLine": 86, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 86, - "column": 31, - "endLine": 87, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 87, - "column": 31, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 88, - "column": 35, - "endLine": 89, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 89, - "column": 26, - "endLine": 90, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 90, - "column": 34, - "endLine": 91, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 91, - "column": 1, - "endLine": 91, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 91, - "column": 23, - "endLine": 92, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 91, - "column": 23, - "endLine": 92, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 37, - "endLine": 93, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 94, - "column": 19, - "endLine": 94, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 94, - "column": 93, - "endLine": 94, - "endColumn": 94 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'k' is too short (< 2).", - "line": 94, - "column": 93, - "endLine": 94, - "endColumn": 94 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 94, - "column": 126, - "endLine": 95, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 126, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 96, - "column": 20, - "endLine": 97, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 98, - "column": 1, - "endLine": 98, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 98, - "column": 24, - "endLine": 99, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 98, - "column": 24, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 99, - "column": 8, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 101, - "column": 1, - "endLine": 101, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'methods' should be before 'watch'.", - "line": 102, - "column": 3, - "endLine": 102, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'methods' found.", - "line": 102, - "column": 3, - "endLine": 126, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 103, - "column": 1, - "endLine": 103, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 103, - "column": 17, - "endLine": 104, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 104, - "column": 14, - "endLine": 104, - "endColumn": 21 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 104, - "column": 14, - "endLine": 104, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 104, - "column": 37, - "endLine": 105, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 104, - "column": 37, - "endLine": 105, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 105, - "column": 1, - "endLine": 105, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 106, - "column": 17, - "endLine": 107, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 107, - "column": 1, - "endLine": 107, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 107, - "column": 26, - "endLine": 108, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 108, - "column": 15, - "endLine": 109, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 108, - "column": 15, - "endLine": 109, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 111, - "column": 24, - "endLine": 112, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 112, - "column": 1, - "endLine": 112, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 113, - "column": 34, - "endLine": 114, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 113, - "column": 34, - "endLine": 114, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'showAd' should be before 'updateAd'.", - "line": 115, - "column": 5, - "endLine": 115, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 115, - "column": 15, - "endLine": 116, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 116, - "column": 23, - "endLine": 117, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 117, - "column": 28, - "endLine": 118, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 118, - "column": 13, - "endLine": 119, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 120, - "column": 1, - "endLine": 120, - "endColumn": 11 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 120, - "column": 12, - "endLine": 120, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 120, - "column": 67, - "endLine": 121, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 120, - "column": 67, - "endLine": 121, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 121, - "column": 1, - "endLine": 121, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 121, - "column": 25, - "endLine": 122, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 122, - "column": 1, - "endLine": 122, - "endColumn": 11 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 122, - "column": 11, - "endLine": 122, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 122, - "column": 31, - "endLine": 123, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 122, - "column": 31, - "endLine": 123, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 123, - "column": 10, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 124, - "column": 1, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 124, - "column": 9, - "endLine": 125, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 124, - "column": 9, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 127, - "column": 2, - "endLine": 128, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 130, - "column": 36, - "endLine": 130, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 130, - "column": 49, - "endLine": 131, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/google-adsense-module/lib/plugin.template.js", - "messages": [ - { - "ruleId": "quote-props", - "message": "Unnecessarily quoted property 'class' found.", - "line": 9, - "column": 9, - "endLine": 9, - "endColumn": 33 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 84, - "column": 15, - "endLine": 84, - "endColumn": 16 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 122, - "column": 11, - "endLine": 122, - "endColumn": 24 - } - ] - }, - { - "filePath": "/output/google-optimize/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 32, - "column": 16, - "endLine": 32, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 33, - "column": 19, - "endLine": 33, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 36, - "column": 26, - "endLine": 36, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 40, - "column": 4 - } - ] - }, - { - "filePath": "/output/google-optimize/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/google-optimize/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 28, - "endLine": 1, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 45, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 2, - "column": 9, - "endLine": 2, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 2, - "column": 60, - "endLine": 2, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 68, - "endLine": 2, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 76, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 56, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 38, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 7, - "column": 16, - "endLine": 7, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 39, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "no-use-before-define", - "message": "'assignExperiment' was used before it was defined.", - "line": 9, - "column": 3, - "endLine": 9, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 24, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "no-use-before-define", - "message": "'googleOptimize' was used before it was defined.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 22, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 15, - "column": 10, - "endLine": 15, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 15, - "column": 16, - "endLine": 15, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 15, - "column": 32, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 32, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 18, - "column": 1, - "endLine": 88, - "endColumn": 2 - }, - { - "ruleId": "max-lines-per-function", - "message": "Function 'assignExperiment' has too many lines (71). Maximum allowed is 50.", - "line": 18, - "column": 1, - "endLine": 88, - "endColumn": 2 - }, - { - "ruleId": "max-statements", - "message": "Function 'assignExperiment' has too many statements (34). Maximum allowed is 10.", - "line": 18, - "column": 1, - "endLine": 88, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 18, - "column": 26, - "endLine": 18, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 32, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 27, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 22, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 26, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 19, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "no-use-before-define", - "message": "'getCookie' was used before it was defined.", - "line": 26, - "column": 18, - "endLine": 26, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 26, - "column": 32, - "endLine": 26, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 26, - "column": 33, - "endLine": 26, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 26, - "column": 43, - "endLine": 26, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 45, - "endLine": 26, - "endColumn": 46 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 26, - "column": 46, - "endLine": 26, - "endColumn": 71 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 26, - "column": 46, - "endLine": 26, - "endColumn": 71 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 26, - "column": 46, - "endLine": 26, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 27, - "column": 20, - "endLine": 27, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 27, - "column": 48, - "endLine": 27, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 52, - "endLine": 28, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 32, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 30, - "column": 45, - "endLine": 30, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 83, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 46, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 34, - "column": 39, - "endLine": 34, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 34, - "column": 48, - "endLine": 34, - "endColumn": 49 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'v' is too short (< 2).", - "line": 34, - "column": 48, - "endLine": 34, - "endColumn": 49 - }, - { - "ruleId": "radix", - "message": "Missing radix parameter.", - "line": 34, - "column": 53, - "endLine": 34, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 65, - "endLine": 35, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 65, - "endLine": 35, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 38, - "column": 45, - "endLine": 38, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 38, - "column": 45, - "endLine": 38, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 38, - "column": 52, - "endLine": 38, - "endColumn": 76 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 38, - "column": 52, - "endLine": 38, - "endColumn": 93 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 38, - "column": 67, - "endLine": 38, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 38, - "column": 79, - "endLine": 38, - "endColumn": 80 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 38, - "column": 79, - "endLine": 38, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 94, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 35, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 3 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 40, - "column": 30, - "endLine": 40, - "endColumn": 32 - }, - { - "ruleId": "no-plusplus", - "message": "Unary operator '--' used.", - "line": 40, - "column": 36, - "endLine": 40, - "endColumn": 45 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 40, - "column": 48, - "endLine": 40, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 51, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 41, - "column": 56, - "endLine": 42, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 46, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 45, - "column": 42, - "endLine": 45, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 45, - "column": 54, - "endLine": 46, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 46, - "column": 40, - "endLine": 47, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 48, - "column": 47, - "endLine": 49, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 9 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 49, - "column": 27, - "endLine": 49, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 49, - "column": 29, - "endLine": 50, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 49, - "column": 29, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 50, - "column": 8, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 6, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 3 - }, - { - "ruleId": "no-negated-condition", - "message": "Unexpected negated condition.", - "line": 54, - "column": 3, - "endLine": 79, - "endColumn": 4 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: -1.", - "line": 54, - "column": 27, - "endLine": 54, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 54, - "column": 31, - "endLine": 55, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 56, - "column": 44, - "endLine": 56, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 80, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 59, - "column": 52, - "endLine": 59, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 59, - "column": 52, - "endLine": 59, - "endColumn": 112 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 59, - "column": 63, - "endLine": 59, - "endColumn": 91 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 59, - "column": 63, - "endLine": 59, - "endColumn": 112 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 59, - "column": 82, - "endLine": 59, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 59, - "column": 94, - "endLine": 59, - "endColumn": 95 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 59, - "column": 94, - "endLine": 59, - "endColumn": 95 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 113, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 60, - "column": 60, - "endLine": 60, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 60, - "column": 64, - "endLine": 61, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 61, - "column": 51, - "endLine": 62, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 32, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 63, - "column": 33, - "endLine": 64, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 63, - "column": 33, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 5 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 67, - "column": 23, - "endLine": 67, - "endColumn": 79 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 67, - "column": 49, - "endLine": 67, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 67, - "column": 75, - "endLine": 67, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 67, - "column": 79, - "endLine": 68, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 68, - "column": 31, - "endLine": 69, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 7 - }, - { - "ruleId": "no-use-before-define", - "message": "'setCookie' was used before it was defined.", - "line": 69, - "column": 7, - "endLine": 69, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 69, - "column": 21, - "endLine": 69, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 69, - "column": 22, - "endLine": 69, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 69, - "column": 28, - "endLine": 69, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 69, - "column": 39, - "endLine": 69, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 69, - "column": 58, - "endLine": 70, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 69, - "column": 58, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 73, - "column": 34, - "endLine": 73, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 73, - "column": 43, - "endLine": 73, - "endColumn": 49 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 73, - "column": 43, - "endLine": 73, - "endColumn": 81 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 73, - "column": 70, - "endLine": 73, - "endColumn": 73 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 73, - "column": 82, - "endLine": 74, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 73, - "column": 82, - "endLine": 74, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 74, - "column": 10, - "endLine": 75, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 76, - "column": 20, - "endLine": 77, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 77, - "column": 24, - "endLine": 78, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 78, - "column": 17, - "endLine": 79, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 78, - "column": 17, - "endLine": 79, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property '$experimentIndex' found.", - "line": 82, - "column": 5, - "endLine": 82, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property '$variantIndexes' found.", - "line": 83, - "column": 5, - "endLine": 83, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. '$activeVariants' should be before '$variantIndexes'.", - "line": 84, - "column": 5, - "endLine": 84, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property '$activeVariants' found.", - "line": 84, - "column": 5, - "endLine": 84, - "endColumn": 77 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 84, - "column": 41, - "endLine": 84, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property '$classes' found.", - "line": 85, - "column": 5, - "endLine": 85, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 4, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 87, - "column": 4, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 90, - "column": 1, - "endLine": 100, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 90, - "column": 19, - "endLine": 90, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 90, - "column": 31, - "endLine": 91, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 91, - "column": 1, - "endLine": 91, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 91, - "column": 35, - "endLine": 92, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 92, - "column": 11, - "endLine": 93, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 11, - "endLine": 93, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 96, - "column": 21, - "endLine": 96, - "endColumn": 35 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 96, - "column": 21, - "endLine": 96, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 96, - "column": 38, - "endLine": 96, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 96, - "column": 78, - "endLine": 97, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 97, - "column": 44, - "endLine": 97, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 97, - "column": 53, - "endLine": 98, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 3 - }, - { - "ruleId": "consistent-return", - "message": "Function 'getCookie' expected no return value.", - "line": 99, - "column": 3, - "endLine": 99, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 99, - "column": 23, - "endLine": 100, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 99, - "column": 23, - "endLine": 100, - "endColumn": 1 - }, - { - "ruleId": "max-params", - "message": "Function 'setCookie' has too many parameters (4). Maximum allowed is 3.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 19 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 102, - "column": 1, - "endLine": 121, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 102, - "column": 19, - "endLine": 102, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 102, - "column": 56, - "endLine": 103, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 103, - "column": 1, - "endLine": 103, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 103, - "column": 49, - "endLine": 103, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 103, - "column": 56, - "endLine": 103, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'path' found.", - "line": 104, - "column": 5, - "endLine": 104, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 104, - "column": 11, - "endLine": 104, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 105, - "column": 1, - "endLine": 105, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'maxAge' should be before 'path'.", - "line": 105, - "column": 5, - "endLine": 105, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 106, - "column": 5, - "endLine": 107, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 108, - "column": 23, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 110, - "column": 39, - "endLine": 111, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 110, - "column": 39, - "endLine": 111, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 111, - "column": 41, - "endLine": 112, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 113, - "column": 36, - "endLine": 113, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 113, - "column": 49, - "endLine": 114, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 5 - }, - { - "ruleId": "no-shadow", - "message": "'value' is already declared in the upper scope on line 102 column 31.", - "line": 114, - "column": 9, - "endLine": 114, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 114, - "column": 33, - "endLine": 115, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 115, - "column": 15, - "endLine": 116, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 116, - "column": 15, - "endLine": 116, - "endColumn": 34 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 116, - "column": 15, - "endLine": 117, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 117, - "column": 17, - "endLine": 117, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 117, - "column": 35, - "endLine": 118, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 117, - "column": 35, - "endLine": 118, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 119, - "column": 23, - "endLine": 119, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 119, - "column": 36, - "endLine": 119, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 119, - "column": 43, - "endLine": 120, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 119, - "column": 43, - "endLine": 120, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 120, - "column": 1, - "endLine": 120, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 120, - "column": 4, - "endLine": 121, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 124, - "column": 1, - "endLine": 132, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 124, - "column": 24, - "endLine": 124, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 124, - "column": 26, - "endLine": 124, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 124, - "column": 37, - "endLine": 124, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 124, - "column": 41, - "endLine": 125, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 125, - "column": 80, - "endLine": 126, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 126, - "column": 11, - "endLine": 127, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 126, - "column": 11, - "endLine": 127, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 127, - "column": 1, - "endLine": 127, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 3 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 129, - "column": 15, - "endLine": 129, - "endColumn": 83 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 129, - "column": 41, - "endLine": 129, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 129, - "column": 79, - "endLine": 129, - "endColumn": 82 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 129, - "column": 83, - "endLine": 130, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 131, - "column": 1, - "endLine": 131, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 131, - "column": 13, - "endLine": 131, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 131, - "column": 19, - "endLine": 131, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 131, - "column": 20, - "endLine": 131, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 131, - "column": 26, - "endLine": 131, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 131, - "column": 31, - "endLine": 132, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 131, - "column": 31, - "endLine": 132, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/google-optimize/lib/plugin.js", - "messages": [ - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 18, - "column": 26, - "endLine": 18, - "endColumn": 27 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 90, - "column": 19, - "endLine": 90, - "endColumn": 20 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 102, - "column": 19, - "endLine": 102, - "endColumn": 20 - }, - { - "ruleId": "multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 116, - "column": 15, - "endLine": 116, - "endColumn": 34 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 124, - "column": 24, - "endLine": 124, - "endColumn": 25 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "quote-props", - "message": "Unnecessarily quoted property 'semi' found.", - "line": 26, - "column": 7, - "endLine": 26, - "endColumn": 33 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 34, - "column": 16, - "endLine": 34, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 35, - "column": 19, - "endLine": 35, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 12.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 13 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 41, - "column": 26, - "endLine": 41, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 45, - "column": 4 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/all-rules-test/main.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 20, - "endLine": 1, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 28, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 22, - "endLine": 2, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 33, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 17, - "endLine": 3, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 22, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 4, - "column": 21, - "endLine": 4, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 31, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 5, - "column": 9, - "endLine": 5, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 5, - "column": 21, - "endLine": 5, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 5, - "column": 29, - "endLine": 5, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 41, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 6, - "column": 29, - "endLine": 6, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 6, - "column": 37, - "endLine": 6, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 46, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 17, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 57, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 61, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 61, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 43, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 33, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 16, - "column": 49, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 53, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 75, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 21, - "column": 35, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 22, - "column": 10, - "endLine": 22, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 22, - "column": 48, - "endLine": 22, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 60, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 63, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "no-unused-vars", - "message": "'getHostname' is assigned a value but never used.", - "line": 26, - "column": 9, - "endLine": 26, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 49, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "no-unused-vars", - "message": "'getForwarded' is assigned a value but never used.", - "line": 27, - "column": 9, - "endLine": 27, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 51, - "endLine": 28, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 57, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 29, - "column": 43, - "endLine": 30, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 33, - "column": 14, - "endLine": 34, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 34, - "column": 42, - "endLine": 34, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'namespaced' found.", - "line": 35, - "column": 7, - "endLine": 35, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'locale' found.", - "line": 37, - "column": 45, - "endLine": 37, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 37, - "column": 53, - "endLine": 37, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/comma-spacing", - "message": "A space is required after ','.", - "line": 37, - "column": 55, - "endLine": 37, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'messages' found.", - "line": 38, - "column": 47, - "endLine": 38, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/comma-spacing", - "message": "A space is required after ','.", - "line": 38, - "column": 59, - "endLine": 38, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'routeParams' found.", - "line": 39, - "column": 50, - "endLine": 39, - "endColumn": 65 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'actions' should be before 'state'.", - "line": 41, - "column": 7, - "endLine": 41, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 43, - "column": 21, - "endLine": 43, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 43, - "column": 28, - "endLine": 43, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 40, - "endLine": 44, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 44, - "column": 18, - "endLine": 44, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 44, - "column": 30, - "endLine": 44, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 44, - "column": 38, - "endLine": 45, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 44, - "column": 38, - "endLine": 45, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 47, - "column": 23, - "endLine": 47, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 47, - "column": 30, - "endLine": 47, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 47, - "column": 44, - "endLine": 48, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 48, - "column": 18, - "endLine": 48, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 48, - "column": 32, - "endLine": 48, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 48, - "column": 42, - "endLine": 49, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 48, - "column": 42, - "endLine": 49, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 51, - "column": 26, - "endLine": 51, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 51, - "column": 33, - "endLine": 51, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 45, - "endLine": 52, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 52, - "column": 40, - "endLine": 52, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 55, - "endLine": 53, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 53, - "column": 40, - "endLine": 54, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 53, - "column": 40, - "endLine": 54, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 55, - "column": 18, - "endLine": 55, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 55, - "column": 35, - "endLine": 55, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 55, - "column": 43, - "endLine": 56, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 55, - "column": 43, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 10.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 61, - "column": 37, - "endLine": 62, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 32, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 62, - "column": 32, - "endLine": 63, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 65, - "column": 39, - "endLine": 66, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 66, - "column": 36, - "endLine": 67, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 66, - "column": 36, - "endLine": 67, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 69, - "column": 40, - "endLine": 70, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 70, - "column": 37, - "endLine": 71, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 70, - "column": 37, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'getters' should be before 'mutations'.", - "line": 74, - "column": 7, - "endLine": 74, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'localeRouteParams' found.", - "line": 76, - "column": 9, - "endLine": 76, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 76, - "column": 30, - "endLine": 76, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 76, - "column": 42, - "endLine": 76, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 76, - "column": 49, - "endLine": 76, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 79, - "column": 7, - "endLine": 79, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'preserveState' found.", - "line": 79, - "column": 10, - "endLine": 79, - "endColumn": 55 - }, - { - "ruleId": "no-implicit-coercion", - "message": "use `Boolean(store.state[vuex.moduleName])` instead.", - "line": 79, - "column": 25, - "endLine": 79, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 79, - "column": 55, - "endLine": 79, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 79, - "column": 58, - "endLine": 80, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 79, - "column": 58, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 83, - "column": 85, - "endLine": 84, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 84, - "column": 10, - "endLine": 84, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 84, - "column": 31, - "endLine": 84, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 84, - "column": 57, - "endLine": 85, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 3 - }, - { - "ruleId": "consistent-return", - "message": "Expected to return a value at the end of arrow function.", - "line": 86, - "column": 30, - "endLine": 86, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 86, - "column": 33, - "endLine": 87, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 20, - "endLine": 88, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 88, - "column": 27, - "endLine": 89, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 89, - "column": 39, - "endLine": 90, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 89, - "column": 39, - "endLine": 90, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 90, - "column": 55, - "endLine": 90, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 90, - "column": 68, - "endLine": 91, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 91, - "column": 1, - "endLine": 91, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 91, - "column": 25, - "endLine": 91, - "endColumn": 58 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 91, - "column": 25, - "endLine": 91, - "endColumn": 98 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 91, - "column": 61, - "endLine": 91, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 91, - "column": 98, - "endLine": 92, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 92, - "column": 34, - "endLine": 93, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 34, - "endLine": 93, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 93, - "column": 8, - "endLine": 94, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 6, - "endLine": 95, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 95, - "column": 4, - "endLine": 96, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 97, - "column": 27, - "endLine": 97, - "endColumn": 33 - }, - { - "ruleId": "max-statements", - "message": "Arrow function has too many statements (11). Maximum allowed is 10.", - "line": 97, - "column": 27, - "endLine": 121, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 97, - "column": 37, - "endLine": 98, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 98, - "column": 1, - "endLine": 98, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 98, - "column": 21, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 99, - "column": 13, - "endLine": 100, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 99, - "column": 13, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 101, - "column": 1, - "endLine": 101, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 101, - "column": 28, - "endLine": 102, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 102, - "column": 25, - "endLine": 103, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 103, - "column": 1, - "endLine": 103, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 103, - "column": 30, - "endLine": 103, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 103, - "column": 38, - "endLine": 103, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'expires' found.", - "line": 104, - "column": 9, - "endLine": 104, - "endColumn": 62 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 365.", - "line": 104, - "column": 57, - "endLine": 104, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 105, - "column": 1, - "endLine": 105, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'path' found.", - "line": 105, - "column": 9, - "endLine": 105, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 105, - "column": 15, - "endLine": 105, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 106, - "column": 9, - "endLine": 107, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 106, - "column": 9, - "endLine": 107, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 107, - "column": 1, - "endLine": 107, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 107, - "column": 21, - "endLine": 108, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 108, - "column": 35, - "endLine": 108, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 108, - "column": 54, - "endLine": 109, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 7 - }, - { - "ruleId": "eqeqeq", - "message": "Expected '===' and instead saw '=='.", - "line": 109, - "column": 26, - "endLine": 109, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 109, - "column": 29, - "endLine": 109, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 109, - "column": 39, - "endLine": 110, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 110, - "column": 28, - "endLine": 111, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 110, - "column": 28, - "endLine": 111, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 113, - "column": 57, - "endLine": 113, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 113, - "column": 65, - "endLine": 113, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'expires' found.", - "line": 114, - "column": 9, - "endLine": 114, - "endColumn": 62 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 365.", - "line": 114, - "column": 57, - "endLine": 114, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'path' found.", - "line": 115, - "column": 9, - "endLine": 115, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 115, - "column": 15, - "endLine": 115, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 116, - "column": 9, - "endLine": 117, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 117, - "column": 35, - "endLine": 118, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 119, - "column": 21, - "endLine": 119, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 119, - "column": 34, - "endLine": 119, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 119, - "column": 43, - "endLine": 120, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 119, - "column": 43, - "endLine": 120, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 120, - "column": 1, - "endLine": 120, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 120, - "column": 6, - "endLine": 121, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 121, - "column": 1, - "endLine": 121, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 121, - "column": 4, - "endLine": 122, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 3 - }, - { - "ruleId": "max-lines-per-function", - "message": "Async arrow function has too many lines (51). Maximum allowed is 50.", - "line": 123, - "column": 28, - "endLine": 173, - "endColumn": 4 - }, - { - "ruleId": "max-statements", - "message": "Async arrow function has too many statements (24). Maximum allowed is 10.", - "line": 123, - "column": 28, - "endLine": 173, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 123, - "column": 47, - "endLine": 123, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 123, - "column": 68, - "endLine": 123, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 123, - "column": 80, - "endLine": 124, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 125, - "column": 53, - "endLine": 126, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 126, - "column": 13, - "endLine": 127, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 126, - "column": 13, - "endLine": 127, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 127, - "column": 1, - "endLine": 127, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 130, - "column": 1, - "endLine": 130, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 130, - "column": 40, - "endLine": 131, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 131, - "column": 1, - "endLine": 131, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 131, - "column": 13, - "endLine": 132, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 131, - "column": 13, - "endLine": 132, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 132, - "column": 1, - "endLine": 132, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 134, - "column": 1, - "endLine": 134, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 134, - "column": 38, - "endLine": 135, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 136, - "column": 1, - "endLine": 136, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 136, - "column": 24, - "endLine": 137, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 137, - "column": 1, - "endLine": 137, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 137, - "column": 47, - "endLine": 137, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 137, - "column": 58, - "endLine": 138, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 139, - "column": 1, - "endLine": 139, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 139, - "column": 22, - "endLine": 140, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 140, - "column": 1, - "endLine": 140, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 140, - "column": 44, - "endLine": 141, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 140, - "column": 44, - "endLine": 141, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 141, - "column": 1, - "endLine": 141, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 141, - "column": 8, - "endLine": 142, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 142, - "column": 1, - "endLine": 142, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 144, - "column": 1, - "endLine": 144, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 145, - "column": 1, - "endLine": 145, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 145, - "column": 15, - "endLine": 146, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 146, - "column": 1, - "endLine": 146, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 146, - "column": 14, - "endLine": 146, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 146, - "column": 32, - "endLine": 146, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 146, - "column": 45, - "endLine": 146, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 146, - "column": 55, - "endLine": 147, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 148, - "column": 1, - "endLine": 148, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 149, - "column": 1, - "endLine": 149, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 149, - "column": 77, - "endLine": 150, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 150, - "column": 1, - "endLine": 150, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 150, - "column": 41, - "endLine": 150, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 150, - "column": 66, - "endLine": 151, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 150, - "column": 66, - "endLine": 151, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 151, - "column": 1, - "endLine": 151, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 153, - "column": 1, - "endLine": 153, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 153, - "column": 39, - "endLine": 153, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 153, - "column": 50, - "endLine": 154, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 153, - "column": 50, - "endLine": 154, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 154, - "column": 1, - "endLine": 154, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 156, - "column": 1, - "endLine": 156, - "endColumn": 5 - }, - { - "ruleId": "require-atomic-updates", - "message": "Possible race condition: `app.i18n.locale` might be assigned based on an outdated state of `app`.", - "line": 156, - "column": 5, - "endLine": 156, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 156, - "column": 32, - "endLine": 157, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 158, - "column": 1, - "endLine": 158, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 158, - "column": 24, - "endLine": 159, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 159, - "column": 1, - "endLine": 159, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 159, - "column": 45, - "endLine": 159, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 159, - "column": 56, - "endLine": 160, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 159, - "column": 56, - "endLine": 160, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 160, - "column": 1, - "endLine": 160, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 162, - "column": 1, - "endLine": 162, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 162, - "column": 30, - "endLine": 162, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 162, - "column": 68, - "endLine": 163, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 164, - "column": 1, - "endLine": 164, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 164, - "column": 61, - "endLine": 165, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 165, - "column": 1, - "endLine": 165, - "endColumn": 7 - }, - { - "ruleId": "no-shadow", - "message": "'route' is already declared in the upper scope on line 22 column 16.", - "line": 165, - "column": 13, - "endLine": 165, - "endColumn": 18 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 165, - "column": 21, - "endLine": 165, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 165, - "column": 37, - "endLine": 166, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 166, - "column": 1, - "endLine": 166, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 166, - "column": 25, - "endLine": 166, - "endColumn": 44 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 166, - "column": 25, - "endLine": 166, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 166, - "column": 47, - "endLine": 166, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 166, - "column": 77, - "endLine": 166, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 166, - "column": 84, - "endLine": 167, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 167, - "column": 1, - "endLine": 167, - "endColumn": 7 - }, - { - "ruleId": "prefer-object-spread", - "message": "Use an object spread instead of `Object.assign` eg: `{ ...foo }`.", - "line": 167, - "column": 43, - "endLine": 167, - "endColumn": 88 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 167, - "column": 60, - "endLine": 167, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 167, - "column": 67, - "endLine": 167, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 167, - "column": 69, - "endLine": 167, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'name' found.", - "line": 167, - "column": 70, - "endLine": 167, - "endColumn": 85 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 167, - "column": 85, - "endLine": 167, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 167, - "column": 89, - "endLine": 167, - "endColumn": 90 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 167, - "column": 100, - "endLine": 168, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 169, - "column": 1, - "endLine": 169, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 169, - "column": 49, - "endLine": 170, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 170, - "column": 1, - "endLine": 170, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 170, - "column": 31, - "endLine": 171, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 170, - "column": 31, - "endLine": 171, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 171, - "column": 1, - "endLine": 171, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 171, - "column": 8, - "endLine": 172, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 172, - "column": 1, - "endLine": 172, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 172, - "column": 6, - "endLine": 173, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 173, - "column": 1, - "endLine": 173, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 173, - "column": 4, - "endLine": 174, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 175, - "column": 1, - "endLine": 175, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 176, - "column": 1, - "endLine": 176, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 176, - "column": 65, - "endLine": 177, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 177, - "column": 1, - "endLine": 177, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 177, - "column": 60, - "endLine": 178, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 178, - "column": 1, - "endLine": 178, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 178, - "column": 58, - "endLine": 179, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 179, - "column": 1, - "endLine": 179, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 179, - "column": 62, - "endLine": 180, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 180, - "column": 1, - "endLine": 180, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 180, - "column": 56, - "endLine": 181, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 181, - "column": 1, - "endLine": 181, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 181, - "column": 70, - "endLine": 182, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 182, - "column": 1, - "endLine": 182, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 182, - "column": 66, - "endLine": 183, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 183, - "column": 1, - "endLine": 183, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 183, - "column": 45, - "endLine": 184, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 184, - "column": 1, - "endLine": 184, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 184, - "column": 45, - "endLine": 185, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 185, - "column": 1, - "endLine": 185, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 185, - "column": 60, - "endLine": 186, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 187, - "column": 1, - "endLine": 187, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 188, - "column": 1, - "endLine": 188, - "endColumn": 3 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 188, - "column": 3, - "endLine": 188, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 188, - "column": 27, - "endLine": 189, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 190, - "column": 1, - "endLine": 190, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 191, - "column": 1, - "endLine": 191, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 191, - "column": 43, - "endLine": 192, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 193, - "column": 1, - "endLine": 193, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 193, - "column": 43, - "endLine": 194, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 194, - "column": 1, - "endLine": 194, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 194, - "column": 30, - "endLine": 194, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 194, - "column": 40, - "endLine": 195, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 195, - "column": 1, - "endLine": 195, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 195, - "column": 61, - "endLine": 196, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 195, - "column": 61, - "endLine": 196, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 196, - "column": 1, - "endLine": 196, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 196, - "column": 7, - "endLine": 197, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 196, - "column": 7, - "endLine": 197, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 197, - "column": 1, - "endLine": 197, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 199, - "column": 1, - "endLine": 199, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 199, - "column": 46, - "endLine": 200, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 201, - "column": 1, - "endLine": 201, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 201, - "column": 34, - "endLine": 202, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 202, - "column": 1, - "endLine": 202, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 202, - "column": 43, - "endLine": 203, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 203, - "column": 1, - "endLine": 203, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 203, - "column": 14, - "endLine": 203, - "endColumn": 26 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 203, - "column": 14, - "endLine": 203, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 203, - "column": 29, - "endLine": 203, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 203, - "column": 50, - "endLine": 204, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 203, - "column": 50, - "endLine": 204, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 204, - "column": 1, - "endLine": 204, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 204, - "column": 49, - "endLine": 205, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 205, - "column": 1, - "endLine": 205, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 205, - "column": 69, - "endLine": 206, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 206, - "column": 1, - "endLine": 206, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 206, - "column": 87, - "endLine": 207, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 208, - "column": 1, - "endLine": 208, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 208, - "column": 50, - "endLine": 208, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 208, - "column": 71, - "endLine": 208, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 208, - "column": 101, - "endLine": 208, - "endColumn": 102 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 208, - "column": 119, - "endLine": 209, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 209, - "column": 1, - "endLine": 209, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 209, - "column": 14, - "endLine": 209, - "endColumn": 25 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 209, - "column": 14, - "endLine": 209, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 209, - "column": 28, - "endLine": 209, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 209, - "column": 48, - "endLine": 210, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 209, - "column": 48, - "endLine": 210, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 210, - "column": 1, - "endLine": 210, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 210, - "column": 25, - "endLine": 211, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 6.", - "line": 211, - "column": 1, - "endLine": 211, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 211, - "column": 43, - "endLine": 212, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 211, - "column": 43, - "endLine": 212, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 212, - "column": 1, - "endLine": 212, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 214, - "column": 1, - "endLine": 214, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 214, - "column": 33, - "endLine": 214, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 214, - "column": 35, - "endLine": 214, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'initialSetup' found.", - "line": 214, - "column": 36, - "endLine": 214, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 214, - "column": 54, - "endLine": 214, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 214, - "column": 57, - "endLine": 215, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 216, - "column": 1, - "endLine": 216, - "endColumn": 3 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 216, - "column": 3, - "endLine": 216, - "endColumn": 35 - }, - { - "ruleId": "complexity", - "message": "Async arrow function has a complexity of 21. Maximum allowed is 20.", - "line": 216, - "column": 38, - "endLine": 257, - "endColumn": 4 - }, - { - "ruleId": "max-statements", - "message": "Async arrow function has too many statements (17). Maximum allowed is 10.", - "line": 216, - "column": 38, - "endLine": 257, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 216, - "column": 44, - "endLine": 216, - "endColumn": 49 - }, - { - "ruleId": "no-shadow", - "message": "'route' is already declared in the upper scope on line 22 column 16.", - "line": 216, - "column": 44, - "endLine": 216, - "endColumn": 49 - }, - { - "ruleId": "no-unused-vars", - "message": "'route' is defined but never used.", - "line": 216, - "column": 44, - "endLine": 216, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 216, - "column": 53, - "endLine": 217, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 217, - "column": 1, - "endLine": 217, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 217, - "column": 12, - "endLine": 217, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 217, - "column": 43, - "endLine": 217, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 217, - "column": 69, - "endLine": 218, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 219, - "column": 1, - "endLine": 219, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 219, - "column": 32, - "endLine": 220, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 220, - "column": 1, - "endLine": 220, - "endColumn": 7 - }, - { - "ruleId": "init-declarations", - "message": "Variable 'browserLocale' should be initialized on declaration.", - "line": 220, - "column": 11, - "endLine": 220, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 220, - "column": 24, - "endLine": 221, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 222, - "column": 1, - "endLine": 222, - "endColumn": 7 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 1.", - "line": 222, - "column": 81, - "endLine": 222, - "endColumn": 82 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 222, - "column": 104, - "endLine": 222, - "endColumn": 107 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 223, - "column": 1, - "endLine": 223, - "endColumn": 9 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 223, - "column": 9, - "endLine": 224, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 224, - "column": 1, - "endLine": 224, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 225, - "column": 1, - "endLine": 225, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 225, - "column": 57, - "endLine": 225, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 225, - "column": 92, - "endLine": 226, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 226, - "column": 1, - "endLine": 226, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 227, - "column": 1, - "endLine": 227, - "endColumn": 9 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 227, - "column": 74, - "endLine": 227, - "endColumn": 75 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 227, - "column": 76, - "endLine": 227, - "endColumn": 77 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 227, - "column": 77, - "endLine": 227, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 227, - "column": 79, - "endLine": 228, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 227, - "column": 79, - "endLine": 228, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 228, - "column": 1, - "endLine": 228, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 228, - "column": 44, - "endLine": 228, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 228, - "column": 67, - "endLine": 228, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 228, - "column": 80, - "endLine": 229, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 229, - "column": 1, - "endLine": 229, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 229, - "column": 37, - "endLine": 229, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 229, - "column": 62, - "endLine": 229, - "endColumn": 65 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 229, - "column": 67, - "endLine": 229, - "endColumn": 68 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 229, - "column": 100, - "endLine": 229, - "endColumn": 101 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 229, - "column": 102, - "endLine": 229, - "endColumn": 103 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 229, - "column": 103, - "endLine": 229, - "endColumn": 104 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 229, - "column": 105, - "endLine": 230, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 229, - "column": 105, - "endLine": 230, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 230, - "column": 1, - "endLine": 230, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 232, - "column": 1, - "endLine": 232, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 232, - "column": 26, - "endLine": 233, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 233, - "column": 1, - "endLine": 233, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 234, - "column": 1, - "endLine": 234, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 234, - "column": 65, - "endLine": 235, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 235, - "column": 1, - "endLine": 235, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 235, - "column": 48, - "endLine": 236, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 237, - "column": 1, - "endLine": 237, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 238, - "column": 1, - "endLine": 238, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 238, - "column": 52, - "endLine": 239, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 239, - "column": 1, - "endLine": 239, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 239, - "column": 45, - "endLine": 240, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 239, - "column": 45, - "endLine": 240, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 240, - "column": 1, - "endLine": 240, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 242, - "column": 1, - "endLine": 242, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 242, - "column": 75, - "endLine": 243, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 243, - "column": 1, - "endLine": 243, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 243, - "column": 55, - "endLine": 244, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 28 spaces but found 14.", - "line": 244, - "column": 1, - "endLine": 244, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 28 spaces but found 14.", - "line": 245, - "column": 1, - "endLine": 245, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 245, - "column": 57, - "endLine": 246, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 245, - "column": 57, - "endLine": 246, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 246, - "column": 1, - "endLine": 246, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 246, - "column": 57, - "endLine": 247, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 28 spaces but found 14.", - "line": 247, - "column": 1, - "endLine": 247, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 247, - "column": 57, - "endLine": 248, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 247, - "column": 57, - "endLine": 248, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 248, - "column": 1, - "endLine": 248, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 248, - "column": 14, - "endLine": 249, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 249, - "column": 1, - "endLine": 249, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 251, - "column": 1, - "endLine": 251, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 251, - "column": 22, - "endLine": 252, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 251, - "column": 22, - "endLine": 252, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 252, - "column": 1, - "endLine": 252, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 252, - "column": 10, - "endLine": 253, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 253, - "column": 1, - "endLine": 253, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 253, - "column": 8, - "endLine": 254, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 254, - "column": 1, - "endLine": 254, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 256, - "column": 1, - "endLine": 256, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 256, - "column": 17, - "endLine": 257, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 256, - "column": 17, - "endLine": 257, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 257, - "column": 1, - "endLine": 257, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 257, - "column": 4, - "endLine": 258, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 259, - "column": 1, - "endLine": 259, - "endColumn": 3 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 259, - "column": 9, - "endLine": 259, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 259, - "column": 48, - "endLine": 260, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 259, - "column": 48, - "endLine": 260, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 260, - "column": 2, - "endLine": 261, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/all-rules-test/routing.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 17, - "endLine": 2, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 22, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 61, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 43, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 49, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 65, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 53, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 51, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 85, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 13, - "column": 46, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "curly", - "message": "Expected { after 'if' condition.", - "line": 15, - "column": 17, - "endLine": 15, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 23, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 17, - "column": 67, - "endLine": 17, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 17, - "column": 90, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 18, - "column": 7, - "endLine": 18, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 137, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 137, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'locale'.", - "line": 21, - "column": 5, - "endLine": 21, - "endColumn": 11 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 21, - "column": 5, - "endLine": 21, - "endColumn": 45 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 21, - "column": 24, - "endLine": 21, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 45, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "curly", - "message": "Expected { after 'if' condition.", - "line": 23, - "column": 18, - "endLine": 23, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 24, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 26, - "column": 26, - "endLine": 26, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 36, - "endLine": 27, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 7 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'route'.", - "line": 27, - "column": 7, - "endLine": 27, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 27, - "column": 16, - "endLine": 27, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'name' found.", - "line": 27, - "column": 17, - "endLine": 27, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 27, - "column": 28, - "endLine": 27, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 30, - "endLine": 28, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 27, - "column": 30, - "endLine": 28, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 31, - "column": 30, - "endLine": 31, - "endColumn": 63 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 31, - "column": 30, - "endLine": 31, - "endColumn": 99 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 31, - "column": 66, - "endLine": 31, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 31, - "column": 66, - "endLine": 31, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 100, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 81, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 65, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 35, - "column": 65, - "endLine": 36, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 5 - }, - { - "ruleId": "prefer-object-spread", - "message": "Use an object spread instead of `Object.assign` eg: `{ ...foo }`.", - "line": 38, - "column": 28, - "endLine": 38, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 38, - "column": 45, - "endLine": 38, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 38, - "column": 52, - "endLine": 38, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 38, - "column": 54, - "endLine": 38, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 38, - "column": 59, - "endLine": 38, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 62, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 40, - "column": 12, - "endLine": 40, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 40, - "column": 19, - "endLine": 40, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 40, - "column": 38, - "endLine": 41, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 41, - "column": 26, - "endLine": 41, - "endColumn": 29 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 41, - "column": 35, - "endLine": 41, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 66, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 42, - "column": 14, - "endLine": 42, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 37, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 37, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 46, - "column": 20, - "endLine": 46, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 46, - "column": 36, - "endLine": 47, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 47, - "column": 12, - "endLine": 47, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'route' found.", - "line": 47, - "column": 13, - "endLine": 47, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 47, - "column": 21, - "endLine": 47, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 47, - "column": 30, - "endLine": 47, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 47, - "column": 32, - "endLine": 47, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 47, - "column": 67, - "endLine": 48, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 5 - }, - { - "ruleId": "consistent-return", - "message": "Function 'localePath' expected no return value.", - "line": 48, - "column": 5, - "endLine": 48, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 48, - "column": 20, - "endLine": 49, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 48, - "column": 20, - "endLine": 49, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 49, - "column": 4, - "endLine": 50, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 49, - "column": 4, - "endLine": 50, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 53, - "column": 45, - "endLine": 54, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 54, - "column": 63, - "endLine": 55, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 55, - "column": 59, - "endLine": 56, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 57, - "column": 45, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 58, - "column": 67, - "endLine": 58, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 90, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 59, - "column": 7, - "endLine": 59, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 143, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 59, - "column": 143, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 62, - "column": 18, - "endLine": 62, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 41, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 63, - "column": 16, - "endLine": 64, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 64, - "column": 14, - "endLine": 64, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 64, - "column": 16, - "endLine": 65, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 64, - "column": 16, - "endLine": 65, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 67, - "column": 12, - "endLine": 67, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 67, - "column": 33, - "endLine": 67, - "endColumn": 34 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 67, - "column": 38, - "endLine": 67, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 67, - "column": 49, - "endLine": 68, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 68, - "column": 30, - "endLine": 69, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 70, - "column": 9, - "endLine": 70, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 70, - "column": 22, - "endLine": 71, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 7 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 71, - "column": 26, - "endLine": 71, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 71, - "column": 93, - "endLine": 72, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 71, - "column": 93, - "endLine": 72, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 5 - }, - { - "ruleId": "prefer-object-spread", - "message": "Use an object spread instead of `Object.assign` eg: `{ ...foo }`.", - "line": 74, - "column": 23, - "endLine": 81, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 74, - "column": 40, - "endLine": 74, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 74, - "column": 51, - "endLine": 74, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'params' found.", - "line": 76, - "column": 7, - "endLine": 80, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 81, - "column": 7, - "endLine": 82, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 82, - "column": 16, - "endLine": 82, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 82, - "column": 42, - "endLine": 82, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 82, - "column": 50, - "endLine": 83, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 85, - "column": 9, - "endLine": 85, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 85, - "column": 42, - "endLine": 86, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 7 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 86, - "column": 20, - "endLine": 86, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 86, - "column": 48, - "endLine": 86, - "endColumn": 49 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 86, - "column": 48, - "endLine": 86, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 86, - "column": 83, - "endLine": 87, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 44, - "endLine": 88, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 9 - }, - { - "ruleId": "init-declarations", - "message": "Variable 'protocol' should be initialized on declaration.", - "line": 88, - "column": 13, - "endLine": 88, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 88, - "column": 21, - "endLine": 89, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 89, - "column": 29, - "endLine": 90, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 90, - "column": 35, - "endLine": 90, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 91, - "column": 1, - "endLine": 91, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 91, - "column": 18, - "endLine": 91, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 91, - "column": 22, - "endLine": 91, - "endColumn": 23 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 91, - "column": 27, - "endLine": 91, - "endColumn": 31 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_parentVnode'.", - "line": 91, - "column": 27, - "endLine": 91, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 91, - "column": 64, - "endLine": 92, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 92, - "column": 22, - "endLine": 92, - "endColumn": 34 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 92, - "column": 22, - "endLine": 92, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 92, - "column": 37, - "endLine": 92, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 92, - "column": 37, - "endLine": 92, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 92, - "column": 47, - "endLine": 92, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 92, - "column": 53, - "endLine": 93, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 92, - "column": 53, - "endLine": 93, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 93, - "column": 1, - "endLine": 93, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 93, - "column": 16, - "endLine": 94, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 11 - }, - { - "ruleId": "prefer-destructuring", - "message": "Use array destructuring.", - "line": 94, - "column": 11, - "endLine": 94, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 94, - "column": 53, - "endLine": 94, - "endColumn": 56 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 94, - "column": 58, - "endLine": 94, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 94, - "column": 60, - "endLine": 95, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 60, - "endLine": 95, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 9 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 96, - "column": 16, - "endLine": 96, - "endColumn": 65 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 96, - "column": 27, - "endLine": 96, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 96, - "column": 65, - "endLine": 97, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 96, - "column": 65, - "endLine": 97, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 97, - "column": 14, - "endLine": 98, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 98, - "column": 1, - "endLine": 98, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 98, - "column": 9, - "endLine": 98, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 98, - "column": 101, - "endLine": 99, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 98, - "column": 101, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 99, - "column": 8, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 101, - "column": 1, - "endLine": 101, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 101, - "column": 16, - "endLine": 102, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 101, - "column": 16, - "endLine": 102, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 102, - "column": 4, - "endLine": 103, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 102, - "column": 4, - "endLine": 103, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 105, - "column": 1, - "endLine": 119, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 107, - "column": 1, - "endLine": 107, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/no-multi-spaces", - "message": "Multiple spaces found before '='.", - "line": 107, - "column": 20, - "endLine": 107, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 107, - "column": 24, - "endLine": 107, - "endColumn": 36 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 107, - "column": 24, - "endLine": 110, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 107, - "column": 39, - "endLine": 107, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/operator-linebreak", - "message": "':' should be placed at the beginning of the line.", - "line": 107, - "column": 70, - "endLine": 107, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 2.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 3 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 108, - "column": 3, - "endLine": 108, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 108, - "column": 20, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 4.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 109, - "column": 21, - "endLine": 109, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 109, - "column": 32, - "endLine": 110, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 109, - "column": 32, - "endLine": 110, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 2.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 110, - "column": 4, - "endLine": 111, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 112, - "column": 1, - "endLine": 112, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 112, - "column": 44, - "endLine": 113, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 113, - "column": 1, - "endLine": 113, - "endColumn": 5 - }, - { - "ruleId": "no-param-reassign", - "message": "Assignment to function parameter 'route'.", - "line": 113, - "column": 5, - "endLine": 113, - "endColumn": 10 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 113, - "column": 30, - "endLine": 113, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 113, - "column": 35, - "endLine": 113, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 113, - "column": 42, - "endLine": 114, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 114, - "column": 22, - "endLine": 115, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 115, - "column": 18, - "endLine": 116, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 115, - "column": 18, - "endLine": 116, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 117, - "column": 50, - "endLine": 117, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 117, - "column": 52, - "endLine": 118, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 117, - "column": 52, - "endLine": 118, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 118, - "column": 4, - "endLine": 119, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 118, - "column": 4, - "endLine": 119, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 122, - "column": 1, - "endLine": 122, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 122, - "column": 10, - "endLine": 122, - "endColumn": 11 - }, - { - "ruleId": "no-shadow", - "message": "'Vue' is already declared in the upper scope on line 2 column 8.", - "line": 122, - "column": 11, - "endLine": 122, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 122, - "column": 16, - "endLine": 123, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 124, - "column": 1, - "endLine": 124, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'methods' found.", - "line": 124, - "column": 7, - "endLine": 128, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'localePath' found.", - "line": 125, - "column": 9, - "endLine": 125, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 125, - "column": 39, - "endLine": 125, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 125, - "column": 47, - "endLine": 125, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 125, - "column": 48, - "endLine": 125, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'switchLocalePath' found.", - "line": 126, - "column": 9, - "endLine": 126, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 126, - "column": 51, - "endLine": 126, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 127, - "column": 1, - "endLine": 127, - "endColumn": 9 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'getRouteBaseName' should be before 'switchLocalePath'.", - "line": 127, - "column": 9, - "endLine": 127, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'getRouteBaseName' found.", - "line": 127, - "column": 9, - "endLine": 127, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 128, - "column": 1, - "endLine": 128, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 129, - "column": 7, - "endLine": 130, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 129, - "column": 7, - "endLine": 130, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 130, - "column": 1, - "endLine": 130, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 131, - "column": 2, - "endLine": 132, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 133, - "column": 18, - "endLine": 133, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 133, - "column": 29, - "endLine": 133, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 133, - "column": 36, - "endLine": 134, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 134, - "column": 1, - "endLine": 134, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 134, - "column": 18, - "endLine": 135, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 135, - "column": 1, - "endLine": 135, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 135, - "column": 38, - "endLine": 135, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 135, - "column": 45, - "endLine": 135, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 135, - "column": 46, - "endLine": 135, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 135, - "column": 55, - "endLine": 136, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 136, - "column": 1, - "endLine": 136, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 136, - "column": 50, - "endLine": 136, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 136, - "column": 57, - "endLine": 137, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 137, - "column": 1, - "endLine": 137, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 137, - "column": 56, - "endLine": 138, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 137, - "column": 56, - "endLine": 138, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 138, - "column": 2, - "endLine": 139, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/all-rules-test/seo.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 2, - "column": 9, - "endLine": 2, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 2, - "column": 21, - "endLine": 2, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 29, - "endLine": 2, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 41, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 5, - "column": 10, - "endLine": 5, - "endColumn": 11 - }, - { - "ruleId": "no-shadow", - "message": "'Vue' is already declared in the upper scope on line 1 column 8.", - "line": 5, - "column": 11, - "endLine": 5, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 5, - "column": 16, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'head' found.", - "line": 7, - "column": 7, - "endLine": 7, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 7, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 7, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 2, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 16, - "endLine": 13, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/main.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 22 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 24 - }, - { - "ruleId": "no-unused-vars", - "message": "'getHostname' is assigned a value but never used.", - "line": 26, - "column": 9, - "endLine": 26, - "endColumn": 20 - }, - { - "ruleId": "no-unused-vars", - "message": "'getForwarded' is assigned a value but never used.", - "line": 27, - "column": 9, - "endLine": 27, - "endColumn": 21 - }, - { - "ruleId": "comma-spacing", - "message": "A space is required after ','.", - "line": 37, - "column": 55, - "endLine": 37, - "endColumn": 56 - }, - { - "ruleId": "comma-spacing", - "message": "A space is required after ','.", - "line": 38, - "column": 59, - "endLine": 38, - "endColumn": 60 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 11 - }, - { - "ruleId": "eqeqeq", - "message": "Expected '===' and instead saw '=='.", - "line": 109, - "column": 26, - "endLine": 109, - "endColumn": 28 - }, - { - "ruleId": "no-unneeded-ternary", - "message": "Unnecessary use of conditional expression for default assignment.", - "line": 203, - "column": 14, - "endLine": 203, - "endColumn": 50 - }, - { - "ruleId": "no-unneeded-ternary", - "message": "Unnecessary use of conditional expression for default assignment.", - "line": 209, - "column": 14, - "endLine": 209, - "endColumn": 48 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 211, - "column": 1, - "endLine": 211, - "endColumn": 7 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/routing.js", - "messages": [ - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 18, - "column": 7, - "endLine": 18, - "endColumn": 19 - }, - { - "ruleId": "no-multiple-empty-lines", - "message": "More than 1 blank line not allowed.", - "line": 52, - "column": 1, - "endLine": 53, - "endColumn": 1 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 59, - "column": 7, - "endLine": 59, - "endColumn": 19 - }, - { - "ruleId": "quote-props", - "message": "Unnecessarily quoted property '0' found.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 30 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 90, - "column": 46, - "endLine": 90, - "endColumn": 47 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 98, - "column": 9, - "endLine": 98, - "endColumn": 21 - }, - { - "ruleId": "padded-blocks", - "message": "Block must not be padded by blank lines.", - "line": 105, - "column": 49, - "endLine": 107, - "endColumn": 3 - }, - { - "ruleId": "no-multi-spaces", - "message": "Multiple spaces found before '='.", - "line": 107, - "column": 20, - "endLine": 107, - "endColumn": 22 - }, - { - "ruleId": "multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 107, - "column": 24, - "endLine": 107, - "endColumn": 36 - }, - { - "ruleId": "operator-linebreak", - "message": "':' should be placed at the beginning of the line.", - "line": 107, - "column": 70, - "endLine": 107, - "endColumn": 71 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 3 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 4.", - "line": 109, - "column": 1, - "endLine": 109, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 3 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 122, - "column": 10, - "endLine": 122, - "endColumn": 11 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/plugins/seo.js", - "messages": [ - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 5, - "column": 10, - "endLine": 5, - "endColumn": 11 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/all-rules-test/middleware.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 24, - "endLine": 1, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 39, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 12, - "endLine": 3, - "endColumn": 18 - }, - { - "ruleId": "dot-notation", - "message": "[\"i18n\"] is better written in dot notation.", - "line": 3, - "column": 12, - "endLine": 3, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 3, - "column": 41, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 4, - "column": 10, - "endLine": 4, - "endColumn": 11 - }, - { - "ruleId": "no-unused-vars", - "message": "'req' is assigned a value but never used.", - "line": 4, - "column": 16, - "endLine": 4, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 4, - "column": 43, - "endLine": 4, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 55, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 14, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 11, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 11, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 59, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 55, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 53, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 16, - "column": 22, - "endLine": 16, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 16, - "column": 43, - "endLine": 17, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 17, - "column": 14, - "endLine": 17, - "endColumn": 17 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 17, - "column": 14, - "endLine": 17, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 17, - "column": 33, - "endLine": 17, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 17, - "column": 46, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 11, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 11, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__route'.", - "line": 22, - "column": 3, - "endLine": 22, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 27, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 85, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '__detectBrowserLanguage'.", - "line": 26, - "column": 38, - "endLine": 26, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 79, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 27, - "column": 11, - "endLine": 28, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 27, - "column": 11, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 67, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 63, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 67, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 85, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 73, - "endLine": 35, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 36, - "column": 48, - "endLine": 36, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 36, - "column": 69, - "endLine": 36, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 36, - "column": 99, - "endLine": 36, - "endColumn": 100 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 36, - "column": 108, - "endLine": 37, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 38, - "column": 28, - "endLine": 38, - "endColumn": 39 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 38, - "column": 28, - "endLine": 38, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 38, - "column": 42, - "endLine": 38, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 63, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 63, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 2, - "endLine": 40, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/all-rules-test/options.js", - "messages": [ - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 2, - "column": 1, - "endLine": 10, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 2, - "column": 24, - "endLine": 2, - "endColumn": 25 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 24, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 5, - "column": 24, - "endLine": 5, - "endColumn": 33 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "no-else-return", - "message": "Unnecessary 'else' after 'return'.", - "line": 7, - "column": 10, - "endLine": 9, - "endColumn": 4 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 33, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 12, - "column": 17, - "endLine": 12, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 55, - "endLine": 15, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/all-rules-test/seo-head.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 21, - "endLine": 1, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 31, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 69, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 57, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 55, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 42, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 61, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 43, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 10, - "column": 28, - "endLine": 10, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 40, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 26 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 74 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 12, - "column": 29, - "endLine": 12, - "endColumn": 54 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 12, - "column": 49, - "endLine": 12, - "endColumn": 53 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 12, - "column": 57, - "endLine": 12, - "endColumn": 61 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_hasMetaInfo'.", - "line": 12, - "column": 57, - "endLine": 12, - "endColumn": 74 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 13, - "column": 6, - "endLine": 13, - "endColumn": 10 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 14, - "column": 6, - "endLine": 14, - "endColumn": 10 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 15, - "column": 6, - "endLine": 15, - "endColumn": 10 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 16, - "column": 5, - "endLine": 16, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 17, - "column": 5, - "endLine": 17, - "endColumn": 6 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 17, - "column": 6, - "endLine": 17, - "endColumn": 10 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 17, - "column": 46, - "endLine": 17, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 5, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 15, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 22, - "column": 29, - "endLine": 22, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 22, - "column": 53, - "endLine": 22, - "endColumn": 54 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 22, - "column": 53, - "endLine": 22, - "endColumn": 54 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 22, - "column": 81, - "endLine": 22, - "endColumn": 85 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 99, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 23, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 24, - "column": 63, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 55, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 25, - "column": 55, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 18, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 29, - "column": 3, - "endLine": 29, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 42, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 31, - "column": 18, - "endLine": 31, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 32, - "column": 7, - "endLine": 32, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 32, - "column": 12, - "endLine": 32, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 32, - "column": 22, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 33, - "column": 37, - "endLine": 34, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'hid' found.", - "line": 35, - "column": 13, - "endLine": 35, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 35, - "column": 18, - "endLine": 35, - "endColumn": 39 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 35, - "column": 18, - "endLine": 35, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rel' found.", - "line": 36, - "column": 13, - "endLine": 36, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 36, - "column": 18, - "endLine": 36, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 13 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'href' should be before 'rel'.", - "line": 37, - "column": 13, - "endLine": 37, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'href' found.", - "line": 37, - "column": 13, - "endLine": 37, - "endColumn": 64 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 37, - "column": 30, - "endLine": 37, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 24 spaces but found 12.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'hreflang' found.", - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 12, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 12, - "endLine": 40, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 16, - "endLine": 41, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 11 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 41, - "column": 11, - "endLine": 41, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 41, - "column": 110, - "endLine": 42, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 22, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 22, - "endLine": 43, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 10, - "endLine": 44, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 45, - "column": 7, - "endLine": 45, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 45, - "column": 15, - "endLine": 45, - "endColumn": 19 - }, - { - "ruleId": "no-implicit-coercion", - "message": "use `Boolean(item)` instead.", - "line": 45, - "column": 23, - "endLine": 45, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 45, - "column": 31, - "endLine": 46, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 45, - "column": 31, - "endLine": 46, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 48, - "column": 3, - "endLine": 48, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 49, - "column": 51, - "endLine": 50, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 50, - "column": 27, - "endLine": 50, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 50, - "column": 84, - "endLine": 51, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 51, - "column": 44, - "endLine": 51, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 62, - "endLine": 52, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'hid' found.", - "line": 54, - "column": 9, - "endLine": 54, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 54, - "column": 14, - "endLine": 54, - "endColumn": 31 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 54, - "column": 14, - "endLine": 54, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rel' found.", - "line": 55, - "column": 9, - "endLine": 55, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 55, - "column": 14, - "endLine": 55, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'href' should be before 'rel'.", - "line": 56, - "column": 9, - "endLine": 56, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'href' found.", - "line": 56, - "column": 9, - "endLine": 56, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 57, - "column": 9, - "endLine": 58, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 57, - "column": 9, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 6, - "endLine": 59, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 61, - "column": 3, - "endLine": 61, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 18, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 63, - "column": 3, - "endLine": 63, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 64, - "column": 63, - "endLine": 65, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'hid' found.", - "line": 66, - "column": 7, - "endLine": 66, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 66, - "column": 12, - "endLine": 66, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'property' found.", - "line": 67, - "column": 7, - "endLine": 67, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 67, - "column": 17, - "endLine": 67, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'content' should be before 'property'.", - "line": 69, - "column": 7, - "endLine": 69, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'content' found.", - "line": 69, - "column": 7, - "endLine": 69, - "endColumn": 68 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 69, - "column": 58, - "endLine": 69, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 69, - "column": 63, - "endLine": 69, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 69, - "column": 64, - "endLine": 69, - "endColumn": 67 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 70, - "column": 7, - "endLine": 71, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 70, - "column": 7, - "endLine": 71, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 3 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 72, - "column": 3, - "endLine": 72, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 73, - "column": 1, - "endLine": 73, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-paren-newline", - "message": "Unexpected newline after '('.", - "line": 73, - "column": 12, - "endLine": 73, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 5 - }, - { - "ruleId": "no-invalid-this", - "message": "Unexpected 'this'.", - "line": 74, - "column": 8, - "endLine": 74, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 75, - "column": 7, - "endLine": 75, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 75, - "column": 15, - "endLine": 75, - "endColumn": 16 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 75, - "column": 15, - "endLine": 75, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 76, - "column": 7, - "endLine": 76, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 76, - "column": 12, - "endLine": 76, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'hid' found.", - "line": 77, - "column": 9, - "endLine": 77, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 77, - "column": 14, - "endLine": 77, - "endColumn": 36 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 77, - "column": 14, - "endLine": 77, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'property' found.", - "line": 78, - "column": 9, - "endLine": 78, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 78, - "column": 19, - "endLine": 78, - "endColumn": 40 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 9 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'content' should be before 'property'.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'content' found.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 59 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 79, - "column": 49, - "endLine": 79, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 79, - "column": 54, - "endLine": 79, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 79, - "column": 55, - "endLine": 79, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-paren-newline", - "message": "Unexpected newline before ')'.", - "line": 81, - "column": 3, - "endLine": 81, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 4, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 87, - "column": 4, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 88, - "column": 2, - "endLine": 89, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/all-rules-test/utils.js", - "messages": [ - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 57, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 61, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 57, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 53, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 55, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 44, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 8, - "column": 18, - "endLine": 8, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 8, - "column": 78, - "endLine": 8, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 86, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 15, - "column": 59, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 16, - "column": 10, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 16, - "column": 14, - "endLine": 16, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 34, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 34, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 34, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 22, - "column": 51, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 23, - "column": 47, - "endLine": 23, - "endColumn": 48 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'l' is too short (< 2).", - "line": 23, - "column": 47, - "endLine": 23, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 82, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 24, - "column": 22, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 48, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 17, - "endLine": 27, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 13, - "endLine": 29, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 11 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 29, - "column": 39, - "endLine": 29, - "endColumn": 79 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 29, - "column": 39, - "endLine": 29, - "endColumn": 79 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 29, - "column": 114, - "endLine": 30, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 30, - "column": 28, - "endLine": 30, - "endColumn": 42 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 30, - "column": 28, - "endLine": 30, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 30, - "column": 45, - "endLine": 30, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 68, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 31, - "column": 26, - "endLine": 31, - "endColumn": 56 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 31, - "column": 26, - "endLine": 31, - "endColumn": 110 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 31, - "column": 46, - "endLine": 31, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 31, - "column": 59, - "endLine": 31, - "endColumn": 99 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 110, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 32, - "column": 44, - "endLine": 32, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 52, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 48, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 33, - "column": 48, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 25, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 35, - "column": 11, - "endLine": 35, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 31, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 35, - "column": 31, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 37, - "column": 16, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 14, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 39, - "column": 9, - "endLine": 39, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 99, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 99, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 8, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 6, - "endLine": 42, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 4, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 49, - "column": 36, - "endLine": 49, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 49, - "column": 51, - "endLine": 50, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 50, - "column": 31, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 51, - "column": 5, - "endLine": 51, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 51, - "column": 82, - "endLine": 52, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 52, - "column": 11, - "endLine": 53, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 11, - "endLine": 53, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 54, - "column": 45, - "endLine": 54, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 54, - "column": 57, - "endLine": 55, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 55, - "column": 37, - "endLine": 56, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 56, - "column": 7, - "endLine": 56, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 121, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 56, - "column": 121, - "endLine": 57, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 57, - "column": 34, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 58, - "column": 7, - "endLine": 58, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 58, - "column": 120, - "endLine": 59, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 120, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 59, - "column": 6, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 60, - "column": 5, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 5, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 61, - "column": 2, - "endLine": 62, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/middleware.js", - "messages": [ - { - "ruleId": "dot-notation", - "message": "[\"i18n\"] is better written in dot notation.", - "line": 3, - "column": 12, - "endLine": 3, - "endColumn": 18 - }, - { - "ruleId": "no-unused-vars", - "message": "'req' is assigned a value but never used.", - "line": 4, - "column": 16, - "endLine": 4, - "endColumn": 19 - }, - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_CODE_KEY' is assigned a value but never used.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 24 - }, - { - "ruleId": "no-unneeded-ternary", - "message": "Unnecessary use of conditional expression for default assignment.", - "line": 38, - "column": 28, - "endLine": 38, - "endColumn": 62 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/options.js", - "messages": [ - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 2, - "column": 24, - "endLine": 2, - "endColumn": 25 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 6, - "column": 25, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/seo-head.js", - "messages": [ - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 19, - "column": 14, - "endLine": 19, - "endColumn": 15 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 41, - "column": 11, - "endLine": 41, - "endColumn": 23 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 81, - "column": 4, - "endLine": 81, - "endColumn": 5 - } - ] - }, - { - "filePath": "/output/nuxt-i18n/src/templates/utils.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'LOCALE_DOMAIN_KEY' is assigned a value but never used.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 24 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 16, - "column": 26, - "endLine": 16, - "endColumn": 27 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 35, - "column": 11, - "endLine": 35, - "endColumn": 24 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 39, - "column": 9, - "endLine": 39, - "endColumn": 21 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 51, - "column": 5, - "endLine": 51, - "endColumn": 17 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 56, - "column": 7, - "endLine": 56, - "endColumn": 19 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 58, - "column": 7, - "endLine": 58, - "endColumn": 19 - } - ] - }, - { - "filePath": "/output/nuxt-logrocket/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 32, - "column": 16, - "endLine": 32, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 33, - "column": 19, - "endLine": 33, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 36, - "column": 26, - "endLine": 36, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 40, - "column": 4 - } - ] - }, - { - "filePath": "/output/nuxt-logrocket/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxt-logrocket/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 23, - "endLine": 1, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 26, - "endLine": 2, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 50, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 55, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 7, - "column": 16, - "endLine": 7, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 7, - "column": 27, - "endLine": 7, - "endColumn": 28 - }, - { - "ruleId": "no-unused-vars", - "message": "'app' is defined but never used.", - "line": 7, - "column": 28, - "endLine": 7, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 7, - "column": 38, - "endLine": 7, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 50, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 8, - "column": 5, - "endLine": 8, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 9, - "column": 51, - "endLine": 9, - "endColumn": 63 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 10, - "column": 5, - "endLine": 10, - "endColumn": 55 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 10, - "column": 5, - "endLine": 11, - "endColumn": 52 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 11, - "column": 5, - "endLine": 11, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 12, - "column": 26, - "endLine": 12, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 12, - "column": 81, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 13, - "column": 9, - "endLine": 13, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 38, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 16, - "column": 5, - "endLine": 16, - "endColumn": 75 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 17, - "column": 16, - "endLine": 18, - "endColumn": 9 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 19, - "column": 9, - "endLine": 19, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 20, - "column": 32, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 22, - "column": 5, - "endLine": 22, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 23, - "column": 12, - "endLine": 23, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 23, - "column": 24, - "endLine": 23, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 36, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/no-extra-semi", - "message": "Unnecessary semicolon.", - "line": 24, - "column": 2, - "endLine": 24, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/nuxt-logrocket/lib/plugin.js", - "messages": [ - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 1, - "column": 34, - "endLine": 1, - "endColumn": 35 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 2, - "column": 42, - "endLine": 2, - "endColumn": 43 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 9, - "column": 63, - "endLine": 9, - "endColumn": 64 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 9 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 14, - "column": 37, - "endLine": 14, - "endColumn": 38 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 9 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 18, - "column": 56, - "endLine": 18, - "endColumn": 57 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 8.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 9 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 20, - "column": 31, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 23, - "column": 35, - "endLine": 23, - "endColumn": 36 - } - ] - }, - { - "filePath": "/output/nuxtent-module/.eslintrc.js", - "messages": [ - { - "ruleId": "unicorn/prefer-module", - "message": "Do not use \"module\".", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 7 - } - ] - }, - { - "filePath": "/output/nuxtent-module/lib/plugins/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-components.template.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 17, - "endLine": 2, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 22, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "no-unused-vars", - "message": "'interopDefault' is defined but never used.", - "line": 5, - "column": 3, - "endLine": 5, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 6, - "column": 8, - "endLine": 6, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 17, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 9, - "column": 48, - "endLine": 9, - "endColumn": 49 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 0 spaces.", - "line": 10, - "column": 3, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 0 spaces.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-paren-newline", - "message": "Unexpected newline before ')'.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/block-spacing", - "message": "Requires a space before '}'.", - "line": 12, - "column": 4, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 12, - "column": 4, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 4, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 6, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 2, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 17, - "column": 15, - "endLine": 17, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 17, - "column": 30, - "endLine": 17, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'name' found.", - "line": 18, - "column": 3, - "endLine": 18, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 18, - "column": 9, - "endLine": 18, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 19, - "column": 9, - "endLine": 19, - "endColumn": 10 - }, - { - "ruleId": "max-statements", - "message": "Method 'render' has too many statements (12). Maximum allowed is 10.", - "line": 19, - "column": 9, - "endLine": 42, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 25, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 20, - "column": 31, - "endLine": 20, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 33, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "prefer-destructuring", - "message": "Use object destructuring.", - "line": 21, - "column": 11, - "endLine": 21, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 25, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'props' found.", - "line": 24, - "column": 7, - "endLine": 26, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'on' should be before 'props'.", - "line": 27, - "column": 7, - "endLine": 27, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'on' found.", - "line": 27, - "column": 7, - "endLine": 27, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'domProps' should be before 'on'.", - "line": 28, - "column": 7, - "endLine": 28, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'domProps' found.", - "line": 28, - "column": 7, - "endLine": 28, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 28, - "column": 19, - "endLine": 28, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 29, - "column": 6, - "endLine": 30, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 30, - "column": 25, - "endLine": 30, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 35, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 30, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 61, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 46, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 34, - "column": 48, - "endLine": 34, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 60, - "endLine": 35, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 60, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 36, - "column": 59, - "endLine": 37, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 37, - "column": 32, - "endLine": 37, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 37, - "column": 44, - "endLine": 38, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 37, - "column": 44, - "endLine": 38, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 12, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "no-else-return", - "message": "Unnecessary 'else' after 'return'.", - "line": 38, - "column": 12, - "endLine": 41, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 43, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 40, - "column": 32, - "endLine": 40, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 40, - "column": 44, - "endLine": 41, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 44, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 6, - "endLine": 42, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'props' should be before 'render'.", - "line": 43, - "column": 3, - "endLine": 43, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'props' found.", - "line": 43, - "column": 3, - "endLine": 52, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'tag' found.", - "line": 44, - "column": 5, - "endLine": 47, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 45, - "column": 7, - "endLine": 45, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 46, - "column": 7, - "endLine": 46, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'default' found.", - "line": 46, - "column": 7, - "endLine": 46, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 46, - "column": 16, - "endLine": 46, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 46, - "column": 21, - "endLine": 46, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'body' should be before 'tag'.", - "line": 48, - "column": 5, - "endLine": 48, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'body' found.", - "line": 48, - "column": 5, - "endLine": 51, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 49, - "column": 7, - "endLine": 49, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 49, - "column": 21, - "endLine": 49, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'required' should be before 'type'.", - "line": 50, - "column": 7, - "endLine": 50, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'required' found.", - "line": 50, - "column": 7, - "endLine": 50, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/nuxtent-module/lib/plugins/all-rules-test/nuxtent-config.template.js", - "messages": [ - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'api' found.", - "line": 1, - "column": 36, - "endLine": 1, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 65, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 22, - "endLine": 3, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/nuxtent-module/lib/plugins/nuxtent-components.template.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'interopDefault' is defined but never used.", - "line": 5, - "column": 3, - "endLine": 5, - "endColumn": 17 - }, - { - "ruleId": "unicorn/no-array-for-each", - "message": "Use `for…of` instead of `.forEach(…)`.", - "line": 9, - "column": 25, - "endLine": 9, - "endColumn": 32 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 0 spaces.", - "line": 10, - "column": 3, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 0 spaces.", - "line": 12, - "column": 3, - "endLine": 12, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/nuxtent-module/lib/plugins/nuxtent-config.template.js", - "messages": [] - }, - { - "filePath": "/output/pwa-module/lib/icon/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/icon/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "func-names", - "message": "Unexpected unnamed async function.", - "line": 1, - "column": 16, - "endLine": 1, - "endColumn": 31 - }, - { - "ruleId": "require-await", - "message": "Async function has no 'await' expression.", - "line": 1, - "column": 16, - "endLine": 1, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 1, - "column": 45, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 53, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 3, - "column": 19, - "endLine": 3, - "endColumn": 23 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 3, - "column": 33, - "endLine": 3, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 40, - "endLine": 3, - "endColumn": 43 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 55, - "endLine": 3, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 57, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 4, - "column": 48, - "endLine": 4, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 4, - "column": 57, - "endLine": 4, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 4, - "column": 66, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 66, - "endLine": 5, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/icon/plugin.js", - "messages": [] - }, - { - "filePath": "/output/pwa-module/lib/onesignal/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/onesignal/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 1, - "column": 21, - "endLine": 1, - "endColumn": 62 - }, - { - "ruleId": "no-multi-assign", - "message": "Unexpected chained assignment.", - "line": 1, - "column": 21, - "endLine": 1, - "endColumn": 62 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 17, - "endLine": 3, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 3, - "column": 24, - "endLine": 3, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 3, - "column": 57, - "endLine": 3, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 3, - "column": 63, - "endLine": 3, - "endColumn": 64 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 3, - "column": 64, - "endLine": 3, - "endColumn": 65 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 5, - "column": 16, - "endLine": 5, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 5, - "column": 39, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 6, - "column": 10, - "endLine": 6, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 22, - "endLine": 6, - "endColumn": 23 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 6, - "column": 23, - "endLine": 6, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 33, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 33, - "endLine": 7, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/onesignal/plugin.js", - "messages": [ - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 1, - "column": 62, - "endLine": 1, - "endColumn": 63 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 3, - "column": 71, - "endLine": 3, - "endColumn": 72 - }, - { - "ruleId": "no-undef", - "message": "'OneSignal' is not defined.", - "line": 6, - "column": 23, - "endLine": 6, - "endColumn": 32 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/workbox/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/workbox/templates/all-rules-test/sw.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'importScripts' is not defined.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 1, - "column": 39, - "endLine": 1, - "endColumn": 40 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'i' is too short (< 2).", - "line": 1, - "column": 71, - "endLine": 1, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 101, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 3, - "column": 1, - "endLine": 5, - "endColumn": 54 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 7, - "column": 25, - "endLine": 7, - "endColumn": 27 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 9, - "column": 53, - "endLine": 9, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 9, - "column": 59, - "endLine": 9, - "endColumn": 60 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 9, - "column": 60, - "endLine": 9, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 66, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 12, - "column": 29, - "endLine": 12, - "endColumn": 31 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 14, - "column": 72, - "endLine": 14, - "endColumn": 73 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 14, - "column": 78, - "endLine": 14, - "endColumn": 79 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 14, - "column": 79, - "endLine": 14, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 85, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 28, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 27, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 43, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 37, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 33, - "endLine": 38, - "endColumn": 34 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 38, - "column": 33, - "endLine": 38, - "endColumn": 66 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 38, - "column": 33, - "endLine": 38, - "endColumn": 66 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 41, - "column": 1, - "endLine": 43, - "endColumn": 54 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 47, - "column": 75, - "endLine": 47, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 47, - "column": 81, - "endLine": 47, - "endColumn": 82 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 47, - "column": 82, - "endLine": 47, - "endColumn": 83 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 47, - "column": 88, - "endLine": 47, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 47, - "column": 129, - "endLine": 47, - "endColumn": 130 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 47, - "column": 135, - "endLine": 47, - "endColumn": 136 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 47, - "column": 136, - "endLine": 47, - "endColumn": 137 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 47, - "column": 142, - "endLine": 48, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 52, - "column": 33, - "endLine": 52, - "endColumn": 34 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 52, - "column": 33, - "endLine": 52, - "endColumn": 66 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 52, - "column": 33, - "endLine": 52, - "endColumn": 66 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 55, - "column": 1, - "endLine": 57, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 60, - "column": 35, - "endLine": 60, - "endColumn": 36 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'r' is too short (< 2).", - "line": 60, - "column": 35, - "endLine": 60, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 60, - "column": 40, - "endLine": 60, - "endColumn": 41 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 60, - "column": 44, - "endLine": 60, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 60, - "column": 108, - "endLine": 60, - "endColumn": 109 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 60, - "column": 113, - "endLine": 60, - "endColumn": 120 - }, - { - "ruleId": "@stylistic/function-call-spacing", - "message": "Unexpected whitespace between function name and paren.", - "line": 60, - "column": 132 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 60, - "column": 198, - "endLine": 60, - "endColumn": 199 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 217, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 65, - "column": 76, - "endLine": 65, - "endColumn": 77 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 65, - "column": 90, - "endLine": 66, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 3 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 66, - "column": 14, - "endLine": 66, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 67, - "column": 5, - "endLine": 67, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 67, - "column": 61, - "endLine": 68, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 67, - "column": 61, - "endLine": 68, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 72, - "column": 33, - "endLine": 72, - "endColumn": 34 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 72, - "column": 33, - "endLine": 72, - "endColumn": 66 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 72, - "column": 33, - "endLine": 72, - "endColumn": 66 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/workbox/templates/all-rules-test/workbox.js", - "messages": [ - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 1, - "column": 24, - "endLine": 1, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 1, - "column": 27, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "no-unsafe-negation", - "message": "Unexpected negating the left operand of 'in' operator.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 8, - "endLine": 2, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 2, - "column": 38, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 21, - "endLine": 3, - "endColumn": 73 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 74, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 3, - "column": 74, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 6, - "column": 10, - "endLine": 6, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 6, - "column": 18, - "endLine": 6, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 6, - "column": 76, - "endLine": 6, - "endColumn": 87 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 6, - "column": 76, - "endLine": 6, - "endColumn": 104 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 6, - "column": 90, - "endLine": 6, - "endColumn": 95 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 117, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 8, - "column": 54, - "endLine": 8, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 5, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 27, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 17, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 17, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 18, - "column": 3, - "endLine": 18, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 18, - "column": 10, - "endLine": 18, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/block-spacing", - "message": "Requires a space after '{'.", - "line": 18, - "column": 19, - "endLine": 18, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 18, - "column": 19, - "endLine": 18, - "endColumn": 20 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 18, - "column": 45, - "endLine": 18, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 18, - "column": 59, - "endLine": 18, - "endColumn": 87 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 18, - "column": 88, - "endLine": 18, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 95, - "endLine": 18, - "endColumn": 96 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 95, - "endLine": 18, - "endColumn": 96 - }, - { - "ruleId": "@stylistic/block-spacing", - "message": "Requires a space before '}'.", - "line": 18, - "column": 103, - "endLine": 18, - "endColumn": 104 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 18, - "column": 103, - "endLine": 18, - "endColumn": 104 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 105, - "endLine": 19, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/workbox/templates/sw.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'importScripts' is not defined.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 7, - "column": 25, - "endLine": 7, - "endColumn": 27 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "lodash-template/template-tag-spacing", - "message": "Expected 1 space before `%>`, but no spaces found.", - "line": 12, - "column": 29, - "endLine": 12, - "endColumn": 31 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 8 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 8 - }, - { - "ruleId": "brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 60, - "column": 40, - "endLine": 60, - "endColumn": 41 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 60, - "column": 44, - "endLine": 60, - "endColumn": 51 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 60, - "column": 113, - "endLine": 60, - "endColumn": 120 - }, - { - "ruleId": "func-call-spacing", - "message": "Unexpected whitespace between function name and paren.", - "line": 60, - "column": 148, - "endLine": 60, - "endColumn": 148 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 8 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required after '{'.", - "line": 65, - "column": 78, - "endLine": 65, - "endColumn": 79 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 65, - "column": 84, - "endLine": 65, - "endColumn": 85 - }, - { - "ruleId": "no-undef", - "message": "'workbox' is not defined.", - "line": 66, - "column": 14, - "endLine": 66, - "endColumn": 21 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required after '{'.", - "line": 66, - "column": 73, - "endLine": 66, - "endColumn": 74 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 66, - "column": 79, - "endLine": 66, - "endColumn": 80 - }, - { - "ruleId": "no-undef", - "message": "'caches' is not defined.", - "line": 67, - "column": 18, - "endLine": 67, - "endColumn": 24 - } - ] - }, - { - "filePath": "/output/pwa-module/lib/workbox/templates/workbox.js", - "messages": [ - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 1, - "column": 24, - "endLine": 1, - "endColumn": 25 - }, - { - "ruleId": "no-unsafe-negation", - "message": "Unexpected negating the left operand of 'in' operator.", - "line": 2, - "column": 7, - "endLine": 2, - "endColumn": 23 - }, - { - "ruleId": "block-spacing", - "message": "Requires a space after '{'.", - "line": 18, - "column": 19, - "endLine": 18, - "endColumn": 20 - }, - { - "ruleId": "block-spacing", - "message": "Requires a space before '}'.", - "line": 18, - "column": 103, - "endLine": 18, - "endColumn": 104 - } - ] - }, - { - "filePath": "/output/recaptcha-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 12, - "column": 16, - "endLine": 12, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 13, - "column": 19, - "endLine": 13, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 10 spaces but found 12.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 13 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 10 spaces but found 12.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 13 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 12, - "endLine": 20, - "endColumn": 13 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 24, - "column": 26, - "endLine": 24, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 28, - "column": 4 - } - ] - }, - { - "filePath": "/output/recaptcha-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/recaptcha-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 1, - "column": 9, - "endLine": 1, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 1, - "column": 22, - "endLine": 1, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 30, - "endLine": 1, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 38, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 17, - "endLine": 2, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 22, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 4, - "column": 17, - "endLine": 4, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 58, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 17, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "max-statements", - "message": "Constructor has too many statements (11). Maximum allowed is 10.", - "line": 7, - "column": 15, - "endLine": 26, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 7, - "column": 17, - "endLine": 7, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 7, - "column": 55, - "endLine": 7, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 59, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 19, - "endLine": 9, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 9, - "column": 23, - "endLine": 9, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 58, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 9, - "column": 58, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 12, - "column": 19, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 13, - "column": 23, - "endLine": 13, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 62, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 13, - "column": 62, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 16, - "column": 5, - "endLine": 16, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 16, - "column": 24, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 18, - "column": 5, - "endLine": 18, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 26, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 19, - "column": 5, - "endLine": 19, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 24, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 31, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 22, - "column": 33, - "endLine": 22, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 37, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 27, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 27, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 25, - "column": 27, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 14, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 29, - "column": 9, - "endLine": 29, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 29, - "column": 22, - "endLine": 30, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 7 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 30, - "column": 7, - "endLine": 30, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 26, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 32, - "column": 14, - "endLine": 32, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 32, - "column": 19, - "endLine": 32, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 32, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 33, - "column": 14, - "endLine": 33, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 33, - "column": 20, - "endLine": 33, - "endColumn": 21 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 33, - "column": 25, - "endLine": 33, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 39, - "endLine": 34, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 35, - "column": 58, - "endLine": 35, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 36, - "column": 9, - "endLine": 36, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 36, - "column": 17, - "endLine": 36, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 36, - "column": 47, - "endLine": 36, - "endColumn": 58 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 36, - "column": 60, - "endLine": 37, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 27, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 39, - "column": 25, - "endLine": 39, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 39, - "column": 60, - "endLine": 40, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 39, - "column": 60, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 33, - "endLine": 43, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 43, - "column": 32, - "endLine": 44, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 32, - "endLine": 44, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 44, - "column": 8, - "endLine": 45, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 45, - "column": 6, - "endLine": 46, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 3 - }, - { - "ruleId": "consistent-return", - "message": "Expected to return a value at the end of async method 'execute'.", - "line": 48, - "column": 9, - "endLine": 48, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 48, - "column": 26, - "endLine": 49, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 49, - "column": 9, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 50, - "column": 24, - "endLine": 51, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 52, - "column": 11, - "endLine": 52, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 35, - "endLine": 53, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 55, - "column": 12, - "endLine": 55, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 55, - "column": 19, - "endLine": 55, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 10, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 56, - "column": 10, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 57, - "column": 8, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 21, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 59, - "column": 23, - "endLine": 59, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 60, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 59, - "column": 60, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 60, - "column": 6, - "endLine": 61, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 61, - "column": 1, - "endLine": 61, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 63, - "column": 18, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 64, - "column": 45, - "endLine": 65, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 65, - "column": 11, - "endLine": 65, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 65, - "column": 35, - "endLine": 66, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 66, - "column": 57, - "endLine": 67, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 68, - "column": 23, - "endLine": 69, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 11 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 69, - "column": 11, - "endLine": 69, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 69, - "column": 31, - "endLine": 69, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 69, - "column": 51, - "endLine": 69, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 69, - "column": 61, - "endLine": 70, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 70, - "column": 1, - "endLine": 70, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 70, - "column": 28, - "endLine": 71, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 70, - "column": 28, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 71, - "column": 16, - "endLine": 72, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 72, - "column": 32, - "endLine": 72, - "endColumn": 51 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 72, - "column": 51, - "endLine": 73, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 11 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 74, - "column": 11, - "endLine": 74, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 74, - "column": 31, - "endLine": 74, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 74, - "column": 49, - "endLine": 74, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 74, - "column": 63, - "endLine": 75, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 75, - "column": 1, - "endLine": 75, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 75, - "column": 31, - "endLine": 76, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 75, - "column": 31, - "endLine": 76, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 76, - "column": 10, - "endLine": 77, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 77, - "column": 8, - "endLine": 78, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 78, - "column": 7, - "endLine": 79, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 78, - "column": 7, - "endLine": 79, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 3 - }, - { - "ruleId": "max-statements", - "message": "Method 'init' has too many statements (17). Maximum allowed is 10.", - "line": 81, - "column": 8, - "endLine": 126, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 81, - "column": 11, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 82, - "column": 9, - "endLine": 82, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 82, - "column": 22, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 83, - "column": 1, - "endLine": 83, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 83, - "column": 31, - "endLine": 84, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 83, - "column": 31, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 86, - "column": 5, - "endLine": 86, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 86, - "column": 40, - "endLine": 87, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 87, - "column": 5, - "endLine": 87, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'script' found.", - "line": 88, - "column": 7, - "endLine": 88, - "endColumn": 47 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 88, - "column": 38, - "endLine": 88, - "endColumn": 46 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 89, - "column": 1, - "endLine": 89, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'style' found.", - "line": 89, - "column": 7, - "endLine": 89, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 89, - "column": 37, - "endLine": 89, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 90, - "column": 1, - "endLine": 90, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 90, - "column": 6, - "endLine": 91, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 92, - "column": 1, - "endLine": 92, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 92, - "column": 12, - "endLine": 92, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 92, - "column": 26, - "endLine": 92, - "endColumn": 27 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_elements'.", - "line": 92, - "column": 31, - "endLine": 92, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 92, - "column": 45, - "endLine": 93, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 94, - "column": 1, - "endLine": 94, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 94, - "column": 29, - "endLine": 94, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 94, - "column": 37, - "endLine": 94, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 94, - "column": 44, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 95, - "column": 1, - "endLine": 95, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 95, - "column": 40, - "endLine": 96, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 96, - "column": 1, - "endLine": 96, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 96, - "column": 23, - "endLine": 96, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 96, - "column": 64, - "endLine": 97, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 96, - "column": 64, - "endLine": 97, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 97, - "column": 1, - "endLine": 97, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 97, - "column": 7, - "endLine": 98, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 99, - "column": 1, - "endLine": 99, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 99, - "column": 25, - "endLine": 99, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 99, - "column": 33, - "endLine": 99, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 99, - "column": 34, - "endLine": 99, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 99, - "column": 37, - "endLine": 100, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 100, - "column": 1, - "endLine": 100, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 100, - "column": 25, - "endLine": 100, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 100, - "column": 33, - "endLine": 100, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 100, - "column": 34, - "endLine": 100, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 100, - "column": 37, - "endLine": 101, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 102, - "column": 1, - "endLine": 102, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 2.", - "line": 102, - "column": 26, - "endLine": 102, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 102, - "column": 29, - "endLine": 103, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 103, - "column": 1, - "endLine": 103, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 103, - "column": 27, - "endLine": 103, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 103, - "column": 33, - "endLine": 103, - "endColumn": 34 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 103, - "column": 34, - "endLine": 103, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 103, - "column": 44, - "endLine": 103, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 103, - "column": 67, - "endLine": 104, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 103, - "column": 67, - "endLine": 104, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 104, - "column": 1, - "endLine": 104, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 104, - "column": 12, - "endLine": 105, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 105, - "column": 1, - "endLine": 105, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 105, - "column": 27, - "endLine": 105, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 105, - "column": 33, - "endLine": 105, - "endColumn": 34 - }, - { - "ruleId": "prefer-template", - "message": "Unexpected string concatenation.", - "line": 105, - "column": 34, - "endLine": 105, - "endColumn": 69 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 105, - "column": 44, - "endLine": 105, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 105, - "column": 70, - "endLine": 106, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 105, - "column": 70, - "endLine": 106, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 106, - "column": 1, - "endLine": 106, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 108, - "column": 1, - "endLine": 108, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 108, - "column": 38, - "endLine": 109, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 110, - "column": 1, - "endLine": 110, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 110, - "column": 50, - "endLine": 110, - "endColumn": 64 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 110, - "column": 70, - "endLine": 110, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 110, - "column": 90, - "endLine": 110, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 110, - "column": 97, - "endLine": 111, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 111, - "column": 1, - "endLine": 111, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 111, - "column": 45, - "endLine": 111, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 111, - "column": 65, - "endLine": 111, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 111, - "column": 85, - "endLine": 112, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 112, - "column": 1, - "endLine": 112, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 112, - "column": 43, - "endLine": 112, - "endColumn": 57 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 112, - "column": 63, - "endLine": 112, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 112, - "column": 81, - "endLine": 112, - "endColumn": 82 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 112, - "column": 82, - "endLine": 112, - "endColumn": 101 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 112, - "column": 102, - "endLine": 113, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 114, - "column": 1, - "endLine": 114, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 114, - "column": 5, - "endLine": 114, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 114, - "column": 31, - "endLine": 114, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 114, - "column": 42, - "endLine": 115, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 115, - "column": 1, - "endLine": 115, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 115, - "column": 31, - "endLine": 115, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 115, - "column": 38, - "endLine": 115, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 115, - "column": 45, - "endLine": 116, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 116, - "column": 1, - "endLine": 116, - "endColumn": 9 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 3.", - "line": 116, - "column": 30, - "endLine": 116, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 116, - "column": 51, - "endLine": 117, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 117, - "column": 1, - "endLine": 117, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 117, - "column": 29, - "endLine": 117, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 117, - "column": 66, - "endLine": 118, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 118, - "column": 1, - "endLine": 118, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 118, - "column": 43, - "endLine": 119, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 118, - "column": 43, - "endLine": 119, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 119, - "column": 1, - "endLine": 119, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 121, - "column": 1, - "endLine": 121, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 121, - "column": 41, - "endLine": 122, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 121, - "column": 41, - "endLine": 122, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 122, - "column": 1, - "endLine": 122, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 122, - "column": 9, - "endLine": 123, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 122, - "column": 9, - "endLine": 123, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 123, - "column": 1, - "endLine": 123, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 123, - "column": 7, - "endLine": 124, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 125, - "column": 1, - "endLine": 125, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_ready'.", - "line": 125, - "column": 12, - "endLine": 125, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 125, - "column": 23, - "endLine": 126, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 125, - "column": 23, - "endLine": 126, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 126, - "column": 1, - "endLine": 126, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 128, - "column": 1, - "endLine": 128, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 128, - "column": 24, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 129, - "column": 1, - "endLine": 129, - "endColumn": 5 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_eventBus'.", - "line": 129, - "column": 12, - "endLine": 129, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 129, - "column": 36, - "endLine": 129, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 129, - "column": 46, - "endLine": 130, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 129, - "column": 46, - "endLine": 130, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 130, - "column": 1, - "endLine": 130, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 130, - "column": 4, - "endLine": 131, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 133, - "column": 16, - "endLine": 133, - "endColumn": 25 - }, - { - "ruleId": "id-length", - "message": "Identifier name '_' is too short (< 2).", - "line": 133, - "column": 26, - "endLine": 133, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 133, - "column": 37, - "endLine": 134, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 134, - "column": 1, - "endLine": 134, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 134, - "column": 17, - "endLine": 134, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 134, - "column": 29, - "endLine": 134, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 134, - "column": 43, - "endLine": 134, - "endColumn": 60 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 134, - "column": 62, - "endLine": 135, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 135, - "column": 1, - "endLine": 135, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 135, - "column": 10, - "endLine": 135, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 135, - "column": 22, - "endLine": 135, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 135, - "column": 64, - "endLine": 136, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 135, - "column": 64, - "endLine": 136, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/recaptcha-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 2, - "column": 8, - "endLine": 2, - "endColumn": 11 - }, - { - "ruleId": "arrow-parens", - "message": "Unexpected parentheses around single function argument having a body with no curly braces.", - "line": 110, - "column": 40, - "endLine": 110, - "endColumn": 45 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 114, - "column": 31, - "endLine": 114, - "endColumn": 38 - }, - { - "ruleId": "vue/component-definition-name-casing", - "message": "Property name \"recaptcha\" is not PascalCase.", - "line": 134, - "column": 17, - "endLine": 134, - "endColumn": 28 - }, - { - "ruleId": "vue/multi-word-component-names", - "message": "Component name \"recaptcha\" should always be multi-word.", - "line": 134, - "column": 17, - "endLine": 134, - "endColumn": 28 - } - ] - }, - { - "filePath": "/output/router-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 8, - "column": 16, - "endLine": 8, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 9, - "column": 19, - "endLine": 9, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 16, - "column": 26, - "endLine": 16, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 20, - "column": 4 - } - ] - }, - { - "filePath": "/output/router-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/router-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 1, - "column": 9, - "endLine": 1, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 1, - "column": 44, - "endLine": 1, - "endColumn": 45 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 83, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'multiple' syntax before 'single' syntax.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 85 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 4, - "column": 9, - "endLine": 4, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 4, - "column": 60, - "endLine": 4, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 4, - "column": 68, - "endLine": 4, - "endColumn": 85 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 85, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 33, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 27, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 10, - "column": 8, - "endLine": 12, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 10, - "column": 29, - "endLine": 10, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 42, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 11, - "column": 40, - "endLine": 11, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 11, - "column": 61, - "endLine": 11, - "endColumn": 62 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 11, - "column": 76, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 76, - "endLine": 12, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/router-module/lib/plugin.js", - "messages": [ - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 10, - "column": 29, - "endLine": 10, - "endColumn": 30 - } - ] - }, - { - "filePath": "/output/sentry-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/sentry-module/lib/all-rules-test/sentry.client.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'VueLib' is defined but never used.", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 20, - "endLine": 1, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 25, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Expected 'all' syntax before 'single' syntax.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 25, - "endLine": 2, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 42, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 3, - "column": 9, - "endLine": 3, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 3, - "column": 52, - "endLine": 3, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/newline-per-chained-call", - "message": "Expected line break before `.join`.", - "line": 3, - "column": 79, - "endLine": 3, - "endColumn": 84 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 3, - "column": 93, - "endLine": 3, - "endColumn": 94 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 3, - "column": 101, - "endLine": 3, - "endColumn": 123 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 3, - "column": 123, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 5, - "column": 16, - "endLine": 5, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 5, - "column": 39, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 33, - "endLine": 6, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 6, - "column": 67, - "endLine": 6, - "endColumn": 68 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 8, - "column": 49, - "endLine": 8, - "endColumn": 53 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 9, - "column": 7, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 55, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 10, - "column": 7, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 6 spaces but found 4 spaces.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 11, - "column": 76, - "endLine": 12, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 9 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 13, - "column": 7, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 13, - "column": 61, - "endLine": 13, - "endColumn": 67 - }, - { - "ruleId": "@stylistic/no-confusing-arrow", - "message": "Arrow function used ambiguously with a conditional expression.", - "line": 13, - "column": 61, - "endLine": 14, - "endColumn": 112 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 13, - "column": 71, - "endLine": 14, - "endColumn": 112 - }, - { - "ruleId": "@stylistic/operator-linebreak", - "message": "'?' should be placed at the beginning of the line.", - "line": 13, - "column": 113, - "endLine": 13, - "endColumn": 114 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 6 spaces but found 4 spaces.", - "line": 14, - "column": 7, - "endLine": 14, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 14, - "column": 11, - "endLine": 14, - "endColumn": 64 - }, - { - "ruleId": "no-undef", - "message": "'serializeFunction' is not defined.", - "line": 14, - "column": 24, - "endLine": 14, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/newline-per-chained-call", - "message": "Expected line break before `.join`.", - "line": 14, - "column": 113, - "endLine": 14, - "endColumn": 118 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 127, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 15, - "column": 7, - "endLine": 15, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/newline-per-chained-call", - "message": "Expected line break before `.join`.", - "line": 15, - "column": 9, - "endLine": 15, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 17, - "column": 5, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "line-comment-position", - "message": "Expected comment to be above code.", - "line": 19, - "column": 34, - "endLine": 19, - "endColumn": 54 - }, - { - "ruleId": "no-inline-comments", - "message": "Unexpected comment inline with code.", - "line": 19, - "column": 34, - "endLine": 19, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 23, - "column": 10, - "endLine": 23, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 23, - "column": 19, - "endLine": 23, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 27, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 23, - "column": 27, - "endLine": 24, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/sentry-module/lib/sentry.client.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "no-unused-vars", - "message": "'VueLib' is defined but never used.", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 14 - }, - { - "ruleId": "arrow-parens", - "message": "Expected parentheses around arrow function argument having a body with curly braces.", - "line": 8, - "column": 49, - "endLine": 8, - "endColumn": 53 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 9, - "column": 7, - "endLine": 9, - "endColumn": 9 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 10, - "column": 7, - "endLine": 10, - "endColumn": 9 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 6 spaces but found 4 spaces.", - "line": 11, - "column": 7, - "endLine": 11, - "endColumn": 11 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 9 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 4 spaces but found 2 spaces.", - "line": 13, - "column": 7, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "operator-linebreak", - "message": "'?' should be placed at the beginning of the line.", - "line": 13, - "column": 113, - "endLine": 13, - "endColumn": 114 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 6 spaces but found 4 spaces.", - "line": 14, - "column": 7, - "endLine": 14, - "endColumn": 11 - }, - { - "ruleId": "multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 14, - "column": 11, - "endLine": 14, - "endColumn": 64 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected relative indentation of 2 spaces but found 0 spaces.", - "line": 15, - "column": 7, - "endLine": 15, - "endColumn": 7 - } - ] - }, - { - "filePath": "/output/svg-sprite-module/.eslintrc.js", - "messages": [ - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 7 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 14, - "column": 26, - "endLine": 14, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 18, - "column": 16, - "endLine": 18, - "endColumn": 22 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 9 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 19, - "column": 19, - "endLine": 19, - "endColumn": 67 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 11 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 8 spaces but found 10.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 11 - }, - { - "ruleId": "comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 26, - "endLine": 26, - "endColumn": 27 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 6 spaces but found 8.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 9 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 4 spaces but found 6.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 3 - }, - { - "ruleId": "eol-last", - "message": "Newline required at end of file but not found.", - "line": 30, - "column": 4 - } - ] - }, - { - "filePath": "/output/svg-sprite-module/lib/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/svg-sprite-module/lib/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 2, - "column": 9, - "endLine": 2, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 2, - "column": 19, - "endLine": 2, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 27, - "endLine": 2, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 54, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "func-style", - "message": "Expected a function expression.", - "line": 4, - "column": 1, - "endLine": 9, - "endColumn": 2 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 4, - "column": 30, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 6, - "column": 5, - "endLine": 6, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 7, - "column": 5, - "endLine": 7, - "endColumn": 6 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 7, - "column": 14, - "endLine": 7, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 7, - "column": 23, - "endLine": 7, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 7, - "column": 24, - "endLine": 7, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 8, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "require-unicode-regexp", - "message": "Use the 'u' flag.", - "line": 8, - "column": 14, - "endLine": 8, - "endColumn": 27 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 8, - "column": 28, - "endLine": 8, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 8, - "column": 29, - "endLine": 8, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 33, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 33, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 11, - "column": 25, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 12, - "column": 10, - "endLine": 12, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 12, - "column": 23, - "endLine": 12, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 12, - "column": 32, - "endLine": 13, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 3 - }, - { - "ruleId": "no-undef", - "message": "'relativeToBuild' is not defined.", - "line": 13, - "column": 23, - "endLine": 13, - "endColumn": 38 - }, - { - "ruleId": "no-underscore-dangle", - "message": "Unexpected dangling '_' in '_output'.", - "line": 13, - "column": 39, - "endLine": 13, - "endColumn": 54 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 13, - "column": 72, - "endLine": 13, - "endColumn": 78 - }, - { - "ruleId": "@stylistic/indent-binary-ops", - "message": "Expected indentation of 4 spaces", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 39, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 39, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 17, - "column": 25, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 18, - "column": 15, - "endLine": 18, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 18, - "column": 35, - "endLine": 18, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 18, - "column": 39, - "endLine": 19, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 20, - "column": 14, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 18, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 22, - "column": 44, - "endLine": 23, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 22, - "column": 44, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 28, - "column": 1, - "endLine": 28, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 28, - "column": 4, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 4, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'name' found.", - "line": 33, - "column": 3, - "endLine": 33, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 33, - "column": 9, - "endLine": 33, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'functional' should be before 'name'.", - "line": 34, - "column": 3, - "endLine": 34, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'functional' found.", - "line": 34, - "column": 3, - "endLine": 34, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'props' found.", - "line": 35, - "column": 3, - "endLine": 57, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'name' found.", - "line": 36, - "column": 5, - "endLine": 39, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 37, - "column": 7, - "endLine": 37, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'required' should be before 'type'.", - "line": 38, - "column": 7, - "endLine": 38, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'required' found.", - "line": 38, - "column": 7, - "endLine": 38, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'title' found.", - "line": 40, - "column": 5, - "endLine": 43, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 41, - "column": 7, - "endLine": 41, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 42, - "column": 7, - "endLine": 42, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'default' found.", - "line": 42, - "column": 7, - "endLine": 42, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 5 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'desc' should be before 'title'.", - "line": 44, - "column": 5, - "endLine": 44, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'desc' found.", - "line": 44, - "column": 5, - "endLine": 47, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 45, - "column": 1, - "endLine": 45, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 45, - "column": 7, - "endLine": 45, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 46, - "column": 7, - "endLine": 46, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'default' found.", - "line": 46, - "column": 7, - "endLine": 46, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 48, - "column": 1, - "endLine": 48, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'viewBox' found.", - "line": 48, - "column": 5, - "endLine": 56, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 49, - "column": 1, - "endLine": 49, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'type' found.", - "line": 49, - "column": 7, - "endLine": 49, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 50, - "column": 1, - "endLine": 50, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'default' should be before 'type'.", - "line": 50, - "column": 7, - "endLine": 50, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'default' found.", - "line": 50, - "column": 7, - "endLine": 50, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 51, - "column": 1, - "endLine": 51, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 25, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 52, - "column": 28, - "endLine": 52, - "endColumn": 31 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'v' is too short (< 2).", - "line": 52, - "column": 40, - "endLine": 52, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 46, - "endLine": 53, - "endColumn": 11 - }, - { - "ruleId": "arrow-body-style", - "message": "Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.", - "line": 52, - "column": 46, - "endLine": 54, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 20 spaces but found 10.", - "line": 53, - "column": 1, - "endLine": 53, - "endColumn": 11 - }, - { - "ruleId": "radix", - "message": "Missing radix parameter.", - "line": 53, - "column": 25, - "endLine": 53, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 53, - "column": 37, - "endLine": 54, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 53, - "column": 37, - "endLine": 54, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 54, - "column": 1, - "endLine": 54, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 54, - "column": 11, - "endLine": 55, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 54, - "column": 11, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 55, - "column": 1, - "endLine": 55, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 57, - "column": 1, - "endLine": 57, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 3 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'h' is too short (< 2).", - "line": 58, - "column": 11, - "endLine": 58, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 58, - "column": 15, - "endLine": 58, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 58, - "column": 27, - "endLine": 58, - "endColumn": 28 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 58, - "column": 31, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 37, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 31, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 62, - "column": 19, - "endLine": 62, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 62, - "column": 25, - "endLine": 62, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 63, - "column": 1, - "endLine": 63, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'attrs' found.", - "line": 63, - "column": 7, - "endLine": 68, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 64, - "column": 1, - "endLine": 64, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 65, - "column": 1, - "endLine": 65, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'href' found.", - "line": 65, - "column": 9, - "endLine": 65, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 66, - "column": 1, - "endLine": 66, - "endColumn": 9 - }, - { - "ruleId": "capitalized-comments", - "message": "Comments should not begin with a lowercase character.", - "line": 66, - "column": 9, - "endLine": 66, - "endColumn": 89 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 67, - "column": 9, - "endLine": 67, - "endColumn": 21 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 68, - "column": 1, - "endLine": 68, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 69, - "column": 1, - "endLine": 69, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 69, - "column": 7, - "endLine": 70, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 71, - "column": 1, - "endLine": 71, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 71, - "column": 19, - "endLine": 71, - "endColumn": 30 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 71, - "column": 19, - "endLine": 71, - "endColumn": 63 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 71, - "column": 33, - "endLine": 71, - "endColumn": 56 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 71, - "column": 35, - "endLine": 71, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 71, - "column": 43, - "endLine": 71, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 71, - "column": 63, - "endLine": 72, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 72, - "column": 1, - "endLine": 72, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 72, - "column": 18, - "endLine": 72, - "endColumn": 28 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 72, - "column": 18, - "endLine": 72, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 72, - "column": 31, - "endLine": 72, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 72, - "column": 33, - "endLine": 72, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 72, - "column": 40, - "endLine": 72, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 72, - "column": 59, - "endLine": 73, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 74, - "column": 1, - "endLine": 74, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 74, - "column": 12, - "endLine": 74, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 74, - "column": 19, - "endLine": 74, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 74, - "column": 28, - "endLine": 75, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 76, - "column": 1, - "endLine": 76, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 77, - "column": 1, - "endLine": 77, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 78, - "column": 1, - "endLine": 78, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'attrs' should be before 'class'.", - "line": 78, - "column": 7, - "endLine": 78, - "endColumn": 12 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'attrs' found.", - "line": 78, - "column": 7, - "endLine": 81, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 79, - "column": 1, - "endLine": 79, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'xmlns' found.", - "line": 79, - "column": 9, - "endLine": 79, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 79, - "column": 16, - "endLine": 79, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 80, - "column": 1, - "endLine": 80, - "endColumn": 9 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'viewBox' should be before 'xmlns'.", - "line": 80, - "column": 9, - "endLine": 80, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'viewBox' found.", - "line": 80, - "column": 9, - "endLine": 80, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 81, - "column": 1, - "endLine": 81, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 82, - "column": 1, - "endLine": 82, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 82, - "column": 6, - "endLine": 83, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 84, - "column": 1, - "endLine": 84, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-paren-newline", - "message": "Expected newline after '('.", - "line": 84, - "column": 13, - "endLine": 84, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 84, - "column": 14, - "endLine": 84, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 85, - "column": 1, - "endLine": 85, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 85, - "column": 22, - "endLine": 85, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 86, - "column": 1, - "endLine": 86, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/array-bracket-spacing", - "message": "There should be no space after '['.", - "line": 86, - "column": 8, - "endLine": 86, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 86, - "column": 15, - "endLine": 86, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 86, - "column": 21, - "endLine": 86, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/array-bracket-spacing", - "message": "There should be no space before ']'.", - "line": 86, - "column": 25, - "endLine": 86, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 87, - "column": 1, - "endLine": 87, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 87, - "column": 6, - "endLine": 88, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 87, - "column": 6, - "endLine": 88, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 88, - "column": 1, - "endLine": 88, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 89, - "column": 2, - "endLine": 90, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 91, - "column": 28, - "endLine": 91, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 91, - "column": 37, - "endLine": 92, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/svg-sprite-module/lib/plugin.js", - "messages": [ - { - "ruleId": "import/default", - "message": "No default export found in imported module \"vue\".", - "line": 1, - "column": 8, - "endLine": 1, - "endColumn": 11 - }, - { - "ruleId": "no-undef", - "message": "'relativeToBuild' is not defined.", - "line": 13, - "column": 23, - "endLine": 13, - "endColumn": 38 - }, - { - "ruleId": "array-bracket-spacing", - "message": "There should be no space after '['.", - "line": 86, - "column": 8, - "endLine": 86, - "endColumn": 9 - }, - { - "ruleId": "array-bracket-spacing", - "message": "There should be no space before ']'.", - "line": 86, - "column": 25, - "endLine": 86, - "endColumn": 26 - } - ] - }, - { - "filePath": "/output/vuetify-module/.eslintrc.js", - "messages": [ - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 3, - "column": 13, - "endLine": 3, - "endColumn": 47 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 6, - "column": 14, - "endLine": 6, - "endColumn": 20 - }, - { - "ruleId": "quotes", - "message": "Strings must use singlequote.", - "line": 7, - "column": 17, - "endLine": 7, - "endColumn": 65 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 18, - "column": 2, - "endLine": 18, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/vuetify-module/src/templates/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/vuetify-module/src/templates/all-rules-test/options.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'serializeFunction' is not defined.", - "line": 1, - "column": 20, - "endLine": 1, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 49, - "endLine": 2, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/vuetify-module/src/templates/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 2, - "column": 26, - "endLine": 2, - "endColumn": 43 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 2, - "column": 26, - "endLine": 2, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 2, - "column": 46, - "endLine": 2, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 75, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 5, - "column": 4, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'key' found.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 5, - "column": 24, - "endLine": 5, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'location' found.", - "line": 5, - "column": 24, - "endLine": 5, - "endColumn": 47 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 6, - "column": 4, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'key' found.", - "line": 6, - "column": 5, - "endLine": 6, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 6, - "column": 25, - "endLine": 6, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'location' found.", - "line": 6, - "column": 25, - "endLine": 6, - "endColumn": 48 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 7, - "column": 4, - "endLine": 7, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'key' found.", - "line": 7, - "column": 5, - "endLine": 7, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 7, - "column": 24, - "endLine": 7, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'location' found.", - "line": 7, - "column": 24, - "endLine": 7, - "endColumn": 58 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 2, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 11, - "column": 75, - "endLine": 11, - "endColumn": 76 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 13, - "column": 9, - "endLine": 13, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 13, - "column": 54, - "endLine": 13, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 13, - "column": 83, - "endLine": 14, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 32, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 22, - "column": 17, - "endLine": 22, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 0.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 24, - "column": 23, - "endLine": 24, - "endColumn": 26 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 24, - "column": 96, - "endLine": 24, - "endColumn": 97 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 6 spaces.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 25, - "column": 7, - "endLine": 25, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 25, - "column": 12, - "endLine": 25, - "endColumn": 15 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 6 spaces.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/dot-location", - "message": "Expected dot to be on same line as object.", - "line": 26, - "column": 7, - "endLine": 26, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 28, - "column": 3, - "endLine": 29, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 25, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 31, - "column": 26, - "endLine": 31, - "endColumn": 55 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 31, - "column": 26, - "endLine": 31, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 31, - "column": 45, - "endLine": 31, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 31, - "column": 58, - "endLine": 31, - "endColumn": 70 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 80, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 0.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 3 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 34, - "column": 3, - "endLine": 34, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 52, - "endLine": 35, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 69, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 0.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 46, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 40, - "column": 28, - "endLine": 41, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 35, - "endLine": 42, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 41, - "column": 35, - "endLine": 42, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 2, - "endLine": 43, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/vuetify-module/src/templates/options.js", - "messages": [] - }, - { - "filePath": "/output/vuetify-module/src/templates/plugin.js", - "messages": [ - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 3 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 5, - "column": 47, - "endLine": 5, - "endColumn": 48 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 3 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 6, - "column": 48, - "endLine": 6, - "endColumn": 49 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "object-curly-spacing", - "message": "A space is required before '}'.", - "line": 7, - "column": 58, - "endLine": 7, - "endColumn": 59 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 0 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 6 spaces but found 4 spaces.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 5 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 2 spaces.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 3 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 1 - }, - { - "ruleId": "import/default", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/namespace", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/no-named-as-default", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "import/no-named-as-default-member", - "message": "Parse errors in imported module './options': Unexpected token %= (1:17)", - "line": 20, - "column": 21, - "endLine": 20, - "endColumn": 32 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 0.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 6 spaces.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 4 spaces but found 6 spaces.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 7 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 0.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 0.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 1 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/.eslintrc.js deleted file mode 100644 index d0b2d7cc..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = { - root: true, - extends: [ - '@nuxtjs' - ], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/plugin.js deleted file mode 100644 index e753a37b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createRouter as customCreateRouter } from '<%= options.routerFilePath %>' - -<% if (options.keepDefaultRouter) { %> -import { createRouter as createDefaultRouter, routerOptions } from './defaultRouter' -<% } else { %> -const createDefaultRouter = null -const routerOptions = null -<% } %> - -export function createRouter(ssrContext) { - return customCreateRouter(ssrContext, createDefaultRouter, routerOptions) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/plugin.js deleted file mode 100644 index e753a37b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/router-module/lib/plugin.js +++ /dev/null @@ -1,12 +0,0 @@ -import { createRouter as customCreateRouter } from '<%= options.routerFilePath %>' - -<% if (options.keepDefaultRouter) { %> -import { createRouter as createDefaultRouter, routerOptions } from './defaultRouter' -<% } else { %> -const createDefaultRouter = null -const routerOptions = null -<% } %> - -export function createRouter(ssrContext) { - return customCreateRouter(ssrContext, createDefaultRouter, routerOptions) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/.eslintrc b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/.eslintrc deleted file mode 100644 index 37579354..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/.eslintrc +++ /dev/null @@ -1,31 +0,0 @@ -{ - "root": true, - "extends": ["@nuxtjs", "plugin:lodash-template/base"], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "rules": { - "lodash-template/no-empty-template-tag": "error", - "lodash-template/no-invalid-template-interpolation": "error", - "lodash-template/no-semi-in-template-interpolation": "error", - "lodash-template/no-irregular-whitespace": "error", - "lodash-template/no-multi-spaces-in-scriptlet": "error", - "lodash-template/scriptlet-indent": "error", - "lodash-template/template-tag-spacing": "error" - }, - "parserOptions": { - "parser": "vue-eslint-parser", - "sourceType": "module", - "parserOptions": { - "ecmaVersion": 2019 - }, - }, - "globals": { - "options": true, - "serialize": true, - "serializeFunction": true - } - } - ] -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/sentry.client.js deleted file mode 100644 index 0e67143f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/all-rules-test/sentry.client.js +++ /dev/null @@ -1,24 +0,0 @@ -import VueLib from 'vue' -import * as Sentry from '@sentry/browser' -import { <%= Object.keys(options.integrations).map(integration => integration).join(', ') %> } from '@sentry/integrations' - -export default function (ctx, inject) { - const opts = Object.assign({}, <%= serialize(options.config) %>, { - integrations: [ - <%= Object.keys(options.integrations).map(name => { - const integration = options.integrations[name] - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})` - } - return `new ${name}({${Object.keys(integration).map(option => typeof integration[option] === 'function' ? - `${option}:${serializeFunction(integration[option])}` : `${option}:${serialize(integration[option])}`).join(',')}})` - }).join(',\n ') %> - ] - }) - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject('sentry', Sentry) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/sentry.client.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/sentry.client.js deleted file mode 100644 index 0e67143f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/sentry-module/lib/sentry.client.js +++ /dev/null @@ -1,24 +0,0 @@ -import VueLib from 'vue' -import * as Sentry from '@sentry/browser' -import { <%= Object.keys(options.integrations).map(integration => integration).join(', ') %> } from '@sentry/integrations' - -export default function (ctx, inject) { - const opts = Object.assign({}, <%= serialize(options.config) %>, { - integrations: [ - <%= Object.keys(options.integrations).map(name => { - const integration = options.integrations[name] - if (name === 'Vue') { - return `new ${name}({Vue: VueLib, ...${serialize(integration)}})` - } - return `new ${name}({${Object.keys(integration).map(option => typeof integration[option] === 'function' ? - `${option}:${serializeFunction(integration[option])}` : `${option}:${serialize(integration[option])}`).join(',')}})` - }).join(',\n ') %> - ] - }) - - <% if (options.initialize) { %>// Initialize sentry - Sentry.init(opts)<% } %> - - // Inject Sentry to the context as $sentry - inject('sentry', Sentry) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/.eslintrc.js deleted file mode 100644 index 591960f7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2019, - sourceType: 'module' - }, - extends: [ - '@nuxtjs' - ], - globals: { - page: true, - browser: true, - context: true, - jestPuppeteer: true, - }, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser', - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] - } \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/plugin.js deleted file mode 100644 index 3b0ba5e8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/all-rules-test/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from 'vue' -import { mergeData } from 'vue-functional-data-merge' - -function generateName (name) { - return name - .toLowerCase() - .replace(/\.svg$/, '') - .replace(/[^a-z0-9-]/g, '-') -} - -function getIcon (info) { - const { icon, sprite } = info - return require('<%= relativeToBuild(options._output) %>/' + sprite + '.svg') + - `#i-${generateName(icon)}` -} - -function getInfo (name) { - let [sprite, icon] = name.split('/') - - if (!icon) { - icon = sprite - sprite = '<%= options.defaultSprite %>' - } - - return { - icon, - sprite - } -} - -// @vue/component -const SvgIcon = { - name: 'SvgIcon', - functional: true, - props: { - name: { - type: String, - required: true - }, - title: { - type: String, - default: null - }, - desc: { - type: String, - default: null - }, - viewBox: { - type: String, - default: null, - validator (value) { - return value.split(' ').every((v) => { - return !isNaN(parseInt(v)) - }) - } - } - }, - render (h, { props, data }) { - const info = getInfo(props.name) - const icon = getIcon(info) - - const use = h('use', { - attrs: { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - href: icon, - // xlink:href can still be required in practice for cross-browser compatibility. - 'xlink:href': icon - } - }) - - const title = props.title ? h('title', props.title) : null - const desc = props.desc ? h('desc', props.desc) : null - - const { sprite } = info - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - attrs: { - xmlns: 'http://www.w3.org/2000/svg', - viewBox: props.viewBox - } - } - - return h('svg', - mergeData(data, componentData), - [ title, desc, use ].filter(Boolean) - ) - } -} - -Vue.component(SvgIcon.name, SvgIcon) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/plugin.js deleted file mode 100644 index 3b0ba5e8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/svg-sprite-module/lib/plugin.js +++ /dev/null @@ -1,91 +0,0 @@ -import Vue from 'vue' -import { mergeData } from 'vue-functional-data-merge' - -function generateName (name) { - return name - .toLowerCase() - .replace(/\.svg$/, '') - .replace(/[^a-z0-9-]/g, '-') -} - -function getIcon (info) { - const { icon, sprite } = info - return require('<%= relativeToBuild(options._output) %>/' + sprite + '.svg') + - `#i-${generateName(icon)}` -} - -function getInfo (name) { - let [sprite, icon] = name.split('/') - - if (!icon) { - icon = sprite - sprite = '<%= options.defaultSprite %>' - } - - return { - icon, - sprite - } -} - -// @vue/component -const SvgIcon = { - name: 'SvgIcon', - functional: true, - props: { - name: { - type: String, - required: true - }, - title: { - type: String, - default: null - }, - desc: { - type: String, - default: null - }, - viewBox: { - type: String, - default: null, - validator (value) { - return value.split(' ').every((v) => { - return !isNaN(parseInt(v)) - }) - } - } - }, - render (h, { props, data }) { - const info = getInfo(props.name) - const icon = getIcon(info) - - const use = h('use', { - attrs: { - // Since SVG 2, the xlink:href attribute is deprecated in favor of simply href. - href: icon, - // xlink:href can still be required in practice for cross-browser compatibility. - 'xlink:href': icon - } - }) - - const title = props.title ? h('title', props.title) : null - const desc = props.desc ? h('desc', props.desc) : null - - const { sprite } = info - - const componentData = { - class: '<%= options.elementClass %> <%= options.spriteClassPrefix %>' + sprite, - attrs: { - xmlns: 'http://www.w3.org/2000/svg', - viewBox: props.viewBox - } - } - - return h('svg', - mergeData(data, componentData), - [ title, desc, use ].filter(Boolean) - ) - } -} - -Vue.component(SvgIcon.name, SvgIcon) diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/.eslintrc.js deleted file mode 100644 index 3d0bfa4c..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/.eslintrc.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = { - root: true, - extends: ["@nuxtjs/eslint-config-typescript"], - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - parser: 'vue-eslint-parser' - }, - globals: { - options: true, - serialize: true, - serializeFunction: true - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/options.js deleted file mode 100644 index 507321f5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/plugin.js deleted file mode 100644 index 3c110992..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/all-rules-test/plugin.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' -import Vuetify from '<%= options.treeShake ? 'vuetify/lib' : 'vuetify' %>' -<% -const libImports = [ - { key: 'components', location: 'vuetify/lib'}, - { key: 'transitions', location: 'vuetify/lib'}, - { key: 'directives', location: 'vuetify/lib/directives'} -] -if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import { <%= options.treeShake[lib.key].join(', ') %> } from '<%= lib.location %>' - <% - } - } -} -%> - -import options from './options' - -Vue.use(Vuetify, { -<% if (options.treeShake) { %> -<%= libImports.filter(lib => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) - .map(lib => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`) - .join(',\n') %> -<% } %> -}) - -export default (ctx) => { - const vuetifyOptions = typeof options === 'function' ? options(ctx) : options - -<% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {} - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>' -<% } %> - - const vuetify = new Vuetify(vuetifyOptions) - - ctx.app.vuetify = vuetify - ctx.$vuetify = vuetify.framework -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/options.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/options.js deleted file mode 100644 index 507321f5..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/options.js +++ /dev/null @@ -1 +0,0 @@ -export default <%= serializeFunction(options) %> diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/plugin.js deleted file mode 100644 index 3c110992..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/output/vuetify-module/src/templates/plugin.js +++ /dev/null @@ -1,42 +0,0 @@ -import Vue from 'vue' -import Vuetify from '<%= options.treeShake ? 'vuetify/lib' : 'vuetify' %>' -<% -const libImports = [ - { key: 'components', location: 'vuetify/lib'}, - { key: 'transitions', location: 'vuetify/lib'}, - { key: 'directives', location: 'vuetify/lib/directives'} -] -if (options.treeShake) { - for (const lib of libImports) { - if (options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) { -%> -import { <%= options.treeShake[lib.key].join(', ') %> } from '<%= lib.location %>' - <% - } - } -} -%> - -import options from './options' - -Vue.use(Vuetify, { -<% if (options.treeShake) { %> -<%= libImports.filter(lib => options.treeShake[lib.key] && options.treeShake[lib.key].length > 0) - .map(lib => ` ${lib.key}: { ${options.treeShake[lib.key].join(', ')} }`) - .join(',\n') %> -<% } %> -}) - -export default (ctx) => { - const vuetifyOptions = typeof options === 'function' ? options(ctx) : options - -<% if (options.defaultIconPreset) { %> - vuetifyOptions.icons = vuetifyOptions.icons || {} - vuetifyOptions.icons.iconfont = '<%= options.defaultIconPreset %>' -<% } %> - - const vuetify = new Vuetify(vuetifyOptions) - - ctx.app.vuetify = vuetify - ctx.$vuetify = vuetify.framework -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/_summary/package.json b/tests_fixtures/script-processor-repos/nuxt-community/_summary/package.json deleted file mode 100644 index ae39bab7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/_summary/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "devDependencies": { - "@nuxtjs/eslint-config": "~12.0.0", - "@nuxtjs/eslint-config-typescript": "~12.1.0", - "@stylistic/eslint-plugin": "~2.0.0", - "eslint": "~8.57.0", - "eslint-plugin-jest": "~28.11.0", - "eslint-plugin-lodash-template": "file:../../../..", - "eslint-plugin-unicorn": "~56.0.0" - }, - "description": "test for https://github.com/nuxt-community", - "repository": { - "type": "git", - "url": "git+https://github.com/ota-meshi/eslint-plugin-lodash-template.git" - }, - "private": true, - "license": "MIT" -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/.eslintrc.js deleted file mode 100644 index ce183aad..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = { - root: true, - parserOptions: { - sourceType: "module" - }, - env: { - browser: true, - node: true - }, - extends: ["standard"], - // required to lint *.vue files - // plugins: ["html"], - // add your custom rules here - rules: { - // allow paren-less arrow functions - "arrow-parens": 0, - // allow async-await - "generator-star-spacing": 0, - // allow debugger during development - "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, - // do not allow console.logs etc... - "no-console": 2 - }, - globals: {}, - overrides: [ - { - files: "*.js", - extends: ["plugin:lodash-template/recommended-with-script"], - parserOptions: { - sourceType: 'module' - }, - globals: { - options: true, - serialize: true, - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/.npmrc b/tests_fixtures/script-processor-repos/nuxt-community/modules/.npmrc deleted file mode 100644 index 9cf94950..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/plugin.js deleted file mode 100644 index bccf66e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/all-rules-test/plugin.js +++ /dev/null @@ -1,63 +0,0 @@ - -// Google Tag Manager Class to be injected -class GTM { - constructor(ctx, options) { - this.ctx = ctx - this.options = options - } - init() { - window[this.options.layer] = window[this.options.layer] || [] - - this.pushEvent({ - event: 'gtm.js', - 'gtm.start': new Date().getTime() - }) - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - this.initPageTracking() - } - } - - initPageTracking() { - this.ctx.app.router.afterEach((to, from) => { - setTimeout(() => { - window[this.options.layer].push(to.gtm || { event: 'nuxtRoute', pageType: 'PageView', pageUrl: to.fullPath, routeName: to.name }) - }, 0) - }) - } - - pushEvent(obj) { - try { - if (!window || !window[this.options.layer]) { - throw new Error('missing GTM dataLayer') - } - if (typeof obj !== 'object') { - throw new Error('event should be an object') - } - if (!obj.hasOwnProperty('event')) { - throw new Error('missing event property') - } - window[this.options.layer].push(obj) - } catch (err) { - console.error('[ERROR] [GTM]', err) - } - } - - hasDNT() { - return window.doNotTrack === '1' || - navigator.doNotTrack === 'yes' || - navigator.doNotTrack === '1' || - navigator.msDoNotTrack === '1' || - (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) - } -} - -export default function(ctx, inject) { - const options = <%= JSON.stringify(options) %> - - // Create a new Auth instance - const $gtm = new GTM(ctx, options) - inject('gtm', $gtm) - - $gtm.init() -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/plugin.js deleted file mode 100644 index bccf66e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/google-tag-manager/plugin.js +++ /dev/null @@ -1,63 +0,0 @@ - -// Google Tag Manager Class to be injected -class GTM { - constructor(ctx, options) { - this.ctx = ctx - this.options = options - } - init() { - window[this.options.layer] = window[this.options.layer] || [] - - this.pushEvent({ - event: 'gtm.js', - 'gtm.start': new Date().getTime() - }) - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - this.initPageTracking() - } - } - - initPageTracking() { - this.ctx.app.router.afterEach((to, from) => { - setTimeout(() => { - window[this.options.layer].push(to.gtm || { event: 'nuxtRoute', pageType: 'PageView', pageUrl: to.fullPath, routeName: to.name }) - }, 0) - }) - } - - pushEvent(obj) { - try { - if (!window || !window[this.options.layer]) { - throw new Error('missing GTM dataLayer') - } - if (typeof obj !== 'object') { - throw new Error('event should be an object') - } - if (!obj.hasOwnProperty('event')) { - throw new Error('missing event property') - } - window[this.options.layer].push(obj) - } catch (err) { - console.error('[ERROR] [GTM]', err) - } - } - - hasDNT() { - return window.doNotTrack === '1' || - navigator.doNotTrack === 'yes' || - navigator.doNotTrack === '1' || - navigator.msDoNotTrack === '1' || - (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) - } -} - -export default function(ctx, inject) { - const options = <%= JSON.stringify(options) %> - - // Create a new Auth instance - const $gtm = new GTM(ctx, options) - inject('gtm', $gtm) - - $gtm.init() -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/plugin.js deleted file mode 100644 index ce6e6eea..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/all-rules-test/plugin.js +++ /dev/null @@ -1,20 +0,0 @@ -import MarkdownIt from 'markdown-it' - -export default ({ app }, inject) => { -<% -const plugins = options.use || [] -delete options.use -options = serialize(options) -options = options === '{}' ? undefined : options -%> - const md = new MarkdownIt(<%= options %>) -<% - for (config of plugins) { - const hasOpts = Array.isArray(config); - const plugin = hasOpts ? config.shift(): config - const opts = hasOpts ? config : [] -%> - md.use(require('<%= plugin %>')<% for(opt of opts) { %>, <%= serialize(opt) %> <% } %>) -<% } %> - inject('md', md) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/plugin.js deleted file mode 100644 index ce6e6eea..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/markdownit/plugin.js +++ /dev/null @@ -1,20 +0,0 @@ -import MarkdownIt from 'markdown-it' - -export default ({ app }, inject) => { -<% -const plugins = options.use || [] -delete options.use -options = serialize(options) -options = options === '{}' ? undefined : options -%> - const md = new MarkdownIt(<%= options %>) -<% - for (config of plugins) { - const hasOpts = Array.isArray(config); - const plugin = hasOpts ? config.shift(): config - const opts = hasOpts ? config : [] -%> - md.use(require('<%= plugin %>')<% for(opt of opts) { %>, <%= serialize(opt) %> <% } %>) -<% } %> - inject('md', md) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/plugin.js deleted file mode 100644 index 49921ede..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/all-rules-test/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import Toasted from 'vue-toasted' - -Vue.use(Toasted, <%= serialize(options.toastOptions) %>) - -const globals = <%= serialize(options.register) %> -if(globals) { - globals.forEach(global => { - Vue.toasted.register(global.name, global.message, global.options) - }) -} - -export default function (ctx, inject) { - inject('toast', Vue.toasted) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/plugin.js deleted file mode 100644 index 49921ede..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/toast/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import Toasted from 'vue-toasted' - -Vue.use(Toasted, <%= serialize(options.toastOptions) %>) - -const globals = <%= serialize(options.register) %> -if(globals) { - globals.forEach(global => { - Vue.toasted.register(global.name, global.message, global.options) - }) -} - -export default function (ctx, inject) { - inject('toast', Vue.toasted) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/plugin.js deleted file mode 100644 index cab27398..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/all-rules-test/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -export default ({ app: { router } }) => { - let ready = false - - router.onReady(() => { - // Mark when the router has completed the initial navigation. - ready = true - }) - - function create() { - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>) - router.afterEach((to, from) => { - if (!ready) { - // Don't record a duplicate hit for the initial navigation. - return - } - window['yaCounter<%= options.id %>'].hit(to.fullPath, { - referer: from.fullPath - // TODO: pass title: - // This will need special handling because router.afterEach is called *before* DOM is updated. - }) - }) - } - - if (window.Ya && window.Ya.Metrika) { - // Yandex.Metrika API is already available. - create() - } else { - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - (w[c] = w[c] || []).push(create) - })(window, 'yandex_metrika_callbacks') - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/plugin.js deleted file mode 100644 index cab27398..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/input/packages/yandex-metrika/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -export default ({ app: { router } }) => { - let ready = false - - router.onReady(() => { - // Mark when the router has completed the initial navigation. - ready = true - }) - - function create() { - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>) - router.afterEach((to, from) => { - if (!ready) { - // Don't record a duplicate hit for the initial navigation. - return - } - window['yaCounter<%= options.id %>'].hit(to.fullPath, { - referer: from.fullPath - // TODO: pass title: - // This will need special handling because router.afterEach is called *before* DOM is updated. - }) - }) - } - - if (window.Ya && window.Ya.Metrika) { - // Yandex.Metrika API is already available. - create() - } else { - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - (w[c] = w[c] || []).push(create) - })(window, 'yandex_metrika_callbacks') - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/plugin.js deleted file mode 100644 index 46f0f788..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/all-rules-test/plugin.js +++ /dev/null @@ -1,109 +0,0 @@ - -// Google Tag Manager Class to be injected -class GTM { - - constructor (ctx, options) { - - this.ctx = ctx; - this.options = options; - - } - - init () { - - window[this.options.layer] = window[this.options.layer] || []; - - this.pushEvent({ - "event": "gtm.js", - "gtm.start": new Date().getTime() - }); - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - - this.initPageTracking(); - - } - - } - - initPageTracking () { - - this.ctx.app.router.afterEach((to, from) => { - - setTimeout( - () => { - - window[this.options.layer].push(to.gtm || {"event": "nuxtRoute", - "pageType": "PageView", - "pageUrl": to.fullPath, - "routeName": to.name}); - - }, - 0 - ); - - }); - - } - - pushEvent (obj) { - - try { - - if (!window || !window[this.options.layer]) { - - throw new Error("missing GTM dataLayer"); - - } - if (typeof obj !== "object") { - - throw new Error("event should be an object"); - - } - if (!obj.hasOwnProperty("event")) { - - throw new Error("missing event property"); - - } - window[this.options.layer].push(obj); - - } catch (err) { - - console.error( - "[ERROR] [GTM]", - err - ); - - } - - } - - hasDNT () { - - return window.doNotTrack === "1" || - navigator.doNotTrack === "yes" || - navigator.doNotTrack === "1" || - navigator.msDoNotTrack === "1" || - window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled(); - - } - -} - -export default function (ctx, inject) { - - const options = <%= JSON.stringify(options) %>; - - // Create a new Auth instance - const $gtm = new GTM( - ctx, - options - ); - inject( - "gtm", - $gtm - ); - - $gtm.init(); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/plugin.js deleted file mode 100644 index e902698d..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/google-tag-manager/plugin.js +++ /dev/null @@ -1,63 +0,0 @@ -// Google Tag Manager Class to be injected -class GTM { - constructor (ctx, options) { - this.ctx = ctx - this.options = options - } - - init () { - window[this.options.layer] = window[this.options.layer] || [] - - this.pushEvent({ - event: 'gtm.js', - 'gtm.start': new Date().getTime() - }) - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - this.initPageTracking() - } - } - - initPageTracking () { - this.ctx.app.router.afterEach((to, from) => { - setTimeout(() => { - window[this.options.layer].push(to.gtm || { event: 'nuxtRoute', pageType: 'PageView', pageUrl: to.fullPath, routeName: to.name }) - }, 0) - }) - } - - pushEvent (obj) { - try { - if (!window || !window[this.options.layer]) { - throw new Error('missing GTM dataLayer') - } - if (typeof obj !== 'object') { - throw new Error('event should be an object') - } - if (!obj.hasOwnProperty('event')) { - throw new Error('missing event property') - } - window[this.options.layer].push(obj) - } catch (err) { - console.error('[ERROR] [GTM]', err) - } - } - - hasDNT () { - return window.doNotTrack === '1' || - navigator.doNotTrack === 'yes' || - navigator.doNotTrack === '1' || - navigator.msDoNotTrack === '1' || - (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) - } -} - -export default function (ctx, inject) { - const options = <%= JSON.stringify(options) %> - - // Create a new Auth instance - const $gtm = new GTM(ctx, options) - inject('gtm', $gtm) - - $gtm.init() -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/plugin.js deleted file mode 100644 index fc84fa5b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/all-rules-test/plugin.js +++ /dev/null @@ -1,35 +0,0 @@ -import MarkdownIt from "markdown-it"; - -export default ({app}, inject) => { - - <% - const plugins = options.use || []; - delete options.use; - options = serialize(options); - options = options === '{}' - ? undefined - : options; -%> - const md = new MarkdownIt(<%= options %>); - <% - for (config of plugins) { - const hasOpts = Array.isArray(config); - const plugin = hasOpts - ? config.shift() - : config; - const opts = hasOpts - ? config - : []; -%> - md.use( - require('<%= plugin %>')<% for (opt of opts) { - %>, - <%= serialize(opt) %> <% - } %>); - <% } %> - inject( - "md", - md - ); - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/plugin.js deleted file mode 100644 index 80bc301b..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/markdownit/plugin.js +++ /dev/null @@ -1,20 +0,0 @@ -import MarkdownIt from 'markdown-it' - -export default ({ app }, inject) => { -<% - const plugins = options.use || [] - delete options.use - options = serialize(options) - options = options === '{}' ? undefined : options -%> - const md = new MarkdownIt(<%= options %>) - <% - for (config of plugins) { - const hasOpts = Array.isArray(config) - const plugin = hasOpts ? config.shift() : config - const opts = hasOpts ? config : [] -%> - md.use(require('<%= plugin %>')<% for (opt of opts) { %>, <%= serialize(opt) %> <% } %>) - <% } %> - inject('md', md) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/plugin.js deleted file mode 100644 index 18b3a111..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/all-rules-test/plugin.js +++ /dev/null @@ -1,31 +0,0 @@ -import Vue from "vue"; -import Toasted from "vue-toasted"; - -Vue.use( - Toasted, - <%= serialize(options.toastOptions) %> -); - -const globals = <%= serialize(options.register) %>; -if (globals) { - - globals.forEach((global) => { - - Vue.toasted.register( - global.name, - global.message, - global.options - ); - - }); - -} - -export default function (ctx, inject) { - - inject( - "toast", - Vue.toasted - ); - -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/plugin.js deleted file mode 100644 index d8718cee..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/toast/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import Toasted from 'vue-toasted' - -Vue.use(Toasted, <%= serialize(options.toastOptions) %>) - -const globals = <%= serialize(options.register) %> -if (globals) { - globals.forEach(global => { - Vue.toasted.register(global.name, global.message, global.options) - }) -} - -export default function (ctx, inject) { - inject('toast', Vue.toasted) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/.eslintrc.js deleted file mode 100644 index 259251d8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,38 +0,0 @@ - - -module.exports = { - "root": true, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true - }, - "extends": [ - "eslint:all", - "plugin:lodash-template/all", - "plugin:@stylistic/all-extends" - ], - "overrides": [ - { - "files": "*.js", - "processor": "lodash-template/script", - "parserOptions": { - "ecmaVersion": 2019, - "sourceType": "module" - }, - "globals": { - "options": true, - "serialize": true, - "process": true, - "require": true - }, - "rules": { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off" - } - } - ] -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/plugin.js deleted file mode 100644 index 1d686c61..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/all-rules-test/plugin.js +++ /dev/null @@ -1,58 +0,0 @@ -export default ({"app": {router}}) => { - - let ready = false; - - router.onReady(() => { - - // Mark when the router has completed the initial navigation. - ready = true; - - }); - - function create () { - - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>); - router.afterEach((to, from) => { - - if (!ready) { - - // Don't record a duplicate hit for the initial navigation. - return; - - } - window['yaCounter<%= options.id %>'].hit( - to.fullPath, - { - "referer": from.fullPath - - /* - * TODO: pass title: - * This will need special handling because router.afterEach is called *before* DOM is updated. - */ - } - ); - - }); - - } - - if (window.Ya && window.Ya.Metrika) { - - // Yandex.Metrika API is already available. - create(); - - } else { - - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - - (w[c] = w[c] || []).push(create); - - }( - window, - "yandex_metrika_callbacks" - )); - - } - -}; diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/plugin.js deleted file mode 100644 index 6cd4b13f..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/packages/yandex-metrika/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -export default ({ app: { router } }) => { - let ready = false - - router.onReady(() => { - // Mark when the router has completed the initial navigation. - ready = true - }) - - function create () { - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>) - router.afterEach((to, from) => { - if (!ready) { - // Don't record a duplicate hit for the initial navigation. - return - } - window['yaCounter<%= options.id %>'].hit(to.fullPath, { - referer: from.fullPath - // TODO: pass title: - // This will need special handling because router.afterEach is called *before* DOM is updated. - }) - }) - } - - if (window.Ya && window.Ya.Metrika) { - // Yandex.Metrika API is already available. - create() - } else { - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - (w[c] = w[c] || []).push(create) - })(window, 'yandex_metrika_callbacks') - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/result.json b/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/result.json deleted file mode 100644 index 5cd06906..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output-with-fix/result.json +++ /dev/null @@ -1,573 +0,0 @@ -[ - { - "filePath": "/output-with-fix/packages/google-tag-manager/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/packages/google-tag-manager/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 14, - "column": 9, - "endLine": 14, - "endColumn": 70 - }, - { - "ruleId": "no-unused-vars", - "message": "'from' is defined but never used.", - "line": 31, - "column": 44, - "endLine": 31, - "endColumn": 48 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 42, - "column": 17, - "endLine": 42, - "endColumn": 18 - }, - { - "ruleId": "no-prototype-builtins", - "message": "Do not access Object.prototype method 'hasOwnProperty' from target object.", - "line": 63, - "column": 22, - "endLine": 63, - "endColumn": 36 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 72, - "column": 13, - "endLine": 72, - "endColumn": 26 - }, - { - "ruleId": "class-methods-use-this", - "message": "Expected 'this' to be used by class method 'hasDNT'.", - "line": 81, - "column": 5, - "endLine": 81, - "endColumn": 12 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 93, - "column": 16, - "endLine": 93, - "endColumn": 25 - } - ] - }, - { - "filePath": "/output-with-fix/packages/google-tag-manager/plugin.js", - "messages": [ - { - "ruleId": "no-prototype-builtins", - "message": "Do not access Object.prototype method 'hasOwnProperty' from target object.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 30 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 42, - "column": 7, - "endLine": 42, - "endColumn": 20 - } - ] - }, - { - "filePath": "/output-with-fix/packages/markdownit/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/packages/markdownit/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "no-unused-vars", - "message": "'app' is defined but never used.", - "line": 3, - "column": 18, - "endLine": 3, - "endColumn": 21 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 9, - "column": 17, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 10, - "column": 11, - "endLine": 10, - "endColumn": 20 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 15, - "column": 12, - "endLine": 15, - "endColumn": 18 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 16, - "column": 39, - "endLine": 16, - "endColumn": 45 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 17, - "column": 24, - "endLine": 19, - "endColumn": 19 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 19 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 19, - "column": 13, - "endLine": 19, - "endColumn": 19 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 20, - "column": 22, - "endLine": 22, - "endColumn": 15 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 21, - "column": 13, - "endLine": 21, - "endColumn": 19 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 25, - "column": 41, - "endLine": 25, - "endColumn": 44 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 27, - "column": 23, - "endLine": 27, - "endColumn": 26 - } - ] - }, - { - "filePath": "/output-with-fix/packages/markdownit/plugin.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 12, - "column": 10, - "endLine": 12, - "endColumn": 16 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 13, - "column": 37, - "endLine": 13, - "endColumn": 43 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 32, - "endLine": 14, - "endColumn": 38 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 49, - "endLine": 14, - "endColumn": 55 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 15, - "column": 30, - "endLine": 15, - "endColumn": 36 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 42, - "endLine": 17, - "endColumn": 45 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 75, - "endLine": 17, - "endColumn": 78 - } - ] - }, - { - "filePath": "/output-with-fix/packages/toast/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/packages/toast/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "sort-imports", - "message": "Imports should be sorted alphabetically.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 35 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 24, - "column": 16, - "endLine": 24, - "endColumn": 25 - } - ] - }, - { - "filePath": "/output-with-fix/packages/toast/plugin.js", - "messages": [] - }, - { - "filePath": "/output-with-fix/packages/yandex-metrika/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 20 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 10 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 28 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 26, - "column": 13, - "endLine": 26, - "endColumn": 22 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 29, - "column": 17, - "endLine": 29, - "endColumn": 26 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 34, - "column": 17, - "endLine": 34, - "endColumn": 72 - } - ] - }, - { - "filePath": "/output-with-fix/packages/yandex-metrika/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'Ya' is not defined.", - "line": 14, - "column": 52, - "endLine": 14, - "endColumn": 54 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 47, - "column": 10, - "endLine": 47, - "endColumn": 19 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'w' is too short (< 2).", - "line": 47, - "column": 20, - "endLine": 47, - "endColumn": 21 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'c' is too short (< 2).", - "line": 47, - "column": 23, - "endLine": 47, - "endColumn": 24 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 49, - "column": 14, - "endLine": 49, - "endColumn": 31 - } - ] - }, - { - "filePath": "/output-with-fix/packages/yandex-metrika/plugin.js", - "messages": [ - { - "ruleId": "no-undef", - "message": "'Ya' is not defined.", - "line": 10, - "column": 48, - "endLine": 10, - "endColumn": 50 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/plugin.js deleted file mode 100644 index bccf66e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/all-rules-test/plugin.js +++ /dev/null @@ -1,63 +0,0 @@ - -// Google Tag Manager Class to be injected -class GTM { - constructor(ctx, options) { - this.ctx = ctx - this.options = options - } - init() { - window[this.options.layer] = window[this.options.layer] || [] - - this.pushEvent({ - event: 'gtm.js', - 'gtm.start': new Date().getTime() - }) - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - this.initPageTracking() - } - } - - initPageTracking() { - this.ctx.app.router.afterEach((to, from) => { - setTimeout(() => { - window[this.options.layer].push(to.gtm || { event: 'nuxtRoute', pageType: 'PageView', pageUrl: to.fullPath, routeName: to.name }) - }, 0) - }) - } - - pushEvent(obj) { - try { - if (!window || !window[this.options.layer]) { - throw new Error('missing GTM dataLayer') - } - if (typeof obj !== 'object') { - throw new Error('event should be an object') - } - if (!obj.hasOwnProperty('event')) { - throw new Error('missing event property') - } - window[this.options.layer].push(obj) - } catch (err) { - console.error('[ERROR] [GTM]', err) - } - } - - hasDNT() { - return window.doNotTrack === '1' || - navigator.doNotTrack === 'yes' || - navigator.doNotTrack === '1' || - navigator.msDoNotTrack === '1' || - (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) - } -} - -export default function(ctx, inject) { - const options = <%= JSON.stringify(options) %> - - // Create a new Auth instance - const $gtm = new GTM(ctx, options) - inject('gtm', $gtm) - - $gtm.init() -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/plugin.js deleted file mode 100644 index bccf66e7..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/google-tag-manager/plugin.js +++ /dev/null @@ -1,63 +0,0 @@ - -// Google Tag Manager Class to be injected -class GTM { - constructor(ctx, options) { - this.ctx = ctx - this.options = options - } - init() { - window[this.options.layer] = window[this.options.layer] || [] - - this.pushEvent({ - event: 'gtm.js', - 'gtm.start': new Date().getTime() - }) - - if (this.options.pageTracking && (!this.options.respectDoNotTrack || !this.hasDNT())) { - this.initPageTracking() - } - } - - initPageTracking() { - this.ctx.app.router.afterEach((to, from) => { - setTimeout(() => { - window[this.options.layer].push(to.gtm || { event: 'nuxtRoute', pageType: 'PageView', pageUrl: to.fullPath, routeName: to.name }) - }, 0) - }) - } - - pushEvent(obj) { - try { - if (!window || !window[this.options.layer]) { - throw new Error('missing GTM dataLayer') - } - if (typeof obj !== 'object') { - throw new Error('event should be an object') - } - if (!obj.hasOwnProperty('event')) { - throw new Error('missing event property') - } - window[this.options.layer].push(obj) - } catch (err) { - console.error('[ERROR] [GTM]', err) - } - } - - hasDNT() { - return window.doNotTrack === '1' || - navigator.doNotTrack === 'yes' || - navigator.doNotTrack === '1' || - navigator.msDoNotTrack === '1' || - (window.external && window.external.msTrackingProtectionEnabled && window.external.msTrackingProtectionEnabled()) - } -} - -export default function(ctx, inject) { - const options = <%= JSON.stringify(options) %> - - // Create a new Auth instance - const $gtm = new GTM(ctx, options) - inject('gtm', $gtm) - - $gtm.init() -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/plugin.js deleted file mode 100644 index ce6e6eea..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/all-rules-test/plugin.js +++ /dev/null @@ -1,20 +0,0 @@ -import MarkdownIt from 'markdown-it' - -export default ({ app }, inject) => { -<% -const plugins = options.use || [] -delete options.use -options = serialize(options) -options = options === '{}' ? undefined : options -%> - const md = new MarkdownIt(<%= options %>) -<% - for (config of plugins) { - const hasOpts = Array.isArray(config); - const plugin = hasOpts ? config.shift(): config - const opts = hasOpts ? config : [] -%> - md.use(require('<%= plugin %>')<% for(opt of opts) { %>, <%= serialize(opt) %> <% } %>) -<% } %> - inject('md', md) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/plugin.js deleted file mode 100644 index ce6e6eea..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/markdownit/plugin.js +++ /dev/null @@ -1,20 +0,0 @@ -import MarkdownIt from 'markdown-it' - -export default ({ app }, inject) => { -<% -const plugins = options.use || [] -delete options.use -options = serialize(options) -options = options === '{}' ? undefined : options -%> - const md = new MarkdownIt(<%= options %>) -<% - for (config of plugins) { - const hasOpts = Array.isArray(config); - const plugin = hasOpts ? config.shift(): config - const opts = hasOpts ? config : [] -%> - md.use(require('<%= plugin %>')<% for(opt of opts) { %>, <%= serialize(opt) %> <% } %>) -<% } %> - inject('md', md) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/plugin.js deleted file mode 100644 index 49921ede..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/all-rules-test/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import Toasted from 'vue-toasted' - -Vue.use(Toasted, <%= serialize(options.toastOptions) %>) - -const globals = <%= serialize(options.register) %> -if(globals) { - globals.forEach(global => { - Vue.toasted.register(global.name, global.message, global.options) - }) -} - -export default function (ctx, inject) { - inject('toast', Vue.toasted) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/plugin.js deleted file mode 100644 index 49921ede..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/toast/plugin.js +++ /dev/null @@ -1,15 +0,0 @@ -import Vue from 'vue' -import Toasted from 'vue-toasted' - -Vue.use(Toasted, <%= serialize(options.toastOptions) %>) - -const globals = <%= serialize(options.register) %> -if(globals) { - globals.forEach(global => { - Vue.toasted.register(global.name, global.message, global.options) - }) -} - -export default function (ctx, inject) { - inject('toast', Vue.toasted) -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/.eslintrc.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/.eslintrc.js deleted file mode 100644 index dc00c3c8..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/.eslintrc.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2018, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/all", "plugin:@stylistic/all-extends"], - overrides: [ - { - files: "*.js", - processor: "lodash-template/script", - parserOptions: { - ecmaVersion: 2019, - sourceType: "module", - }, - globals: { - options: true, - serialize: true, - process: true, - require: true, - }, - rules: { - "one-var": "off", - "lodash-template/prefer-escape-template-interpolations": "off", - }, - }, - ], -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/plugin.js deleted file mode 100644 index cab27398..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/all-rules-test/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -export default ({ app: { router } }) => { - let ready = false - - router.onReady(() => { - // Mark when the router has completed the initial navigation. - ready = true - }) - - function create() { - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>) - router.afterEach((to, from) => { - if (!ready) { - // Don't record a duplicate hit for the initial navigation. - return - } - window['yaCounter<%= options.id %>'].hit(to.fullPath, { - referer: from.fullPath - // TODO: pass title: - // This will need special handling because router.afterEach is called *before* DOM is updated. - }) - }) - } - - if (window.Ya && window.Ya.Metrika) { - // Yandex.Metrika API is already available. - create() - } else { - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - (w[c] = w[c] || []).push(create) - })(window, 'yandex_metrika_callbacks') - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/plugin.js b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/plugin.js deleted file mode 100644 index cab27398..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/packages/yandex-metrika/plugin.js +++ /dev/null @@ -1,33 +0,0 @@ -export default ({ app: { router } }) => { - let ready = false - - router.onReady(() => { - // Mark when the router has completed the initial navigation. - ready = true - }) - - function create() { - window['yaCounter<%= options.id %>'] = new Ya.Metrika(<%= JSON.stringify(options) %>) - router.afterEach((to, from) => { - if (!ready) { - // Don't record a duplicate hit for the initial navigation. - return - } - window['yaCounter<%= options.id %>'].hit(to.fullPath, { - referer: from.fullPath - // TODO: pass title: - // This will need special handling because router.afterEach is called *before* DOM is updated. - }) - }) - } - - if (window.Ya && window.Ya.Metrika) { - // Yandex.Metrika API is already available. - create() - } else { - // Yandex.Metrika has not loaded yet, register a callback. - (function (w, c) { - (w[c] = w[c] || []).push(create) - })(window, 'yandex_metrika_callbacks') - } -} diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/result.json b/tests_fixtures/script-processor-repos/nuxt-community/modules/output/result.json deleted file mode 100644 index 0fa3dc37..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/output/result.json +++ /dev/null @@ -1,3854 +0,0 @@ -[ - { - "filePath": "/output/packages/google-tag-manager/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/google-tag-manager/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 3, - "column": 11, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 4, - "column": 14, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 4, - "column": 29, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 19, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 27, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 27, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/lines-between-class-members", - "message": "Expected blank line between class members.", - "line": 8, - "column": 3, - "endLine": 19, - "endColumn": 4 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 8, - "column": 7, - "endLine": 8, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 10, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 66 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 66, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'event' found.", - "line": 12, - "column": 7, - "endLine": 12, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 12, - "column": 14, - "endLine": 12, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 13, - "column": 7, - "endLine": 13, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 7, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 16, - "column": 91, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 17, - "column": 30, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 17, - "column": 30, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 18, - "column": 6, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 21, - "column": 19, - "endLine": 21, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 21, - "column": 22, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 5 - }, - { - "ruleId": "no-unused-vars", - "message": "'from' is defined but never used.", - "line": 22, - "column": 40, - "endLine": 22, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 22, - "column": 49, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 23, - "column": 1, - "endLine": 23, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 23, - "column": 24, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 24, - "column": 52, - "endLine": 24, - "endColumn": 53 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'event' found.", - "line": 24, - "column": 53, - "endLine": 24, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 24, - "column": 60, - "endLine": 24, - "endColumn": 71 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 24, - "column": 73, - "endLine": 24, - "endColumn": 81 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'pageType' found.", - "line": 24, - "column": 73, - "endLine": 24, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 24, - "column": 83, - "endLine": 24, - "endColumn": 93 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 24, - "column": 95, - "endLine": 24, - "endColumn": 102 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'pageUrl' found.", - "line": 24, - "column": 95, - "endLine": 24, - "endColumn": 115 - }, - { - "ruleId": "@stylistic/object-property-newline", - "message": "Object properties must go on a new line.", - "line": 24, - "column": 117, - "endLine": 24, - "endColumn": 126 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'routeName' found.", - "line": 24, - "column": 117, - "endLine": 24, - "endColumn": 135 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 24, - "column": 135, - "endLine": 24, - "endColumn": 136 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 24, - "column": 138, - "endLine": 25, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 24, - "column": 138, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 25, - "column": 1, - "endLine": 25, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 25, - "column": 9, - "endLine": 25, - "endColumn": 10 - }, - { - "ruleId": "no-magic-numbers", - "message": "No magic number: 0.", - "line": 25, - "column": 10, - "endLine": 25, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 25, - "column": 12, - "endLine": 26, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 25, - "column": 12, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 7, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 7, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 29, - "column": 12, - "endLine": 29, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 29, - "column": 18, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 9, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 51, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 32, - "column": 25, - "endLine": 32, - "endColumn": 48 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 32, - "column": 49, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 32, - "column": 49, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 33, - "column": 1, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 34, - "column": 1, - "endLine": 34, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 34, - "column": 26, - "endLine": 34, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 34, - "column": 36, - "endLine": 35, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 35, - "column": 1, - "endLine": 35, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 35, - "column": 25, - "endLine": 35, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 35, - "column": 53, - "endLine": 36, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 35, - "column": 53, - "endLine": 36, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 36, - "column": 1, - "endLine": 36, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 37, - "column": 1, - "endLine": 37, - "endColumn": 7 - }, - { - "ruleId": "no-prototype-builtins", - "message": "Do not access Object.prototype method 'hasOwnProperty' from target object.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 37, - "column": 31, - "endLine": 37, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 37, - "column": 41, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 38, - "column": 1, - "endLine": 38, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 38, - "column": 25, - "endLine": 38, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 38, - "column": 50, - "endLine": 39, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 38, - "column": 50, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 39, - "column": 1, - "endLine": 39, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 40, - "column": 1, - "endLine": 40, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 40, - "column": 43, - "endLine": 41, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 40, - "column": 43, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 41, - "column": 1, - "endLine": 41, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 41, - "column": 19, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 42, - "column": 1, - "endLine": 42, - "endColumn": 7 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 42, - "column": 7, - "endLine": 42, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 42, - "column": 21, - "endLine": 42, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 42, - "column": 37, - "endLine": 42, - "endColumn": 38 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 42, - "column": 42, - "endLine": 43, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 42, - "column": 42, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 43, - "column": 1, - "endLine": 43, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 43, - "column": 6, - "endLine": 44, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 44, - "column": 1, - "endLine": 44, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 46, - "column": 1, - "endLine": 46, - "endColumn": 3 - }, - { - "ruleId": "class-methods-use-this", - "message": "Expected 'this' to be used by class method 'hasDNT'.", - "line": 46, - "column": 3, - "endLine": 46, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 46, - "column": 9, - "endLine": 46, - "endColumn": 10 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 46, - "column": 12, - "endLine": 47, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 47, - "column": 1, - "endLine": 47, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 47, - "column": 34, - "endLine": 47, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 48, - "column": 32, - "endLine": 48, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 49, - "column": 32, - "endLine": 49, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 50, - "column": 34, - "endLine": 50, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/no-extra-parens", - "message": "Unnecessary parentheses around expression.", - "line": 51, - "column": 7, - "endLine": 51, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 51, - "column": 120, - "endLine": 52, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 51, - "column": 120, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 52, - "column": 1, - "endLine": 52, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 52, - "column": 4, - "endLine": 53, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 55, - "column": 16, - "endLine": 55, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 55, - "column": 24, - "endLine": 55, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 55, - "column": 38, - "endLine": 56, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 56, - "column": 1, - "endLine": 56, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 56, - "column": 49, - "endLine": 57, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 58, - "column": 1, - "endLine": 58, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 59, - "column": 1, - "endLine": 59, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 59, - "column": 28, - "endLine": 59, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 59, - "column": 37, - "endLine": 60, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 60, - "column": 1, - "endLine": 60, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 60, - "column": 10, - "endLine": 60, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 60, - "column": 16, - "endLine": 60, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 60, - "column": 22, - "endLine": 61, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 62, - "column": 1, - "endLine": 62, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 62, - "column": 14, - "endLine": 63, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 62, - "column": 14, - "endLine": 63, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/google-tag-manager/plugin.js", - "messages": [ - { - "ruleId": "no-multiple-empty-lines", - "message": "Too many blank lines at the beginning of file. Max of 0 allowed.", - "line": 1, - "column": 1, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 4, - "column": 14, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "lines-between-class-members", - "message": "Expected blank line between class members.", - "line": 8, - "column": 3, - "endLine": 19, - "endColumn": 4 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 8, - "column": 7, - "endLine": 8, - "endColumn": 8 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 21, - "column": 19, - "endLine": 21, - "endColumn": 20 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 29, - "column": 12, - "endLine": 29, - "endColumn": 13 - }, - { - "ruleId": "no-prototype-builtins", - "message": "Do not access Object.prototype method 'hasOwnProperty' from target object.", - "line": 37, - "column": 16, - "endLine": 37, - "endColumn": 30 - }, - { - "ruleId": "no-console", - "message": "Unexpected console statement.", - "line": 42, - "column": 7, - "endLine": 42, - "endColumn": 20 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 46, - "column": 9, - "endLine": 46, - "endColumn": 10 - }, - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 55, - "column": 24, - "endLine": 55, - "endColumn": 25 - } - ] - }, - { - "filePath": "/output/packages/markdownit/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/markdownit/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 24, - "endLine": 1, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 37, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 3, - "column": 18, - "endLine": 3, - "endColumn": 19 - }, - { - "ruleId": "no-unused-vars", - "message": "'app' is defined but never used.", - "line": 3, - "column": 19, - "endLine": 3, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 3, - "column": 22, - "endLine": 3, - "endColumn": 23 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 3, - "column": 37, - "endLine": 4, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 5, - "column": 34, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 19, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 29, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 8, - "column": 11, - "endLine": 8, - "endColumn": 27 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 8, - "column": 11, - "endLine": 8, - "endColumn": 49 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 8, - "column": 30, - "endLine": 8, - "endColumn": 39 - }, - { - "ruleId": "no-undefined", - "message": "Unexpected use of undefined.", - "line": 8, - "column": 30, - "endLine": 8, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 8, - "column": 49, - "endLine": 9, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 44, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 0.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 12, - "column": 8, - "endLine": 12, - "endColumn": 14 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 13, - "column": 35, - "endLine": 13, - "endColumn": 41 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 14, - "column": 20, - "endLine": 14, - "endColumn": 27 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 14, - "column": 20, - "endLine": 14, - "endColumn": 52 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 30, - "endLine": 14, - "endColumn": 36 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 14, - "column": 30, - "endLine": 14, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/space-infix-ops", - "message": "Operator ':' must be spaced.", - "line": 14, - "column": 44, - "endLine": 14, - "endColumn": 45 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 46, - "endLine": 14, - "endColumn": 52 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 52, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between test and consequent of ternary expression.", - "line": 15, - "column": 18, - "endLine": 15, - "endColumn": 25 - }, - { - "ruleId": "no-ternary", - "message": "Ternary operator used.", - "line": 15, - "column": 18, - "endLine": 15, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/multiline-ternary", - "message": "Expected newline between consequent and alternate of ternary expression.", - "line": 15, - "column": 28, - "endLine": 15, - "endColumn": 34 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 15, - "column": 28, - "endLine": 15, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 15, - "column": 39, - "endLine": 16, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/keyword-spacing", - "message": "Expected space(s) after \"for\".", - "line": 17, - "column": 37, - "endLine": 17, - "endColumn": 40 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 41, - "endLine": 17, - "endColumn": 44 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Statement inside of curly braces should be on next line.", - "line": 17, - "column": 54, - "endLine": 17, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 17, - "column": 59, - "endLine": 17, - "endColumn": 60 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 74, - "endLine": 17, - "endColumn": 77 - }, - { - "ruleId": "@stylistic/brace-style", - "message": "Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.", - "line": 17, - "column": 85, - "endLine": 17, - "endColumn": 86 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 17, - "column": 90, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 0.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 19, - "column": 10, - "endLine": 19, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 19, - "column": 15, - "endLine": 19, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 19, - "column": 19, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 19, - "column": 19, - "endLine": 20, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 2, - "endLine": 21, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/markdownit/plugin.js", - "messages": [ - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 5, - "column": 1, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "lodash-template/scriptlet-indent", - "message": "Expected indentation of 2 spaces but found 0 spaces.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 0.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 12, - "column": 8, - "endLine": 12, - "endColumn": 14 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 13, - "column": 35, - "endLine": 13, - "endColumn": 41 - }, - { - "ruleId": "semi", - "message": "Extra semicolon.", - "line": 13, - "column": 42, - "endLine": 13, - "endColumn": 43 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 30, - "endLine": 14, - "endColumn": 36 - }, - { - "ruleId": "space-infix-ops", - "message": "Operator ':' must be spaced.", - "line": 14, - "column": 44, - "endLine": 14, - "endColumn": 45 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 14, - "column": 46, - "endLine": 14, - "endColumn": 52 - }, - { - "ruleId": "no-undef", - "message": "'config' is not defined.", - "line": 15, - "column": 28, - "endLine": 15, - "endColumn": 34 - }, - { - "ruleId": "keyword-spacing", - "message": "Expected space(s) after \"for\".", - "line": 17, - "column": 37, - "endLine": 17, - "endColumn": 40 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 41, - "endLine": 17, - "endColumn": 44 - }, - { - "ruleId": "no-undef", - "message": "'opt' is not defined.", - "line": 17, - "column": 74, - "endLine": 17, - "endColumn": 77 - }, - { - "ruleId": "indent", - "message": "Expected indentation of 2 spaces but found 0.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/toast/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/toast/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 1, - "column": 17, - "endLine": 1, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 22, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "sort-imports", - "message": "Imports should be sorted alphabetically.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 2, - "column": 21, - "endLine": 2, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 34, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 4, - "column": 17, - "endLine": 4, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 4, - "column": 57, - "endLine": 5, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 51, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/keyword-spacing", - "message": "Expected space(s) after \"if\".", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 7, - "column": 13, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 8, - "column": 1, - "endLine": 8, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/arrow-parens", - "message": "Expected parentheses around arrow function argument.", - "line": 8, - "column": 19, - "endLine": 8, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 8, - "column": 29, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 9, - "column": 38, - "endLine": 9, - "endColumn": 39 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 9, - "column": 54, - "endLine": 9, - "endColumn": 55 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 9, - "column": 70, - "endLine": 10, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 9, - "column": 70, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 10, - "column": 5, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 5, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 13, - "column": 16, - "endLine": 13, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 13, - "column": 39, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 14, - "column": 10, - "endLine": 14, - "endColumn": 17 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 14, - "column": 18, - "endLine": 14, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 31, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 31, - "endLine": 15, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/toast/plugin.js", - "messages": [ - { - "ruleId": "keyword-spacing", - "message": "Expected space(s) after \"if\".", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - } - ] - }, - { - "filePath": "/output/packages/yandex-metrika/all-rules-test/.eslintrc.js", - "messages": [ - { - "ruleId": "strict", - "message": "'use strict' is unnecessary inside of modules.", - "line": 1, - "column": 1, - "endLine": 1, - "endColumn": 13 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 1, - "column": 13, - "endLine": 2, - "endColumn": 1 - }, - { - "ruleId": "no-undef", - "message": "'module' is not defined.", - "line": 3, - "column": 1, - "endLine": 3, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'root' found.", - "line": 4, - "column": 5, - "endLine": 4, - "endColumn": 15 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'root'.", - "line": 5, - "column": 5, - "endLine": 5, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 5, - "column": 5, - "endLine": 8, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 6, - "column": 9, - "endLine": 6, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 7, - "column": 9, - "endLine": 7, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 7, - "column": 29, - "endLine": 7, - "endColumn": 30 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'env' should be before 'parserOptions'.", - "line": 9, - "column": 5, - "endLine": 9, - "endColumn": 8 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'env' found.", - "line": 9, - "column": 5, - "endLine": 12, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'browser' found.", - "line": 10, - "column": 9, - "endLine": 10, - "endColumn": 22 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'es6' found.", - "line": 11, - "column": 9, - "endLine": 11, - "endColumn": 18 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 11, - "column": 18, - "endLine": 11, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'extends' found.", - "line": 13, - "column": 5, - "endLine": 13, - "endColumn": 91 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 28, - "endLine": 13, - "endColumn": 29 - }, - { - "ruleId": "@stylistic/array-element-newline", - "message": "There should be a linebreak after this element.", - "line": 13, - "column": 58, - "endLine": 13, - "endColumn": 59 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'overrides' found.", - "line": 14, - "column": 5, - "endLine": 33, - "endColumn": 6 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'files' found.", - "line": 16, - "column": 13, - "endLine": 16, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'processor' found.", - "line": 17, - "column": 13, - "endLine": 17, - "endColumn": 48 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'parserOptions' should be before 'processor'.", - "line": 18, - "column": 13, - "endLine": 18, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'parserOptions' found.", - "line": 18, - "column": 13, - "endLine": 21, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'ecmaVersion' found.", - "line": 19, - "column": 17, - "endLine": 19, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'sourceType' found.", - "line": 20, - "column": 17, - "endLine": 20, - "endColumn": 37 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 20, - "column": 37, - "endLine": 20, - "endColumn": 38 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'globals' should be before 'parserOptions'.", - "line": 22, - "column": 13, - "endLine": 22, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'globals' found.", - "line": 22, - "column": 13, - "endLine": 27, - "endColumn": 14 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'options' found.", - "line": 23, - "column": 17, - "endLine": 23, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'serialize' found.", - "line": 24, - "column": 17, - "endLine": 24, - "endColumn": 32 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'process' should be before 'serialize'.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 24 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'process' found.", - "line": 25, - "column": 17, - "endLine": 25, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'require' found.", - "line": 26, - "column": 17, - "endLine": 26, - "endColumn": 30 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 26, - "column": 30, - "endLine": 26, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'rules' found.", - "line": 28, - "column": 13, - "endLine": 31, - "endColumn": 14 - }, - { - "ruleId": "sort-keys", - "message": "Expected object keys to be in ascending order. 'lodash-template/prefer-escape-template-interpolations' should be before 'one-var'.", - "line": 30, - "column": 17, - "endLine": 30, - "endColumn": 72 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 30, - "column": 79, - "endLine": 30, - "endColumn": 80 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 31, - "column": 14, - "endLine": 31, - "endColumn": 15 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 32, - "column": 10, - "endLine": 32, - "endColumn": 11 - }, - { - "ruleId": "@stylistic/comma-dangle", - "message": "Unexpected trailing comma.", - "line": 33, - "column": 6, - "endLine": 33, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 34, - "column": 2, - "endLine": 35, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/yandex-metrika/all-rules-test/plugin.js", - "messages": [ - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 1, - "column": 18, - "endLine": 1, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'app' found.", - "line": 1, - "column": 19, - "endLine": 1, - "endColumn": 34 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space after '{'.", - "line": 1, - "column": 25, - "endLine": 1, - "endColumn": 26 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 1, - "column": 32, - "endLine": 1, - "endColumn": 33 - }, - { - "ruleId": "@stylistic/object-curly-spacing", - "message": "There should be no space before '}'.", - "line": 1, - "column": 34, - "endLine": 1, - "endColumn": 35 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 1, - "column": 41, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 2, - "column": 1, - "endLine": 2, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 2, - "column": 20, - "endLine": 3, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 4, - "column": 1, - "endLine": 4, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 4, - "column": 24, - "endLine": 5, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 6, - "column": 1, - "endLine": 6, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 6, - "column": 17, - "endLine": 7, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 6, - "column": 17, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 7, - "column": 1, - "endLine": 7, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 7, - "column": 5, - "endLine": 8, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 9, - "column": 1, - "endLine": 9, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 9, - "column": 18, - "endLine": 9, - "endColumn": 19 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 9, - "column": 21, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 10, - "column": 1, - "endLine": 10, - "endColumn": 5 - }, - { - "ruleId": "no-undef", - "message": "'Ya' is not defined.", - "line": 10, - "column": 48, - "endLine": 10, - "endColumn": 50 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 10, - "column": 90, - "endLine": 11, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 11, - "column": 1, - "endLine": 11, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 11, - "column": 36, - "endLine": 12, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 12, - "column": 1, - "endLine": 12, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 12, - "column": 19, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 13, - "column": 1, - "endLine": 13, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 14, - "column": 1, - "endLine": 14, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 14, - "column": 15, - "endLine": 15, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 14, - "column": 15, - "endLine": 15, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 15, - "column": 1, - "endLine": 15, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 16, - "column": 1, - "endLine": 16, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 16, - "column": 60, - "endLine": 16, - "endColumn": 61 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 17, - "column": 1, - "endLine": 17, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/quote-props", - "message": "Unquoted property 'referer' found.", - "line": 17, - "column": 9, - "endLine": 17, - "endColumn": 31 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 18, - "column": 1, - "endLine": 18, - "endColumn": 9 - }, - { - "ruleId": "no-warning-comments", - "message": "Unexpected 'todo' comment: 'TODO: pass title: '.", - "line": 18, - "column": 9, - "endLine": 18, - "endColumn": 46 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 18, - "column": 9, - "endLine": 19, - "endColumn": 103 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 16 spaces but found 8.", - "line": 19, - "column": 1, - "endLine": 19, - "endColumn": 9 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 20, - "column": 1, - "endLine": 20, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 20, - "column": 9, - "endLine": 21, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 20, - "column": 9, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 21, - "column": 1, - "endLine": 21, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 21, - "column": 7, - "endLine": 22, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 21, - "column": 7, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 22, - "column": 1, - "endLine": 22, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 24, - "column": 1, - "endLine": 24, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 24, - "column": 39, - "endLine": 25, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 26, - "column": 1, - "endLine": 26, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 26, - "column": 13, - "endLine": 27, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 26, - "column": 13, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 27, - "column": 1, - "endLine": 27, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 27, - "column": 10, - "endLine": 28, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 29, - "column": 1, - "endLine": 29, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/wrap-iife", - "message": "Move the invocation into the parens that contain the function.", - "line": 29, - "column": 5, - "endLine": 31, - "endColumn": 43 - }, - { - "ruleId": "func-names", - "message": "Unexpected unnamed function.", - "line": 29, - "column": 6, - "endLine": 29, - "endColumn": 15 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'w' is too short (< 2).", - "line": 29, - "column": 16, - "endLine": 29, - "endColumn": 17 - }, - { - "ruleId": "id-length", - "message": "Identifier name 'c' is too short (< 2).", - "line": 29, - "column": 19, - "endLine": 29, - "endColumn": 20 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 29, - "column": 22, - "endLine": 30, - "endColumn": 7 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 12 spaces but found 6.", - "line": 30, - "column": 1, - "endLine": 30, - "endColumn": 7 - }, - { - "ruleId": "logical-assignment-operators", - "message": "Assignment (=) can be replaced with operator assignment (||=).", - "line": 30, - "column": 8, - "endLine": 30, - "endColumn": 25 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 30, - "column": 39, - "endLine": 31, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 30, - "column": 39, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 8 spaces but found 4.", - "line": 31, - "column": 1, - "endLine": 31, - "endColumn": 5 - }, - { - "ruleId": "@stylistic/function-call-argument-newline", - "message": "There should be a line break after this argument.", - "line": 31, - "column": 15, - "endLine": 31, - "endColumn": 16 - }, - { - "ruleId": "@stylistic/quotes", - "message": "Strings must use doublequote.", - "line": 31, - "column": 16, - "endLine": 31, - "endColumn": 42 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 31, - "column": 43, - "endLine": 32, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 31, - "column": 43, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/indent", - "message": "Expected indentation of 4 spaces but found 2.", - "line": 32, - "column": 1, - "endLine": 32, - "endColumn": 3 - }, - { - "ruleId": "@stylistic/padded-blocks", - "message": "Block must be padded by blank lines.", - "line": 32, - "column": 4, - "endLine": 33, - "endColumn": 1 - }, - { - "ruleId": "@stylistic/semi", - "message": "Missing semicolon.", - "line": 33, - "column": 2, - "endLine": 34, - "endColumn": 1 - } - ] - }, - { - "filePath": "/output/packages/yandex-metrika/plugin.js", - "messages": [ - { - "ruleId": "space-before-function-paren", - "message": "Missing space before function parentheses.", - "line": 9, - "column": 18, - "endLine": 9, - "endColumn": 19 - }, - { - "ruleId": "no-undef", - "message": "'Ya' is not defined.", - "line": 10, - "column": 48, - "endLine": 10, - "endColumn": 50 - } - ] - } -] \ No newline at end of file diff --git a/tests_fixtures/script-processor-repos/nuxt-community/modules/package.json b/tests_fixtures/script-processor-repos/nuxt-community/modules/package.json deleted file mode 100644 index 1468d825..00000000 --- a/tests_fixtures/script-processor-repos/nuxt-community/modules/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "devDependencies": { - "@stylistic/eslint-plugin": "~2.0.0", - "eslint": "~8.57.0", - "eslint-config-standard": "~17.1.0", - "eslint-plugin-import": "~2.31.0", - "eslint-plugin-lodash-template": "file:../../../..", - "eslint-plugin-n": "~17.16.0", - "eslint-plugin-promise": "~7.2.0" - }, - "description": "test for https://github.com/nuxt-community/modules", - "repository": { - "type": "git", - "url": "git+https://github.com/ota-meshi/eslint-plugin-lodash-template.git" - }, - "private": true, - "license": "MIT" -} diff --git a/tests_fixtures/script-processor-repos/test-with-ts01/.eslintrc.js b/tests_fixtures/script-processor-repos/test-with-ts01/.eslintrc.js deleted file mode 100644 index 38231895..00000000 --- a/tests_fixtures/script-processor-repos/test-with-ts01/.eslintrc.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2020, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - overrides: [ - { - files: ["*.ts"], - extends: ["eslint:all", "plugin:lodash-template/recommended-with-script", "plugin:lodash-template/all"], - parserOptions: { - parser: "@typescript-eslint/parser" - } - }, - ] -} diff --git a/tests_fixtures/script-processor-repos/test-with-ts01/eslint.config.mjs b/tests_fixtures/script-processor-repos/test-with-ts01/eslint.config.mjs new file mode 100644 index 00000000..b2dbf690 --- /dev/null +++ b/tests_fixtures/script-processor-repos/test-with-ts01/eslint.config.mjs @@ -0,0 +1,32 @@ +import eslintJs from "@eslint/js"; +import lodashTemplatePlugin from "eslint-plugin-lodash-template"; +import tseslint from "typescript-eslint"; +import globals from "globals"; + +export default tseslint.config( + { + languageOptions: { + ecmaVersion: 2020, + sourceType: "module", + + globals: { + ...globals.browser, + ...globals.es6, + }, + }, + }, + + { + files: ["**/*.ts"], + extends: [ + eslintJs.configs.all, + lodashTemplatePlugin.configs.recommendedWithScript, + lodashTemplatePlugin.configs.all, + ], + languageOptions: { + parserOptions: { + parser: tseslint.parser, + }, + }, + }, +); diff --git a/tests_fixtures/script-processor-repos/test-with-ts01/package.json b/tests_fixtures/script-processor-repos/test-with-ts01/package.json index 8aee0b99..f03873f8 100644 --- a/tests_fixtures/script-processor-repos/test-with-ts01/package.json +++ b/tests_fixtures/script-processor-repos/test-with-ts01/package.json @@ -1,9 +1,10 @@ { "devDependencies": { - "@stylistic/eslint-plugin": "~2.0.0", - "@typescript-eslint/parser": "^8.0.0", - "eslint": "~8.57.0", - "eslint-plugin-lodash-template": "file:../../.." + "@stylistic/eslint-plugin": "^3.1.0", + "typescript-eslint": "~8.26.0", + "eslint": "~9.22.0", + "eslint-plugin-lodash-template": "file:../../..", + "globals": "^16.0.0" }, "description": "test", "repository": { diff --git a/tests_fixtures/script-processor-repos/test01/.eslintrc.js b/tests_fixtures/script-processor-repos/test01/.eslintrc.js deleted file mode 100644 index 644e0e99..00000000 --- a/tests_fixtures/script-processor-repos/test01/.eslintrc.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict" - -module.exports = { - root: true, - parserOptions: { - ecmaVersion: 2022, - sourceType: "module", - }, - env: { - browser: true, - es6: true, - }, - extends: ["eslint:all", "plugin:lodash-template/recommended-with-script", "plugin:lodash-template/all"] -} diff --git a/tests_fixtures/script-processor-repos/test01/eslint.config.mjs b/tests_fixtures/script-processor-repos/test01/eslint.config.mjs new file mode 100644 index 00000000..b5274859 --- /dev/null +++ b/tests_fixtures/script-processor-repos/test01/eslint.config.mjs @@ -0,0 +1,21 @@ +import eslintJs from "@eslint/js"; +import globals from "globals"; +import lodashTemplatePlugin from "eslint-plugin-lodash-template"; + +export default [ + eslintJs.configs.all, + lodashTemplatePlugin.configs.recommendedWithScript, + lodashTemplatePlugin.configs.all, + + { + languageOptions: { + ecmaVersion: 2020, + sourceType: "module", + + globals: { + ...globals.browser, + ...globals.es6, + }, + }, + }, +]; diff --git a/tests_fixtures/script-processor-repos/test01/output-with-fix/result.json b/tests_fixtures/script-processor-repos/test01/output-with-fix/result.json index bb617d06..410cc942 100644 --- a/tests_fixtures/script-processor-repos/test01/output-with-fix/result.json +++ b/tests_fixtures/script-processor-repos/test01/output-with-fix/result.json @@ -256,9 +256,9 @@ }, { "ruleId": "lodash-template/no-script-parsing-error", - "message": "Parsing error: Unexpected character '''.", + "message": "Parsing error: Unexpected character '#'.", "line": 3, - "column": 12 + "column": 11 }, { "ruleId": "id-length", @@ -291,9 +291,9 @@ }, { "ruleId": "lodash-template/no-script-parsing-error", - "message": "Parsing error: Unexpected character '''.", + "message": "Parsing error: Unexpected character '#'.", "line": 2, - "column": 12 + "column": 11 }, { "ruleId": "lodash-template/prefer-escape-template-interpolations", @@ -403,4 +403,4 @@ } ] } -] \ No newline at end of file +] diff --git a/tests_fixtures/script-processor-repos/test01/output-with-fix/test2.js b/tests_fixtures/script-processor-repos/test01/output-with-fix/test2.js index 670be216..74e09848 100644 --- a/tests_fixtures/script-processor-repos/test01/output-with-fix/test2.js +++ b/tests_fixtures/script-processor-repos/test01/output-with-fix/test2.js @@ -3,11 +3,9 @@ // If this plugin is not used, a parsing error will occur. const obj = <%= JSON.stringify(param ) %> -/* - * ^^^^ ^^^^^ - * | | - * | If you don't use `"plugin:lodash-template/recommended-with-script"`, - * | only the space after `param` is reported. - * | - * + When using `"plugin:lodash-template/recommended-with-script"`, the space after `obj` is also reported. - */ +// ^^^^ ^^^^^ +// | | +// | If you don't use `"plugin:lodash-template/recommended-with-script"`, +// | only the space after `param` is reported. +// | +// + When using `"plugin:lodash-template/recommended-with-script"`, the space after `obj` is also reported. diff --git a/tests_fixtures/script-processor-repos/test01/output/result.json b/tests_fixtures/script-processor-repos/test01/output/result.json index 7c2b0575..369d2f9d 100644 --- a/tests_fixtures/script-processor-repos/test01/output/result.json +++ b/tests_fixtures/script-processor-repos/test01/output/result.json @@ -256,9 +256,9 @@ }, { "ruleId": "lodash-template/no-script-parsing-error", - "message": "Parsing error: Unexpected character '''.", + "message": "Parsing error: Unexpected character '#'.", "line": 3, - "column": 12 + "column": 11 }, { "ruleId": "id-length", @@ -291,9 +291,9 @@ }, { "ruleId": "lodash-template/no-script-parsing-error", - "message": "Parsing error: Unexpected character '''.", + "message": "Parsing error: Unexpected character '#'.", "line": 2, - "column": 12 + "column": 11 }, { "ruleId": "lodash-template/prefer-escape-template-interpolations", @@ -424,15 +424,7 @@ "column": 40, "endLine": 5, "endColumn": 45 - }, - { - "ruleId": "multiline-comment-style", - "message": "Expected a block comment instead of consecutive line comments.", - "line": 6, - "column": 1, - "endLine": 11, - "endColumn": 116 } ] } -] \ No newline at end of file +] diff --git a/tests_fixtures/script-processor-repos/test01/package.json b/tests_fixtures/script-processor-repos/test01/package.json index 9f019d9b..2d9a7cb4 100644 --- a/tests_fixtures/script-processor-repos/test01/package.json +++ b/tests_fixtures/script-processor-repos/test01/package.json @@ -1,8 +1,9 @@ { "devDependencies": { - "@stylistic/eslint-plugin": "~2.0.0", - "eslint": "~8.57.0", - "eslint-plugin-lodash-template": "file:../../.." + "@stylistic/eslint-plugin": "^3.1.0", + "eslint": "~9.22.0", + "eslint-plugin-lodash-template": "file:../../..", + "globals": "^16.0.0" }, "description": "test", "repository": { diff --git a/tools/update-docs-rules-index.js b/tools/update-docs-rules-index.js index 0788e766..44dba3ab 100644 --- a/tools/update-docs-rules-index.js +++ b/tools/update-docs-rules-index.js @@ -11,7 +11,7 @@ const uncategorizedRules = rules.filter( ); const deprecatedRules = rules.filter((rule) => rule.meta.deprecated); -//eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function toRuleRow(rule) { const mark = `${rule.meta.fixable ? ":wrench:" : ""}${ rule.meta.deprecated ? ":warning:" : "" @@ -22,7 +22,7 @@ function toRuleRow(rule) { return `| ${link} | ${description} | ${mark} |`; } -//eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function toDeprecatedRuleRow(rule) { const link = `[${rule.meta.docs.ruleId}](./${rule.meta.docs.ruleName}.md)`; const replacedRules = rule.meta.docs.replacedBy || []; diff --git a/tools/update-docs.js b/tools/update-docs.js index a1492099..f927765b 100644 --- a/tools/update-docs.js +++ b/tools/update-docs.js @@ -5,7 +5,7 @@ const path = require("path"); const rules = require("../lib/utils/rules").rules; const configs = require("./lib/load-configs"); -//eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function formatItems(items) { if (items.length <= 2) { return items.join(" and "); @@ -15,7 +15,7 @@ function formatItems(items) { }`; } -//eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function getPresets(category) { const categoryConfig = configs.find((conf) => conf.name === category); if (!categoryConfig) { @@ -34,7 +34,7 @@ function getPresets(category) { return presets; } -//eslint-disable-next-line require-jsdoc -- ignore +// eslint-disable-next-line jsdoc/require-jsdoc -- ignore function yamlValue(val) { if (typeof val === "string") { return `"${val.replace(/"/gu, '\\"')}"`; diff --git a/tools/update-readme.js b/tools/update-readme.js index 3b9f57cf..bdf994b8 100644 --- a/tools/update-readme.js +++ b/tools/update-readme.js @@ -11,7 +11,7 @@ const uncategorizedRules = rules.filter( ); const deprecatedRules = rules.filter((rule) => rule.meta.deprecated); -//eslint-disable-next-line require-jsdoc -- ignore +//eslint-disable-next-line jsdoc/require-jsdoc -- ignore function toRuleRow(rule) { const mark = `${rule.meta.fixable ? ":wrench:" : ""}${ rule.meta.deprecated ? ":warning:" : "" @@ -22,7 +22,7 @@ function toRuleRow(rule) { return `| ${mark} | ${link} | ${description} |`; } -//eslint-disable-next-line require-jsdoc -- ignore +//eslint-disable-next-line jsdoc/require-jsdoc -- ignore function toDeprecatedRuleRow(rule) { const link = `[${rule.meta.docs.ruleId}](./docs/rules/${rule.meta.docs.ruleName}.md)`; const replacedRules = rule.meta.docs.replacedBy || []; diff --git a/tools/update-rules.js b/tools/update-rules.js index 868b7d30..dac1894d 100644 --- a/tools/update-rules.js +++ b/tools/update-rules.js @@ -3,7 +3,7 @@ const path = require("path"); const fs = require("fs"); const isWin = require("os").platform().startsWith("win"); -const { LegacyESLint } = require("../tests/eslint-compat"); +const { ESLint } = require("../tests/eslint-compat"); const rules = require("./lib/load-rules"); let content = ` @@ -62,7 +62,7 @@ if (isWin) { fs.writeFileSync(filePath, content); // Format files. -const linter = new LegacyESLint({ fix: true }); +const linter = new ESLint({ fix: true }); linter.lintFiles([filePath]).then((report) => { - LegacyESLint.outputFixes(report); + ESLint.outputFixes(report); });