question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refactor to remove style-search

See original GitHub issue

We’ve been gradually moving away from style-search in favour of using the value parser.

This is an umbrella issue to track that migration.

Rules:

  • function-calc-no-unspaced-operator
  • selector-pseudo-element-colon-notation
  • value-no-vendor-prefix

Utils:

  • rangeContextNodeParser
  • functionArgumentsSearch

Stylistic rules and utils (no need to update as will eventually be deprecated and removed):

  • function-whitespace-after
  • indentation
  • max-empty-lines
  • max-line-length
  • no-eol-whitespace
  • no-extra-semicolons
  • selector-attribute-brackets-space-inside
  • selector-list-comma-newline-after

Utils:

  • declarationBangSpaceChecker
  • findMediaOperator
  • mediaFeatureColonSpaceChecker
  • mediaQueryListCommaWhitespaceChecker
  • selectorAttributeOperatorSpaceChecker
  • selectorListCommaWhitespaceChecker
  • valueListCommaWhitespaceChecker

When adding an option or fixing a bug with one of these rules (or a rule that uses a utility using search-search), consider refactoring it to use the value parser.

Ref: https://github.com/stylelint/stylelint/pull/5496#discussion_r694494678

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jeddy3commented, Feb 5, 2022

Can we use the value parser as a stepping stone to a parser that understands this construct?

The value parser will parse this a series of word nodes. We can then spot the operator word nodes.

1reaction
jeddy3commented, Jan 18, 2022

I’ve updated the task list above to ignore stylistic rules and utils.

It leaves us with only two rules and two utils left to migrate to a parser.

I think rangeContextNodeParser is a good candidate to migrate to a future-facing parser like SWC. Having said that, all the rules can be migrated to postcss-based parsers as a stepping stone away from stylesearch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Designing an AJAX driven Quicksilver-style search with ...
I have a solution where the back-end uses the observer pattern to send the query to different plugins for each type of search....
Read more >
reCode : A Lightweight Find-and-Replace Interaction in the ...
reCode users first specify a straightforward search term to identify relevant locations of interest for the code transformation. To remove the burden of...
Read more >
Create API to discover config entities' soft dependencies and ...
Create API to discover config entities' soft dependencies and use this to present a confirm form on module uninstall ; custom_block_type, n/a.
Read more >
Plugin Ideas Search - JetBrains Marketplace
Right-click on any of the results references in the find window and hit "Exclude" or "Remove". Click Export to "^O" to export to...
Read more >
Refactor How Weekly Mileage is Calculated - Rails Code Along
In this video, we refactor how weekly mileage is calculated by adding a new column to the activities table to store the distance...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found