Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
[stylelint-config-terra][browserlist-config-terra] Update stylelint t…
Browse files Browse the repository at this point in the history
…o v15 and remove IE 10 rules (#831)

* initial changes

* updates, removing scss standards

* updating rules, removing rimraf, fixing stylelint-config package.json

* removing rem from ignore list since we should now fully support it
  • Loading branch information
BenBoersma authored Oct 24, 2023
1 parent 4bf2bb0 commit ee0b5e2
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"react": "^16.8.5",
"react-dom": "^16.8.5",
"react-intl": "^2.9.0",
"stylelint": "^13.0.0",
"stylelint": "^15.2.0",
"terra-application": "^1.54.1",
"utf-8-validate": "^5.0.2",
"webpack": "^5.28.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/browserslist-config-terra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Breaking Change
* Dropped support for IE10.

## 3.4.0 - (August 31, 2023)

* Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/browserslist-config-terra/browserslist.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = [
'ie >= 11',
'iOS >= 12',
'last 2 and_chr versions',
'last 2 android versions',
'last 2 chrome versions',
'last 2 edge versions',
'last 2 firefox versions',
'last 2 ie versions',
'last 2 safari versions',
];
3 changes: 3 additions & 0 deletions packages/stylelint-config-terra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Breaking Change
* Upgraded Stylelint from 13 to 15.

## 4.6.0 - (September 26, 2023)

* Changed
Expand Down
15 changes: 13 additions & 2 deletions packages/stylelint-config-terra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
"publishConfig": {
"access": "public"
},
"files": [
"CHANGELOG.md",
"README.md",
"LICENSE",
"NOTICE",
"lib",
"stylelint.config.js"
],
"keywords": [
"stylelint",
"stylelint-config",
Expand Down Expand Up @@ -44,9 +52,11 @@
"test": "npm run jest"
},
"dependencies": {
"@cerner/browserslist-config-terra": "3.2.0",
"find-up": "^4.0.0",
"postcss-scss": "^4.0.6",
"postcss-value-parser": "^4.0.0",
"stylelint-config-sass-guidelines": "^7.1.0",
"stylelint-config-sass-guidelines": "10.0.0",
"stylelint-no-unsupported-browser-features": "^4.1.0",
"stylelint-order": "^4.1.0",
"stylelint-scss": "^3.11.0"
Expand All @@ -59,6 +69,7 @@
"eslint": "^7.32.0"
},
"peerDependencies": {
"stylelint": "^13.0.0"
"postscss": "8.3.11",
"stylelint": "^15.2.0"
}
}
15 changes: 9 additions & 6 deletions packages/stylelint-config-terra/stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const browserslist = require('@cerner/browserslist-config-terra');

