Skip to content

Commit 25379ec

Browse files
authored
feat(create-rstack): add staged file checks to templates (#264)
1 parent b7d9b70 commit 25379ec

54 files changed

Lines changed: 175 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎packages/create-rstack/template-app-lit-js/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dev": "rs dev",
1010
"format": "rs fmt",
1111
"lint": "rs lint",
12+
"prepare": "rs setup",
1213
"preview": "rs preview",
1314
"test": "rs test",
1415
"test:watch": "rs test --watch"

‎packages/create-rstack/template-app-lit-js/rstack.config.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ define.lint(async () => {
2626
define.fmt({
2727
singleQuote: true,
2828
});
29+
30+
define.staged({
31+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
32+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
33+
});

‎packages/create-rstack/template-app-lit-ts/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dev": "rs dev",
1010
"format": "rs fmt",
1111
"lint": "rs lint",
12+
"prepare": "rs setup",
1213
"preview": "rs preview",
1314
"test": "rs test",
1415
"test:watch": "rs test --watch"

‎packages/create-rstack/template-app-lit-ts/rstack.config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,8 @@ define.lint(async () => {
2525
define.fmt({
2626
singleQuote: true,
2727
});
28+
29+
define.staged({
30+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
31+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
32+
});

‎packages/create-rstack/template-app-preact-js/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dev": "rs dev",
1010
"format": "rs fmt",
1111
"lint": "rs lint",
12+
"prepare": "rs setup",
1213
"preview": "rs preview",
1314
"test": "rs test",
1415
"test:watch": "rs test --watch"

‎packages/create-rstack/template-app-preact-js/rstack.config.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ define.lint(async () => {
2727
define.fmt({
2828
singleQuote: true,
2929
});
30+
31+
define.staged({
32+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
33+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
34+
});

‎packages/create-rstack/template-app-preact-ts/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dev": "rs dev",
1010
"format": "rs fmt",
1111
"lint": "rs lint",
12+
"prepare": "rs setup",
1213
"preview": "rs preview",
1314
"test": "rs test",
1415
"test:watch": "rs test --watch"

‎packages/create-rstack/template-app-preact-ts/rstack.config.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ define.lint(async () => {
2727
define.fmt({
2828
singleQuote: true,
2929
});
30+
31+
define.staged({
32+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
33+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
34+
});

‎packages/create-rstack/template-app-react-js/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"dev": "rs dev",
1010
"format": "rs fmt",
1111
"lint": "rs lint",
12+
"prepare": "rs setup",
1213
"preview": "rs preview",
1314
"test": "rs test",
1415
"test:watch": "rs test --watch"

‎packages/create-rstack/template-app-react-js/rstack.config.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ define.lint(async () => {
2727
define.fmt({
2828
singleQuote: true,
2929
});
30+
31+
define.staged({
32+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
33+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
34+
});

0 commit comments

Comments
 (0)