Skip to content

Commit

Permalink
Add prettier support
Browse files Browse the repository at this point in the history
  • Loading branch information
ajhyndman committed Apr 21, 2019
1 parent 19b1f41 commit 3049b67
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 389 deletions.
23 changes: 8 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module.exports = {
"extends": ["eslint:recommended", "plugin:react/recommended"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:prettier/recommended",
"prettier/react",
],
"env": {
"browser": true,
"es6": true,
Expand All @@ -15,23 +20,11 @@ module.exports = {
"parser": "babel-eslint",
"plugins": [
"import",
"no-null"
"no-null",
"prettier"
],
"rules": {
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "always-multiline",
"exports": "always-multiline",
"functions": "always-multiline"
}],
"eol-last": ["error", "always"],
"eqeqeq": ["error", "always", { "null": "ignore" }],
"indent": ["error", 2, { "SwitchCase": 1 }],
"quotes": ["error", "single"],
"max-len": ["error", { "code": 100, "ignoreStrings": true }],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"semi": ["error", "always"],

// eslint-plugin-import
"import/first": "error",
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"license": "MIT",
"peerDependencies": {
"babel-eslint": ">=7.1.1",
"eslint-config-prettier": ">=4.1.0",
"eslint-plugin-flowtype": ">=2.30.0",
"eslint-plugin-import": ">=2.2.0",
"eslint-plugin-no-null": ">=1.0.2",
"eslint-plugin-prettier": ">=3.0.1",
"eslint-plugin-react": ">=6.10.0"
}
}
Loading

0 comments on commit 3049b67

Please sign in to comment.