question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable warning for TypeScript file not within `tsconfig.json`

See original GitHub issue

I would love to be able to write and run my tests using typescript-node, which works perfectly, except atom-typescript continues to warn my to check if it should be in the files array. This wouldn’t be a big deal, except it then disable completion and linting for the rest of the file. Can we not consider any tsconfig.json in the current directory upward part of the configuration automatically?

I imagine you can run into a similar casing when compiling TypeScript within a Browserify/Webpack/etc. project since you don’t need to define the files for it to work there.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:7
  • Comments:21 (11 by maintainers)

github_iconTop GitHub Comments

14reactions
MrHencommented, Apr 4, 2016

I would also like a way to disable this warning. I have two scenarios where I want this:

  • Running tests using mocha --require ts-node/register
  • Using a gulpfile.ts (also with ts-node)

I explicitly don’t want atom-typescript to build these files so I choose not to add them in my tsconfig.json’s filesGlob.

My workaround for the test files was to just throw them away after the build was over but gulpfile.ts lives at the root level and my tsconfig.json has both rootDir and outDir set to something lower than the root.

I am reluctant to modify my tsconfig.json simply to keep an error from appearing in atom-typescript. I would like a way to disable this warning entirely or at least add a way to disable it for a particular file.

1reaction
gunchacommented, May 2, 2017

I’m closing this since the original issue isn’t an issue anymore. No warnings are generated in the case you’re editing a file that’s not part of a project. The status bar will look something like this:

image

@demisx what you’re trying to accomplish could be done using a Typescript language service plugin feature that recently landed in 2.3.0. It’s not well documented, but they idea is that you’re able to intercept calls to getDiagnostics and, in your case, filter out messages based on a file and diagnostic type. If someone implements a plugin like that, it will immediately work in atom-typescript, VSCode, SublimeText and other editors that use tsserver, which is why I think this shouldn’t be a part of atom-typescript.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get rid of the warning .ts file is part of the TypeScript ...
In my case I did not have a specific files array entry in my tsconfig.app.json, and I would receive the error message for...
Read more >
TSConfig Reference - Docs on every TSConfig option
Intro to the TSConfig Reference. A TSConfig file in a directory indicates that the directory is the root of a TypeScript or JavaScript...
Read more >
Solving warning: “Experimental support for decorators is a ...
This functionality is available only in TypeScript but there is a proposal to ... It is plain to see it if the file...
Read more >
Thousands of typescript warnings; TS1127, TS1136, TS1002 ...
These projects do not have a tsconfig.json, and are not setup to use any typescript packages, etc. The TS warnings are all coming...
Read more >
Options - TypeDoc
If not specified TypeDoc will look for tsconfig.json in the current directory and ... Prevent externally resolved TypeScript files from being documented.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found