Disable warning for TypeScript file not within `tsconfig.json`
See original GitHub issueI 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:
- Created 8 years ago
- Reactions:7
- Comments:21 (11 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I would also like a way to disable this warning. I have two scenarios where I want this:
mocha --require ts-node/register
gulpfile.ts
(also withts-node
)I explicitly don’t want atom-typescript to build these files so I choose not to add them in my
tsconfig.json
’sfilesGlob
.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 mytsconfig.json
has bothrootDir
andoutDir
set to something lower than the root.I am reluctant to modify my
tsconfig.json
simply to keep an error from appearing inatom-typescript
. I would like a way to disable this warning entirely or at least add a way to disable it for a particular file.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:
@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 inatom-typescript
, VSCode, SublimeText and other editors that usetsserver
, which is why I think this shouldn’t be a part ofatom-typescript
.