@brightspace-ui/stylelint-config 0.0.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -6
- package/index.js +11 -2
- package/package.json +7 -4
package/README.md
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# stylelint-config
|
|
2
2
|
[](https://www.npmjs.org/package/@brightspace-ui/stylelint-config)
|
|
3
3
|
[](https://www.npmjs.com/package/@brightspace-ui/stylelint-config)
|
|
4
|
-
[](https://app.dependabot.com/)
|
|
5
4
|
|
|
6
5
|
Common Brightspace [stylelint](https://stylelint.io/) configs.
|
|
7
6
|
|
|
@@ -39,12 +38,41 @@ Contributions are welcome, please submit a pull request!
|
|
|
39
38
|
|
|
40
39
|
This repository is configured with [EditorConfig](http://editorconfig.org) rules and contributions should make use of them.
|
|
41
40
|
|
|
42
|
-
## Versioning
|
|
41
|
+
## Versioning & Releasing
|
|
43
42
|
|
|
44
|
-
|
|
43
|
+
> TL;DR: Commits prefixed with `fix:` and `feat:` will trigger patch and minor releases when merged to `main`. Read on for more details...
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
The [sematic-release GitHub Action](https://github.com/BrightspaceUI/actions/tree/master/semantic-release) is called from the `release.yml` GitHub Action workflow to handle version changes and releasing.
|
|
47
46
|
|
|
48
|
-
|
|
47
|
+
### Version Changes
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
All version changes should obey [semantic versioning](https://semver.org/) rules:
|
|
50
|
+
1. **MAJOR** version when you make incompatible API changes,
|
|
51
|
+
2. **MINOR** version when you add functionality in a backwards compatible manner, and
|
|
52
|
+
3. **PATCH** version when you make backwards compatible bug fixes.
|
|
53
|
+
|
|
54
|
+
The next version number will be determined from the commit messages since the previous release. Our semantic-release configuration uses the [Angular convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular) when analyzing commits:
|
|
55
|
+
* Commits which are prefixed with `fix:` or `perf:` will trigger a `patch` release. Example: `fix: validate input before using`
|
|
56
|
+
* Commits which are prefixed with `feat:` will trigger a `minor` release. Example: `feat: add toggle() method`
|
|
57
|
+
* To trigger a MAJOR release, include `BREAKING CHANGE:` with a space or two newlines in the footer of the commit message
|
|
58
|
+
* Other suggested prefixes which will **NOT** trigger a release: `build:`, `ci:`, `docs:`, `style:`, `refactor:` and `test:`. Example: `docs: adding README for new component`
|
|
59
|
+
|
|
60
|
+
To revert a change, add the `revert:` prefix to the original commit message. This will cause the reverted change to be omitted from the release notes. Example: `revert: fix: validate input before using`.
|
|
61
|
+
|
|
62
|
+
### Releases
|
|
63
|
+
|
|
64
|
+
When a release is triggered, it will:
|
|
65
|
+
* Update the version in `package.json`
|
|
66
|
+
* Tag the commit
|
|
67
|
+
* Create a GitHub release (including release notes)
|
|
68
|
+
* Deploy a new package to NPM
|
|
69
|
+
|
|
70
|
+
### Releasing from Maintenance Branches
|
|
71
|
+
|
|
72
|
+
Occasionally you'll want to backport a feature or bug fix to an older release. `semantic-release` refers to these as [maintenance branches](https://semantic-release.gitbook.io/semantic-release/usage/workflow-configuration#maintenance-branches).
|
|
73
|
+
|
|
74
|
+
Maintenance branch names should be of the form: `+([0-9])?(.{+([0-9]),x}).x`.
|
|
75
|
+
|
|
76
|
+
Regular expressions are complicated, but this essentially means branch names should look like:
|
|
77
|
+
* `1.15.x` for patch releases on top of the `1.15` release (after version `1.16` exists)
|
|
78
|
+
* `2.x` for feature releases on top of the `2` release (after version `3` exists)
|
package/index.js
CHANGED
|
@@ -76,7 +76,6 @@ module.exports = {
|
|
|
76
76
|
"selector-attribute-operator-space-before": "never",
|
|
77
77
|
"selector-combinator-space-after": "always",
|
|
78
78
|
"selector-combinator-space-before": "always",
|
|
79
|
-
"selector-class-pattern": "(^d2l-)|(^focus-visible$)",
|
|
80
79
|
"selector-descendant-combinator-no-non-space": true,
|
|
81
80
|
"selector-list-comma-space-before": "never",
|
|
82
81
|
"selector-max-empty-lines": 0,
|
|
@@ -93,5 +92,15 @@ module.exports = {
|
|
|
93
92
|
"value-list-comma-space-after": "always-single-line",
|
|
94
93
|
"value-list-comma-space-before": "never",
|
|
95
94
|
"value-list-max-empty-lines": 0
|
|
96
|
-
}
|
|
95
|
+
},
|
|
96
|
+
"overrides": [
|
|
97
|
+
{
|
|
98
|
+
"files": ["**/*.js"],
|
|
99
|
+
"customSyntax": "@stylelint/postcss-css-in-js"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"files": ["**/*.html"],
|
|
103
|
+
"customSyntax": "postcss-html"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
97
106
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightspace-ui/stylelint-config",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Common Brightspace stylelint configs.",
|
|
5
5
|
"repository": "https://github.com/BrightspaceUI/stylelint-config.git",
|
|
6
6
|
"publishConfig": {
|
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
"author": "D2L Corporation",
|
|
17
17
|
"license": "Apache-2.0",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"stylelint": "^
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"@stylelint/postcss-css-in-js": "^0.37.2",
|
|
20
|
+
"postcss-html": "^1.2.0",
|
|
21
|
+
"postcss-syntax": "^0.36.2",
|
|
22
|
+
"stylelint": "^14",
|
|
23
|
+
"stylelint-config-recommended": "^6",
|
|
24
|
+
"stylelint-order": "^5"
|
|
22
25
|
}
|
|
23
26
|
}
|