module.exports = {
extends: 'stylelint-config-sass-guidelines',
plugins: [
Expand All @@ -10,7 +12,6 @@ module.exports = {
],
rules: {
'max-nesting-depth': 3,
'no-extra-semicolons': [true, { severity: 'warning' }],
'scss/at-mixin-pattern': '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$',
'custom-property-pattern': [
'[a-z]+([a-z0-9-]+[a-z0-9]+)?$',
Expand All @@ -19,6 +20,7 @@ module.exports = {
},
],
'declaration-property-unit-allowed-list': [{ 'line-height': [] }, { severity: 'warning' }],
'scss/no-global-function-names': null,
'terra/custom-property-name': true,
'terra/custom-property-no-duplicate-declaration': true,
'terra/custom-property-pattern': true,
Expand All @@ -27,16 +29,17 @@ module.exports = {
'plugin/no-unsupported-browser-features': [
true,
{
browsers: browserslist,
ignore: [
'calc', // "calc" is only partially supported by Android Browser 4.4.3-4.4.4
'css-gradients', // is only partially supported by Safari 12,11.1, iOS Safari 10.0-10.2,10.3,11.0-11.2,11.3-11.4,12.0-12.1
'cursor', // "css3-cursors" is not supported by iOS Safari 10.0-10.2,10.3,11.0-11.2,11.3-11.4, Android Browser 4.4.3-4.4.4
'flexbox', // "flexbox" is only partially supported by IE 10,11
'outline', // "outline" is only partially supported by IE 10,11
'rem', // "rem" is only partially supported by IE 10
'viewport-units', // is only partially supported by IE 10,11
'flexbox', // "flexbox" is only partially supported by IE 11
'outline', // "outline" is only partially supported by IE 11
'viewport-units', // is only partially supported by IE 11
'word-break', // "word-break" is only partially supported by Android Browser 4.3.4-4.4.4
'wordwrap', // is only partially supported by IE 10,11, Edge 17
'wordwrap', // is only partially supported by IE 11, Edge 17
'css-filters', // "Not supported by IE 11",
],
severity: 'warning',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports[`custom-property-name does error with a mismatched name 1`] = `
Array [
Object {
"column": 9,
"endColumn": 47,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-name",
"severity": "error",
Expand All @@ -16,6 +18,8 @@ exports[`custom-property-name does error with a mismatched name with hyphen 1`]
Array [
Object {
"column": 9,
"endColumn": 49,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-name",
"severity": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports[`custom-property-namespace does error with no custom namespace 1`] = `
Array [
Object {
"column": 9,
"endColumn": 33,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-namespace",
"severity": "error",
Expand All @@ -16,6 +18,8 @@ exports[`custom-property-namespace does error with no default namespace 1`] = `
Array [
Object {
"column": 9,
"endColumn": 34,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-namespace",
"severity": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports[`custom-property-no-duplicate-declaration does error with nested duplica
Array [
Object {
"column": 11,
"endColumn": 42,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-no-duplicate-declaration",
"severity": "error",
Expand All @@ -16,6 +18,8 @@ exports[`custom-property-no-duplicate-declaration does error with reversed sibli
Array [
Object {
"column": 11,
"endColumn": 42,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-no-duplicate-declaration",
"severity": "error",
Expand All @@ -28,6 +32,8 @@ exports[`custom-property-no-duplicate-declaration does error with sibling duplic
Array [
Object {
"column": 49,
"endColumn": 80,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-no-duplicate-declaration",
"severity": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports[`custom-property-pattern does error with custom property with underscore
Array [
Object {
"column": 9,
"endColumn": 44,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-pattern",
"severity": "error",
Expand All @@ -16,6 +18,8 @@ exports[`custom-property-pattern does error with custom property with uppercase
Array [
Object {
"column": 9,
"endColumn": 33,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-pattern",
"severity": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ exports[`custom-property-pseudo-selectors does error with a custom properties th
Array [
Object {
"column": 27,
"endColumn": 63,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-pseudo-selectors",
"severity": "error",
Expand All @@ -16,6 +18,8 @@ exports[`custom-property-pseudo-selectors does error with a custom properties th
Array [
Object {
"column": 15,
"endColumn": 39,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-pseudo-selectors",
"severity": "error",
Expand All @@ -28,6 +32,8 @@ exports[`custom-property-pseudo-selectors does error with a custom properties th
Array [
Object {
"column": 15,
"endColumn": 39,
"endLine": 1,
"line": 1,
"rule": "terra/custom-property-pseudo-selectors",
"severity": "error",
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-toolkit-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated upgrade guide for `stylelint-config-terra`.

## 2.23.0 - (September 26, 2023)

* Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ import { Badge } from '@cerner/stylelint-config-terra/package.json?dev-site-pack

# stylelint-config-terra Upgrade Guide

## Changes from stylelint-config-terra 4.0.0 to @cerner/stylelint-config-terra 5.0.0

* Stylelint version 15 is now required. Refer to the [Stylelint 15 Migration Guide for more details](https://stylelint.io/migration-guide/to-15).
* Support for IE10 rules has been dropped. Make sure you are no longer using IE10 rules in your project before upgrading.
* Stylint CLI no longer supports --syntax option. Refer to the [Stylelint 14 Migration Guide for more details](https://stylelint.io/migration-guide/to-14#syntax-option-and-automatic-inferral-of-syntax).

## Changes from stylelint-config-terra 3.x to @cerner/stylelint-config-terra 4.0.0

### Node 10

Node 10 is not the minimum supported version. Upgrade to node 10.
Node 10 is not the minimum supported version. Upgrade to node 14.

### Stylelint 13

Expand Down

0 comments on commit ee0b5e2

Please sign in to comment.