Skip to content

Commit

Permalink
finally committing this starting point up. updated deps, too
Browse files Browse the repository at this point in the history
  • Loading branch information
rpearce committed Jun 25, 2019
1 parent 65e0c7a commit 057962f
Show file tree
Hide file tree
Showing 35 changed files with 8,432 additions and 26,590 deletions.
69 changes: 49 additions & 20 deletions .all-contributorsrc
@@ -1,31 +1,12 @@
{
"projectName": "react-medium-image-zoom",
"projectOwner": "rpearce",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"contributors": [
{
"login": "rpearce",
"name": "Robert Pearce",
"avatar_url": "https://avatars2.githubusercontent.com/u/592876?v=4",
"profile": "https://robertwpearce.com",
"contributions": [
"code",
"question",
"test",
"bug",
"example",
"design",
"review",
"ideas",
"doc"
]
},
{
"login": "cbothner",
"name": "Cameron Bothner",
Expand Down Expand Up @@ -88,6 +69,23 @@
"bug"
]
},
{
"login": "rpearce",
"name": "Robert Pearce",
"avatar_url": "https://avatars2.githubusercontent.com/u/592876?v=4",
"profile": "https://robertwpearce.com",
"contributions": [
"code",
"question",
"test",
"bug",
"example",
"design",
"review",
"ideas",
"doc"
]
},
{
"login": "joshsloat",
"name": "Josh Sloat",
Expand Down Expand Up @@ -187,6 +185,37 @@
"contributions": [
"bug"
]
},
{
"login": "tommoor",
"name": "Tom Moor",
"avatar_url": "https://avatars2.githubusercontent.com/u/380914?v=4",
"profile": "http://tommoor.com",
"contributions": [
"code",
"bug"
]
},
{
"login": "jpreynat",
"name": "Johan Preynat",
"avatar_url": "https://avatars2.githubusercontent.com/u/7927876?v=4",
"profile": "https://github.com/jpreynat",
"contributions": [
"code",
"bug"
]
},
{
"login": "rgabs",
"name": "Rahul Gaba",
"avatar_url": "https://avatars3.githubusercontent.com/u/7898942?v=4",
"profile": "http://rahulgaba.com",
"contributions": [
"code",
"bug"
]
}
]
],
"repoType": "github"
}
9 changes: 9 additions & 0 deletions .browserslistrc
@@ -0,0 +1,9 @@
# Browsers that we support

last 3 chrome versions
last 3 ff versions
last 3 safari versions
last 3 edge versions
last 3 ios major versions
last 1 and_chr version
ie >= 11
6 changes: 2 additions & 4 deletions .eslintignore
@@ -1,4 +1,2 @@
coverage/
docs/
node_modules/
src/
!.storybook/
dist/
62 changes: 0 additions & 62 deletions .eslintrc

This file was deleted.

42 changes: 42 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,42 @@
module.exports = {
env: {
browser: true,
es6: true,
jest: true,
node: true
},
extends: [
'eslint:recommended',
'plugin:css-modules/recommended',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended'
],
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module'
},
plugins: [
'css-modules',
'jsx-a11y',
'react',
'react-hooks'
],
rules: {
'indent': ['error', 2, { 'SwitchCase': 1 }],
'jsx-quotes': ['error', 'prefer-double'],
'jsx-a11y/no-onchange': 0,
'no-console': ['error', { allow: ['error'] }],
'no-trailing-spaces': 'error',
'object-curly-spacing': ['error', 'always'],
'quotes': ['error', 'single', { 'allowTemplateLiterals': true }],
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/rules-of-hooks': 'error',
'semi': ['error', 'never']
},
settings: {
react: {
version: '16'
}
}
}
4 changes: 4 additions & 0 deletions .prettierrc.js
@@ -0,0 +1,4 @@
module.exports = {
semi: false,
singleQuote: true
}
4 changes: 4 additions & 0 deletions .storybook/addons.js
@@ -0,0 +1,4 @@
import '@storybook/addon-a11y/register'
import '@storybook/addon-actions/register'
import '@storybook/addon-knobs/register'
import '@storybook/addon-links/register'
26 changes: 26 additions & 0 deletions .storybook/base.css
@@ -0,0 +1,26 @@
html {
font-size: 16px;
box-sizing: border-box;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
html,
body {
min-height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
margin: 2em;
font-size: 1rem;
font-family: monospace;
color: #333;
}
body,
input,
button {
-webkit-font-smoothing: antialiased;
}
7 changes: 7 additions & 0 deletions .storybook/config.js
@@ -0,0 +1,7 @@
import { configure } from '@storybook/react'

function loadStories() {
require('../stories.js')
}

configure(loadStories, module)
38 changes: 38 additions & 0 deletions .storybook/webpack.config.js
@@ -0,0 +1,38 @@
const path = require('path')

module.exports = async ({ config }) => {
config.module.rules = config.module.rules.filter(
f => f.test.toString() !== '/\\.css$/'
)

config.module.rules.push({
oneOf: [
{
test: /\.css$/,
include: /node_modules/,
loaders: [
'style-loader',
{
loader: 'css-loader',
options: { modules: false }
},
'postcss-loader'
]
},
{
test: /\.css$/,
loaders: [
'style-loader',
{
loader: 'css-loader',
options: { modules: true }
},
'postcss-loader'
],
include: path.resolve(__dirname, '../')
}
]
})

return config
}
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "11"
- "12"
cache: yarn
after_success:
- npm run coverage
31 changes: 27 additions & 4 deletions LICENSE
@@ -1,7 +1,30 @@
ISC License (ISC)
Copyright (c) 2019, Robert Pearce

Copyright 2019 Robert Pearce
All rights reserved.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of Robert Pearce nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 comments on commit 057962f

Please sign in to comment.