Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static check: warning on several block/mix/attrs/js/etc subpredicates #431

Open
miripiruni opened this issue Mar 20, 2017 · 3 comments

Comments

@miripiruni
Copy link
Contributor

miripiruni commented Mar 20, 2017

block('page')(
    tag()('body'),
    block('content').tag()('article'),
    block('footer').tag()('footer')
)

P.S. Test needed.

@miripiruni miripiruni changed the title Throw error of warning on several block subpredicates Throw error or warning on several block subpredicates Mar 20, 2017
@miripiruni
Copy link
Contributor Author

Need tests for cases such as block('a').mod('m1', 'v1').mod('m2', 'v2')…

@miripiruni
Copy link
Contributor Author

We have three options:

  1. Throw error only in case of block in block case (block('a').block('b')… or block('a')(block('b')…)) (see my commit e7c5cb1)
  2. Throw error in any necessary case: tag().tag()…, mix().mix()…, attrs().attrs()…, js().js()…, content().content()…, etc
  3. Do not throw errors but introduce static check.

IMHO we need a combination of 1 and 3. Because 2 is much more heavy for bundle size.

@veged @zxqfox @tadatuta what are you think about it?

@veged
Copy link
Member

veged commented Apr 19, 2017

let's do this through static check

@miripiruni miripiruni changed the title Throw error or warning on several block subpredicates Add static check: warning on several block/mix/attrs/js/etc subpredicates Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants