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

TypeError: Cannot read properties of undefined (reading '0') at LessParser.atrule #167

Open
ccqgithub opened this issue Jun 30, 2022 · 1 comment · May be fixed by #170
Open

TypeError: Cannot read properties of undefined (reading '0') at LessParser.atrule #167

ccqgithub opened this issue Jun 30, 2022 · 1 comment · May be fixed by #170

Comments

@ccqgithub
Copy link

With vscode-stylelint, throw errors when typing, similar with relative issue.

  • Node Version: v16.15.1
  • NPM Version: 8.11.0
  • postcss Version: 8.4.14
  • postcss-less Version: 6.0.0

If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.

LESS

Throw errors when typing

.l

JavaScript

// js that reproduces the issue

Errors

image

Expected Behavior

No exceptions when typing

Actual Behavior

Exceptions.

How can we reproduce the behavior?

stylelintrc.js

module.exports = {
  plugins: ['stylelint-prettier'],
  extends: [
    'stylelint-config-recommended',
    'stylelint-config-css-modules',
    'stylelint-config-prettier'
  ],
  rules: {
    'at-rule-no-unknown': null,
    'font-family-no-missing-generic-family-keyword': null,
    'no-descending-specificity': null,
    'selector-pseudo-class-no-unknown': [
      true,
      {
        ignorePseudoClasses: ['global', 'local']
      }
    ],
    'selector-type-no-unknown': [
      true,
      {
        ignoreTypes: ['/[a-zA-Z-]+/']
      }
    ],
    'function-no-unknown': [
      true,
      {
        ignoreFunctions: ['constant']
      }
    ],
    'prettier/prettier': true
  },
  overrides: [
    {
      files: ['*.less', '**/*.less'],
      customSyntax: 'postcss-less-fix'
    }
  ]
};
@shellscape
Copy link
Owner

Happy to review a PR that solves this.

tjx666 pushed a commit to tjx666/postcss-less that referenced this issue Sep 4, 2022
@tjx666 tjx666 linked a pull request Sep 4, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants