-
-
Notifications
You must be signed in to change notification settings - Fork 55
Initial config for stylelint #747
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
base: main
Are you sure you want to change the base?
Conversation
* Fix CHECKOV Docker security issues (brisbanesocialchess#554) * Update Dockerfile update the code * Update Dockerfile --------- Co-authored-by: John Bampton <[email protected]>
* Refactor tailwind.css: Change import statement to use URL and reorganize hover effect styles * Refactor role styles in tailwind.css: Consolidate border and color properties for roles * Fix import statement and clean up whitespace in tailwind.css
…ss#580) * Remove duplicate npm-ci hook; refactor local hooks * Update .pre-commit-config.yaml
* Natural language fixes in Markdown files * Update DEVELOPER_HELP.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update README.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* pre-commit prettier check JS files JS files were not being checked so there was a difference when running pre-commit and prettier manually via `npm run format`
) * Format base.njk with Prettier and run pre-commit hooks * Optimize PNGs via pre-commit (oxipng) * Unchanged package-lock.json and package.json * Removed Cdn * Apply pre-commit autofixes (EOF newline, oxipng) * Update frontend/_includes/layouts/base.njk --------- Co-authored-by: John Bampton <[email protected]>
* Create .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Update .deepsource.toml
* Update .deepsource.toml * Update .deepsource.toml Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Validate codecov.yml file with curl * Fix up
* Test Docker with GitHub Actions * Update .github/workflows/docker-ci.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces Stylelint to the project for CSS linting, which is a great step for maintaining code quality. I've found a few issues with the initial configuration. There's a syntax error in stylelint.config.js
that will prevent it from working. Additionally, the configuration isn't set up to handle Tailwind CSS syntax, and the .stylelintignore
file incorrectly ignores a source CSS file while not ignoring a generated one. My review includes suggestions to fix these issues to ensure Stylelint is configured correctly and effectively from the start.
stylelint.config.js
Outdated
export default { | ||
extends: ["stylelint-config-standard"], | ||
}; No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration has a syntax error and is incomplete for your project.
- Syntax Error: There's a trailing semicolon on line 4, which is invalid JavaScript syntax and will cause Stylelint to fail.
- Missing Tailwind CSS support: The project uses Tailwind CSS, but
stylelint-config-standard
doesn't understand Tailwind-specific at-rules like@theme
. This will lead to linting errors infrontend/assets/tailwind.css
.
I suggest fixing the syntax and adding stylelint-config-tailwindcss
. You'll need to install it first: npm i -D stylelint-config-tailwindcss
.
export default { | |
extends: ["stylelint-config-standard"], | |
}; | |
export default { | |
extends: ["stylelint-config-standard", "stylelint-config-tailwindcss"], | |
}; |
bundle.css | ||
tailwind.css | ||
./_site/assets | ||
./_deploy/assets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ignore file has a couple of issues:
tailwind.css
is ignored. This seems to be the main source file for your Tailwind CSS (frontend/assets/tailwind.css
), which contains custom CSS and should be linted. It's likely being ignored to prevent errors from Tailwind's custom at-rules, but the better solution is to configure Stylelint to understand them (as suggested forstylelint.config.js
).- The generated CSS file
frontend/assets/styles/base.css
is not being ignored. Generated files should typically be excluded from linting.
I suggest updating the ignore file to lint your source CSS and ignore the generated output.
bundle.css
frontend/assets/styles/base.css
./_site/assets
./_deploy/assets
No description provided.