forked from CyberTimon/RapidRAW
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
83 lines (79 loc) · 1.69 KB
/
Copy patheslint.config.js
File metadata and controls
83 lines (79 loc) · 1.69 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const js = require('@eslint/js');
const tseslint = require('typescript-eslint');
const react = require('eslint-plugin-react');
const i18next = require('eslint-plugin-i18next');
const tsFiles = ['**/*.{ts,tsx}'];
const jsRecommendedForTs = {
...js.configs.recommended,
files: tsFiles,
};
const tsRecommended = tseslint.configs.recommended.map((config) =>
config.files ? config : { ...config, files: tsFiles },
);
module.exports = [
{
ignores: [
'dist/**',
'node_modules/**',
'src-tauri/target/**',
'src-tauri/gen/**',
'src-tauri/rawler/**',
'data/**',
],
},
jsRecommendedForTs,
...tsRecommended,
{
files: tsFiles,
plugins: {
react,
i18next,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
],
'i18next/no-literal-string': [
'warn',
{
markupOnly: true,
ignoreAttribute: [
'className',
'style',
'data-tooltip',
'variant',
'size',
'color',
'weight',
'fillOrigin',
'id',
'name',
'type',
'value',
'label',
'placeholder',
'stroke',
'fill',
'viewBox',
],
},
],
},
},
];