Skip to content

Commit bd0401c

Browse files
authored
chore: config updates (#51)
1 parent 6f69165 commit bd0401c

File tree

40 files changed

+571
-665
lines changed

40 files changed

+571
-665
lines changed

.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
- package-ecosystem: npm
8+
directory: /
9+
schedule:
10+
interval: monthly

.github/stale.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,27 @@ on:
77
branches: [main]
88

99
concurrency:
10-
group: "${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
10+
group: "${{ github.workflow }}-${{ github.head_ref || github.ref }}"
1111
cancel-in-progress: true
1212

1313
jobs:
1414
format:
1515
runs-on: ubuntu-latest
1616
permissions:
17-
# Give the default GITHUB_TOKEN write permission to commit and push the
18-
# added or changed files to the repository.
1917
contents: write
2018
steps:
2119
- name: Checkout code
22-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2321
with:
2422
ref: ${{ github.head_ref }}
25-
- name: Use node
26-
uses: actions/setup-node@v4
23+
- name: Install node
24+
uses: actions/setup-node@v6
2725
with:
2826
node-version: 24
2927
cache: npm
30-
- name: Install dependencies
28+
- name: Install packages
3129
run: npm ci
32-
- name: Format Code
30+
- name: Format code
3331
run: npm run format
3432
- name: Commit changes
3533
uses: stefanzweifel/git-auto-commit-action@v5
@@ -46,42 +44,49 @@ jobs:
4644
node: [24]
4745
steps:
4846
- name: Checkout code
49-
uses: actions/checkout@v4
50-
- name: Use node@${{ matrix.node }}
51-
uses: actions/setup-node@v4
47+
uses: actions/checkout@v6
48+
- name: Install node
49+
id: node
50+
uses: actions/setup-node@v6
5251
with:
5352
node-version: ${{ matrix.node }}
5453
cache: npm
55-
- name: Install dependencies
54+
- name: Install packages (node@${{ steps.node.outputs.node-version }})
5655
run: npm ci
5756
- name: Install Playwright Browsers
5857
run: npx playwright install --with-deps chromium
5958
- name: Run tests
60-
run: npm run ci:test
61-
- name: Report code coverage
62-
uses: codecov/codecov-action@v3
59+
run: npm run @ci:test
60+
- name: Report coverage
61+
uses: codecov/codecov-action@v5
62+
with:
63+
token: ${{ secrets.CODECOV_TOKEN }}
64+
slug: storybookjs/marko
6365
release:
6466
runs-on: ubuntu-latest
6567
needs: [format, test]
6668
if: "${{ github.repository_owner == 'storybookjs' && github.event_name == 'push' }}"
69+
permissions:
70+
id-token: write
71+
contents: write
72+
pull-requests: write
6773
steps:
6874
- name: Checkout code
69-
uses: actions/checkout@v4
70-
- name: Setup node
71-
uses: actions/setup-node@v4
75+
uses: actions/checkout@v6
76+
- name: Install node
77+
id: node
78+
uses: actions/setup-node@v6
7279
with:
7380
node-version: 24
7481
cache: npm
75-
- name: Install dependencies
82+
- name: Install packages (node@${{ steps.node.outputs.node-version }})
7683
run: npm ci
77-
- name: Release
78-
id: changesets
84+
- name: Run release
7985
uses: changesets/action@v1
8086
with:
81-
version: npm run version
82-
publish: npm run release
87+
version: npm run @ci:version
88+
publish: npm run @ci:release
8389
commit: "[ci] release"
8490
title: "[ci] release"
8591
env:
8692
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npm exec -- lint-staged && npm run build:types
1+
npm exec lint-staged && npm run build:types

.lintstagedrc.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"*.ts": ["eslint --fix", "prettier --write"],
3-
"*{.js,.json,.md,.yml,rc}": ["prettier --write"],
4-
"./{,packages/*/*/,tests/frameworks/*/}package.json": [
5-
"prettier --write",
6-
"sort-package-json --quiet"
7-
]
2+
"*.{js,ts}": ["eslint --fix", "prettier --write"],
3+
"*{.json,.md,.yml,rc}": ["prettier --write"]
84
}

.prettierignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
.nyc_output
2-
.vscode
3-
package.json
41
package-lock.json
52
CHANGELOG.md
6-
node_modules
7-
coverage
8-
dist
93
__snapshots__
104
*expected*

.prettierrc.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
{
2-
"overrides": [
3-
{
4-
"files": "*rc",
5-
"options": {
6-
"parser": "json"
7-
}
8-
}
9-
]
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"plugins": ["prettier-plugin-packagejson"]
104
}

eslint.config.mjs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import eslint from "@eslint/js";
2+
import { defineConfig } from "eslint/config";
3+
import sortImportPlugin from "eslint-plugin-simple-import-sort";
4+
import globals from "globals";
5+
import tseslint from "typescript-eslint";
6+
7+
export default defineConfig(
8+
{
9+
ignores: [
10+
".nyc_output",
11+
".vscode",
12+
"coverage",
13+
"**/dist",
14+
"**/__snapshots__",
15+
],
16+
},
17+
eslint.configs.recommended,
18+
tseslint.configs.recommended,
19+
{
20+
languageOptions: {
21+
globals: {
22+
...globals.node,
23+
...globals.browser,
24+
...globals.vitest,
25+
},
26+
},
27+
plugins: {
28+
"simple-import-sort": sortImportPlugin,
29+
},
30+
rules: {
31+
"@typescript-eslint/no-duplicate-enum-values": "off",
32+
"@typescript-eslint/no-empty-function": "off",
33+
"@typescript-eslint/no-empty-object-type": "off",
34+
"@typescript-eslint/no-explicit-any": "off",
35+
"@typescript-eslint/no-import-type-side-effects": "error",
36+
"@typescript-eslint/no-namespace": "off",
37+
"@typescript-eslint/no-non-null-assertion": "off",
38+
"@typescript-eslint/no-require-imports": "off",
39+
"@typescript-eslint/no-unused-expressions": "off",
40+
"@typescript-eslint/no-unused-vars": "off",
41+
"simple-import-sort/exports": "error",
42+
"simple-import-sort/imports": "error",
43+
},
44+
},
45+
);

0 commit comments

Comments
 (0)