@koslibs/configs 0.1.0 → 0.2.9
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/eslint/{index.ts → index.mjs} +25 -75
- package/eslint/react.mjs +11 -0
- package/eslint.config.mjs +4 -0
- package/index.js +7 -0
- package/package.json +35 -10
- package/playwright/index.mjs +23 -0
- package/shared/merge-config.mjs +41 -0
- package/tsconfig/base.json +15 -0
- package/tsconfig/index.json +3 -23
- package/tsconfig/node.json +9 -0
- package/vite/index.mjs +18 -0
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -15
- package/eslint.config.js +0 -4
- package/lefthook/index.yml +0 -16
- /package/cli/{index.mjs → lint.js} +0 -0
- /package/eslint/{config.ts → config.mjs} +0 -0
|
@@ -1,74 +1,48 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
|
|
4
|
-
import { FlatCompat } from '@eslint/eslintrc';
|
|
5
1
|
import js from '@eslint/js';
|
|
6
2
|
import tsParser from '@typescript-eslint/parser';
|
|
7
|
-
import prettier from 'eslint-plugin-prettier';
|
|
8
3
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
9
|
-
import tseslint from 'typescript-eslint';
|
|
10
4
|
import importPlugin from 'eslint-plugin-import-helpers';
|
|
11
|
-
import
|
|
5
|
+
import prettier from 'eslint-plugin-prettier';
|
|
12
6
|
import globals from 'globals';
|
|
7
|
+
import tseslint from 'typescript-eslint';
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
const compat = new FlatCompat({
|
|
17
|
-
baseDirectory: __dirname,
|
|
18
|
-
recommendedConfig: js.configs.recommended,
|
|
19
|
-
allConfig: js.configs.all,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default defineConfig([
|
|
23
|
-
globalIgnores(['**/node_modules', '**/wailsjs', '**/dist', '**/vite.config.ts', '**/.cache']),
|
|
24
|
-
js.configs.recommended,
|
|
25
|
-
tseslint.configs.recommended,
|
|
26
|
-
{
|
|
27
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.mjs', '**/*.cjs'],
|
|
9
|
+
import { globalIgnores } from './config.mjs';
|
|
28
10
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
),
|
|
11
|
+
const ignores = ['**/node_modules', '**/wailsjs', '**/dist', '**/.cache', '**/*.json'];
|
|
12
|
+
const files = ['**/*.{ts,tsx,js,jsx,mjs,cjs}'];
|
|
13
|
+
const prettierFiles = ['**/*.{ts,tsx,js,jsx,mjs,cjs,json}'];
|
|
33
14
|
|
|
15
|
+
export const baseEslintConfig = [
|
|
16
|
+
globalIgnores(ignores),
|
|
17
|
+
{
|
|
18
|
+
...js.configs.recommended,
|
|
19
|
+
files,
|
|
20
|
+
},
|
|
21
|
+
...tseslint.configs.recommended.map((config) => ({
|
|
22
|
+
...config,
|
|
23
|
+
files: config.files ?? files,
|
|
24
|
+
})),
|
|
25
|
+
{
|
|
26
|
+
files,
|
|
34
27
|
languageOptions: {
|
|
35
28
|
globals: {
|
|
36
29
|
...globals.node,
|
|
37
30
|
...globals.browser,
|
|
38
31
|
Controller: 'readonly',
|
|
39
32
|
},
|
|
40
|
-
|
|
41
33
|
parser: tsParser,
|
|
42
34
|
ecmaVersion: 'latest',
|
|
43
35
|
sourceType: 'module',
|
|
44
|
-
|
|
45
36
|
parserOptions: {
|
|
46
37
|
ecmaFeatures: {
|
|
47
38
|
jsx: true,
|
|
48
39
|
},
|
|
49
40
|
sourceType: 'module',
|
|
50
|
-
project: '../tsconfig/index.json',
|
|
51
|
-
tsconfigRootDir: __dirname,
|
|
52
41
|
},
|
|
53
42
|
},
|
|
54
|
-
|
|
55
43
|
plugins: {
|
|
56
|
-
// @ts-ignore
|
|
57
44
|
'import-helpers': importPlugin,
|
|
58
|
-
js,
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
settings: {
|
|
62
|
-
react: {
|
|
63
|
-
version: 'detect',
|
|
64
|
-
},
|
|
65
|
-
'import/resolver': {
|
|
66
|
-
typescript: {
|
|
67
|
-
alwaysTryTypes: true,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
45
|
},
|
|
71
|
-
|
|
72
46
|
rules: {
|
|
73
47
|
'import-helpers/order-imports': [
|
|
74
48
|
'error',
|
|
@@ -78,7 +52,6 @@ export default defineConfig([
|
|
|
78
52
|
alphabetize: { order: 'asc', ignoreCase: true },
|
|
79
53
|
},
|
|
80
54
|
],
|
|
81
|
-
|
|
82
55
|
'no-restricted-imports': [
|
|
83
56
|
'error',
|
|
84
57
|
{
|
|
@@ -119,11 +92,9 @@ export default defineConfig([
|
|
|
119
92
|
'vm',
|
|
120
93
|
'zlib',
|
|
121
94
|
],
|
|
122
|
-
|
|
123
95
|
message: 'Use prefix node: for node packages',
|
|
124
96
|
},
|
|
125
97
|
],
|
|
126
|
-
|
|
127
98
|
paths: [
|
|
128
99
|
{
|
|
129
100
|
name: 'node:assert',
|
|
@@ -142,14 +113,12 @@ export default defineConfig([
|
|
|
142
113
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
|
143
114
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
144
115
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
145
|
-
|
|
146
116
|
'@typescript-eslint/no-empty-function': [
|
|
147
117
|
'error',
|
|
148
118
|
{
|
|
149
119
|
allow: ['arrowFunctions'],
|
|
150
120
|
},
|
|
151
121
|
],
|
|
152
|
-
|
|
153
122
|
'@typescript-eslint/no-unused-vars': [
|
|
154
123
|
'error',
|
|
155
124
|
{
|
|
@@ -159,25 +128,12 @@ export default defineConfig([
|
|
|
159
128
|
caughtErrorsIgnorePattern: '^error',
|
|
160
129
|
},
|
|
161
130
|
],
|
|
162
|
-
|
|
163
|
-
// '@typescript-eslint/ban-types': [
|
|
164
|
-
// 'error',
|
|
165
|
-
// {
|
|
166
|
-
// extendDefaults: true,
|
|
167
|
-
|
|
168
|
-
// types: {
|
|
169
|
-
// '{}': false,
|
|
170
|
-
// },
|
|
171
|
-
// },
|
|
172
|
-
// ],
|
|
173
|
-
|
|
174
131
|
'@typescript-eslint/consistent-type-imports': [
|
|
175
132
|
'error',
|
|
176
133
|
{
|
|
177
134
|
fixStyle: 'inline-type-imports',
|
|
178
135
|
},
|
|
179
136
|
],
|
|
180
|
-
|
|
181
137
|
'no-cond-assign': 'error',
|
|
182
138
|
'no-control-regex': 'error',
|
|
183
139
|
'no-debugger': 'error',
|
|
@@ -195,7 +151,6 @@ export default defineConfig([
|
|
|
195
151
|
'no-unreachable': 'error',
|
|
196
152
|
'no-unreachable-loop': 'error',
|
|
197
153
|
'no-var': 'error',
|
|
198
|
-
|
|
199
154
|
'no-multiple-empty-lines': [
|
|
200
155
|
'error',
|
|
201
156
|
{
|
|
@@ -203,16 +158,13 @@ export default defineConfig([
|
|
|
203
158
|
maxEOF: 1,
|
|
204
159
|
},
|
|
205
160
|
],
|
|
206
|
-
|
|
207
161
|
'no-unsafe-negation': 'error',
|
|
208
|
-
|
|
209
162
|
'no-console': [
|
|
210
163
|
'error',
|
|
211
164
|
{
|
|
212
165
|
allow: ['info', 'error'],
|
|
213
166
|
},
|
|
214
167
|
],
|
|
215
|
-
|
|
216
168
|
'no-use-before-define': 'off',
|
|
217
169
|
'no-shadow': 'off',
|
|
218
170
|
'no-const-assign': 'error',
|
|
@@ -266,7 +218,6 @@ export default defineConfig([
|
|
|
266
218
|
quotes: ['error', 'single'],
|
|
267
219
|
'object-curly-spacing': [1, 'always'],
|
|
268
220
|
'default-case': 'error',
|
|
269
|
-
|
|
270
221
|
'comma-dangle': [
|
|
271
222
|
'error',
|
|
272
223
|
{
|
|
@@ -277,20 +228,16 @@ export default defineConfig([
|
|
|
277
228
|
objects: 'always-multiline',
|
|
278
229
|
},
|
|
279
230
|
],
|
|
280
|
-
|
|
281
231
|
'max-params': [2, 6],
|
|
282
232
|
'max-nested-callbacks': ['error', 3],
|
|
283
233
|
'brace-style': 'error',
|
|
284
|
-
|
|
285
234
|
camelcase: [
|
|
286
235
|
'error',
|
|
287
236
|
{
|
|
288
237
|
properties: 'never',
|
|
289
238
|
},
|
|
290
239
|
],
|
|
291
|
-
|
|
292
240
|
'new-parens': 'error',
|
|
293
|
-
|
|
294
241
|
'max-len': [
|
|
295
242
|
'error',
|
|
296
243
|
{
|
|
@@ -306,11 +253,12 @@ export default defineConfig([
|
|
|
306
253
|
},
|
|
307
254
|
},
|
|
308
255
|
{
|
|
309
|
-
files:
|
|
256
|
+
files: prettierFiles,
|
|
310
257
|
plugins: {
|
|
311
258
|
prettier,
|
|
312
|
-
|
|
313
|
-
|
|
259
|
+
},
|
|
260
|
+
rules: {
|
|
261
|
+
'prettier/prettier': [
|
|
314
262
|
'error',
|
|
315
263
|
{
|
|
316
264
|
trailingComma: 'es5',
|
|
@@ -325,4 +273,6 @@ export default defineConfig([
|
|
|
325
273
|
},
|
|
326
274
|
},
|
|
327
275
|
eslintConfigPrettier,
|
|
328
|
-
]
|
|
276
|
+
];
|
|
277
|
+
|
|
278
|
+
export default baseEslintConfig;
|
package/eslint/react.mjs
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as eslintConfig } from './eslint/index.mjs';
|
|
2
|
+
export { default as playwrightConfig } from './playwright/index.mjs';
|
|
3
|
+
export { default as prettierConfig } from './prettier/index.js';
|
|
4
|
+
export { default as viteConfig } from './vite/index.mjs';
|
|
5
|
+
|
|
6
|
+
export { createPlaywrightConfig } from './playwright/index.mjs';
|
|
7
|
+
export { createViteConfig } from './vite/index.mjs';
|
package/package.json
CHANGED
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koslibs/configs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"description": "Tool for api usage within react app",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "./index.js",
|
|
6
6
|
"private": false,
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"author": "holypower777",
|
|
9
9
|
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"cli",
|
|
12
|
+
"commitlint",
|
|
13
|
+
"eslint",
|
|
14
|
+
"playwright",
|
|
15
|
+
"prettier",
|
|
16
|
+
"shared",
|
|
17
|
+
"tsconfig",
|
|
18
|
+
"vite",
|
|
19
|
+
"index.js",
|
|
20
|
+
"eslint.config.mjs",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"bin": {
|
|
24
|
+
"koslibs-lint": "cli/lint.js"
|
|
25
|
+
},
|
|
10
26
|
"scripts": {
|
|
11
27
|
"lint": "npm run lint:js && npm run format:check",
|
|
12
28
|
"lint:fix": "npm run lint:js --fix && npm run format",
|
|
13
|
-
"lint:js": "node ./cli/
|
|
14
|
-
"format": "node ./cli/
|
|
15
|
-
"format:check": "node ./cli/
|
|
29
|
+
"lint:js": "node ./cli/lint.js js",
|
|
30
|
+
"format": "node ./cli/lint.js format",
|
|
31
|
+
"format:check": "node ./cli/lint.js format:check",
|
|
16
32
|
"release": "changeset publish",
|
|
17
33
|
"release:snapshot": "changeset publish --tag snapshot --no-git-tag",
|
|
18
34
|
"version-package": "changeset version",
|
|
35
|
+
"version-package:patch": "npm version patch --no-git-tag-version",
|
|
19
36
|
"version-package:snapshot": "changeset version --snapshot snapshot"
|
|
20
37
|
},
|
|
21
38
|
"bugs": {
|
|
@@ -24,7 +41,10 @@
|
|
|
24
41
|
"homepage": "https://github.com/koslibs/configs",
|
|
25
42
|
"repository": {
|
|
26
43
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/koslibs/configs"
|
|
44
|
+
"url": "git+https://github.com/koslibs/configs.git"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
28
48
|
},
|
|
29
49
|
"engines": {
|
|
30
50
|
"node": ">=22.14.0"
|
|
@@ -33,13 +53,18 @@
|
|
|
33
53
|
"commitlint": {
|
|
34
54
|
"extends": "./commitlint"
|
|
35
55
|
},
|
|
36
|
-
"eslintConfig": {
|
|
37
|
-
"extends": "./eslint"
|
|
38
|
-
},
|
|
39
56
|
"exports": {
|
|
57
|
+
".": "./index.js",
|
|
40
58
|
"./eslint": "./eslint/index.mjs",
|
|
59
|
+
"./eslint/config": "./eslint/config.mjs",
|
|
60
|
+
"./eslint/react": "./eslint/react.mjs",
|
|
61
|
+
"./playwright": "./playwright/index.mjs",
|
|
41
62
|
"./prettier": "./prettier/index.js",
|
|
42
|
-
"./commitlint": "./commitlint/index.js"
|
|
63
|
+
"./commitlint": "./commitlint/index.js",
|
|
64
|
+
"./tsconfig": "./tsconfig/index.json",
|
|
65
|
+
"./tsconfig/base": "./tsconfig/base.json",
|
|
66
|
+
"./tsconfig/node": "./tsconfig/node.json",
|
|
67
|
+
"./vite": "./vite/index.mjs"
|
|
43
68
|
},
|
|
44
69
|
"dependencies": {
|
|
45
70
|
"@commitlint/cli": "20.3.1",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mergeConfig from '../shared/merge-config.mjs';
|
|
2
|
+
|
|
3
|
+
const defaultReporter = process.env.CI
|
|
4
|
+
? [['github'], ['html', { open: 'never' }]]
|
|
5
|
+
: [['html', { open: 'never' }]];
|
|
6
|
+
|
|
7
|
+
export const playwrightConfig = {
|
|
8
|
+
testDir: './playwright',
|
|
9
|
+
fullyParallel: true,
|
|
10
|
+
forbidOnly: Boolean(process.env.CI),
|
|
11
|
+
retries: process.env.CI ? 2 : 0,
|
|
12
|
+
workers: process.env.CI ? 1 : undefined,
|
|
13
|
+
reporter: defaultReporter,
|
|
14
|
+
use: {
|
|
15
|
+
trace: 'on-first-retry',
|
|
16
|
+
screenshot: 'only-on-failure',
|
|
17
|
+
video: 'retain-on-failure',
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const createPlaywrightConfig = (overrides = {}) => mergeConfig(playwrightConfig, overrides);
|
|
22
|
+
|
|
23
|
+
export default playwrightConfig;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const isPlainObject = (value) => Object.prototype.toString.call(value) === '[object Object]';
|
|
2
|
+
|
|
3
|
+
const cloneValue = (value) => {
|
|
4
|
+
if (Array.isArray(value)) {
|
|
5
|
+
return value.map(cloneValue);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
if (isPlainObject(value)) {
|
|
9
|
+
return Object.fromEntries(
|
|
10
|
+
Object.entries(value).map(([key, nestedValue]) => [key, cloneValue(nestedValue)])
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return value;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const mergeValue = (target, source) => {
|
|
18
|
+
if (Array.isArray(target) && Array.isArray(source)) {
|
|
19
|
+
return [...target, ...source];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (isPlainObject(target) && isPlainObject(source)) {
|
|
23
|
+
const nextValue = { ...target };
|
|
24
|
+
|
|
25
|
+
for (const [key, nestedValue] of Object.entries(source)) {
|
|
26
|
+
nextValue[key] =
|
|
27
|
+
key in nextValue
|
|
28
|
+
? mergeValue(nextValue[key], nestedValue)
|
|
29
|
+
: cloneValue(nestedValue);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return nextValue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return cloneValue(source);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const mergeConfig = (...parts) =>
|
|
39
|
+
parts.filter(Boolean).reduce((mergedValue, part) => mergeValue(mergedValue, part), {});
|
|
40
|
+
|
|
41
|
+
export default mergeConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"allowJs": false,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"esModuleInterop": false,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"noEmit": true
|
|
14
|
+
}
|
|
15
|
+
}
|
package/tsconfig/index.json
CHANGED
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "./base.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
4
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
|
6
|
-
"allowJs": false,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"esModuleInterop": false,
|
|
9
|
-
"allowSyntheticDefaultImports": true,
|
|
10
|
-
"strict": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
5
|
"module": "ESNext",
|
|
13
|
-
"moduleResolution": "
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"noEmit": true,
|
|
6
|
+
"moduleResolution": "Bundler",
|
|
17
7
|
"jsx": "react-jsx"
|
|
18
|
-
}
|
|
19
|
-
"include": [
|
|
20
|
-
"src",
|
|
21
|
-
".storybook/**/*",
|
|
22
|
-
"eslint.config.mjs",
|
|
23
|
-
"prettier.config.mjs",
|
|
24
|
-
"playwright/**/*.tsx",
|
|
25
|
-
"playwright-ct.config.ts",
|
|
26
|
-
"playwright.config.ts",
|
|
27
|
-
"**/*.spec.tsx"
|
|
28
|
-
]
|
|
8
|
+
}
|
|
29
9
|
}
|
package/vite/index.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import mergeConfig from '../shared/merge-config.mjs';
|
|
2
|
+
|
|
3
|
+
export const viteConfig = {
|
|
4
|
+
server: {
|
|
5
|
+
host: true,
|
|
6
|
+
port: 5173,
|
|
7
|
+
strictPort: true,
|
|
8
|
+
},
|
|
9
|
+
preview: {
|
|
10
|
+
host: true,
|
|
11
|
+
port: 4173,
|
|
12
|
+
strictPort: true,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const createViteConfig = (overrides = {}) => mergeConfig(viteConfig, overrides);
|
|
17
|
+
|
|
18
|
+
export default viteConfig;
|
package/.changeset/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Changesets
|
|
2
|
-
|
|
3
|
-
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
-
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
-
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
-
|
|
7
|
-
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
-
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
package/.changeset/config.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
|
|
3
|
-
"changelog": ["@changesets/changelog-github", { "repo": "koslibs/configs" }],
|
|
4
|
-
"commit": false,
|
|
5
|
-
"fixed": [],
|
|
6
|
-
"linked": [],
|
|
7
|
-
"access": "public",
|
|
8
|
-
"baseBranch": "main",
|
|
9
|
-
"updateInternalDependencies": "patch",
|
|
10
|
-
"ignore": [],
|
|
11
|
-
"snapshot": {
|
|
12
|
-
"prereleaseTemplate": "{tag}-{commit}",
|
|
13
|
-
"useCalculatedVersion": true
|
|
14
|
-
}
|
|
15
|
-
}
|
package/eslint.config.js
DELETED
package/lefthook/index.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Refer for explanation to following link:
|
|
2
|
-
# https://lefthook.dev/configuration/
|
|
3
|
-
|
|
4
|
-
pre-commit:
|
|
5
|
-
parallel: true
|
|
6
|
-
commands:
|
|
7
|
-
check-scripts:
|
|
8
|
-
glob: '*.{js,ts,jsx,tsx,mts,mjs,cjs,cts,ctsx,mtsx,cjsx,mjsx}'
|
|
9
|
-
run: npx --no-install prettier --write {staged_files} --cache && npx --no-install eslint {staged_files} --no-warn-ignored && git add {staged_files}
|
|
10
|
-
check-json:
|
|
11
|
-
glob: '*.{json}'
|
|
12
|
-
run: npx --no-install prettier --write {staged_files} --cache && git add {staged_files}
|
|
13
|
-
commit-msg:
|
|
14
|
-
commands:
|
|
15
|
-
commitlint:
|
|
16
|
-
run: npx --no-install commitlint --edit {1}
|
|
File without changes
|
|
File without changes
|