Why does it tell me that everything is incorrect (when it worked fine in VS Code when I used it)?


I have just got this IDE and it's playing up. Lots of stuff, including the requires, is showing up as incorrect. I've tried to change the language to ECMAScript6 and that has cleared up some stuff but not all.

I'm working on a Discord bot in the library of discord.js.


Please provide code sample (files/code snippets) that shows up the issue


const package = require("../package.json");
const Discord = require("discord.js");

module.exports = async(client, message, args) => {
    const embed = new Discord.RichEmbed()
    .setAuthor(client.user.username, client.user.avatarURL)
    .setTitle("Pong! 🏓")
    .setFooter("This message took me " + Math.floor(client.ping) + "ms! | v" + package.version)

    console.log(`[info] Treating ${message.content} by ${message.author.tag} from ${message.guild} as a command.`);


So it says both the requires are wrong, that it needs a semi-colon at the end of the embed and at the end of this code snippet. This all works perfectly when I open the bot.


works fine for me... Webstorm shows a pair of warnings for this code (`reserved word used as name` for `const package` and `unterminated statement` for missing semicolons).


You can ignore/disable these warnings if your code style doesn't require using semicolons, etc.


How would I disable them? Sorry I'm a new user with this.


Please sign in to leave a comment.