Skip to content

Commit a2f29a5

Browse files
authored
chore: dependency upgrades, import order, and no one-line if statements (#19)
* Enforce curly braces for all if statements * Upgrades * import order configuration
1 parent 39347f3 commit a2f29a5

File tree

3 files changed

+817
-520
lines changed

3 files changed

+817
-520
lines changed

index.js

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,43 @@ module.exports = {
77
// This doesn't work for us because we use `inject-loader` for testing JS
88
// files, and can't be automatically configured in webpack.config.js.
99
"import/no-webpack-loader-syntax": "off",
10-
"import/order": "warn",
10+
"import/order": [
11+
"error",
12+
{
13+
alphabetize: {
14+
order: "asc"
15+
},
16+
pathGroups: [
17+
{
18+
pattern: "abstract-di/**",
19+
group: "external",
20+
position: "after"
21+
},
22+
{
23+
pattern: "core/**",
24+
group: "external",
25+
position: "after"
26+
},
27+
{
28+
pattern: "desktop/**",
29+
group: "external",
30+
position: "after"
31+
},
32+
{
33+
pattern: "support/**",
34+
group: "external",
35+
position: "after"
36+
},
37+
{
38+
pattern: "web/**",
39+
group: "external",
40+
position: "after"
41+
}
42+
]
43+
}
44+
],
1145
"mocha/no-exclusive-tests": "error",
46+
curly: ["error", "all"],
1247
// Prettier automatically uses the least amount of parens possible, so this
1348
// does more harm than good.
1449
"no-mixed-operators": "off",

package.json

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,33 @@
1111
"lint": "eslint ."
1212
},
1313
"devDependencies": {
14-
"babel-eslint": "9.x",
15-
"eslint": "5.x",
16-
"eslint-config-react-app": "^3.0.5",
17-
"eslint-plugin-flowtype": "2.x",
18-
"eslint-plugin-import": "2.x",
19-
"eslint-plugin-jsx-a11y": "6.x",
14+
"@typescript-eslint/eslint-plugin": "^2.15.0",
15+
"@typescript-eslint/parser": "^2.15.0",
16+
"babel-eslint": "^10.0.3",
17+
"eslint": "^6.8.0",
18+
"eslint-config-react-app": "^5.1.0",
19+
"eslint-plugin-flowtype": "^3.13.0",
20+
"eslint-plugin-import": "^2.19.1",
21+
"eslint-plugin-jsx-a11y": "^6.2.3",
2022
"eslint-plugin-mocha": "^5.2.0",
2123
"eslint-plugin-prettier": "^3.0.0",
22-
"eslint-plugin-react": "7.x",
23-
"eslint-plugin-react-hooks": "^2.0.1",
24-
"prettier": "1.15.3"
24+
"eslint-plugin-react": "^7.17.0",
25+
"eslint-plugin-react-hooks": "^1.7.0",
26+
"prettier": "1.19.1"
2527
},
2628
"peerDependencies": {
27-
"babel-eslint": "9.x",
28-
"eslint": "5.x",
29-
"eslint-config-react-app": "^3.0.5",
30-
"eslint-plugin-flowtype": "2.x",
31-
"eslint-plugin-import": "2.x",
32-
"eslint-plugin-jsx-a11y": "6.x",
29+
"@typescript-eslint/eslint-plugin": "^2.15.0",
30+
"@typescript-eslint/parser": "^2.15.0",
31+
"babel-eslint": "^10.0.3",
32+
"eslint": "^6.8.0",
33+
"eslint-config-react-app": "^5.1.0",
34+
"eslint-plugin-flowtype": "^3.13.0",
35+
"eslint-plugin-import": "^2.19.1",
36+
"eslint-plugin-jsx-a11y": "^6.2.3",
3337
"eslint-plugin-mocha": "^5.2.0",
3438
"eslint-plugin-prettier": "^3.0.0",
35-
"eslint-plugin-react": "7.x",
36-
"eslint-plugin-react-hooks": "^2.0.1",
37-
"prettier": "1.15.3"
39+
"eslint-plugin-react": "^7.17.0",
40+
"eslint-plugin-react-hooks": "^1.7.0",
41+
"prettier": "1.19.1"
3842
}
3943
}

0 commit comments

Comments
 (0)