Skip to content

Commit

Permalink
Merge pull request #19 from Netcentric/3.0.0-update
Browse files Browse the repository at this point in the history
Feature: Update to Stylelint 16, update other dependencies, and restore support for stylistic rules that were deprecated in Stylelint v15
  • Loading branch information
lucasenicora authored Jun 24, 2024
2 parents 3f09bea + 91ccea2 commit deeb4c5
Show file tree
Hide file tree
Showing 4 changed files with 1,778 additions and 866 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If StyleLint is new to you, you might want to check out [what it does](https://
## Install

```bash
npm install --save @netcentric/stylelint-config stylelint
npm install --save-dev @netcentric/stylelint-config stylelint
```

## Setup
Expand Down Expand Up @@ -68,24 +68,23 @@ When working with this plugin we've found some browser issues that might help yo

```javascript
"plugin/no-unsupported-browser-features": [true, {
severity: `error`,
severity: `warning`,
browsers,
ignore: [
// only issue for IE (according to http://caniuse.com/#feat=font-unicode-range)
// seems to that it "ignores the unicode-range if the U is lowercase e.g 'u+0061'"
`font-unicode-range`,
// autoprefixer does the job
`flexbox`,
// "css-hyphens" is only partially supported by Chrome and Android Browser 56
// autoprefixer does the job
`css-hyphens`,
// http://caniuse.com/#feat=viewport-units
// only the `vmax` rule is not supported in IE11, Edge
`viewport-units`,
// we expect full CSS grid support on target browsers once the project launches
// we expect full CSS grid support on target browsers nowadays
`multicolumn`,
// IE11, Edge14 partially support this http://caniuse.com/#feat=outline
`outline`
// most of the values are well supported, just clip is partially suppported by Safari
'css-overflow',
// most of the values are well supported, just old versions of Firefox and Safari have a few issues with transparent colors
'css-gradients',
// following rules need to be disabled if using SCSS, since the CSS nesting is going to be converted to compatible CSS by the build tools
'css-nesting',
'css-when-else',
// it might give false positives when using together with SCSS functions, such as column-gap: scss-function();
'column-gap',
]
}],
```
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module.exports = {
"extends": "stylelint-config-standard-scss",
"extends": [
"stylelint-config-standard-scss",
"@stylistic/stylelint-config"
],
"plugins": [
"@stylistic/stylelint-plugin",
"stylelint-no-unsupported-browser-features"
],
// additonal rules based mainly on
Expand All @@ -14,8 +18,8 @@ module.exports = {
"plugin/no-unsupported-browser-features": [true, { "severity": "warning" }],

// general
"indentation": null,
"no-missing-end-of-source-newline": null,
"@stylistic/indentation": null,
"@stylistic/no-missing-end-of-source-newline": null,

// vendor prefixes
// we expect all projects to use autoprefixer
Expand Down
Loading

0 comments on commit deeb4c5

Please sign in to comment.