codeclimate / codeclimate-eslint

Code Climate Engine for ESLint
MIT License
95 stars 94 forks source link

Parsing error: Invalid ecmaVersion. #581

Open femans opened 1 year ago

femans commented 1 year ago

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"]
}


> 2. _If possible, use our CLI with [the debug option](https://github.com/codeclimate/codeclimate#environment-variables) to provide additional info, including any stderr produced by the engine._ `CODECLIMATE_DEBUG=1 codeclimate analyze -e eslint`

## Relevant links

https://github.com/ipfs-search/dweb-search-frontend/pull/214

----
- [ ] 4-6 word issue title