Comments (5)
Another thing to keep in mind is that a rule might belong to several groups and could have different configurations in each one.
@alrra, can you put an example for that scenario?
from hint.
@alrra thoughts about how this should work?
from hint.
thoughts about how this should work?
I don't have a good idea yet. :(
They should be simple to enable, just like the regular rules. Maybe have them act the same as regular rules?
e.g. For a manifest
group rule that contain all the manifest related rules:
"rules": {
// ...
"manifest": "warning",
// ...
}
We could add an option in .sonarrc to enable all rules within a category (that also works with the command line).
Don't know is doing it automatically just based on the category is the best way.
Another thing to keep in mind is that a rule might belong to several groups and could have different configurations in each one.
One idea is to have them just like the other rules, but instead of calling create
they can call another method with a JSON configuration similar to the content of the rules
property from the .sonarrc
file?
const groupRuleConfigs = {
"rule1": {},
"rule2": {
"option1": "value",
"option2": "value",
// ...
},
// ...
}
createGroupRule(groupRuleConfigs);
Thoughts?
from hint.
@alrra I was thinking more about the scenario you had in mind when you suggested this rule. What specific rule will need to be used in 2 groups with different configurations, and what would those configurations need to be?
from hint.
What specific rule will need to be used in 2 groups with different configurations, and what would those configurations need to be?
Things are changing in the manifest space, but for now at least the display
property will need to be standalone
or fullscreen
in order for some browsers to display the app install banner.
If we think of 2 categories, in the case of let's say (1) PWAs
, the display
property will be limited to those 2 values, but in the case of just having an ok, valid (2) manifest
that restriction shouldn't exist.
from hint.
Related Issues (20)
- [Bug] Reenable Broken link found (404 response). HOT 1
- [Bug] Reenable lint-markdown-validator as a scheduled pipeline
- Console HOT 1
- cachae control missing Error HOT 1
- [Feature] Update MDN compat data - it's 2 years old HOT 2
- [Bug] Bug description
- [Bug] axe-core reports "same id ...for control" even though they are isolated by a shadow-root HOT 1
- [Bug] Describe your bug here HOT 1
- [VSCode extension] how to see all hint issues in my project without opening all files? HOT 1
- [Bug] Describe your bug here
- [Bug] No browser detected even if two installed & working HOT 1
- [Feature] Axe errors: show which element the error is about HOT 1
- [Bug] Bug description
- [Bug] Bug description
- [Bug] Extension incorrectly says `'@layer' is not supported by Chrome, Chrome Android, Edge...` HOT 9
- forbidness to answer in quora HOT 1
- vertalen
- [Bug] Bug description
- [Bug] `hint` shouldn't warn about `forceConsistentCasingInFileNames` when TS version is >= 5.0.0 HOT 6
- packages/extension-vscode[Bug] Describe your bug here HOT 2
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 hint.