Code Monkey home page Code Monkey logo

Comments (2)

Pixelik avatar Pixelik commented on June 27, 2024

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.

edouard-lopez avatar edouard-lopez commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.