Description
Summary
In the test files we have a lot of accesses that look like object['property'
. By default, biome throws an error if this kind of access is used and it suggests to use the literal key access instead (object.property
).
However, in our test cases this can not be done, because the properties are private and therefore this kind of access would fail.
Therefore we need to extend the biome configuration to override the linting for test files, to ignore this rule in test files. I suggest to add the following property to the biome.json
{
"overrides": [
{
"include": ["**/*.test.ts"],
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "off"
}
}
}
}
],
}
Why is this needed?
We do not want to flood our test files with biome exception comments.
Which area does this relate to?
Tests
Solution
No response
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Shipped