eslint-config-matsuri 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +35 -1
  2. package/index.js +2 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1 +1,35 @@
1
- # eslint-config-matsuri
1
+ # eslint-config-matsuri
2
+
3
+ React/TypeScriptを利用しているリポジトリで共通して使えるESLintのConfigです。
4
+
5
+ 当社以外での理由は想定していません。
6
+
7
+ ## Motivation
8
+
9
+ - 各リポジトリでESLintの設定を更新しなくていいようにする。
10
+ - 簡単に設定ができるようにする。
11
+ - 頻出するwarningをerrorかoffに分類し、方針を明確にする
12
+
13
+ ## Installation
14
+
15
+ ESLintを除く依存関係を別途インストールする必要はありません。既に入っている場合は、削除してください。
16
+
17
+ ```sh
18
+ yarn add eslint eslint-config-matsuri
19
+ ```
20
+
21
+ 設定ファイルは次の記述のみで良くなります。他の記述は削除してください。
22
+
23
+ ```js
24
+ /** @type {import('eslint').Linter.BaseConfig} */
25
+ const config = {
26
+ extends: ["matsuri"],
27
+ };
28
+
29
+ module.exports = config;
30
+ ```
31
+
32
+ ## Contributing
33
+
34
+ ルールの検証などを行いたい場合は、tests以下にファイルを配置してください。
35
+ Errorが出てほしい記述には、`// eslint-disable-next-line`コメントを付けておくことで、`pnpm test`コマンドで確認できるようになります。
package/index.js CHANGED
@@ -24,7 +24,6 @@ const config = {
24
24
  extends: [
25
25
  "plugin:react/recommended",
26
26
  "plugin:react-hooks/recommended",
27
- "plugin:import/recommended",
28
27
  "plugin:import/typescript",
29
28
  "plugin:react/jsx-runtime",
30
29
  "plugin:@typescript-eslint/recommended",
@@ -54,6 +53,8 @@ const config = {
54
53
  html: true,
55
54
  },
56
55
  ],
56
+ "react/prop-types": "off",
57
+ "react-hooks/exhaustive-deps": "error",
57
58
 
58
59
  "jsx-a11y/click-events-have-key-events": "off",
59
60
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-matsuri",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {