Skip to content

Commit 6121242

Browse files
committed
feat(stylelint): add support for stylelint 15
1 parent 8d4deff commit 6121242

File tree

4 files changed

+67
-29
lines changed

4 files changed

+67
-29
lines changed

.github/workflows/integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Install pnpm
26-
run: npm install -g pnpm
26+
run: npm install -g pnpm npm-check-updates
2727

2828
- name: ⤵️ Check out code from GitHub
2929
uses: actions/checkout@v3

lib/builder/src/stylelint/stylelint-utils.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import type { ESLint } from 'eslint';
2-
import type { LinterResult, PublicApi } from 'stylelint';
3-
4-
export async function loadStylelint(): Promise<PublicApi> {
5-
let stylelint: PromiseLike<PublicApi>;
2+
import type stylelint from 'stylelint';
3+
import type { LinterResult } from 'stylelint';
64

5+
export async function loadStylelint(): Promise<typeof stylelint> {
76
try {
8-
// @ts-ignore
9-
stylelint = await import('stylelint');
10-
return stylelint;
7+
//@ts-ignore
8+
return await import('stylelint');
119
} catch {
1210
throw new Error('Unable to find stylelint. Ensure stylelint is installed.');
1311
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"npm-watch": "^0.11.0",
5151
"prettier": "^2.8.4",
5252
"semantic-release": "^19.0.5",
53-
"stylelint": "^14.16.1",
53+
"stylelint": "^15.2.0",
5454
"ts-jest": "^27.1.5",
5555
"typescript": "^4.3.5"
5656
}

pnpm-lock.yaml

Lines changed: 60 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)