@hs-web-team/eslint-config-node 4.1.0 → 4.2.1
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.
|
@@ -7,11 +7,38 @@ on:
|
|
|
7
7
|
permissions:
|
|
8
8
|
contents: write
|
|
9
9
|
pull-requests: write
|
|
10
|
+
id-token: write # Required for OIDC npm publish
|
|
10
11
|
|
|
11
12
|
jobs:
|
|
12
13
|
release-please:
|
|
13
14
|
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
14
17
|
steps:
|
|
15
18
|
- uses: googleapis/release-please-action@v5
|
|
19
|
+
id: release
|
|
16
20
|
with:
|
|
17
21
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
22
|
+
|
|
23
|
+
publish:
|
|
24
|
+
needs: release-please
|
|
25
|
+
if: ${{ needs.release-please.outputs.release_created == 'true' }}
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
- uses: actions/setup-node@v6
|
|
30
|
+
with:
|
|
31
|
+
node-version: 24
|
|
32
|
+
registry-url: 'https://registry.npmjs.org'
|
|
33
|
+
- run: npm ci
|
|
34
|
+
- run: npm run build --if-present
|
|
35
|
+
- name: Publish to npm
|
|
36
|
+
run: |
|
|
37
|
+
VERSION=$(node -p "require('./package.json').version")
|
|
38
|
+
if [[ "$VERSION" =~ -next\. ]] || [[ "$VERSION" =~ -(alpha|beta|rc)\. ]]; then
|
|
39
|
+
echo "Publishing prerelease $VERSION with tag 'next'"
|
|
40
|
+
npm publish --tag next
|
|
41
|
+
else
|
|
42
|
+
echo "Publishing stable $VERSION"
|
|
43
|
+
npm publish
|
|
44
|
+
fi
|
package/.stylelintrc.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "stylelint-config-standard-scss",
|
|
3
|
+
"plugins": ["stylelint-declaration-strict-value"],
|
|
3
4
|
"rules": {
|
|
5
|
+
"scale-unlimited/declaration-strict-value": [
|
|
6
|
+
["/color/", "fill", "stroke", "font-size", "font-weight"],
|
|
7
|
+
{
|
|
8
|
+
"ignoreValues": ["inherit", "initial", "normal", "unset", "revert", "currentColor", "transparent"],
|
|
9
|
+
"message": "Expected a CSS custom property (var(--token)) or Sass variable ($var). For color opacity variants, use color-mix(in srgb, var(--token) 80%, transparent) instead of rgba().",
|
|
10
|
+
"severity": "warning"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
4
13
|
"length-zero-no-unit": null,
|
|
5
14
|
"declaration-empty-line-before": null,
|
|
6
15
|
"no-empty-source": null,
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [4.2.1](https://github.com/HubSpotWebTeam/wt-eslint-node/compare/v4.2.0...v4.2.1) (2026-06-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* re-trigger publish after release-please CI fix ([45fe949](https://github.com/HubSpotWebTeam/wt-eslint-node/commit/45fe94930c06d61e6f8f3015bc4e6518e187aaa1))
|
|
9
|
+
|
|
10
|
+
## [4.2.0](https://github.com/HubSpotWebTeam/wt-eslint-node/compare/v4.1.0...v4.2.0) (2026-06-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* warn on hardcoded color, font-size, and font-weight values ([#37](https://github.com/HubSpotWebTeam/wt-eslint-node/issues/37)) ([783a320](https://github.com/HubSpotWebTeam/wt-eslint-node/commit/783a320a3d0e858cd370670be452aaa847ba9c39))
|
|
@@ -7,7 +7,7 @@ This package provides a shared Stylelint configuration for SCSS/CSS linting in H
|
|
|
7
7
|
1. Install the package and stylelint dependencies:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install --save-dev @hs-web-team/eslint-config-node stylelint stylelint-config-standard-scss
|
|
10
|
+
npm install --save-dev @hs-web-team/eslint-config-node stylelint stylelint-config-standard-scss stylelint-declaration-strict-value
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -136,7 +136,7 @@ To override rules for your project, add them to your `.stylelintrc.json`:
|
|
|
136
136
|
If you get a module not found error, ensure you have installed all dependencies:
|
|
137
137
|
|
|
138
138
|
```bash
|
|
139
|
-
npm install --save-dev stylelint stylelint-config-standard-scss
|
|
139
|
+
npm install --save-dev stylelint stylelint-config-standard-scss stylelint-declaration-strict-value
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
### Conflicts with Prettier
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hs-web-team/eslint-config-node",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "HubSpot Marketing WebTeam shared configurations for ESLint, Prettier, Stylelint, and Cypress",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
"cypress": "^15.16.0",
|
|
85
85
|
"stylelint": "^17.1.1",
|
|
86
86
|
"stylelint-config-standard": "^40.0.0",
|
|
87
|
-
"stylelint-config-standard-scss": "^17.0.0"
|
|
87
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
88
|
+
"stylelint-declaration-strict-value": "^1.11.1"
|
|
88
89
|
},
|
|
89
90
|
"peerDependenciesMeta": {
|
|
90
91
|
"stylelint": {
|
|
@@ -96,6 +97,9 @@
|
|
|
96
97
|
"stylelint-config-standard-scss": {
|
|
97
98
|
"optional": true
|
|
98
99
|
},
|
|
100
|
+
"stylelint-declaration-strict-value": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
99
103
|
"cypress": {
|
|
100
104
|
"optional": true
|
|
101
105
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Publish Package to npmjs
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [created]
|
|
5
|
-
|
|
6
|
-
permissions:
|
|
7
|
-
id-token: write # Required for OIDC
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
15
|
-
- uses: actions/checkout@v6
|
|
16
|
-
- uses: actions/setup-node@v6
|
|
17
|
-
with:
|
|
18
|
-
node-version: 24
|
|
19
|
-
registry-url: 'https://registry.npmjs.org'
|
|
20
|
-
- run: npm ci
|
|
21
|
-
- run: npm run build --if-present
|
|
22
|
-
- name: Publish to npm
|
|
23
|
-
run: |
|
|
24
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
25
|
-
if [[ "$VERSION" =~ -next\. ]]; then
|
|
26
|
-
echo "Publishing prerelease version $VERSION with tag 'next'"
|
|
27
|
-
npm publish --tag next
|
|
28
|
-
elif [[ "$VERSION" =~ -(alpha|beta|rc)\. ]]; then
|
|
29
|
-
echo "Publishing prerelease version $VERSION with tag 'next'"
|
|
30
|
-
npm publish --tag next
|
|
31
|
-
else
|
|
32
|
-
echo "Publishing stable version $VERSION"
|
|
33
|
-
npm publish
|
|
34
|
-
fi
|