New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@jesscss/less-parser

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jesscss/less-parser

Jess LESS parser

npmnpm
Version
2.0.0-alpha.6
Version published
Weekly downloads
125
-83.38%
Maintainers
1
Weekly downloads
 
Created
Source

Jess - Less parser

Translates a Less string to a Jess AST.

Ideas

Converting Less 1.x-5.x to Less 6

  • Auto-wrap parens around division to dis-ambiguate.
  • Convert @import to @use and @include syntax.
  • Throw errors on @plugin and ask to refactor with @from
  • Convert function references to @from '#less' ([func])
  • Add parentheses after mixin calls e.g. .ns > .mixin; to .ns.mixin();
  • Convert local imports from @import 'local' to @include './local.less'
  • Convert @import (less) './file.css'; to @include './file.css' as less;
  • Convert @import (inline) './file.css'; to @include './file.css' as text;
  • Convert @import (reference) './file.less'; to @use './file.less';
  • Files that consume variables, mixins, or rules (like with extend) should have a @use added.
  • Don't allow .class as a value in a declaration. Convert to \.class e.g. @foo: .class should be converted to @foo: \.class (or selector(.class)?).
  • In a custom property value, convert @variable to @{variable}.

Converting Less 1.x-4.x to Jess

  • Auto-wrap expressions (like math) with $()
  • Convert mixin definitions .my-mixin() to @mixin my-mixin()
  • Convert mixin calls to function calls: #ns > .mixin() to $ns.mixin()
  • Throw errors on mixed case mixins: .my-mixin() and .myMixin()
  • Throw errors on mixed hash and class mixins: #my-mixin() and .my-mixin()
  • Convert variable declarations @my-var with $my-var
  • Convert interpolated vars @{my-var} to $(my-var)
  • Convert property references $prop to $[prop]
  • Convert color names in expressions to hex values (or wrapped in color()?) (because Jess doesn't support color keywords in expressions). Alternatively, should Jess allow keyword to denote keywords?
  • Convert @rest... to ...rest
  • Convert .rules() to @include .rules() if .rules is a selector. What if it's a selector and mixin? Maybe something like @include .rules, $rules();? This might change the execution order from Less though.
  • Convert @foo: extract(@bar, 1) to @let foo: $bar[0];?

FAQs

Package last updated on 05 Apr 2026

Related posts