Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Updated ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
asgvard committed Sep 17, 2019
1 parent 69c9991 commit 8bea530
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 121 deletions.
16 changes: 1 addition & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
{
"extends": "norigin/react",
"rules": {
"indent": ["error", 2],
"new-cap": ["error", {"capIsNew": false}],
"quotes": ["error", "single", "avoid-escape"],
"react/jsx-indent": ["error", 2],
"react/jsx-indent-props": ["error", 2],
"react/jsx-closing-bracket-location": ["off"],
"react/jsx-closing-tag-location": ["off"],
"react/jsx-curly-brace-presence": ["error", {"props": "always"}],
"react/boolean-prop-naming": ["off"],
"arrow-body-style": ["error", "as-needed"],
"import/extensions": ["error", "never"],
"no-console": ["error", {"allow": ["warn", "error", "log"]}],
"id-length": ["error", {"min": 1, "max": 60}]
},
"rules": {},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7
Expand Down
141 changes: 87 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"eslint": "4.19.1",
"eslint-config-norigin": "git+https://github.com/NoriginMedia/eslint-config-norigin.git#v3.7.0",
"eslint-config-norigin": "git+https://github.com/NoriginMedia/eslint-config-norigin.git#v3.7.5",
"parcel-bundler": "^1.11.0",
"pre-commit": "^1.2.2",
"react": "^16.5.2",
Expand Down
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ class Active extends React.PureComponent {

Active.propTypes = {
program: PropTypes.shape({
title: PropTypes.string.isRequired
title: PropTypes.string.isRequired,
color: PropTypes.string.isRequired
})
};

Expand Down
100 changes: 50 additions & 50 deletions src/spatialNavigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,72 +86,72 @@ class SpatialNavigation {
};

switch (direction) {
case DIRECTION_UP: {
const y = isSibling ? itemY + itemHeight : itemY;
case DIRECTION_UP: {
const y = isSibling ? itemY + itemHeight : itemY;

result.a = {
x: itemX,
y
};
result.a = {
x: itemX,
y
};

result.b = {
x: itemX + itemWidth,
y
};
result.b = {
x: itemX + itemWidth,
y
};

break;
}
break;
}

case DIRECTION_DOWN: {
const y = isSibling ? itemY : itemY + itemHeight;
case DIRECTION_DOWN: {
const y = isSibling ? itemY : itemY + itemHeight;

result.a = {
x: itemX,
y
};
result.a = {
x: itemX,
y
};

result.b = {
x: itemX + itemWidth,
y
};
result.b = {
x: itemX + itemWidth,
y
};

break;
}
break;
}

case DIRECTION_LEFT: {
const x = isSibling ? itemX + itemWidth : itemX;
case DIRECTION_LEFT: {
const x = isSibling ? itemX + itemWidth : itemX;

result.a = {
x,
y: itemY
};
result.a = {
x,
y: itemY
};

result.b = {
x,
y: itemY + itemHeight
};
result.b = {
x,
y: itemY + itemHeight
};

break;
}
break;
}

case DIRECTION_RIGHT: {
const x = isSibling ? itemX : itemX + itemWidth;
case DIRECTION_RIGHT: {
const x = isSibling ? itemX : itemX + itemWidth;

result.a = {
x,
y: itemY
};
result.a = {
x,
y: itemY
};

result.b = {
x,
y: itemY + itemHeight
};
result.b = {
x,
y: itemY + itemHeight
};

break;
}
break;
}

default:
break;
default:
break;
}

return result;
Expand Down

0 comments on commit 8bea530

Please sign in to comment.