Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
62 lines (61 loc) · 1.64 KB
/
Copy patheslint.config.js
File metadata and controls
62 lines (61 loc) · 1.64 KB
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
59
60
61
62
import i18next from "eslint-plugin-i18next";
import tsParser from "@typescript-eslint/parser";
import tseslint from "@typescript-eslint/eslint-plugin";
import reactHooks from "eslint-plugin-react-hooks";
import noIconInTextButton from "./eslint-rules/no-icon-in-text-button.js";
export default [
{
files: ["src/**/*.{ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
"@typescript-eslint": tseslint,
"react-hooks": reactHooks,
i18next,
murmur: { rules: { "no-icon-in-text-button": noIconInTextButton } },
},
rules: {
"murmur/no-icon-in-text-button": "error",
// A hook called conditionally crashes at runtime.
"react-hooks/rules-of-hooks": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
// Catch text in JSX that should be translated
"i18next/no-literal-string": [
"error",
{
markupOnly: true, // Only check JSX content, not all strings
ignoreAttribute: [
"className",
"style",
"type",
"id",
"name",
"key",
"data-*",
"aria-*",
], // Ignore common non-translatable attributes
},
],
},
},
{
// Generated by tauri-specta. It imports Channel even when this build
// does not construct one.
files: ["src/bindings.ts"],
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
];