Skip to content

Commit 962abd3

Browse files
committed
Add prettier, eslint-config-prettier, eslint-plugin-prettier
1 parent 8834571 commit 962abd3

File tree

5 files changed

+46
-4
lines changed

5 files changed

+46
-4
lines changed

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
__js_test_config
22
app/assets/javascripts/application.js
3+
node_modules
4+
vendor
5+
dist
6+
public
7+
styleguide
8+
**/*.min.js
9+
config

.eslintrc.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
module.exports = {
22
plugins: [
33
"react",
4-
"jest"
4+
"jest",
5+
"prettier"
56
],
67
env: {
78
"jest/globals": true
89
},
910
extends: [
1011
"airbnb",
1112
"standard",
12-
"standard-react"
13+
"standard-react",
14+
"plugin:prettier/recommended",
15+
"prettier/react",
16+
"prettier/standard"
1317
],
1418
parser: "babel-eslint",
1519
parserOptions: {
@@ -61,6 +65,7 @@ module.exports = {
6165
"consistent": true,
6266
"minProperties": 6
6367
}],
68+
"prettier/prettier": "error",
6469
"radix": ["error", "as-needed"],
6570
"semi" : [2, "never"],
6671
"space-before-function-paren": 0,

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
"draft-js": "^0.10.5",
7474
"draft-js-mention-plugin": "^3.0.4",
7575
"draft-js-plugins-editor": "^2.0.8",
76+
"eslint-config-prettier": "^3.0.1",
77+
"eslint-plugin-prettier": "^2.6.2",
7678
"filestack-js": "^0.11.2",
7779
"firebase": "^5.0.4",
7880
"formik": "0.11.11",
@@ -91,6 +93,7 @@
9193
"papaparse": "^4.6.0",
9294
"parameterize": "^0.1.0",
9395
"pluralize": "^7.0.0",
96+
"prettier": "^1.14.2",
9497
"prop-types": "^15.6.2",
9598
"query-string": "5.1.0",
9699
"react": "^16.4.2",

prettier.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
semi: false,
3+
singleQuote: true,
4+
trailingComma: 'es5',
5+
bracketSpacing: true,
6+
}

yarn.lock

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3573,6 +3573,12 @@ eslint-config-airbnb@~16.1.0:
35733573
dependencies:
35743574
eslint-config-airbnb-base "^12.1.0"
35753575

3576+
eslint-config-prettier@^3.0.1:
3577+
version "3.0.1"
3578+
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-3.0.1.tgz#479214f64c1a4b344040924bfb97543db334b7b1"
3579+
dependencies:
3580+
get-stdin "^6.0.0"
3581+
35763582
eslint-config-standard-jsx@^4.0.0:
35773583
version "4.0.2"
35783584
resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz#009e53c4ddb1e9ee70b4650ffe63a7f39f8836e1"
@@ -3648,6 +3654,13 @@ eslint-plugin-node@~5.1.1:
36483654
resolve "^1.3.3"
36493655
semver "5.3.0"
36503656

3657+
eslint-plugin-prettier@^2.6.2:
3658+
version "2.6.2"
3659+
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz#71998c60aedfa2141f7bfcbf9d1c459bf98b4fad"
3660+
dependencies:
3661+
fast-diff "^1.1.1"
3662+
jest-docblock "^21.0.0"
3663+
36513664
eslint-plugin-promise@~3.5.0:
36523665
version "3.5.0"
36533666
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.5.0.tgz#78fbb6ffe047201627569e85a6c5373af2a68fca"
@@ -3968,7 +3981,7 @@ fast-deep-equal@^1.0.0:
39683981
version "1.1.0"
39693982
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
39703983

3971-
3984+
[email protected], fast-diff@^1.1.1:
39723985
version "1.1.2"
39733986
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
39743987

@@ -4353,6 +4366,10 @@ get-stdin@^4.0.1:
43534366
version "4.0.1"
43544367
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
43554368

4369+
get-stdin@^6.0.0:
4370+
version "6.0.0"
4371+
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b"
4372+
43564373
[email protected], get-stream@^3.0.0:
43574374
version "3.0.0"
43584375
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
@@ -5623,6 +5640,10 @@ jest-diff@^22.4.3:
56235640
jest-get-type "^22.4.3"
56245641
pretty-format "^22.4.3"
56255642

5643+
jest-docblock@^21.0.0:
5644+
version "21.2.0"
5645+
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414"
5646+
56265647
jest-docblock@^22.4.3:
56275648
version "22.4.3"
56285649
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19"
@@ -8186,7 +8207,7 @@ preserve@^0.2.0:
81868207
version "0.2.0"
81878208
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
81888209

8189-
prettier@^1.12.1:
8210+
prettier@^1.12.1, prettier@^1.14.2:
81908211
version "1.14.2"
81918212
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.2.tgz#0ac1c6e1a90baa22a62925f41963c841983282f9"
81928213

0 commit comments

Comments
 (0)