Skip to content

Commit d7491a3

Browse files
author
Aaron Tobias
committed
Added prettier with staged commit hook - #1205
1 parent 8773b05 commit d7491a3

File tree

6 files changed

+1174
-13
lines changed

6 files changed

+1174
-13
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
trim_trailing_whitespace = true
8+
insert_final_new_line = true
9+
end_of_line = lf

.eslintrc

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,23 @@
22
"root": true,
33
"parser": "babel-eslint",
44

5-
"plugins": [
6-
"react"
7-
],
5+
"plugins": ["react"],
86

9-
"extends": [
10-
"eslint:recommended",
11-
"plugin:react/recommended"
12-
],
7+
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier", "prettier/react"],
138

149
"rules": {
1510
"semi": ["error", "always"],
1611
"keyword-spacing": "error",
1712
"space-infix-ops": "error",
1813
"space-before-blocks": "error",
1914
"array-bracket-spacing": ["error", "never"],
20-
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
15+
"brace-style": ["error", "1tbs", {"allowSingleLine": true}],
2116
"comma-spacing": ["error", {"before": false, "after": true}],
2217
"computed-property-spacing": ["error", "never"],
2318
"eol-last": "error",
24-
"indent": ["error", 2, { "SwitchCase": 1, "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }],
19+
"indent": ["error", 2, {"SwitchCase": 1, "VariableDeclarator": {"var": 2, "let": 2, "const": 3}}],
2520
"no-case-declarations": "off",
26-
"no-console": [1, { "allow": ["warn", "error", "info"] }],
21+
"no-console": [1, {"allow": ["warn", "error", "info"]}],
2722
"no-else-return": "error",
2823
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
2924
"no-trailing-spaces": "error",
@@ -33,7 +28,7 @@
3328
"no-unused-vars": ["error", {"varsIgnorePattern": "ReactDOM"}],
3429
"react/display-name": "off",
3530
// disabling for now since there are too many components without PropTypes
36-
"react/prop-types": "off"
31+
"react/prop-types": "off"
3732
},
3833

3934
"parserOptions": {
@@ -84,5 +79,4 @@
8479
"prettyPrint": true,
8580
"jest": true
8681
}
87-
8882
}

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dist/
2+
test/
3+
assets/
4+
5+
app/**/*.react.js
6+
app/addons/.module-cache
7+
app/addons/**/assets/*
8+
app/addons/**/dependencies/*
9+
app/load_addons.js

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"semi": true,
4+
"singleQuote": true,
5+
"bracketSpacing": false,
6+
"printWidth": 120
7+
}

0 commit comments

Comments
 (0)