Skip to content

Instantly share code, notes, and snippets.

@j138
j138 / patch.diff
Created October 31, 2019 09:57
import/no-absolute-path 対応
diff --git a/.eslintrc.js b/.eslintrc.js
index 5594d79..84bc5b3 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -8,13 +8,18 @@ module.exports = {
ecmascript: 6,
jsx: true,
},
- extends: ['airbnb', 'prettier', 'prettier/react'],
+ extends: ['airbnb', 'prettier', 'prettier/react', 'plugin:import/errors', 'plugin:import/warnings'],
@j138
j138 / file0.diff
Last active December 8, 2018 16:08
babel6からbabel7へのアップグレードしたので雑にまとめる ref: https://qiita.com/Jey/items/12bc781242bc6fa40570
diff --git a/package.json b/package.json
index 6c3e796..3143de6 100644
--- a/package.json
+++ b/package.json
@@ -7,19 +7,14 @@
- "build": "NODE_ENV=production webpack -p",
+ "build": "NODE_ENV=production webpack --optimize-minimize --mode production",
"deploy:local": "npm install; npm run build"
},
@@ -46,61 +41,59 @@
@j138
j138 / react-router-dom.diff
Created March 14, 2017 11:00
react-router@v4対応
diff --git a/package.json b/package.json
index 249974e..25f88b1 100644
--- a/package.json
+++ b/package.json
@@ -97,8 +97,7 @@
"react-ga": "2.1.2",
"react-helmet": "^4.0.0",
"react-konva": "1.1.1",
- "react-router": "3.0.2",
+ "react-router-dom": "4.0.0",
@j138
j138 / file0.txt
Last active March 15, 2017 05:10
react-router@v4対応したので雑に晒す ref: http://qiita.com/Jey/items/dae2074427547e63569b
npm un -S react-router && npm i -S react-router-dom
@j138
j138 / plugin.toml
Last active August 16, 2019 06:11
neovimでreactを書くための開発環境 ref: https://qiita.com/Jey/items/38650ebb26e3fb9c7e85
[[plugins]]
repo = 'pangloss/vim-javascript'
on_ft = ['javascript', 'javascript.jsx']
[[plugins]]
repo = 'maxmellon/vim-jsx-pretty'
on_ft = ['javascript', 'javascript.jsx']
[[plugins]]
repo = 'alampros/vim-styled-jsx'
@j138
j138 / docker-disk-optimize.sh
Last active February 27, 2017 05:00
docker for Mac対象でディスク削減 ref: http://qiita.com/Jey/items/0157e689fb1f428a6e6d
#!/bin/bash
echo y | docker system prune
cd ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux || exit
mv Docker.qcow2 Docker.qcow2.org
qemu-img convert -O qcow2 Docker.qcow2.org Docker.qcow2
ls -lh Docker.qcow2 Docker.qcow2.org
rm Docker.qcow2.org
@j138
j138 / .cvimrc
Last active December 18, 2017 01:45
vimperatorの代替としてcVim入れてみた ref: https://qiita.com/Jey/items/2bee3597bfc24fc8a1f8
" Settings
" set noautofocus
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let fullpagescrollpercent = 100
let barposition = "bottom"
let locale = "jp"
let mapleader = ","
let hintcharacters = "qwertyuiasdfghjklzxcvbnm"
@j138
j138 / file0.diff
Last active January 23, 2017 03:01
webpack v1からv2への以降作業 簡易まとめ ref: http://qiita.com/Jey/items/9b7fa193336e53dc6120
diff --git a/webpack.config.babel.js b/webpack.config.babel.js
index f5cbd1a..8ae3f3a 100644
--- a/webpack.config.babel.js
+++ b/webpack.config.babel.js
@@ -1,5 +1,4 @@
module.exports = {
cache: true,
- debug: true,
devtool: 'inline-source-map',
};
@j138
j138 / circle.yml
Last active January 20, 2017 05:46
CircleCIでRailsアプリをAmazon ECRにpushする ref: http://qiita.com/Jey/items/1bf98d19a5a1e6392bc7
machine:
services:
- docker
timezone:
Asia/Tokyo
environment:
CIRCLE_ENV: test
dependencies:
pre:
- if [[ -e ~/docker/ruby.tar ]]; then docker load --input ~/docker/ruby.tar; fi
#!/bin/sh
DEPLOY_ENV=$1
if [ $# -eq 1 ]
then
DEPLOY_ENV=$1
else
DEPLOY_ENV="staging"
fi