Closed nicolaisueper closed 6 years ago
Thanks ❤️
Hope to find the time to review that within the next couple of days.
FYI: I’ve just moved the open questions from the original issue #198 to this PR to make it easier to review this.
Are polyfills covered? E.g. if I import 'core-js/es6/promise' anywhere, will the check throw an error when using promises?
Answer: Yis. Ref: https://github.com/amilajack/eslint-plugin-compat/wiki/Adding-polyfills
I'm going to double check this now.
Please make eslint optional via config.
Hej @dertuerke,
this is not the place to request that. Feel free to open an issue. But I doubt that you will convince us to make that optional. Because it’s easy to disable in the gulpfile If one really wants to disable it. Must say that I really think you shouldn’t disable it.
Closing this as it doesn’t work out 😞
Reasons
Object.assign()
and String.prototype.padEnd()
didn’t cause errors. Same for arrow functions. Plus, when something causes an error, the error remains when using a proper polyfill.
Summary
This PR will add the possibility to check the SCSS and JS sources for browser compatibility using eslint-plugin-compat and stylelint-no-unsupported-browser-features. The sources don't get checked for compat separately but inside the lint-tasks.
I also added a
lintAll
task, which just runslint
andlintStyles
in parallel.Usage
You may define your supported browser versions inside the
browserslist
file located at the project root. It defaults to"ie >= 11, > 0.5%, last 2 versions"
To run the checks either run:
gulp lint
orgulp lint -P
orgulp lintAll
orgulp lintAll -P
Behavior
The table below shows which plugin breaks the build on dev/prod.
Open issues
Open questions