Skip to content

Commit ecb34de

Browse files
committed
Upgrade ESLint, fix code
1 parent 2f07935 commit ecb34de

File tree

22 files changed

+115
-84
lines changed

22 files changed

+115
-84
lines changed

.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ globals:
2727
rules:
2828
# ERRORS
2929
space-before-blocks: 2
30-
indent: [2, 2, indentSwitchCase: true]
30+
indent: [2, 2, {SwitchCase: 1}]
3131
brace-style: 2
3232
space-after-keywords: 2
33-
strict: 2
33+
strict: [2, global]
3434
comma-dangle: [2, always-multiline]
3535
# Make this a warning for now. We do this in a few places so we might need to
3636
# disable

docs/_js/examples/.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
rules:
33
block-scoped-var: 0
44
no-undef: 0
5+
strict: 0
56
react/react-in-jsx-scope: 0
67
react/jsx-no-undef: 0

eslint-rules/__tests__/warning-and-invariant-args-test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
'use strict';
1313

14-
var eslint = require('eslint');
15-
var ESLintTester = require('eslint-tester');
16-
var eslintTester = new ESLintTester(eslint.linter);
14+
var rule = require('../warning-and-invariant-args');
15+
var RuleTester = require('eslint').RuleTester;
16+
var ruleTester = new RuleTester();
1717

18-
eslintTester.addRuleTest('eslint-rules/warning-and-invariant-args', {
18+
ruleTester.run('eslint-rules/warning-and-invariant-args', rule, {
1919
valid: [
2020
"warning(true, 'hello, world');",
2121
"warning(true, 'expected %s, got %s', 42, 24);",
@@ -100,4 +100,3 @@ eslintTester.addRuleTest('eslint-rules/warning-and-invariant-args', {
100100
},
101101
],
102102
});
103-

grunt/config/npm.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict';
2+
13
exports.pack = {};

grunt/tasks/release.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,14 @@ function docs() {
127127
function msg() {
128128
// Just output a friendly reminder message for the rest of the process
129129
grunt.log.subhead('Release *almost* complete...');
130-
[
130+
var steps = [
131131
'Still todo:',
132132
'* put files on CDN',
133133
'* push changes to git repositories',
134134
'* publish npm module (`npm publish .`)',
135135
'* announce it on FB/Twitter/mailing list',
136-
].forEach(function(ln) {
136+
];
137+
steps.forEach(function(ln) {
137138
grunt.log.writeln(ln);
138139
});
139140
}

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
"version": "0.14.0-beta3",
55
"devDependencies": {
66
"babel": "^5.8.3",
7-
"babel-eslint": "^3.1.25",
7+
"babel-eslint": "^4.0.5",
88
"benchmark": "^1.0.0",
99
"browserify": "^9.0.3",
1010
"bundle-collapser": "^1.1.1",
1111
"coffee-script": "^1.8.0",
1212
"del": "^1.2.0",
1313
"derequire": "^2.0.0",
1414
"envify": "^3.0.0",
15-
"eslint": "^0.24.1",
16-
"eslint-plugin-react": "^2.5.0",
15+
"eslint": "^1.1.0",
16+
"eslint-plugin-react": "^3.2.1",
1717
"eslint-plugin-react-internal": "file:eslint-rules",
18-
"eslint-tester": "^0.7.0",
1918
"fbjs": "0.1.0-alpha.4",
2019
"grunt": "^0.4.5",
2120
"grunt-cli": "^0.1.13",

packages/react-dom/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict';
2+
13
module.exports = require('react/lib/ReactDOM');

packages/react-dom/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
'use strict';
2+
13
module.exports = require('react/lib/ReactDOMServer');

packages/react/addons.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var warning = require('fbjs/lib/warning');
24
warning(
35
false,

scripts/jest/environment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
/* eslint-disable */
12
__DEV__ = true;

0 commit comments

Comments
 (0)