CartoDB / toolkit

JS library to interact with CARTO APIs in a simple way
https://toolkit-wheat.now.sh
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Add ESLint and Prettier #80

Closed jesusbotella closed 4 years ago

jesusbotella commented 4 years ago

WIP.

VictorVelarde commented 4 years ago

I have added github actions to web-sdk in another PR (already merged, and keeping for the moment CircleCI). Then I cherry picked that into this PR, to see if linter executed on that new CI had a different result... but I'm afraid we still get errors... 😢 . (feel free to delete and push forced if you need)

We probably have a different version of eslint or its 'extra-packages' in the CI, that derives in different rules been applied. Maybe we should used fixed versions for these in the meantime:

    "eslint": "^6.8.0",
    "eslint-config-airbnb-base": "^14.1.0",
    "eslint-config-prettier": "^6.11.0",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-jest": "^23.8.2",
    "eslint-plugin-prettier": "^3.1.3",
jesusbotella commented 4 years ago

It's been hard to debug but I've found the culprit by fine debugging the process.

The thing was that Lerna in my computer was not parsing glob patterns correctly (and thus, it was not checking the whole directory) as they were not inside quotes. Why would that happen? No idea, but that was the solution :(