Skip to content

Commit

Permalink
Split up config so it can be used without flow
Browse files Browse the repository at this point in the history
  • Loading branch information
mortnod committed Jul 8, 2019
1 parent b1dd56f commit 2f2d9fa
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
extends: ['./javascript', './prettier'].map(require.resolve)
extends: [
"./javascript",
"./prettier",
"./prettier-react/",
"./prettier-flowtype/"
].map(require.resolve)
};
4 changes: 4 additions & 0 deletions prettier-flowtype/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ["prettier/flowtype"],
parser: "babel-eslint"
};
4 changes: 4 additions & 0 deletions prettier-react/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
extends: ["prettier/react"],
parser: "babel-eslint"
};
6 changes: 2 additions & 4 deletions prettier/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
module.exports = {
extends: [
'plugin:prettier/recommended', // enables-eslint-plugin-prettier, sets the prettier/prettier rule to "error", extends eslint-config-prettier so that we can set prettier options in .prettierrc
'prettier/flowtype',
'prettier/react'
"plugin:prettier/recommended" // enables-eslint-plugin-prettier, sets the prettier/prettier rule to "error", extends eslint-config-prettier so that we can set prettier options in .prettierrc
],
// "plugins": [
// "prettier", enabled by the plugin;prettier/recommneded extension
// ],
parser: 'babel-eslint'
parser: "babel-eslint"
};
11 changes: 8 additions & 3 deletions react-recommended/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module.exports = {
extends: ['../javascript', '../react', '../flowtype', '../prettier'].map(
require.resolve
)
extends: [
"../javascript",
"../react",
"../flowtype",
"../prettier",
"../prettier-react/",
"../prettier-flowtype/"
].map(require.resolve)
};

0 comments on commit 2f2d9fa

Please sign in to comment.