Skip to content

ESlint does not support min max clamp and other functions #405

@1aron

Description

@1aron

Description

SyntaxError [SyntaxMatchError]: Mismatch
    at matchSyntax (file:///Users/aron/master/css/node_modules/.pnpm/css-tree@3.1.0/node_modules/css-tree/lib/lexer/Lexer.js:92:17)
    at Lexer.matchProperty (file:///Users/aron/master/css/node_modules/.pnpm/css-tree@3.1.0/node_modules/css-tree/lib/lexer/Lexer.js:370:16)
    at validateDeclaration (/Users/aron/master/css/packages/validator/src/validate-css.ts:135:44)
    at List.<anonymous> (/Users/aron/master/css/packages/validator/src/validate-css.ts:153:32)
    at List.forEach (file:///Users/aron/master/css/node_modules/.pnpm/css-tree@3.1.0/node_modules/css-tree/lib/utils/List.js:145:16)
    at validateRule (/Users/aron/master/css/packages/validator/src/validate-css.ts:151:29)
    at Object.enter (/Users/aron/master/css/packages/validator/src/validate-css.ts:28:28)
    at Object.<anonymous> (file:///Users/aron/master/css/node_modules/.pnpm/css-tree@3.1.0/node_modules/css-tree/lib/walker/create.js:11:16) {
  message: 'Mismatch\n' +
    '  syntax: auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content( <length-percentage> ) | stretch | <-non-standard-size>\n' +
    '   value: min(50vw, 200px)\n' +
    '  --------^',
  rawMessage: 'Mismatch',
  syntax: 'auto | <length> | <percentage> | min-content | max-content | fit-content | fit-content( <length-percentage> ) | stretch | <-non-standard-size>',
  css: 'min(50vw, 200px)',
  mismatchOffset: 0,
  mismatchLength: 4,
  offset: 0,
  line: 1,
  column: 1,
  loc: {
    source: '<unknown>',
    start: { offset: 0, line: 1, column: 1 },
    end: { offset: 4, line: 1, column: 5 }
  }
}

Reproduction

No response

System Informations

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions