Decorators are not valid here, biome(parse)

521 Views Asked by At

The default biomejs configuration (or linting rule) raises an error on every decorator defined in NestJS resolvers:

Decorators are not valid here. biome(parse)

How to ignore this rule globally?

2

There are 2 best solutions below

0
Jay McDoniel On

You can add the block:

    "javascript": {
        "parser": {
            "unsafeParameterDecoratorsEnabled": true
        }
    },

to your biome configuration. Biome's docs

0
Elias Serneels On

Setting the rule unsafeParameterDecoratorsEnabled to true works to prevent the errors when running biome through the CLI, but they still show up when using the plugin. I haven't found a solution for that.

"javascript": {
    "parser": {
        "unsafeParameterDecoratorsEnabled": true
    }
},