-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.eslintrc.js
35 lines (33 loc) · 1016 Bytes
/
.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
/* eslint-env node */
module.exports = {
env: {browser: true},
extends: ['@evanpurkhiser'],
settings: {
// Using preact, be explicit about the version
react: {version: '16.0'},
},
rules: {
'simple-import-sort/imports': [
'error',
{
groups: [
// Side effect imports.
['^\\u0000'],
// Packages. `react` related packages come first.
['^react', '^@?\\w'],
// Node.js builtins.
[`^(${require('module').builtinModules.join('|')})(/|$)`],
// Internal packages.
['^(src|ui|main|server|overlay|web)(/.*|$)'],
// Parent imports. Put `..` last.
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
// Other relative imports. Put same-folder imports and `.` last.
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
],
},
],
// Remove when I switch @evanpurkhiser to include this
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
};