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

Bug/lint config fix #15

Closed
wants to merge 3 commits into from
Closed

Bug/lint config fix #15

wants to merge 3 commits into from

Conversation

zacktraczyk
Copy link
Member

Problem

The linting failed on my local machine and pipeline.

  • TS linting gave this React warning:
    Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration
  • SCSS linting gave this error:
    When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-scss", and use the "customSyntax" option

Solution

  • The React version needed to be specified. I Used the latest option (Github Issue).
  • The new version of stylelint (v14) requires a PostCSS syntax package. You can add this configuration manually, but thought it was a better option to just use a standard config and extend our rules as that is what the stylelint-scss repo recommends. Then I added two scss linting settings (selector-class-pattern to allow the __ in the classname selectors and no-missing-end-of-source-newline to remove the requirement for newlines at the end of every scss file.
    (Github Issue).

Change Summary:

  • Fix ts and scss lint config

Images/Important Notes (optional):

  • I removed the stylelint-scss package
  • I added the stylelint-config-standard-scss package

@zacktraczyk zacktraczyk closed this Aug 8, 2022
@zacktraczyk zacktraczyk deleted the bug/lintConfigFix branch August 8, 2022 18:46
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

Successfully merging this pull request may close these issues.

1 participant