Skip to content

Commit

Permalink
Merge pull request #4 from geolonia/3-demo-global-mode
Browse files Browse the repository at this point in the history
Global/local mode switch
  • Loading branch information
keichan34 authored Nov 25, 2024
2 parents 19f44a9 + 2abe481 commit a6ae269
Show file tree
Hide file tree
Showing 14 changed files with 918 additions and 673 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ jobs:
- run: npm run test
- run: npm run build

- name: Build demo
run: |
cd demo
npm ci
npm run lint
npm run build
- uses: actions/upload-artifact@v4
with:
name: dist
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
- run: npm run test
- run: npm run build

- run: |
- name: Build demo
run: |
cd demo
npm ci
npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./demo/dist
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
}
}
18 changes: 0 additions & 18 deletions demo/.eslintrc.cjs

This file was deleted.

54 changes: 54 additions & 0 deletions demo/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { fixupConfigRules } from "@eslint/compat";
import reactRefresh from "eslint-plugin-react-refresh";
import stylistic from "@stylistic/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ["**/dist", "**/.eslintrc.cjs"],
},
stylistic.configs.customize({
semi: true,
braceStyle: "1tbs",
quotes: "double",
quoteProps: "consistent",
}),
...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
)),
{
plugins: {
"react-refresh": reactRefresh,
"@stylistic": stylistic,
},

languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
},

rules: {
"react-refresh/only-export-components": ["warn", {
allowConstantExport: true,
}],
},
},
];
Loading

0 comments on commit a6ae269

Please sign in to comment.