Skip to content

Add an option to disable molang checking in specific file extensions #22

@stirante

Description

@stirante

Is your feature request related to a problem? Please describe.
I do a lot of addons with the help of JSONte and often I do a little snippets of molang, that I template in some places so an example of it would be

{
  "isItem": "(id) => 'q.is_item_name_any(\\'slot.weapon.mainhand\\', 0, \\'' + id + '\\')'",
}

Somehow even in .templ files, the molang diagnoser kicks in when it sees q.is_item_name_any and I get a bunch of errors like Molang expression is complex and should end with a ';'.

Describe the solution you'd like
I'd like the diagnoser to only consider actual file extensions used in raw files like .json and maybe add a configuration to add more if someone desires so. Alternatively it could be a list of disabled extensions and patterns (for example I would do *.templ,*.modl,packs/data/jsonte/*.json)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions