@d-zero/lint-staged-config 5.0.0-alpha.3 → 5.0.0-alpha.30
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/LICENSE +1 -1
- package/README.md +27 -2
- package/index.mjs +12 -12
- package/package.json +6 -3
package/LICENSE
CHANGED
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.
|
|
3
|
+
"version": "5.0.0-alpha.30",
|
|
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.",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=22.0.0"
|
|
14
|
+
},
|
|
12
15
|
"type": "module",
|
|
13
16
|
"files": [
|
|
14
17
|
"index.mjs",
|
|
@@ -19,7 +22,7 @@
|
|
|
19
22
|
"types": "./types.ts"
|
|
20
23
|
},
|
|
21
24
|
"dependencies": {
|
|
22
|
-
"lint-staged": "15.2.
|
|
25
|
+
"lint-staged": "15.2.2"
|
|
23
26
|
},
|
|
24
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "2903f129bcd0a81e03598410c6a65daddcce642e"
|
|
25
28
|
}
|