Skip to content

Commit 13028a6

Browse files
committedDec 14, 2019
Initial commit
0 parents  commit 13028a6

26 files changed

+15288
-0
lines changed
 

‎.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
indent_style = space
9+
indent_size = 4
10+
11+
[*.{less,ts,tsx,json,yml,html}]
12+
indent_size = 2

‎.eslintrc.js

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
jest: true,
5+
},
6+
extends: [
7+
'airbnb',
8+
'plugin:@typescript-eslint/eslint-recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
11+
'plugin:prettier/recommended',
12+
'prettier/react',
13+
'prettier/@typescript-eslint',
14+
],
15+
parser: '@typescript-eslint/parser',
16+
parserOptions: {
17+
project: ['./tsconfig.json'],
18+
},
19+
plugins: ['@typescript-eslint', 'react-hooks'],
20+
rules: {
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
23+
'@typescript-eslint/no-unused-vars': [
24+
'error',
25+
{
26+
vars: 'all',
27+
args: 'all',
28+
ignoreRestSiblings: false,
29+
argsIgnorePattern: '^_',
30+
},
31+
],
32+
'import/no-extraneous-dependencies': [
33+
'error',
34+
{
35+
devDependencies: [
36+
'**/*.config.{js,ts}',
37+
'**/*.spec.{ts,tsx}',
38+
'**/.storybook/**/*.{ts,tsx}',
39+
'**/*.stories.{ts,tsx}',
40+
'**/__fixtures__/**/*.{ts,tsx}',
41+
],
42+
},
43+
],
44+
'import/extensions': ['error', 'never'],
45+
'import/order': ['error', { 'newlines-between': 'always' }],
46+
'import/prefer-default-export': 0,
47+
'import/no-default-export': 'error',
48+
'react-hooks/exhaustive-deps': 'warn',
49+
'react-hooks/rules-of-hooks': 'error',
50+
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
51+
'react/jsx-key': ['error', { checkFragmentShorthand: true }],
52+
'react/jsx-props-no-spreading': 0,
53+
'react/prop-types': 0,
54+
},
55+
settings: {
56+
'import/resolver': {
57+
node: {
58+
extensions: ['.ts', '.tsx', '.js', '.jsx'],
59+
paths: ['./src', './node_modules'],
60+
},
61+
},
62+
},
63+
}

‎.gitignore

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
# dist
64+
storybook-static
65+
public

‎.prettierrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
bracketSpacing: true,
3+
semi: false,
4+
singleQuote: true,
5+
tabWidth: 2,
6+
trailingComma: 'es5',
7+
useTabs: false,
8+
}

‎.storybook/addons.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import '@storybook/addon-actions/register';
2+
import '@storybook/addon-links/register';
3+
import '@storybook/addon-knobs/register';

‎.storybook/config.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { configure, addDecorator } from '@storybook/react';
2+
import { withKnobs } from '@storybook/addon-knobs'
3+
import '../src/index.less'
4+
5+
// automatically import all files ending in *.stories.tsx
6+
const req = require.context('../src/components', true, /.stories.tsx$/);
7+
function loadStories() {
8+
req.keys().forEach(filename => req(filename));
9+
}
10+
11+
addDecorator(withKnobs)
12+
configure(loadStories, module);

‎.storybook/webpack.config.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module.exports = {
2+
module: {
3+
rules: [
4+
{
5+
test: /\.tsx?$/,
6+
exclude: /node_modules/,
7+
use: [
8+
{
9+
loader: 'babel-loader',
10+
options: { cacheDirectory: true, compact: true },
11+
},
12+
],
13+
},
14+
{
15+
test: /\.less$/,
16+
use: [
17+
'style-loader',
18+
'css-loader',
19+
{
20+
loader: 'less-loader',
21+
// https://github.com/ant-design/ant-design/issues/7927
22+
options: { javascriptEnabled: true }
23+
}
24+
]
25+
}
26+
]
27+
},
28+
resolve: {
29+
extensions: ['.ts', '.tsx', '.js', '.jsx']
30+
}
31+
}

