forked from Polyfrost/OneLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (64 loc) · 1.72 KB
/
eslint.config.js
File metadata and controls
67 lines (64 loc) · 1.72 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
import { defineConfig } from '@flowr/eslint';
// @ts-ignore -- No types for this package
import { tanstackConfig } from '@tanstack/eslint-config';
const ignores = [
'*.rs',
'**/migrations/**',
'apps/onelauncher/old_frontend',
'apps/*/desktop/capabilities',
'apps/*/desktop/gen',
'**/*.gen.*',
];
export default defineConfig(
{
typescript: true,
react: true,
query: true,
ignores,
toml: {
overrides: {
'toml/array-element-newline': ['error', 'always'],
'toml/no-mixed-type-in-array': ['off'],
},
},
},
// Hack to fix an eslint error with plugin names
// @ts-ignore -- No types for this package
tanstackConfig.map((config) => {
if (config.rules && config.rules['@stylistic/js/spaced-comment'])
delete config.rules['@stylistic/js/spaced-comment'];
return config;
}),
{
ignores,
// overrides: [
// {
// files: ['vite.config.js'],
// parserOptions: {
// project: null, // disables type-aware linting for this file
// },
// },
// ],
},
{
ignores,
rules: {
'sort-imports': 'off', // Replaced by perfectionist/sort-named-imports',
'import/order': 'off', // Replaced by perfectionist/sort-named-imports',
'style/jsx-max-props-per-line': ['error', { maximum: 3 }],
'ts/no-use-before-define': 'off',
'style/function-paren-newline': ['error', 'consistent'],
'react/no-context-provider': 'off',
'prefer-const': 'off', // disabled due to maximum call stack size,
'style/jsx-one-expression-per-line': ['error', { allow: 'non-jsx' }],
'unused-imports/no-unused-imports': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'eslint-comments/require-description': ['error', {
ignore: [
'eslint-disable',
],
}],
'no-shadow': 'off',
},
},
);