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

Switch to using @thoughtbot/stylelint-config #2492

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

nickcharlton
Copy link
Member

@nickcharlton nickcharlton commented Jan 22, 2024

In #2397, we're having trouble with ignoring directories using the existing scss-lint configuration on Hound. scss-lint has been deprecated for a while and we have another configuration based on thoughtbot guides, so this is a good fit.

We use BEM style selectors in our CSS. So we add a custom rule, based on some prior work by @a-tokyo, but adjusted to fit in our JSON configuration file.

In addition, we disable these rules as they don't make sense on Administrate:

  • Disable scss/dollar-variable-empty-line-before on variables
  • Disable function-no-unknown/no-global function names

https://github.com/thoughtbot/stylelint-config
sds/scss-lint@4ac76f9
humanmade/coding-standards#193 (comment)
simonsmith/stylelint-selector-bem-pattern#23

@nickcharlton
Copy link
Member Author

I need to fix GHA, but also when it does run, there's some linting failures as the rules seem to be slightly different and/or maybe broken. I can't tell.

@nickcharlton nickcharlton added views-and-styles how administrate looks and is interacted with github-actions Pull requests that update GitHub Actions code labels Jan 22, 2024
@nickcharlton
Copy link
Member Author

Over on the stylelint-config repo, I'm trying to bring that up to date and sort things out there … then I can come back to this.

@nickcharlton
Copy link
Member Author

This has been a ten (10) day side quest and I can finally think about sorting out the rules which are now failing.

@nickcharlton nickcharlton force-pushed the nc-switch-to-stylelint branch from 566c1c9 to 2f446c7 Compare February 2, 2024 12:42
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
In #2397, we're having trouble with ignoring directories using the
existing `scss-lint` configuration on Hound. `scss-lint` has been
deprecated for a while and we have another configuration based on
thoughtbot guides, so this is a good fit.

We use BEM style selectors in our CSS. So we add a custom rule, based on
some prior work by @a-tokyo, but adjusted to fit in our JSON
configuration file.

In addition, we disable these rules as they don't make sense on
Administrate:

* Disable scss/dollar-variable-empty-line-before on variables
* Disable function-no-unknown/no-global function names

https://github.com/thoughtbot/stylelint-config
sds/scss-lint@4ac76f9
humanmade/coding-standards#193 (comment)
simonsmith/stylelint-selector-bem-pattern#23
@nickcharlton nickcharlton force-pushed the nc-switch-to-stylelint branch from 9231448 to cbd5c0d Compare February 2, 2024 16:33
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
@thoughtbot thoughtbot deleted a comment from hound bot Feb 2, 2024
@nickcharlton
Copy link
Member Author

I published stylelint-config v4.0.0, then updated to that here.

Now this is ready to go. Hound keeps trying to lint, even though it's not configured it's configured at the org level and they mustn't merge the configurations, which … explains why it wasn't working before. That's very confusing.

@nickcharlton nickcharlton merged commit fad9c40 into main Feb 2, 2024
10 checks passed
@nickcharlton nickcharlton deleted the nc-switch-to-stylelint branch February 2, 2024 17:12
jasongorst added a commit to jasongorst/administrate that referenced this pull request Feb 10, 2024
jasongorst added a commit to jasongorst/administrate that referenced this pull request Feb 10, 2024
nickcharlton pushed a commit to jasongorst/administrate that referenced this pull request Feb 14, 2024
In adjusting the styles in thoughtbot#2492, we removed more specific selectors to
pass linting rules. Unfortunately, this broke the situation where you
have a checkbox input when editing a `Field::Boolean`. This adds them
back in, in a linting happy way.

Fixes thoughtbot#2511
nickcharlton pushed a commit that referenced this pull request Feb 14, 2024
In adjusting the styles in #2492, we removed more specific selectors to
pass linting rules. Unfortunately, this broke the situation where you
have a checkbox input when editing a `Field::Boolean`. This adds them
back in, in a linting happy way.

Fixes #2511
nickcharlton added a commit that referenced this pull request Feb 21, 2024
Since #2508 and #2492, we no longer use Hound, this removes the last
reference of it and it's configuration.

We also haven't had a working Code Climate configuration for a while, so
this removes that too.
nickcharlton added a commit that referenced this pull request Jun 28, 2024
Since #2508 and #2492, we no longer use Hound, this removes the last
reference of it and it's configuration.

We also haven't had a working Code Climate configuration for a while, so
this removes that too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions Pull requests that update GitHub Actions code views-and-styles how administrate looks and is interacted with
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant