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

vscode showing SyntaxError dialogs #9

Open
rdgomt opened this issue Jan 27, 2023 · 0 comments
Open

vscode showing SyntaxError dialogs #9

rdgomt opened this issue Jan 27, 2023 · 0 comments

Comments

@rdgomt
Copy link

rdgomt commented Jan 27, 2023

Hello! I dont know if this behavior is being caused because of postcss-js-core. Seems like everything I type then the stylelint extension throws an error. Here is an example:

SyntaxError: Unexpected token (6:0) at instantiate (/Users/.../node_modules/postcss-js-core/node_modules/@babel/parser/lib/index.js:64:32) at constructor (/Users/.../node_modules/postcss-js-core/node_modules/@babel/parser/lib/index.js:361:12) at TypeScriptParserMixin.raise (/Users/.../node_modules/postcss-js-core/node_modules/@babel/parser/lib/index.js:3251:19) at TypeScriptParserMixin.unexpected (/Users/.../node_modules/postcss-js-core/node_modules/@babel/parser/lib/index.js:3281:16) at TypeScriptParserMixin.parseExprAtom (/Users/.../node_modules/postcss-js-core/node_modules/@babel/parser/lib/index.js:11233:22) at TypeScriptParserMixin.parseExprAtom (/Users/.../node_modules/postcss-js-core/node_modules/@babe...

Gravacao.de.Tela.2023-01-26.as.21.51.10.mov

.stylelintrc:

{
  "customSyntax": "postcss-styled-components",
  "extends": [
    "stylelint-config-recommended",
    "stylelint-config-styled-components",
    "stylelint-config-prettier"
  ],
  "plugins": ["stylelint-order", "stylelint-require-units"],
  "rules": {
    "matterialize/stylelint-require-units": [
      true,
      {
        "checkUnknownUnits": true,
        "forceZeroToRequireUnits": true
      }
    ],
    "order/properties-alphabetical-order": [
      true,
      {
        "severity": "warning"
      }
    ]
  }
}

settings.json:

{
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "stylelint.validate": ["css", "postcss", "typescript", "typescriptreact"],
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true,
    "source.fixAll.stylelint": true,
    "source.organizeImports": false
  },
  "typescript.tsdk": "node_modules/typescript/lib"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant