forked from mashaal/destroyer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
43 lines (43 loc) · 1.16 KB
/
.eslintrc.js
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
module.exports = {
ignorePatterns: ['bundle/', 'Destroyer-darwin-x64/'],
overrides: [
{
env: { browser: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
],
files: ['renderer/**/*.js', 'renderer/**/*.jsx'],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: { presets: ['@babel/preset-env', '@babel/preset-react'] },
requireConfigFile: false,
},
rules: {
'react/jsx-sort-props': 'warn',
'react/prop-types': 'off',
},
settings: { react: { version: 'detect' } },
},
{
env: { node: true },
extends: ['eslint:recommended', 'plugin:node/recommended'],
files: ['main/**/*.js'],
parserOptions: { ecmaVersion: 2022 },
rules: {
'node/no-unpublished-require': [
'error',
{ allowModules: ['electron'] },
],
},
},
],
parserOptions: { ecmaVersion: 'latest' },
root: true,
rules: {
curly: 'warn',
'sort-imports': ['warn', { allowSeparatedGroups: true }],
'sort-keys': ['warn', 'asc', { caseSensitive: false }],
},
}