react-workspaces-playground icon indicating copy to clipboard operation
react-workspaces-playground copied to clipboard

[3.4.0-alpha-01] nested .eslintignore file ignored

Open Edelf opened this issue 5 years ago • 3 comments

After upgrading to 3.4.0-alpha-01 I started to have lint errors in serviceWorker.ts even tho the file is listed in the .eslintignore:

Failed to compile.

./packages/apps/my-ts-app/src/serviceWorker.ts
  Line 47:9:  'checkValidServiceWorker' was used before it was defined  @typescript-eslint/no-use-before-define
  Line 59:9:  'registerValidSW' was used before it was defined          @typescript-eslint/no-use-before-define

Search for the keywords to learn more about each error.

/packages/apps/.eslintignore:

**/node_modules/**
**/dist/**
**/storybook-static/**
**/coverage/**
**/build/**
**/.git/**
**/public/**
serviceWorker.ts

The only way for serviceWorker.ts to be ignored is to add it to the .eslintignore at the root: .eslintignore:

**/node_modules/**
**/dist/**
**/storybook-static/**
**/coverage/**
**/build/**
**/.git/**
**/public/**
!.eslintrc.js
serviceWorker.ts

Steps to reproduce:

  • checkout this repo
  • remove non-TS projects (leaving only components-typescript and apps\app-typescript )
  • yarn install (using 1.19.0)
  • yarn upgrade-interactive --latest (https://i.imgur.com/kxBhULx.png)
  • yarn workspace @project/app-typescript start

Edelf avatar Apr 30 '20 17:04 Edelf

True, that happens to me as well after upgrading to 3.4.0-alpha-01

alanrubin avatar May 06 '20 06:05 alanrubin

I notice you interactive upgrade updates babel-eslint. This may be a 'babel-eslint` issue.

If you downgrade babel-eslint after the interactive upgrade, what happens?

F1LT3R avatar May 06 '20 19:05 F1LT3R

I didn't select it to update. Only selected ( * ) the @react-workspaces dependency

Edelf avatar May 07 '20 16:05 Edelf