Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error: Invalid ecmaVersion. #581

Open
1 task
femans opened this issue Jul 23, 2022 · 0 comments
Open
1 task

Parsing error: Invalid ecmaVersion. #581

femans opened this issue Jul 23, 2022 · 0 comments
Assignees

Comments

@femans
Copy link

femans commented Jul 23, 2022

Bug Template

Actual Behavior

Every file in my repository gets the same error reported by the github-CI version of codeclimate. But not by my local version. The error is:
Parsing error: Invalid ecmaVersion.
image

Expected Behavior

I set up the eslintrc and codeclimate.yml correctly I think; I tried with different channels: 7 and 8, tried with different eslint versions, and different settings of ecmaVersion in the .eslint.rc
It is expected that there is no issue with the ecmaVersion.
It is very strange that on my local build of codeclimate the error does not appear but on github it does. It would be expected that this would be similar.

Steps to reproduce

Setup: Vue3 + Vite
eslint version: 7.6.0, 7.32.0 or 8.20

  1. _Include configurations used in your:

    (1) .codeclimate.yml

    codeclimate.yml:
exclude_patterns:
  - "node_modules/"
  - "coverage/"
  - "codeclimate-*/"
  - ".husky/"
  - ".idea/"
  - ".vscode/"
  - "dist/"
  - "public/"
plugins:
  eslint:
    enabled: true
    channel: "eslint-8"
    config:
      extensions:
        - .js
        - .jsx
        - .ts
        - .tsx
        - .cjs
        - .mjs
        - .vue
checks:
  identical-code:
    config:
      threshold: 50
  similar-code:
    config:
      threshold: 75

(2) config files for the oss analysis tool._

.eslintrc:

{
  "root": true,
  "env": {
    "node": false,
    "browser": true,
    "es2020": true
  },
  "extends": [
    "eslint:recommended",
    "plugin:vue/vue3-essential",
    "plugin:vue/strongly-recommended",
    "plugin:vue/vue3-recommended",
    "plugin:@typescript-eslint/recommended",
    "prettier"
  ],
  "parser": "vue-eslint-parser",
  "parserOptions": {
    "sourceType": "module"
  },
  "plugins": ["vue", "html"],
  "settings": {
    "import/resolver": {
      "alias": {
        "map": [["@", "./src"]],
        "extensions": [".vue", ".ts", ".js", ".tsx", ".jsx", ".json"]
      }
    }
  },
  "overrides": [
    {
      "files": [
        "**/__tests__/*.{j,t}s?(x)",
        "**/tests/unit/**/*.spec.{j,t}s?(x)"
      ],
      "env": {
        "jest": true
      }
    }
  ],
  "ignorePatterns": ["components.d.ts", "coverage/", "tests/vitest-setup.ts"]
}

  1. If possible, use our CLI with the debug option to provide additional info, including any stderr produced by the engine. CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint

Relevant links

ipfs-search/dweb-search-frontend#214


  • 4-6 word issue title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants