Skip to content

Commit 535d197

Browse files
authored
chore(deps): upgrade Rslint to v0.8.0 (rstackjs#332)
1 parent 7f83522 commit 535d197

4 files changed

Lines changed: 66 additions & 39 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"devDependencies": {
2121
"@types/node": "catalog:",
2222
"cspell-ban-words": "catalog:",
23+
"globals": "catalog:",
2324
"heading-case": "catalog:",
2425
"prettier": "catalog:",
2526
"rstack": "workspace:*",

pnpm-lock.yaml

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

pnpm-workspace.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ catalog:
1717
'@rsbuild/plugin-react': '^2.1.0'
1818
'@rsbuild/plugin-sass': '^2.0.1'
1919
'@rslib/core': '~1.0.0-beta.2'
20-
'@rslint/core': '~0.7.3'
20+
'@rslint/core': '~0.8.0'
2121
'@rspress/core': '^2.0.19'
2222
'@rspress/plugin-client-redirects': '^2.0.19'
2323
'@rspress/plugin-sitemap': '^2.0.19'
@@ -38,6 +38,7 @@ catalog:
3838
'@shikijs/transformers': '^4.4.2'
3939
'cspell-ban-words': '^0.0.4'
4040
'fast-json-stable-stringify': '2.1.0'
41+
globals: '^17.7.0'
4142
'happy-dom': '^20.11.2'
4243
'heading-case': '^1.1.5'
4344
'import-meta-resolve': '4.2.0'

rstack.config.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22
import { define } from 'rstack';
33

44
define.lint(async () => {
5+
const { default: globals } = await import('globals');
56
const { js, ts } = await import('rstack/lint');
67
return [
78
js.configs.recommended,
89
ts.configs.recommended,
10+
{
11+
files: ['**/*.{js,jsx,cjs,mjs}'],
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.nodeBuiltin,
16+
DEFINE_APP_TEST_VALUE: 'readonly',
17+
DEFINE_LIB_TEST_VALUE: 'readonly',
18+
DEFINE_VALUE: 'readonly',
19+
},
20+
},
21+
},
922
// Source imports use .ts for Node.js native TypeScript execution; builds rewrite them to .js.
1023
{
1124
files: ['packages/rstack/src/**/*.ts'],

0 commit comments

Comments
 (0)