Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Commit 0f389fe

Browse files
committed
Fix eslint issues by upgrading to 1.x rc
1 parent 1345952 commit 0f389fe

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

.eslintrc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,30 @@ plugins:
2929
rules:
3030
indent: [2, 2] # 2 spaces indentation
3131
max-len: [2, 80, 4]
32+
no-multiple-empty-lines: [2, {"max": 1}]
3233
quotes: [2, "double"]
3334
semi: [2, "never"]
34-
no-multiple-empty-lines: [2, {"max": 1}]
3535

3636
brace-style: [2, "stroustrup"]
3737
comma-dangle: [2, "always-multiline"]
3838
comma-style: [2, "last"]
3939
computed-property-spacing: [2, "never"]
4040
dot-location: [2, "property"]
4141

42-
one-var: [2, "never"]
4342
no-var: [2]
44-
prefer-const: [2]
4543
no-bitwise: [2]
44+
one-var: [2, "never"]
45+
prefer-const: [2]
4646

47+
array-bracket-spacing: [2, "never"]
4748
object-shorthand: [2, "methods"]
49+
object-curly-spacing: [2, "never"]
4850
space-after-keywords: [2, "always"]
4951
space-before-blocks: [2, "always"]
5052
space-before-function-paren: [2, "never"]
51-
space-in-brackets: [2, "never"]
5253
space-in-parens: [2, "never"]
53-
spaced-line-comment: [2, "always"]
54+
space-unary-ops: [2, {"words": true, "nonwords": false}]
55+
spaced-comment: [2, "always"]
5456

5557
# see globals
5658
no-underscore-dangle: 0

docs/scripts/build.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,11 @@ if (buildConfig.__DEV_SERVER__) {
118118
version: String((new Date()).getTime()),
119119
scripts: [
120120
"/index.js",
121-
(
122-
`http://${
123-
buildConfig.__SERVER_HOSTNAME__
124-
}:${
125-
buildConfig.__LR_SERVER_PORT__
126-
}/livereload.js`
127-
),
121+
`http://${
122+
buildConfig.__SERVER_HOSTNAME__
123+
}:${
124+
buildConfig.__LR_SERVER_PORT__
125+
}/livereload.js`,
128126
],
129127
// css is handled by the js via webpack style-loader
130128
}

docs/src/modules/Html/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, {Component, PropTypes} from "react"
33
export default class Html extends Component {
44

55
static propTypes = {
6-
children: PropTypes.array.isRequired,
6+
children: PropTypes.array.isRequired,
77
}
88

99
render() {

docs/src/modules/SVGIcon/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default class SVGIcon extends Component {
6464
className,
6565
component,
6666
svg,
67-
fill
67+
fill,
6868
} = this.props
6969

7070
let cleanup = this.props.cleanup

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
"cssrecipes-grid": "^0.4.0",
7676
"cssrecipes-utils": "^0.5.0",
7777
"cssrecipes-vertical-rhythm": "^0.6.0",
78-
"eslint": "^0.23.0",
79-
"eslint-loader": "^0.14.0",
80-
"eslint-plugin-react": "^2.5.2",
78+
"eslint": "^1.0.0-rc-1",
79+
"eslint-loader": "^0.14.2",
80+
"eslint-plugin-react": "^3.0.0",
8181
"extract-text-webpack-plugin": "^0.8.0",
8282
"file-loader": "^0.8.3",
8383
"highlight.js": "^8.6.0",

src/plugins/messages.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@ function escapeForCSS(string) {
1111
for (let i = 0; i < string.length; i++) {
1212
const ch = string.charAt(i)
1313
switch (ch) {
14-
case "\n":
15-
case "\r":
16-
newString += "\\A "
17-
break
14+
case "\n":
15+
case "\r":
16+
newString += "\\A "
17+
break
1818

19-
case "\\":
20-
case "\'":
21-
case "\"":
22-
newString += "\\" + ch
23-
break
19+
case "\\":
20+
case "\'":
21+
case "\"":
22+
newString += "\\" + ch
23+
break
2424

25-
default:
26-
// non ascii
27-
if (!ch.match(/^[\x00-\x7F]*$/)) {
28-
let hexCh = string.charCodeAt(i).toString(16)
29-
while (hexCh.length < 4) {
30-
hexCh = "0" + hexCh
31-
}
32-
// space at the end is required
33-
newString += "\\" + hexCh + " "
34-
continue
25+
default:
26+
// non ascii
27+
if (!ch.match(/^[\x00-\x7F]*$/)) {
28+
let hexCh = string.charCodeAt(i).toString(16)
29+
while (hexCh.length < 4) {
30+
hexCh = "0" + hexCh
3531
}
36-
newString += string[i]
32+
// space at the end is required
33+
newString += "\\" + hexCh + " "
34+
continue
35+
}
36+
newString += string[i]
3737
}
3838
}
3939

0 commit comments

Comments
 (0)