Skip to content

Commit 3b5cc18

Browse files
committed
style(prettier): integrate prettier into linting rules
1 parent 00f6ef7 commit 3b5cc18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+5666
-5838
lines changed

.eslintrc

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
{
22
"root": true,
3-
"extends": "eslint-config-airbnb-base",
43
"env": {
54
"shared-node-browser": true,
65
"es6": true,
76
"es2017": true
87
},
8+
"globals": {
9+
"File": true,
10+
"Blob": true
11+
},
912
"parserOptions": {
1013
"sourceType": "module",
1114
"ecmaFeatures": {
1215
"impliedStrict": true
1316
}
1417
},
18+
"extends": ["eslint-config-airbnb-base", "prettier"],
19+
"plugins": ["eslint-plugin-prettier", "prettier"],
1520
"rules": {
16-
"arrow-body-style": 0, // will be eliminated by prettier
17-
21+
"import/order": ["error", {
22+
"groups": [
23+
["builtin", "external", "internal"],
24+
["parent", "sibling", "index"]
25+
],
26+
"newlines-between": "always"
27+
}],
28+
"prettier/prettier": "error",
1829
"no-param-reassign": 0, // needs to be eliminated in future
1930
"no-use-before-define": [2, "nofunc"] // needs to be eliminated in future
2031
}

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 100,
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"trailingComma": "es5"
7+
}

package-lock.json

+53-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@
6969
"bundlesize": "=0.18.0",
7070
"eslint": "=7.2.0",
7171
"eslint-config-airbnb-base": "=14.2.0",
72+
"eslint-config-prettier": "=6.11.0",
7273
"eslint-plugin-import": "=2.21.2",
74+
"eslint-plugin-prettier": "=3.1.4",
7375
"expect": "=26.0.1",
7476
"fetch-mock": "=9.10.1",
7577
"glob": "=7.1.6",
@@ -82,6 +84,7 @@
8284
"node-fetch": "=2.6.0",
8385
"npm-audit-ci-wrapper": "=2.6.6",
8486
"npm-run-all": "=4.1.5",
87+
"prettier": "=2.0.5",
8588
"release-it": "=12.4.3",
8689
"terser-webpack-plugin": "=3.0.6",
8790
"webpack": "=4.43.0",

0 commit comments

Comments
 (0)