ソースを参照

build: implement prettier and configure eslint

hover-contact
ntasicc 3年前
コミット
ae9df181a0
5個のファイルの変更40行の追加3行の削除
  1. 21
    1
      .eslintrc.json
  2. 4
    0
      .prettierignore
  3. 6
    0
      .prettierrc
  4. 4
    2
      package.json
  5. 5
    0
      yarn.lock

+ 21
- 1
.eslintrc.json ファイルの表示

@@ -1,3 +1,23 @@
{
"extends": "next/core-web-vitals"
"extends": [
"plugin:storybook/recommended",
"next",
"next/core-web-vitals",
"eslint:recommended"
],
"globals": {
"React": "readonly"
},
"overrides": [
{
"files": ["*.stories.@(ts|tsx|js|jsx|mjs|cjs)"],
"rules": {
// example of overriding a rule
"storybook/hierarchy-separator": "error"
}
}
],
"rules": {
"no-unused-vars": [1, { "args": "after-used", "argsIgnorePattern": "^_" }]
}
}

+ 4
- 0
.prettierignore ファイルの表示

@@ -0,0 +1,4 @@
.yarn
.next
dist
node_modules

+ 6
- 0
.prettierrc ファイルの表示

@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}

+ 4
- 2
package.json ファイルの表示

@@ -6,7 +6,8 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"prettier": "prettier --write ."
},
"dependencies": {
"next": "12.2.3",
@@ -15,6 +16,7 @@
},
"devDependencies": {
"eslint": "8.21.0",
"eslint-config-next": "12.2.3"
"eslint-config-next": "12.2.3",
"prettier": "^2.7.1"
}
}

+ 5
- 0
yarn.lock ファイルの表示

@@ -1410,6 +1410,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

prettier@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==

prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"

読み込み中…
キャンセル
保存