Skip to content

Commit

Permalink
Merge pull request #236 from olinlibrary/dev
Browse files Browse the repository at this point in the history
Implements access control and sign in
  • Loading branch information
osteele committed May 15, 2018
2 parents a433eae + d12fa66 commit d7d4666
Show file tree
Hide file tree
Showing 39 changed files with 1,577 additions and 413 deletions.
15 changes: 3 additions & 12 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,22 @@ rules:
react/prop-types: off # TODO: #123

# Airbnb style exceptions that we'll eventually fix:
camelcase: warn
consistent-return: warn
guard-for-in: warn
import/no-unresolved: warn
import/prefer-default-export: warn
no-mixed-operators: warn
no-param-reassign: warn
no-restricted-globals: warn
no-restricted-syntax: warn
no-underscore-dangle: [error, allow: [__REDUX_DEVTOOLS_EXTENSION_COMPOSE__]]
no-use-before-define: warn
prefer-destructuring: warn
react/forbid-prop-types: warn
react/jsx-filename-extension: warn
react/jsx-no-target-blank: warn
react/no-multi-comp: warn
react/no-unused-prop-types: warn
react/no-unused-state: warn
react/prefer-stateless-function: warn
react/require-default-props: warn
react/sort-comp: warn
no-console: off

# Intentional Airbnb exceptions:
no-alert: off # currently used in the UI
no-plusplus: [error, allowForLoopAfterthoughts: true]
no-underscore-dangle: [error, allow: [__REDUX_DEVTOOLS_EXTENSION_COMPOSE__]]

# TODO: #118 accessibility
jsx-a11y/anchor-is-valid: off
Expand All @@ -52,7 +43,6 @@ rules:
jsx-a11y/no-static-element-interactions: off

# Fixable exceptions to Airbnb style guide.
indent: warn
react/jsx-indent: off

overrides:
Expand All @@ -71,6 +61,7 @@ overrides:
jest: true
rules:
import/no-extraneous-dependencies: off
react/jsx-indent: false
- files: [ "actions.js" ]
rules:
no-use-before-define: off
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ seconds for Webpack to recompile everything.

`yarn test:watch` runs Jest in watch mode.

`yarn test:coverage` creates a test coverage report. View the HTML at `./coverage/lcov-report/index.html`.

### Lint

`yarn lint` runs [ESLint](https://eslint.org/). This verifies that the code
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"format": "eslint --fix --ext .js,.jsx src *.js && $npm_execpath run lint:markdown --fix",
"lint:markdown": "markdownlint *.md && markdownlint .github/PULL_REQUEST_TEMPLATE.md -c .github/.markdownlintrc",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"stats": "webpack --json > stats.json"
},
Expand Down Expand Up @@ -98,6 +99,7 @@
"webpack-dev-server": "^2.5.0"
},
"jest": {
"coveragePathIgnorePatterns": ["/node_modules/","__test__"],
"moduleNameMapper": {
"\\.(svg)$": "<rootDir>/__mocks__/fileMock.js"
},
Expand Down
33 changes: 33 additions & 0 deletions src/__test__/__snapshots__/date-time-selector.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`DateTimeSelector date 1`] = `
<div
className="date-time-container"
>
<button
className="button"
onClick={[Function]}
>
May 14, 2018
</button>
<div
className="picker-popup-container"
/>
</div>
`;

exports[`DateTimeSelector datetime 1`] = `
<div
className="date-time-container"
>
<button
className="button"
onClick={[Function]}
>
May 14, 2018 8:00 AM
</button>
<div
className="picker-popup-container"
/>
</div>
`;
14 changes: 14 additions & 0 deletions src/__test__/__snapshots__/plain-english-recurrence.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PlainEnglishRecurrence matches snapshot 1`] = `
<div
className="large-collapse"
>
<span>
Repeats
</span>
daily
2 times
</div>
`;
Loading

0 comments on commit d7d4666

Please sign in to comment.