概要
Reactプロジェクト立てるときのメモ
内容
ルーティング
yarn add react-router-dom
CSS in JS / UIライブラリ
yarn add styled-components semantic-ui-react semantic-ui-css
Lint設定
- airbnbの設定をベースにする
- VSCodeで保存したら修正されるようにしたい
yarn add eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-react eslint-plugin-jsx-a11y babel-eslint
.eslintrcを作成
.eslintrc
{
"extends": "airbnb",
"parser": "babel-eslint",
"globals": {
"fetch": false,
"window": false,
"document": false
},
"rules": {
"array-callback-return": 0,
"react/no-unused-state": 1,
"no-unused-vars": 0,
"react/jsx-filename-extension": 0,
"react/prop-types": 0,
"max-len": 0
}
}
VSCodeの拡張機能からESLintをインストール
VSCodeの設定からLintのAutoFixを有効にする
都度追加していく