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.

jsconfig.json: Property allowJs is not allowed

See original GitHub issue

What are you trying to achieve?

Put jsconfig.json from https://codecept.io/basics#intellisense into your project’s root:

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

No error should be reported in VSCode.

What do you get instead?

Visual Studio Code complains image

VSCode documentation says:

Tip: jsconfig.json is a descendant of tsconfig.json, which is a configuration file for TypeScript. jsconfig.json is tsconfig.json with “allowJs” attribute set to true.

I tested that it’s enough to have the empty file jsconfig.json to get IntelliSense working.

Details

  • CodeceptJS version: 2.3.6
  • NodeJS Version: 10.17.0
  • Operating System: Ubuntu 19.10

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:6
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aesyonducommented, Nov 27, 2020

So I was wondering why type checking was not working for me, I ended up at https://code.visualstudio.com/docs/languages/jsconfig, and found this option checkJs | Enable type checking on JavaScript files..

I changed allowJs to checkJs.

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

Now I believe it technically works, but it’s throwing me errors for Playwright helpers instead.

image

But I saw this issue and perhaps types for playwright is not yet supported. https://github.com/codeceptjs/CodeceptJS/issues/2455

Anyway try changing to checkJs see if it works.

0reactions
aesyonducommented, Nov 27, 2020

Same here, not sure if we can safely ignore this?

codeceptjs@3.0.2 node@13.11.0 Mac OS 10.14.6

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsconfig.json: Property allowJs is not allowed #2072 - GitHub
json with "allowJs" attribute set to true. I tested that it's enough to have the empty file jsconfig.json to get IntelliSense working. Details....
Read more >
jsconfig.json Reference - Visual Studio Code
json is a descendant of tsconfig.json, which is a configuration file for TypeScript. jsconfig.json is tsconfig.json with "allowJs" attribute set to ...
Read more >
Virtual script not found, may missing <script lang="ts"> / "allowJs"
To solve the problem above, go to the tsconfig.json file, under the compilerOptions object-property, add: "allowJs": true.
Read more >
Documentation - What is a tsconfig.json - TypeScript
JavaScript projects can use a jsconfig.json file instead, which acts almost the same but has some JavaScript-related compiler flags enabled by default.
Read more >
Vue.js on Twitter: "PSA: if you are trying to get VSCode to ...
In your tsconfig.json/jsconfig.json, add "allowJs": true to your ... Nirmala Sitharaman chairs 48th GST Council meeting; no tax increase on any item Read....
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