Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@ on:
branches: [main]
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, "latest"]
node-version: ["latest"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: "npm"

- name: npm install, build, lint, and test
run: |
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/updateData.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ name: Update

on:
schedule:
- cron: '12 5 * * *'
- cron: "12 5 * * *"
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "20"
cache: "npm"

- name: npm install
run: npm install

- name: npm install
run: npm install

- name: collect and lint
run: |
npm run collect
npm run lintData
- name: collect and lint
run: |
npm run collect
npm run lintData

- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: updated the data
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: updated the data
59 changes: 35 additions & 24 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { defineConfig, globalIgnores } from "eslint/config";
import { fixupConfigRules } from "@eslint/compat";
import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
Expand All @@ -7,40 +6,52 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import eslintPluginUnicorn from "eslint-plugin-unicorn";

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
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default defineConfig([globalIgnores(["**/dist", "**/.eslintrc.cjs"]), {
extends: fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime"
)),

export default [
{
ignores: ["**/dist", "**/.eslintrc.cjs"],
},
...fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
),
),
{
plugins: {
"react-refresh": reactRefresh,
unicorn: eslintPluginUnicorn,
"react-refresh": reactRefresh,
unicorn: eslintPluginUnicorn,
},
languageOptions: {
globals: {
...globals.browser,
},
globals: {
...globals.browser,
},

parser: tsParser,
},

parser: tsParser,
settings: {
react: {
version: "detect",
},
},

rules: {
"react-refresh/only-export-components": "off",
"react/jsx-uses-react": "error",
"react/react-in-jsx-scope": "off",
"react-refresh/only-export-components": "off",
"react/jsx-uses-react": "error",
"react/react-in-jsx-scope": "off",
},
}]);
},
];
Loading
Loading