-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a shareable ESLint configuration package #689
Changes from 3 commits
a4b4fe3
603cff0
2d2e7af
5c9f7ac
8dbfe66
7e55f86
e2dc36e
cfa6880
f2665d8
2db2ebe
0881de1
5c4458c
996bf67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./packages/eslint-config-react-app/index.js" | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "eslint-config-react-app", | ||
"version": "0.4.3", | ||
"description": "ESLint configuration used by Create React App", | ||
"repository": "facebookincubator/create-react-app", | ||
"license": "BSD-3-Clause", | ||
"bugs": { | ||
"url": "https://github.com/facebookincubator/create-react-app/issues" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"peerDependencies": { | ||
"babel-eslint": "^6.1.2", | ||
"eslint": "^3.5.0", | ||
"eslint-plugin-flowtype": "^2.18.1", | ||
"eslint-plugin-import": "^1.12.0", | ||
"eslint-plugin-jsx-a11y": "^2.2.2", | ||
"eslint-plugin-react": "^5.2.2" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to keep dependencies pinned, and update them manually. Our setup is a little more conservative. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While we're at it, can you look into updating us to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I pinned the dependencies and added a README. I can look into updating the plugins tomorrow. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "react-app" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,11 +165,13 @@ module.exports = { | |
} | ||
] | ||
}, | ||
// @remove-on-eject-begin | ||
// Point ESLint to our predefined config. | ||
eslint: { | ||
configFile: path.join(__dirname, 'eslint.js'), | ||
configFile: path.join(__dirname, '../.eslintrc'), | ||
useEslintrc: false | ||
}, | ||
// @remove-on-eject-end | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we need this for prod config too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We copy the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't mean ejected, I meant There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, great point. I forgot we had ESLint for the build too. Updated now. |
||
// We use PostCSS for autoprefixing only. | ||
postcss: function() { | ||
return [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also want a readme here, explaining in a few words how to use this package as standalone.