eslint-config-matsuri 2.1.1-alpha-bd9aeba.0 → 3.0.0

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.
package/README.md CHANGED
@@ -18,20 +18,28 @@ ESLintを除く依存関係を別途インストールする必要はありま
18
18
  yarn add eslint eslint-config-matsuri
19
19
  ```
20
20
 
21
- 設定ファイルは次の記述のみで良くなります。他の記述は削除してください。
21
+ Flat configをv3からサポートしています。eslint.config.jsに次のように記述します。
22
22
 
23
23
  ```js
24
- /** @type {import('eslint').Linter.BaseConfig} */
25
- const config = {
26
- extends: ["matsuri"],
27
- parserOptions: {
28
- project: true,
29
- tsconfigRootDir: __dirname,
24
+ import config from "eslint-config-matsuri";
25
+
26
+ export default config
27
+ ```
28
+
29
+ 拡張する場合は、次のようにしてください。
30
+
31
+ ```js
32
+ import config from "eslint-config-matsuri";
33
+
34
+ export default [
35
+ ...config,
36
+ {
37
+ // ここに追加の設定を記述する
30
38
  }
31
- };
32
- module.exports = config;
39
+ ]
33
40
  ```
34
41
 
42
+
35
43
  ## Contributing
36
44
 
37
45
  ルールの検証などを行いたい場合は、tests以下にファイルを配置してください。
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { Linter } from "eslint";
2
+
3
+ declare const config: Linter.FlatConfig[];
4
+
5
+ export default config;
package/index.js CHANGED
@@ -17,7 +17,8 @@ const config = [
17
17
  reportUnusedDisableDirectives: true,
18
18
  },
19
19
  languageOptions: {
20
- ecmaVersion: 12,
20
+ ecmaVersion: "latest",
21
+ sourceType: "module",
21
22
  globals: {
22
23
  ...globals.commonjs,
23
24
  ...globals.es2021,
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "eslint-config-matsuri",
3
- "version": "2.1.1-alpha-bd9aeba.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
7
+ "types": "index.d.ts",
7
8
  "files": [
8
- "index.js"
9
+ "index.js",
10
+ "index.d.ts"
9
11
  ],
10
12
  "scripts": {
11
13
  "test": "eslint . --max-warnings 0"
@@ -16,7 +18,7 @@
16
18
  "registry": "https://registry.npmjs.org/"
17
19
  },
18
20
  "peerDependencies": {
19
- "eslint": "8.43.0"
21
+ "eslint": "^8.43.0"
20
22
  },
21
23
  "devDependencies": {
22
24
  "@emotion/react": "11.11.1",