-
Notifications
You must be signed in to change notification settings - Fork 12
/
eslint.config.js
96 lines (82 loc) · 2.25 KB
/
eslint.config.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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
const importPlugin = require("eslint-plugin-import");
const react = require('eslint-plugin-react');
const jest = require('eslint-plugin-jest');
const babelParser = require('@babel/eslint-parser');
module.exports = {
languageOptions: {
parser: babelParser,
},
plugins: { import: importPlugin, react, jest },
rules: {
'react/destructuring-assignment': 0,
'class-methods-use-this': 0,
'no-plusplus': 0,
'no-console': 0,
'no-param-reassign': ['error', { props: false }],
'import/no-extraneous-dependencies': ['error', { packageDir: __dirname }],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react-hooks/rules-of-hooks': 0,
'react/prefer-stateless-function': 0,
'react/forbid-prop-types': 0,
'react/no-children-prop': 0,
'no-nested-ternary': 0,
'prefer-regex-literals': 0,
'jest/no-commented-out-tests': 0,
'jest/no-standalone-expect': 0,
'jest/expect-expect': 0,
'no-unused-vars': 0,
},
settings: {
'import/resolver': {
webpack: {
config: require.resolve('./configs/webpack.config.eslint.js'),
},
},
},
ignores: [
// Logs
'logs',
'*.log',
// Runtime data
'pids',
'*.pid',
'*.seed',
// Directory for instrumented libs generated by jscoverage/JSCover
'lib-cov',
// Coverage directory used by tools like istanbul
'coverage',
// Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
'.grunt',
// node-waf configuration
'.lock-wscript',
// Compiled binary addons (http://nodejs.org/api/addons.html)
'build/Release',
'.eslintcache',
// Dependency directory
// https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
'node_modules',
// OSX
'.DS_Store',
// flow-typed
'flow-typed/npm/*',
'!flow-typed/npm/module_vx.x.x.js',
// App packaged
'release',
'app/main.prod.js',
'app/main.prod.js.map',
'app/renderer.prod.js',
'app/renderer.prod.js.map',
'app/style.css',
'app/style.css.map',
'dist',
'dll',
'main.js',
'main.js.map',
'.idea',
'npm-debug.log.*',
'__snapshots__',
// Package.json
'package.json',
'.travis.yml'
]
};