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

Meta: Enable JSX linting #2678

Merged
merged 3 commits into from Jan 8, 2020
Merged

Meta: Enable JSX linting #2678

merged 3 commits into from Jan 8, 2020

Conversation

fregante
Copy link
Member

@fregante fregante commented Jan 7, 2020

@fregante fregante added the meta Related to Refined GitHub itself label Jan 7, 2020
@jerone
Copy link
Contributor

jerone commented Jan 7, 2020

Cool :shipit:

Offtopic: I get the feeling that lint:css is not run on the PR. Can you confirm?

@fregante fregante changed the title Enable JSX linting Meta: Enable JSX linting Jan 8, 2020
@jerone
Copy link
Contributor

jerone commented Jan 8, 2020

It should be:

The weird thing is, that on my development environment it gives the following errors if I run lint:css:

source/options.css
  98:1  ×  Expected selector ".js-features input" to come before selector "input:not([type='checkbox']):invalid"   no-descending-specificity
 166:2  ×  Expected selector "body > :not(hr)" to come before selector ":root"                                     no-descending-specificity

But I'm not seeing those errors on GitHub Actions. I didn't touch that file. Weird 🙃

@fregante
Copy link
Member Author

fregante commented Jan 9, 2020

You may be right; This isn't be valid CSS: ea0c05f

But lint passes: https://github.com/sindresorhus/refined-github/runs/381528875

stylelint source/*.css includes files directly under source but stylelint source/**/*.css doesn't.

PR welcome to fix the command: stylelint 'source/**/*.css'

@jerone
Copy link
Contributor

jerone commented Jan 9, 2020

stylelint source/*.css includes files directly under source but stylelint source/**/*.css doesn't.

** should match zero or more directories. Meaning that source/**/*.css matches CSS files under source and all sub-directories. I can confirm that when I run lint:css and get errors on the file source/options.css. You also confirmed that in your test, that it was able to run on file source/options.css: https://github.com/sindresorhus/refined-github/runs/381528802#step:4:12

This all doesn't explain why I get these errors, and GitHub Actions not. Do you get those errors too when you run lint:css?

I'm on Windows. Also cleaned my whole node_modules folder. Also tried stylelint@12.0.1, without success.

I do see some talks about no-descending-specificity in the latest PR, but it's not yet released.

@fregante
Copy link
Member Author

I'm on Windows

That's the difference.

With stylelint source/**/*.css the glob expansion is up to the shell. Windows does it, bash apparently not.

With stylelint 'source/**/*.css', stylelint takes care of the glob expansion in a cross-platform way instead of letting the shell do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Related to Refined GitHub itself
Development

Successfully merging this pull request may close these issues.

None yet

3 participants