Next.js 10 で動かしているけど、ESLintを導入していない
Upgrade Guideを参考。
yarn add react@latest react-dom@latest
yarn add next@latest
| name: 'Push CI' | |
| on: push | |
| jobs: | |
| test-create-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout |
Next.js 10 で動かしているけど、ESLintを導入していない
Upgrade Guideを参考。
yarn add react@latest react-dom@latest
yarn add next@latest
| // REF: https://zenn.dev/f_subal/articles/phantom_type_in_typescript | |
| // 「ある関数を通過済みであることを型で保証する」ために下記のような方法を利用する | |
| type Phantomic<T, U extends string> = T & { [key in U]: never }; | |
| type Iso8601 = Phantomic<string, "Iso8601">; | |
| const isoPattern = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; | |
| export const iso8601 = (str: String) => { | |
| if (!str.match(isoPattern)) { | |
| throw new Error("not ISO8601"); |
class Account < ApplicationRecord
has_many :users, inverse_of: :account
endrequire 'benchmark_driver'
Benchmark.driver do |x|
x.rbenv '3.0.0'account = Account.create(email: 'eiwa@example.com', name: 'eiwa')
user_with_account1 = User.create!(name: 'with_account1', account_id: account.id)
user_with_account2 = User.create!(name: 'with_account2', account_id: account.id)
user_without_account1 = User.create!(name: 'without_account1')
user_without_account2 = User.create!(name: 'without_account2')| require: | |
| - rubocop-performance | |
| - rubocop-rails | |
| Style/Documentation: | |
| Enabled: false | |
| Style/ClassAndModuleChildren: | |
| Enabled: false |