codeclimate / codeclimate-eslint

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

update prettier and eslint-config-prettier #351

Closed akatov closed 6 years ago

lsunsi commented 6 years ago

Aren't these dependencies outdated already? The config seems to be on 2.9, while prettier seems to be on 1.9.1.

chrishulton commented 6 years ago

If this update would still be useful, agreed that we should upgrade to the latest versions. Just another bin/yarn upgrade <package> should do it.

vgrbr commented 6 years ago

Prettier is now 1.12.1 :) and eslint-config-prettier is still 2.9...

Because this is blocking me from using prettier I would like to get prettier support even with current versions but as @chrishulton mentioned it's just another yarn upgrade

I would really appreciate if you make codeclimate to support prettier :)

maxjacobson commented 6 years ago

This just went to the eslint-4 channel on codeclimate.com via https://github.com/codeclimate/codeclimate-eslint/pull/384. Thanks for your patience and for the reminder!

vgrbr commented 6 years ago

Even after eslint-4 update https://github.com/codeclimate/codeclimate-eslint/pull/384 new config is still breaking codeclimate :(

maxjacobson commented 6 years ago

@vgrbr hi, sorry to hear that. Will you please elaborate on what you're seeing, and in what context?

vgrbr commented 6 years ago

@maxjacobson

I'm getting E10 error on codeclimate.com

/usr/src/app/lib/validate_config.js:18
        throw e;
        ^

TypeError: Cannot read property 'recommended' of undefined
Referenced from: /code/.eslintrc
    at loadConfigFile (/usr/local/node_modules/eslint/lib/config/config-file.js:211:40)
    at loadFromDisk (/usr/local/node_modules/eslint/lib/config/config-file.js:486:18)
    at load (/usr/local/node_modules/eslint/lib/config/config-file.js:550:20)
    at configExtends.reduceRight.e (/usr/local/node_modules/eslint/lib/config/config-file.js:421:36)
    at Array.reduceRight (native)
    at applyExtends (/usr/local/node_modules/eslint/lib/config/config-file.js:403:28)
    at loadFromDisk (/usr/local/node_modules/eslint/lib/config/config-file.js:514:22)
    at Object.load (/usr/local/node_modules/eslint/lib/config/config-file.js:550:20)
    at Config.getLocalConfigHierarchy (/usr/local/node_modules/eslint/lib/config.js:228:44)
    at Config.getConfigHierarchy (/usr/local/node_modules/eslint/lib/config.js:180:43)

my .eslintrc

.
.
.
"plugins": [
   "react",
   "prettier"
 ],
 "extends": [
   "plugin:prettier/recommended"
  ],
.
.
.

codeclimate.yml

engines:
  rubocop:
    enabled: true
  eslint:
    enabled: true
    channel: eslint-4

package.json

.
.
.
"devDependencies": {
    "eslint": "^4.19.1",
    "eslint-config-prettier": "^2.9.0",
    "eslint-plugin-prettier": "^2.6.0",
    "eslint-plugin-react": "^7.7.0",
  },
.
.
.

Eslint localy works.