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

Add eslint #75

Merged
merged 6 commits into from
Apr 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
# run tests!
- run: yarn test

# run build!
- run: yarn run build

- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
Expand Down
10 changes: 5 additions & 5 deletions lint_problems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set -eo pipefail

prelude() {
echo "
You have prettier linting errors!
You have prettier-eslint linting errors!
----------------------------------
The following files would turn out different if you process them with prettier.
The following files would turn out different if you process them with prettier-eslint.

"
}
Expand All @@ -16,9 +16,9 @@ while read line
do
$first && prelude
echo "To fix:"
echo " prettier --write ${line}"
echo " prettier-eslint --write ${line}"
echo "To see:"
echo " prettier ${line} | diff ${line} -"
echo " prettier-eslint ${line} | diff ${line} -"
echo ""
# echo "$line"
any=true
Expand All @@ -29,7 +29,7 @@ done < "${1:-/dev/stdin}"
$any && echo "
If you're not interested in how they're different, consider running:

yarn run lint:prettierfix
yarn run lint:prettier-eslintfix
"

$any && exit 1 || exit 0
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"eject": "react-scripts eject",
"lint:flow": "flow",
"lint:less": "stylelint 'src/**/*.less' --config .stylelintrc",
"lint:prettier": "prettier --list-different 'src/**/*.js' | ./lint_problems.sh",
"lint:prettierfix": "prettier 'src/**/*.js' --write",
"lint": "yarn run lint:flow && yarn run lint:prettier && yarn run lint:less"
"lint:prettier-eslint": "prettier-eslint --list-different 'src/**/*.js' | ./lint_problems.sh",
"lint:prettier-eslintfix": "prettier-eslint --write 'src/**/*.js'",
"lint": "yarn run lint:flow && yarn run lint:prettier-eslint && yarn run lint:less"
},
"devDependencies": {
"babel-plugin-import": "^1.6.5",
Expand All @@ -43,6 +43,8 @@
"flow-bin": "^0.66.0",
"pre-commit": "^1.2.2",
"prettier": "^1.11.1",
"prettier-eslint": "^8.8.1",
"prettier-eslint-cli": "^4.7.1",
"react-app-rewire-less": "^2.1.0",
"react-app-rewired": "^1.4.1",
"stylelint": "^9.1.1",
Expand Down
7 changes: 3 additions & 4 deletions src/normandy/state/app/session/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export function saveSession() {
}

export function addSessionView(category, caption, identicon) {
return async (dispatch, getState) => {
return async (dispatch, getState) =>
// #todo;
return null;
/*
null;
/*
const { router } = getState();
let url = router.pathname;

Expand All @@ -83,5 +83,4 @@ export function addSessionView(category, caption, identicon) {
// Automatically save the session when views are added.
return dispatch(saveSession());
*/
};
}
4 changes: 3 additions & 1 deletion src/normandy/tests/utils/test_handleError.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ describe('handleError util', () => {
it('should handle a "not logged in" 403 error', () => {
const err = new APIClient.APIError(
'Authentication credentials were not provided',
{ status: 403 },
{
status: 403,
},
);

const { context, message, reason } = handleError('Test.', err);
Expand Down
Loading