Skip to content

Commit 1506900

Browse files
committed
cp dines
1 parent 8c3f698 commit 1506900

4 files changed

Lines changed: 4918 additions & 1155 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
lint-and-format:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run Prettier check
27+
run: npm run format:check
28+
29+
- name: Run ESLint
30+
run: npm run lint
31+
32+
- name: Build TypeScript
33+
run: npm run build

eslint.config.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from '@typescript-eslint/eslint-plugin';
3+
import tsparser from '@typescript-eslint/parser';
4+
import react from 'eslint-plugin-react';
5+
import reactHooks from 'eslint-plugin-react-hooks';
6+
7+
export default [
8+
eslint.configs.recommended,
9+
{
10+
files: ['src/**/*.{ts,tsx}'],
11+
languageOptions: {
12+
parser: tsparser,
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
sourceType: 'module',
16+
ecmaFeatures: {
17+
jsx: true,
18+
},
19+
},
20+
globals: {
21+
console: 'readonly',
22+
process: 'readonly',
23+
Buffer: 'readonly',
24+
__dirname: 'readonly',
25+
__filename: 'readonly',
26+
NodeJS: 'readonly',
27+
},
28+
},
29+
plugins: {
30+
'@typescript-eslint': tseslint,
31+
react: react,
32+
'react-hooks': reactHooks,
33+
},
34+
rules: {
35+
...tseslint.configs.recommended.rules,
36+
...react.configs.recommended.rules,
37+
...reactHooks.configs.recommended.rules,
38+
'react/react-in-jsx-scope': 'off',
39+
'react/prop-types': 'off',
40+
'@typescript-eslint/no-explicit-any': 'warn',
41+
'@typescript-eslint/no-unused-vars': [
42+
'warn',
43+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
44+
],
45+
'no-console': 'off',
46+
},
47+
settings: {
48+
react: {
49+
version: 'detect',
50+
},
51+
},
52+
},
53+
{
54+
ignores: ['dist/**', 'node_modules/**', '*.js', '!eslint.config.js'],
55+
},
56+
];

0 commit comments

Comments
 (0)