‎.travis.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
sudo: false
2+
cache:
3+
yarn: true
4+
directories:
5+
- node_modules
6+
language: node_js
7+
node_js: lts/*
8+
env:
9+
global:
10+
- secure: NOEB9sQFF/yUHb62CYHShk+OEOv/4DbRay2RzWWd3SvxayP9sGQXdC5G2DI4acyTcXSdCykYEiuHh+M0sH/jdW8qZA8rMAReTXCHSC+RTBSPkA2gSPzw/fT+4HjLyTPwPNt2g5P1nKt4k9w2xaUrMCFWbE+ED7Mk9+Y4iasv9J/nFE2p0iccLRcee0tmvPB3vZDe/zkzK7IlQQxTt9K1VHsujRNueukAahlBCayx73PXJzKjom7lZ996tWlfFsfIQlP9Ab0PuI2aaPUIYULloB6YZ2/LvnA5uxuqdKUWA9odNUIAqBonlYq4DHoiRDOXCLMwFSL8UCSfLHhM/Hy3X0kZqV90HQb7E+JDMtw9eJYiOSIdPUDRUJtbgJaCwtGuUgxLdcfyUnVmqXmVGK0lOq04tv5+Q+ZZSYs+yp8hUOTMtZlJIeJ6zjaw/3gGT/pu9LSerw7jrqBqzUKYNCo8SZijSTqzMMq3wM2SS74X7k62gw0Wekrsv9TWfu9LdMzc9pPagFJBoK0XBsxkwBax7Ybw2887B4OY/xxtglxqi5lHl3VpMJwZN4p6gNpV1q8ryPBeoHG5KbAsr7LKxy5nyNZupph3E9A4FZesXObNef6oYCYcmBYc1q8DbqJUUr2BCVl2etG8c6MMbGqW/rFCa9XTQbXyMk3J+7iuAvsHeNk=
11+
stages:
12+
- test
13+
- name: deploy
14+
jobs:
15+
include:
16+
- stage: Test
17+
name: "lint"
18+
script:
19+
- yarn lint
20+
-
21+
script:
22+
- yarn test
23+
name: "test"
24+
-
25+
script:
26+
- yarn build-storybook
27+
name: "build storybook"
28+
- stage: deploy
29+
name: "deploy to gh-page"
30+
env: gh-page
31+
script:
32+
- yarn build
33+
deploy:
34+
provider: pages
35+
skip-cleanup: true
36+
github-token: $GITHUB_TOKEN
37+
keep-history: true
38+
local-dir: public
39+
on:
40+
branch: master

‎.yarnclean

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# test directories
2+
__tests__
3+
test
4+
tests
5+
powered-test
6+
7+
# asset directories
8+
docs
9+
doc
10+
website
11+
images
12+
assets
13+
14+
# examples
15+
example
16+
examples
17+
18+
# code coverage directories
19+
coverage
20+
.nyc_output
21+
22+
# build scripts
23+
Makefile
24+
Gulpfile.js
25+
Gruntfile.js
26+
27+
# configs
28+
appveyor.yml
29+
circle.yml
30+
codeship-services.yml
31+
codeship-steps.yml
32+
wercker.yml
33+
.tern-project
34+
.gitattributes
35+
.editorconfig
36+
.*ignore
37+
.eslintrc
38+
.jshintrc
39+
.flowconfig
40+
.documentup.json
41+
.yarn-metadata.json
42+
.travis.yml
43+
44+
# misc
45+
*.md
46+
47+
48+
## workaround
49+
@types/react-native

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Shoota Kumano
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# react-playground
2+
よりうまい肉を食うぞ
3+
4+
## Purpose
5+
6+
もっとうまい肉を食べれるようになる。
7+
8+
## Scope
9+
10+
- React
11+
- Typescript
12+
- less syntax
13+
- Style(CSS) design
14+
15+
## What I need?
16+
17+
- きれいとはなにかを考える
18+
- できてるものより、できないものを考える
19+
- 悩ましい部分に自分ルールを持つ

‎babel.config.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/env',
5+
{
6+
corejs: 3,
7+
useBuiltIns: 'usage',
8+
},
9+
],
10+
'@babel/typescript',
11+
'@babel/react',
12+
],
13+
plugins: [
14+
'@babel/plugin-proposal-optional-chaining',
15+
'@babel/proposal-class-properties',
16+
'@babel/proposal-object-rest-spread',
17+
],
18+
}

0 commit comments

Comments
 (0)
Please sign in to comment.