Comments (4)
@Sec-ant Good shout! I think that will help as a workaround, though I would still agree with the report since it doesn’t make sense semantically to specify the function rather than the prop. The ignore syntax is currently indeed stricter than the actual dependency verification, so there’s at least some improvement to be made here.
That said, this improvement may not be particularly easy to implement, since the rule instances (props.myArr.map
in this case) get handed to the analyzer, which matches them against the specified ignores without specialized knowledge of the rule that reported it…
PS.: The syntax is new since 1.8 ;)
from biome.
I think I may see a solution: Instead of passing rule instances as String
s, we could create a RuleInstancePath
type that holds a Vec<String>
. Then this instance could be reported as:
RuleInstancePath {
parts: vec!["props", "myArr", "map"]
}
This would give the analyzer a good agnostic method of matching on parts of ignored instances. The only “magic” still involved is that the analyzer would parse the ignore instance props.myArr
and treat the dot as a separator. Choosing the dot as separate works well for this case, but it may turn out to be awkward for other situations. Even a case like props.myArr[0]
is already finicky, since [0]
should be its own part too. May need to put some thought into this 🤔
from biome.
I don't think we support this kind of ignore syntax? https://biomejs.dev/linter/#ignoring-code
Ah, I was wrong: https://biomejs.dev/linter/rules/use-exhaustive-dependencies/#ignoring-a-specific-dependency
from biome.
Does it solve your issue?
from biome.
Related Issues (20)
- 🐛 biome ci . --colors=off outputting colors HOT 5
- 💅 `lint/suspicious/noFallthroughSwitchClause` warns about a missing `break` even if TypeScript considers it unreachable due `never`. HOT 1
- 📎 Implement noDynamicNamespaceImportAccess
- 💅 useShorthandArrayType fix produces invalid syntax in `class extends` clause HOT 1
- 🐛 Playground crashes on `<div dangerouslySetInnerHtml={{ __html: '…' }} /` HOT 1
- 🐛 Constant crashes when editing css files
- 🐛 Files and paths from the `/nix/store` directory are checked by default HOT 4
- 💅 `useExhaustiveDependencies` does not recognize variables declared later as dependencies HOT 1
- 📎 Implement `comment-no-empty`
- 📎 Impplement `stylelint/no-irregular-whitespace`
- 📎 Implement `nursery/useConsistentMemberAccessibility` - `explicit-member-accessibility` HOT 2
- 📎 Implement suppression action for the CSS analyzer
- 🐛 Parser is no longer progressing HOT 9
- 🐛 The CSS parser doesn't support nested selectors with pseudo-classes HOT 2
- 💅 lint/suspicious/noDuplicateTestHooks : Duplicate test hook when using describe.each
- 💅 Transform a function with generics to arrow function by biome linter will not safe. HOT 2
- 🐛 Biome client: couldn't create connection to server. HOT 3
- 📎 Refactor/fix `JsParserSettings` for better override behavior HOT 4
- 💅 noCommentText does not work when any other text is a child
- 📎 Multi-file support HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biome.