Skip to content

Changes to types.ts not triggering type/eslint checks #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
runofthemillgeek opened this issue Jun 29, 2020 · 1 comment
Closed

Changes to types.ts not triggering type/eslint checks #468

runofthemillgeek opened this issue Jun 29, 2020 · 1 comment
Labels

Comments

@runofthemillgeek
Copy link

Current behavior

If I have a types only file (say types.ts), changes to this file doesn't cause the plugin to perform type checks or run eslint checks when used in combination with babel-loader.

Expected behavior

Changes to a file that only has types should cause the plugin to do type/eslint checks again so that correct information is reported.

Steps to reproduce the issue

Use the babel-loader example project and add a types.ts file with the following contents:

export type Animal = {
  type: 'Dog' | 'Cat';
  speak: () => string;
};

Change index.ts to:

import { Animal } from './types';

const dog: Animal = {
  speak: () => 'Bark!',
  type: 'Dog',
};

console.log(dog);

Make some change to types.ts and see that nothing happens during yarn dev. Same goes for eslint if it was enabled.

Issue reproduction repository

Environment

{
    "@babel/core": "^7.10.3",
    "@babel/preset-env": "^7.10.3",
    "@babel/preset-typescript": "^7.10.1",
    "babel-loader": "^8.1.0",
    "fork-ts-checker-webpack-plugin": "^5.0.5",
    "typescript": "^3.9.5",
    "webpack": "^4.43.0",
    "webpack-cli": "^3.3.12",
    "webpack-dev-server": "^3.11.0"
}

os: WSL Ubuntu 18.04.4 LTS

@johnnyreilly
Copy link
Member

Closing as a duplicate of #36 (which I've just reopened)

@piotr-oles had hoped this issue would be resolved by v5 - but it looks like it hasn't been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants