Atom TypeScript linting in .js files

We have two options to fix this problem in Atom.

First and most important you need to tell the TypeScript service to consume JavaScript files like so:


{ "compilerOptions": { "allowJs": true, "checkJs": true } }

Solution 1

Create a symbolic link like so:

ln -s tsconfig.json jsconfig.json

Atom will read the jsconfig.json file and everybody will be happy.

Solution 2

A preferable solution, so you don't have to remember to create a symbolic link every time you checkout this project and want to use Atom, is to simply rename the tsconfig.json file to jsconfig.json file.

It works on Atom, Visual Studio Code but not WebStorm. At least at the time of this post.


{ "compilerOptions": { "allowJs": true, "checkJs": true } }


Use the following code to test your changes.

/** * myFunction * * @param {string} param1 * @returns {boolean} */ function myFunction(param1) { return; // Error here }


Leave a Reply

Add <code> Some Code </code> by using this tags.