thefrontside / javascript

Frontside JavaScript tooling
9 stars 5 forks source link

Update typescript and eslint-config #8

Closed minkimcello closed 4 years ago

minkimcello commented 4 years ago

Motivation

I assumed by having frontside/eslint-config in the dependency of typescript we'd be able to extend from it but that does not seem to be the case.

Approach

~I added eslintrc.json to the frontside/typescript package to see if it'll allow me to install it to a different project and have its eslint be able to extend directly from frontside/typescript~ This didn't work.

This is a known issue and was requested as a feature of eslint but never actually implemented.

So I tried this monkey patch but that didn't work either.

I did the following the finish off this PR:

github-actions[bot] commented 4 years ago

The preview packages of this pull request have been published. Click on the following packages for instructions on how to install them:

@frontside/eslint-config --- Install using the following command: ```bash $ npm install @frontside/eslint-config@typescript-upgrade ``` Or update your package.json file: ```bash { "@frontside/eslint-config": "typescript-upgrade" } ``` ---
eslint-plugin-prefer-let --- Install using the following command: ```bash $ npm install eslint-plugin-prefer-let@typescript-upgrade ``` Or update your package.json file: ```bash { "eslint-plugin-prefer-let": "typescript-upgrade" } ``` ---
@frontside/typescript --- Install using the following command: ```bash $ npm install @frontside/typescript@typescript-upgrade ``` Or update your package.json file: ```bash { "@frontside/typescript": "typescript-upgrade" } ``` ---

Generated by :no_entry_sign: dangerJS against 5eb4678fecab39746e4971e44939022e911fb918

minkimcello commented 4 years ago

@cowboyd Hmm it seems eslint can't reach in to grab eslint-config from frontside/typescript.

node_modules/
  @frontside/typescript/
    node_modules/
      @frontside/eslint-config/

.eslintrc.json // extends: @frontside/eslint-config 👎 

Should we then just make frontside/eslint-config a peer dependency?

cowboyd commented 4 years ago

It looks like this is a known issue https://github.com/eslint/eslint/issues/3458#issuecomment-594979168 and that there is both a formal solution in the works and that there are a number of workarounds that we might be able to use in the mean time.

minkimcello commented 4 years ago

@cowboyd @frontside/typescript: "1.0.0-2925c09" is the preview package that has a dependency of the eslint-config with the patch.