Skip to content

Commit 349e9ee

Browse files
committed
fix: migrate eslint
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent f2528b2 commit 349e9ee

File tree

3 files changed

+40
-28
lines changed

3 files changed

+40
-28
lines changed

.eslintrc.cjs

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

eslint.config.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from '@typescript-eslint/eslint-plugin'
3+
import prettier from 'eslint-config-prettier'
4+
import reactHooks from 'eslint-plugin-react-hooks'
5+
import unusedImports from 'eslint-plugin-unused-imports'
6+
import globals from 'globals'
7+
8+
export default [
9+
{
10+
ignores: [
11+
'node_modules/**',
12+
'dist/**',
13+
'vendor/**',
14+
'**/*.pb.ts',
15+
],
16+
},
17+
eslint.configs.recommended,
18+
...tseslint.configs['flat/recommended'],
19+
reactHooks.configs.flat.recommended,
20+
{
21+
languageOptions: {
22+
globals: {
23+
...globals.node,
24+
...globals.browser,
25+
},
26+
},
27+
plugins: {
28+
'unused-imports': unusedImports,
29+
},
30+
rules: {
31+
'@typescript-eslint/explicit-module-boundary-types': 'off',
32+
'@typescript-eslint/no-non-null-assertion': 'off',
33+
'@typescript-eslint/no-explicit-any': 'warn',
34+
'@typescript-eslint/no-empty-object-type': 'off',
35+
},
36+
},
37+
prettier,
38+
]

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"build": "vite build",
2727
"check": "bun run typecheck && bun run lint",
2828
"typecheck": "tsgo --noEmit",
29-
"deps": "depcheck --ignore-patterns=.eslintrc.cjs,package.json --ignores depcheck,@aptre/common,prettier,rimraf,typescript,@typescript/native-preview,starpc,@go/github.com",
29+
"deps": "depcheck --ignore-patterns=eslint.config.js,package.json --ignores depcheck,@aptre/common,prettier,rimraf,typescript,@typescript/native-preview,starpc,@go/github.com",
3030
"clean": "rimraf ./dist/",
3131
"codegen": "bun run gen",
3232
"gen": "bun run go:aptre -- generate",
@@ -40,7 +40,7 @@
4040
"test:go": "bun run go:aptre -- test",
4141
"lint": "bun run lint:go && bun run lint:js",
4242
"lint:go": "bun run go:aptre -- lint",
43-
"lint:js": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.cjs ./example",
43+
"lint:js": "eslint ./",
4444
"ci": "bun run build && bun run lint:js && bun run lint:go",
4545
"prepare": "bun run clean && rimraf ./.tools && bun run vendor",
4646
"vendor": "go mod vendor",

0 commit comments

Comments
 (0)