-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (50 loc) · 1.27 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// ESLint configuration
// http://eslint.org/docs/user-guide/configuring
module.exports = {
parser: 'babel-eslint',
extends: [
'airbnb',
'plugin:css-modules/recommended',
],
plugins: [
'css-modules',
],
globals: {
__DEV__: true,
contextTypes: true,
},
env: {
browser: true,
},
rules: {
// `js` and `jsx` are common extensions
// `mjs` is for `universal-router` only, for now
'import/extensions': [
'error',
'always',
{
js: 'never',
jsx: 'never',
mjs: 'never',
},
],
// Not supporting nested package.json yet
// https://github.com/benmosher/eslint-plugin-import/issues/458
'import/no-extraneous-dependencies': 'off',
// Recommend not to leave any console.log in your code
// Use console.error, console.warn and console.info instead
'no-console': [
'error',
{
allow: ['warn', 'error', 'info'],
},
],
// Allow js files to use jsx syntax, too
'react/jsx-filename-extension': 'off',
// 'import/no-unresolved': 'off',
// 'import/extensions': 'off',
// https://github.com/kriasoft/react-starter-kit/pull/961
// You can reopen this if you still want this rule
'react/prefer-stateless-function': 'off',
},
};