@d-zero/lint-staged-config 5.0.0-alpha.2 → 5.0.0-alpha.21

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 (4) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +27 -2
  3. package/index.mjs +12 -12
  4. package/package.json +3 -3
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 D-ZERO Co., Ltd.
3
+ Copyright (c) 2024 D-ZERO Co., Ltd.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,4 +1,29 @@
1
1
  # `@d-zero/lint-staged-config`
2
2
 
3
- - 使用: 🆗 使用可
4
- - 解説: 🚧 準備中
3
+ ## 個別インストール
4
+
5
+ ```sh
6
+ yarn add -D @d-zero/lint-staged-config
7
+ ```
8
+
9
+ ## 使い方
10
+
11
+ `lint-staged.config.mjs`を作成し、読み込んだジェネレーター関数で設定を生成しエクスポートします。
12
+
13
+ ```js
14
+ import lintStagedConfigGenerator from '@d-zero/lint-staged-config';
15
+ export default lintStagedConfigGenerator();
16
+ ```
17
+
18
+ ### 拡張
19
+
20
+ プロジェクトに合わせて設定を追加します。
21
+
22
+ ```js
23
+ import lintStagedConfigGenerator, { defaultMapping } from '@d-zero/lint-staged-config';
24
+ export default lintStagedConfigGenerator(process.cwd(), {
25
+ ...defaultMapping,
26
+ // 例: PHPファイルに対して`markuplint`、`prettier`、`cspell`を実行する
27
+ php: ['markuplint', 'prettier', 'cspell'],
28
+ });
29
+ ```
package/index.mjs CHANGED
@@ -73,24 +73,24 @@ export const commands = {
73
73
  * @type {import("./types").CommandMappings}
74
74
  */
75
75
  export const defaultMapping = {
76
+ astro: ['eslint', 'markuplint', 'prettier', 'cspell'],
77
+ cjs: ['eslint', 'prettier', 'cspell'],
78
+ css: ['stylelint', 'prettier', 'cspell'],
79
+ cts: ['eslint', 'prettier', 'cspell'],
80
+ html: ['markuplint', 'prettier', 'cspell'],
81
+ js: ['eslint', 'prettier', 'cspell'],
82
+ json: ['prettier', 'cspell'],
83
+ jsx: ['eslint', 'markuplint', 'prettier', 'cspell'],
76
84
  md: ['prettier', 'textlint', 'cspell'],
77
85
  mdx: ['prettier', 'textlint', 'cspell'],
78
- json: ['prettier', 'cspell'],
79
- yaml: ['cspell'],
80
- yml: ['cspell'],
81
- js: ['eslint', 'prettier', 'cspell'],
82
- cjs: ['eslint', 'prettier', 'cspell'],
83
86
  mjs: ['eslint', 'prettier', 'cspell'],
84
- jsx: ['eslint', 'markuplint', 'prettier', 'cspell'],
85
- ts: ['eslint', 'prettier', 'cspell'],
86
- cts: ['eslint', 'prettier', 'cspell'],
87
87
  mts: ['eslint', 'prettier', 'cspell'],
88
- tsx: ['eslint', 'markuplint', 'prettier', 'cspell'],
89
- html: ['markuplint', 'prettier', 'cspell'],
90
88
  pug: ['markuplint', 'prettier', 'cspell'],
91
- css: ['stylelint', 'prettier', 'cspell'],
92
89
  scss: ['stylelint', 'prettier', 'cspell'],
93
- astro: ['eslint', 'markuplint', 'prettier', 'cspell'],
94
90
  svelte: ['eslint', 'markuplint', 'prettier', 'cspell'],
91
+ ts: ['eslint', 'prettier', 'cspell'],
92
+ tsx: ['eslint', 'markuplint', 'prettier', 'cspell'],
95
93
  vue: ['eslint', 'markuplint', 'prettier', 'cspell'],
94
+ yaml: ['cspell'],
95
+ yml: ['cspell'],
96
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-zero/lint-staged-config",
3
- "version": "5.0.0-alpha.2",
3
+ "version": "5.0.0-alpha.21",
4
4
  "description": "Configurations of lint-staged",
5
5
  "repository": "https://github.com/d-zero-dev/linters.git",
6
6
  "author": "D-ZERO Co., Ltd.",
@@ -19,7 +19,7 @@
19
19
  "types": "./types.ts"
20
20
  },
21
21
  "dependencies": {
22
- "lint-staged": "15.2.0"
22
+ "lint-staged": "15.2.2"
23
23
  },
24
- "gitHead": "f025a02438b76518dabddd9a8c14a8245568e3c4"
24
+ "gitHead": "144e19343efd0bbd97600bb624751fa6cad20b15"
25
25
  }