Comments (2)
I think we should just stick to the following set of obvious/intuitive types of checks:
isTag: '...'
children: [...]
notChildren: [...]
directChildren: [...]
notDirectChildren: [...]
attributes: [...]
notAttributes: [...]
and let the users create whatever rules they like with the above and not add extra checks that are basically wrappers of the above checks (like imageIsAccessible
, typeIsText
, etc..) and that the dev will have to keep in mind on top of the basic ones.
I think it will be quicker/easier for a dev to write:
{
selector: '.my-image',
attributes: ['alt', 'attr-2', 'attr-3', 'attr-4']
}
than :
{
selector: '.my-image',
imageIsAccessible: true,
attributes: ['attr-2', 'attr-3', 'attr-4']
}
from layout-linter.
Thanks for the feedback, as you said they are merely wrappers, moreover that would require people to learn them. While with basic rules we can make is more straightforward to use the tool.
from layout-linter.
Related Issues (20)
- include element's outer HTML in error message
- set up publishing to npm HOT 5
- add all remaining tests
- replace demo with Bootstrap-specific example
- create complete Bootstrap 4 linting rules (json) ? HOT 2
- write sibling-rule test
- fix open tooltip alignment HOT 1
- finalise implementation on PDUI
- Release layout-linter Broccoli plugin ? HOT 1
- Tweet announcement HOT 8
- Add badges after publishing HOT 3
- generate warning-rules automatically out of "good" HTML files HOT 2
- Runing demo fail
- Idea: accepts rules in a folder
- Use as an executable
- Name rules and reference rules
- Accept YAML and JSON
- More examples
- Run in browser HOT 2
- Github issues that initiated this plugin
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 layout-linter.