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

feat(*): linting rules and fixes #233

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

adamdehaven
Copy link
Member

@adamdehaven adamdehaven commented Sep 6, 2023

Summary

Adds eslint and stylelint rules to block the usage of Kongponents utility classes and CSS custom properties in Portal (as they will be removed in the next release).

TODO before merge

  • Keep up-to-date with main
  • Re-enable /.vscode/settings.json file
  • Run yarn stylelint:fix
  • Run yarn lint:fix
  • Change the @kong/kongponents dependency to the alpha release (yarn add @kong/kongponents@alpha) once it is available (before merge)

After steps above are completed, this PR also includes:

  • Add stylelint and associated rules (e.g. property order, etc.)
  • Additional eslint rules to standardize the codebase (e.g. attribute order, trailing commas, etc.)
  • Ran lint:fix and stylelint:fix to update the codebase to adhere to the new rules. Verified no breaking changes.
  • Consolidates the .client.eslintrc.js and .eslintrc.js files as there was no reason for them to be separate
  • Adds the typecheck into the pre-commit hook to prevent code being pushed that we already know will fail the CI
  • Adds the stylelint check to the CI pipelines
  • Adds @kong/design-tokens package and auto-injects the SCSS variables into all components to utilize as needed

Existing codebases/forks/etc. can run the following commands to ensure their custom code adheres to the new rules:

# Get latest from main branch, then...

yarn install --frozen-lockfile

yarn stylelint:fix

yarn lint:fix

@adamdehaven adamdehaven self-assigned this Sep 6, 2023
@adamdehaven adamdehaven requested a review from a team as a code owner September 6, 2023 16:04
@nateslo nateslo added the do not merge Do not merge this pull request until this label is removed. label Sep 6, 2023
@adamdehaven adamdehaven marked this pull request as draft September 6, 2023 18:19
@nateslo
Copy link
Member

nateslo commented Apr 11, 2024

@adamdehaven can we close this PR?

@adamdehaven
Copy link
Member Author

@nateslo if we're thinking none of this matters until 🤫 sure; your call 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge this pull request until this label is removed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants