Permalink
Browse files

Internal: upgrade to babel@6 / eslint@2 / react@15

  • Loading branch information...
1 parent e693d4f commit dd8549d6314059fb7bd0f556bc77073b564da68b @MoOx committed Mar 14, 2016
View
@@ -1,3 +0,0 @@
-{
- "stage": 0
-}
View
@@ -1,81 +0,0 @@
----
-root: true
-extends: eslint:recommended
-
-# babel-eslint support more syntax stuff than eslint for now
-parser: babel-eslint
-
-ecmaFeatures:
- modules: true
- jsx: true
-
-env:
- es6: true
- browser: true
- node: true
-
-globals:
- # for docs
- __DEV__: true
- __PROD__: true
- __SERVER_PROTOCOL__: true
- __SERVER_HOSTNAME__: true
- __SERVER_PORT__: true
- __SERVER_HOST__: true
- __SERVER_URL__: true
- __LR_SERVER_PORT__: true
-
-plugins:
- - react
-
-# 0: off, 1: warning, 2: error
-rules:
- no-console: 0
-
- indent: [2, 2] # 2 spaces indentation
- max-len: [2, 80, 4]
- quotes: [2, "double"]
- jsx-quotes: [2, "prefer-double"]
- semi: [2, "never"]
- no-multiple-empty-lines: [2, {"max": 1}]
-
- brace-style: [2, "stroustrup"]
- comma-dangle: [2, "always-multiline"]
- comma-style: [2, "last"]
- dot-location: [2, "property"]
-
- one-var: [2, "never"]
- no-var: [2]
- prefer-const: [2]
- no-bitwise: [2]
-
- object-curly-spacing: [2, "always"]
- array-bracket-spacing: [2, "always"]
- #computed-property-spacing: [2, "always"]
-
- space-unary-ops: [2, {"words": true, "nonwords": false}]
- space-after-keywords: [2, "always"]
- space-before-blocks: [2, "always"]
- space-before-function-paren: [2, "never"]
- space-in-parens: [2, "never"]
- spaced-comment: [2, "always"]
-
- # see globals
- no-underscore-dangle: 0
-
- # eslint-plugin-react rules
- react/jsx-boolean-value: 2
- react/jsx-no-undef: 2
- #react/jsx-sort-prop-types: 2
- #react/jsx-sort-props: 2
- react/jsx-uses-react: 2
- react/jsx-uses-vars: 2
- react/no-did-mount-set-state: 2
- react/no-did-update-set-state: 2
- react/no-multi-comp: 2
- react/no-unknown-property: 2
- react/prop-types: 2
- react/react-in-jsx-scope: 2
- react/self-closing-comp: 2
- react/sort-comp: 2
- react/wrap-multilines: 2
View
@@ -1,10 +1,10 @@
- Added: cssnext will now warn you when you have duplicates plugins.
This is a really common mistake, people include plugins that are already
- included in cssnext and maybe sometimes in an inaccurate position.
+ included in cssnext and maybe sometimes in an inaccurate position.
**Most tutorial on the internet are wrong (probably 99%)
and show provide duplicates in their examples.
- (eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
- In order to fix this, here is a warning. You are welcome.
+ (eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
+ _In order to fix this, here is a warning. You are welcome._
[Read more about this issue](https://github.com/postcss/postcss/issues/764)
- Added: ``rem`` will now adjust its behavior according to browser option
(IE 9 and IE 10 will only have ``px`` in some places, where rem support is
View
@@ -66,12 +66,16 @@ var output = cssnext(input, {
_(default: true)_
This option should be left with its default value, unless you really know what
-you are doing.
-Most tutorial on the internet are wrong and show provide duplicate
-(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).
+you are doing.
+**Most tutorial on the internet are wrong (probably 99%)
+and show provide duplicates in their examples.
+(eg: autoprefixer + cssnext - but cssnext already includes autoprefixer).**
+_In order to fix this, here is a warning. You are welcome._
+
+---
**To know all available options, please check corresponding postcss plugin by
browsing the
-[feature mapping](https://github.com/MoOx/postcss-cssnext/blob/master/src/features.js).**
+[feature mapping](https://github.com/MoOx/postcss-cssnext/blob/master/src/features.js)**
_Note: order is important to get everything working correctly._
@@ -20,7 +20,7 @@ export default (config, options) => {
const devEntries = [
`webpack-dev-server/client?${serverUrl}`,
- `webpack/hot/only-dev-server`,
+ "webpack/hot/only-dev-server",
]
const devConfig = {
View
@@ -12,9 +12,9 @@
@import "cssrecipes-vertical-rhythm";
@import "cssrecipes-vertical-rhythm/lib/ratio/minor-third.css";
+@import "react-svg-inline/lib/index.css";
@import "./modules/Header";
@import "./modules/Footer";
-@import "./modules/SVGIcon";
@import "./modules/playground";
@custom-media --r-maxXL (max-width: 90em);
@@ -7,20 +7,7 @@ import Html from "../modules/Html"
import Head from "../modules/Head"
import Body from "../modules/Body"
-export default class Default extends Component {
-
- static propTypes = {
- pkg: PropTypes.object.isRequired,
- metadata: PropTypes.object.isRequired,
- // collections: PropTypes.object.isRequired,
- file: PropTypes.object.isRequired,
- }
-
- static childContextTypes = {
- pkg: PropTypes.object.isRequired,
- // collections: PropTypes.object.isRequired,
- file: PropTypes.object.isRequired,
- }
+class Default extends Component {
getChildContext() {
return {
@@ -42,48 +29,48 @@ export default class Default extends Component {
return (
<Html>
<Head
- title={file.title}
- stylesheets={this.props.metadata.assets.stylesheets}
+ title={ file.title }
+ stylesheets={ this.props.metadata.assets.stylesheets }
/>
<Body
- scripts={[
+ scripts={ [
...file.scripts || [],
...this.props.metadata.assets.scripts || [],
- ]}
- version={this.props.metadata.assets.version}
- footer={footer}
+ ] }
+ version={ this.props.metadata.assets.version }
+ footer={ footer }
>
<header
- className={cx({
+ className={ cx({
"cssnext-Jumbotron": true,
"cssnext-Jumbotron--default": true,
["cssnext-Jumbotron--" + dashify(file.url)]: true,
["cssnext-Jumbotron--" + file.backgroundModifier]:
file.backgroundModifier,
- })}
+ }) }
>
<div className="r-Grid">
<div className="r-Grid-cell">
{
file.title &&
<h1
- className={cx(
+ className={ cx(
"cssnext-Jumbotron-title",
"cssnext-Light"
- )}
+ ) }
>
- {file.title}
+ { file.title }
</h1>
}
{
file.subtitle &&
<strong
- className={cx(
+ className={ cx(
"cssnext-Jumbotron-subtitle",
"cssnext-Light"
- )}
+ ) }
>
- {file.subtitle}
+ { file.subtitle }
</strong>
}
</div>
@@ -94,58 +81,62 @@ export default class Default extends Component {
file.incomplete &&
<section className="r-Grid cssnext-Callout cssnext-Callout--info">
<div className="r-Grid-cell">
- <div className="cssnext-Callout-title h4">Incomplete</div>
+ <div className="cssnext-Callout-title h4">
+ { "Incomplete" }
+ </div>
<p>
{
"This documentation is still a work in progress. "
}
<br />
<a
- href={
- "https://github.com/MoOx/postcss-cssnext/issues" +
- "?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+documentation%22"
- }>
- Pull requests
+ href={
+ "https://github.com/MoOx/postcss-cssnext/issues" +
+ "?q=is%3Aopen+is%3Aissue+label%3A%22type%3A+documentation"
+ }
+ >
+ { "Pull requests" }
</a>
{
" expanding on existing or adding additional content " +
" are "
}
- <strong>extremely</strong> appreciated.
+ <strong>{ "extremely" }</strong>{ " appreciated." }
</p>
</div>
</section>
}
<section className="r-Grid cssnext-Section">
<div
- className={cx({
+ className={ cx({
[file.className]: file.className,
"r-Grid-cell": true,
"js-markdownIt-TOCOriginalContainer": true,
- })}
- dangerouslySetInnerHTML={{ __html: file.contents }}
+ }) }
+ dangerouslySetInnerHTML={ { __html: file.contents } }
/>
<div
- className={cx({
+ className={ cx({
"r-Grid-cell": true,
"js-markdownIt-TOCPlaceholder": true,
- })}
+ }) }
/>
</section>
{
footer &&
<div
- className={cx(
+ className={ cx(
"cssnext-Jumbotron",
"cssnext-Jumbotron--default",
"cssnext-Center",
"cssnext-Light"
- )}>
+ ) }
+ >
<div className="cssnext-Jumbotron-title">
<a href="/playground/">
- Try postcss-cssnext in your browser now.
+ { "Try postcss-cssnext in your browser now." }
</a>
</div>
</div>
@@ -156,3 +147,18 @@ export default class Default extends Component {
)
}
}
+
+Default.propTypes = {
+ pkg: PropTypes.object.isRequired,
+ metadata: PropTypes.object.isRequired,
+ // collections: PropTypes.object.isRequired,
+ file: PropTypes.object.isRequired,
+}
+
+Default.childContextTypes = {
+ pkg: PropTypes.object.isRequired,
+ // collections: PropTypes.object.isRequired,
+ file: PropTypes.object.isRequired,
+}
+
+export default Default
@@ -4,20 +4,7 @@ import Html from "../modules/Html"
import Head from "../modules/Head"
import Body from "../modules/Body"
-export default class Simple extends Component {
-
- static propTypes = {
- pkg: PropTypes.object.isRequired,
- metadata: PropTypes.object.isRequired,
- // collections: PropTypes.object.isRequired,
- file: PropTypes.object.isRequired,
- }
-
- static childContextTypes = {
- pkg: PropTypes.object.isRequired,
- // collections: PropTypes.object.isRequired,
- file: PropTypes.object.isRequired,
- }
+class Simple extends Component {
getChildContext() {
return {
@@ -39,23 +26,38 @@ export default class Simple extends Component {
return (
<Html>
<Head
- title={file.title}
- stylesheets={this.props.metadata.assets.stylesheets}
+ title={ file.title }
+ stylesheets={ this.props.metadata.assets.stylesheets }
/>
<Body
- scripts={[
+ scripts={ [
...file.scripts || [],
...this.props.metadata.assets.scripts || [],
- ]}
- version={this.props.metadata.assets.version}
- footer={footer}
+ ] }
+ version={ this.props.metadata.assets.version }
+ footer={ footer }
>
<div
- className={file.className || ""}
- dangerouslySetInnerHTML={{ __html: file.contents }}
+ className={ file.className || "" }
+ dangerouslySetInnerHTML={ { __html: file.contents } }
/>
</Body>
</Html>
)
}
}
+
+Simple.propTypes = {
+ pkg: PropTypes.object.isRequired,
+ metadata: PropTypes.object.isRequired,
+ // collections: PropTypes.object.isRequired,
+ file: PropTypes.object.isRequired,
+}
+
+Simple.childContextTypes = {
+ pkg: PropTypes.object.isRequired,
+ // collections: PropTypes.object.isRequired,
+ file: PropTypes.object.isRequired,
+}
+
+export default Simple
Oops, something went wrong.

0 comments on commit dd8549d

Please sign in to comment.