Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 694c845

Browse files
author
Johann
committed
Add ESLint as the default npm test for now
We have a CI in place that will run `npm test` on pull request, so we might as well use it for something meaningful like ESLint. The `example/` are ignored for now because of too many errors. If anyone wants to pick that up, feel free. This also fixes small ESLint complaints.
1 parent f5c55fd commit 694c845

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,25 +101,25 @@ class Router extends React.Component {
101101
aspect.before(this.refs.navigator, 'push', (route) => {
102102
this.onWillPush(route);
103103
});
104-
aspect.after(this.refs.navigator, 'push', (route) => {
104+
aspect.after(this.refs.navigator, 'push', (route, ...args) => {
105105
// temporary hack to fix bug in aspect library
106-
this.onDidPush(route || arguments[1]);
106+
this.onDidPush(route || args[1]);
107107
});
108108

109109
aspect.before(this.refs.navigator, 'resetTo', (route) => {
110110
this.onWillResetTo(route);
111111
});
112-
aspect.after(this.refs.navigator, 'resetTo', (route) => {
112+
aspect.after(this.refs.navigator, 'resetTo', (route, ...args) => {
113113
// temporary hack to fix bug in aspect library
114-
this.onDidResetTo(route || arguments[1]);
114+
this.onDidResetTo(route || args[1]);
115115
});
116116

117117
aspect.before(this.refs.navigator, 'replace', (route) => {
118118
this.onWillReplace(route);
119119
});
120-
aspect.after(this.refs.navigator, 'replace', (route) => {
120+
aspect.after(this.refs.navigator, 'replace', (route, ...args) => {
121121
// temporary hack to fix bug in aspect library
122-
this.onDidReplace(route || arguments[1]);
122+
this.onDidReplace(route || args[1]);
123123
});
124124

125125
aspect.before(this.refs.navigator, 'popToTop', () => {

‎package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
],
1111
"main": "index.js",
1212
"scripts": {
13-
"test": "echo \"Error: no test specified\" && exit 1"
13+
"test": "eslint . --ignore-pattern examples/"
1414
},
1515
"repository": {
1616
"type": "git",
@@ -41,8 +41,8 @@
4141
},
4242
"devDependencies": {
4343
"eslint": "^2.7.0",
44-
"eslint-config-airbnb": "^7.0.0",
45-
"eslint-plugin-react": "^4.3.0",
46-
"eslint-plugin-jsx-a11y": "^0.6.2"
44+
"eslint-config-airbnb": "^9.0.1",
45+
"eslint-plugin-react": "^5.1.1",
46+
"eslint-plugin-jsx-a11y": "^1.2.0"
4747
}
4848
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /