forked from RSSNext/Follow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
58 lines (57 loc) · 1.33 KB
/
eslint.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// @ts-check
import { defineConfig } from "eslint-config-hyoban"
export default defineConfig(
{
formatting: false,
lessOpinionated: true,
ignores: [
"src/renderer/src/hono.ts",
"src/hono.ts",
"packages/shared/src/hono.ts",
"resources/**",
],
preferESM: false,
},
{
settings: {
tailwindcss: {
whitelist: ["center"],
},
},
rules: {
"unicorn/prefer-math-trunc": "off",
"@eslint-react/no-clone-element": 0,
"@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": 0,
// NOTE: Disable this temporarily
"react-compiler/react-compiler": 0,
"no-restricted-syntax": 0,
"no-restricted-globals": [
"error",
{
name: "location",
message:
"Since you don't use the same router instance in electron and browser, you can't use the global location to get the route info. \n\n" +
"You can use `useLocaltion` or `getReadonlyRoute` to get the route info.",
},
],
},
},
{
files: ["**/*.tsx"],
rules: {
"@stylistic/jsx-self-closing-comp": "error",
},
},
{
files: ["locales/**/*.json"],
rules: {
"jsonc/sort-keys": [
"error",
{
pathPattern: ".*",
order: { type: "asc" },
},
],
},
},
)