@alexaegis/lint-staged-config 0.2.0 → 0.3.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/index.cjs +3 -1
- package/index.cjs.map +1 -1
- package/index.d.ts +2 -10
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/package.json +39 -28
package/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ const tscCommand = "tsc --noEmit";
|
|
|
7
7
|
const eslintSingleFileCommand = "eslint --max-warnings=0 --no-ignore";
|
|
8
8
|
const markdownCommand = "remark --frail --no-stdout --silently-ignore";
|
|
9
9
|
const lintStagedConfig = {
|
|
10
|
-
"**/!(shims)
|
|
10
|
+
"**/!(shims)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)": (filenames) => {
|
|
11
11
|
const groups = fs.groupByCommonNearestFile(filenames, "tsconfig.json");
|
|
12
12
|
return Object.keys(groups).map(
|
|
13
13
|
(tsRoot) => `${tscCommand} --project ${node_path.join(tsRoot, "tsconfig.json")}`
|
|
@@ -16,6 +16,8 @@ const lintStagedConfig = {
|
|
|
16
16
|
"**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
|
|
17
17
|
"*.css": ["stylelint", prettierCommand],
|
|
18
18
|
"*.scss": ["stylelint --customSyntax=postcss-scss", prettierCommand],
|
|
19
|
+
"*.(html|svelte|vue|astro|xml|php)": ["stylelint --customSyntax=postcss-html"],
|
|
20
|
+
"*.(html|vue|astro|xml)": [prettierCommand],
|
|
19
21
|
"(*.json|.eslintrc|.prettierrc|.stylelintrc|.markdownlintrc)": [
|
|
20
22
|
eslintSingleFileCommand,
|
|
21
23
|
prettierCommand
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["// For the glob features check out https://github.com/micromatch/micromatch\nimport { groupByCommonNearestFile } from '@alexaegis/fs';\nimport { join } from 'node:path';\n\nconst prettierCommand = 'prettier --check';\nconst tscCommand = 'tsc --noEmit';\n\nconst eslintSingleFileCommand = 'eslint --max-warnings=0 --no-ignore';\nconst markdownCommand = 'remark --frail --no-stdout --silently-ignore';\n\n// TODO: explore more optimal settings since eslint is slow when used on files 1 by 1\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["// For the glob features check out https://github.com/micromatch/micromatch\nimport { groupByCommonNearestFile } from '@alexaegis/fs';\nimport type { Config } from 'lint-staged';\nimport { join } from 'node:path';\n\nconst prettierCommand = 'prettier --check';\nconst tscCommand = 'tsc --noEmit';\n\nconst eslintSingleFileCommand = 'eslint --max-warnings=0 --no-ignore';\nconst markdownCommand = 'remark --frail --no-stdout --silently-ignore';\n\n// TODO: explore more optimal settings since eslint is slow when used on files 1 by 1\nexport const lintStagedConfig: Config = {\n\t'**/!(shims)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)': (\n\t\tfilenames: string[]\n\t): string[] => {\n\t\tconst groups = groupByCommonNearestFile(filenames, 'tsconfig.json');\n\t\treturn Object.keys(groups).map(\n\t\t\t(tsRoot) => `${tscCommand} --project ${join(tsRoot, 'tsconfig.json')}`\n\t\t);\n\t},\n\t'**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)': [eslintSingleFileCommand, prettierCommand],\n\t'*.css': ['stylelint', prettierCommand],\n\t'*.scss': ['stylelint --customSyntax=postcss-scss', prettierCommand],\n\t'*.(html|svelte|vue|astro|xml|php)': ['stylelint --customSyntax=postcss-html'],\n\t'*.(html|vue|astro|xml)': [prettierCommand],\n\t'(*.json|.eslintrc|.prettierrc|.stylelintrc|.markdownlintrc)': [\n\t\teslintSingleFileCommand,\n\t\tprettierCommand,\n\t],\n\t'*.svelte': ['svelte-check', prettierCommand],\n\t'*.md': [markdownCommand, prettierCommand],\n\t'*.(yml|yaml)': [prettierCommand],\n};\n"],"names":["groupByCommonNearestFile","join"],"mappings":";;;;AAKA,MAAM,kBAAkB;AACxB,MAAM,aAAa;AAEnB,MAAM,0BAA0B;AAChC,MAAM,kBAAkB;AAGjB,MAAM,mBAA2B;AAAA,EACvC,sEAAsE,CACrE,cACc;AACR,UAAA,SAASA,GAAAA,yBAAyB,WAAW,eAAe;AAC3D,WAAA,OAAO,KAAK,MAAM,EAAE;AAAA,MAC1B,CAAC,WAAW,GAAG,wBAAwBC,UAAAA,KAAK,QAAQ,eAAe;AAAA,IAAA;AAAA,EAErE;AAAA,EACA,yCAAyC,CAAC,yBAAyB,eAAe;AAAA,EAClF,SAAS,CAAC,aAAa,eAAe;AAAA,EACtC,UAAU,CAAC,yCAAyC,eAAe;AAAA,EACnE,qCAAqC,CAAC,uCAAuC;AAAA,EAC7E,0BAA0B,CAAC,eAAe;AAAA,EAC1C,+DAA+D;AAAA,IAC9D;AAAA,IACA;AAAA,EACD;AAAA,EACA,YAAY,CAAC,gBAAgB,eAAe;AAAA,EAC5C,QAAQ,CAAC,iBAAiB,eAAe;AAAA,EACzC,gBAAgB,CAAC,eAAe;AACjC;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
'**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)': string[];
|
|
4
|
-
'*.css': string[];
|
|
5
|
-
'*.scss': string[];
|
|
6
|
-
'(*.json|.eslintrc|.prettierrc|.stylelintrc|.markdownlintrc)': string[];
|
|
7
|
-
'*.svelte': string[];
|
|
8
|
-
'*.md': string[];
|
|
9
|
-
'*.(yml|yaml)': string[];
|
|
10
|
-
};
|
|
1
|
+
import type { Config } from 'lint-staged';
|
|
2
|
+
export declare const lintStagedConfig: Config;
|
|
11
3
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAU1C,eAAO,MAAM,gBAAgB,EAAE,MAqB9B,CAAC"}
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const tscCommand = "tsc --noEmit";
|
|
|
5
5
|
const eslintSingleFileCommand = "eslint --max-warnings=0 --no-ignore";
|
|
6
6
|
const markdownCommand = "remark --frail --no-stdout --silently-ignore";
|
|
7
7
|
const lintStagedConfig = {
|
|
8
|
-
"**/!(shims)
|
|
8
|
+
"**/!(shims)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)": (filenames) => {
|
|
9
9
|
const groups = groupByCommonNearestFile(filenames, "tsconfig.json");
|
|
10
10
|
return Object.keys(groups).map(
|
|
11
11
|
(tsRoot) => `${tscCommand} --project ${join(tsRoot, "tsconfig.json")}`
|
|
@@ -14,6 +14,8 @@ const lintStagedConfig = {
|
|
|
14
14
|
"**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
|
|
15
15
|
"*.css": ["stylelint", prettierCommand],
|
|
16
16
|
"*.scss": ["stylelint --customSyntax=postcss-scss", prettierCommand],
|
|
17
|
+
"*.(html|svelte|vue|astro|xml|php)": ["stylelint --customSyntax=postcss-html"],
|
|
18
|
+
"*.(html|vue|astro|xml)": [prettierCommand],
|
|
17
19
|
"(*.json|.eslintrc|.prettierrc|.stylelintrc|.markdownlintrc)": [
|
|
18
20
|
eslintSingleFileCommand,
|
|
19
21
|
prettierCommand
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// For the glob features check out https://github.com/micromatch/micromatch\nimport { groupByCommonNearestFile } from '@alexaegis/fs';\nimport { join } from 'node:path';\n\nconst prettierCommand = 'prettier --check';\nconst tscCommand = 'tsc --noEmit';\n\nconst eslintSingleFileCommand = 'eslint --max-warnings=0 --no-ignore';\nconst markdownCommand = 'remark --frail --no-stdout --silently-ignore';\n\n// TODO: explore more optimal settings since eslint is slow when used on files 1 by 1\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["// For the glob features check out https://github.com/micromatch/micromatch\nimport { groupByCommonNearestFile } from '@alexaegis/fs';\nimport type { Config } from 'lint-staged';\nimport { join } from 'node:path';\n\nconst prettierCommand = 'prettier --check';\nconst tscCommand = 'tsc --noEmit';\n\nconst eslintSingleFileCommand = 'eslint --max-warnings=0 --no-ignore';\nconst markdownCommand = 'remark --frail --no-stdout --silently-ignore';\n\n// TODO: explore more optimal settings since eslint is slow when used on files 1 by 1\nexport const lintStagedConfig: Config = {\n\t'**/!(shims)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)': (\n\t\tfilenames: string[]\n\t): string[] => {\n\t\tconst groups = groupByCommonNearestFile(filenames, 'tsconfig.json');\n\t\treturn Object.keys(groups).map(\n\t\t\t(tsRoot) => `${tscCommand} --project ${join(tsRoot, 'tsconfig.json')}`\n\t\t);\n\t},\n\t'**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)': [eslintSingleFileCommand, prettierCommand],\n\t'*.css': ['stylelint', prettierCommand],\n\t'*.scss': ['stylelint --customSyntax=postcss-scss', prettierCommand],\n\t'*.(html|svelte|vue|astro|xml|php)': ['stylelint --customSyntax=postcss-html'],\n\t'*.(html|vue|astro|xml)': [prettierCommand],\n\t'(*.json|.eslintrc|.prettierrc|.stylelintrc|.markdownlintrc)': [\n\t\teslintSingleFileCommand,\n\t\tprettierCommand,\n\t],\n\t'*.svelte': ['svelte-check', prettierCommand],\n\t'*.md': [markdownCommand, prettierCommand],\n\t'*.(yml|yaml)': [prettierCommand],\n};\n"],"names":[],"mappings":";;AAKA,MAAM,kBAAkB;AACxB,MAAM,aAAa;AAEnB,MAAM,0BAA0B;AAChC,MAAM,kBAAkB;AAGjB,MAAM,mBAA2B;AAAA,EACvC,sEAAsE,CACrE,cACc;AACR,UAAA,SAAS,yBAAyB,WAAW,eAAe;AAC3D,WAAA,OAAO,KAAK,MAAM,EAAE;AAAA,MAC1B,CAAC,WAAW,GAAG,wBAAwB,KAAK,QAAQ,eAAe;AAAA,IAAA;AAAA,EAErE;AAAA,EACA,yCAAyC,CAAC,yBAAyB,eAAe;AAAA,EAClF,SAAS,CAAC,aAAa,eAAe;AAAA,EACtC,UAAU,CAAC,yCAAyC,eAAe;AAAA,EACnE,qCAAqC,CAAC,uCAAuC;AAAA,EAC7E,0BAA0B,CAAC,eAAe;AAAA,EAC1C,+DAA+D;AAAA,IAC9D;AAAA,IACA;AAAA,EACD;AAAA,EACA,YAAY,CAAC,gBAAgB,eAAe;AAAA,EAC5C,QAAQ,CAAC,iBAAiB,eAAe;AAAA,EACzC,gBAAgB,CAAC,eAAe;AACjC;"}
|
package/package.json
CHANGED
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexaegis/lint-staged-config",
|
|
3
3
|
"description": "Lint staged config",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"license": "mit",
|
|
6
6
|
"private": false,
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
"homepage": "https://github.com/AlexAegis/js-tooling",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"email": "alexaegis@gmail.com",
|
|
15
|
-
"url": "https://github.com/AlexAegis/js-tooling/issues"
|
|
7
|
+
"archetype": {
|
|
8
|
+
"platform": "node",
|
|
9
|
+
"framework": "lint-staged",
|
|
10
|
+
"language": "ts",
|
|
11
|
+
"kind": "lib"
|
|
16
12
|
},
|
|
17
13
|
"keywords": [
|
|
18
14
|
"eslint",
|
|
19
15
|
"javascript",
|
|
20
16
|
"js",
|
|
17
|
+
"managed-by-autotool",
|
|
21
18
|
"ts",
|
|
22
19
|
"tsconfig",
|
|
23
20
|
"turbo",
|
|
24
21
|
"typescript"
|
|
25
22
|
],
|
|
23
|
+
"author": {
|
|
24
|
+
"email": "alexaegis@gmail.com",
|
|
25
|
+
"name": "Alex Aegis",
|
|
26
|
+
"url": "https://github.com/AlexAegis"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/AlexAegis/js-tooling",
|
|
29
|
+
"bugs": {
|
|
30
|
+
"email": "alexaegis@gmail.com",
|
|
31
|
+
"url": "https://github.com/AlexAegis/js-tooling/issues"
|
|
32
|
+
},
|
|
26
33
|
"type": "module",
|
|
27
34
|
"config": {
|
|
28
35
|
"engine-strict": true
|
|
@@ -42,41 +49,45 @@
|
|
|
42
49
|
"./readme": "./readme.md"
|
|
43
50
|
},
|
|
44
51
|
"dependencies": {
|
|
45
|
-
"@alexaegis/fs": "^0.1.
|
|
46
|
-
"lint-staged": "13.2.
|
|
52
|
+
"@alexaegis/fs": "^0.1.8",
|
|
53
|
+
"lint-staged": "13.2.2"
|
|
47
54
|
},
|
|
48
55
|
"peerDependencies": {
|
|
49
56
|
"typescript": "^5.0.4"
|
|
50
57
|
},
|
|
51
58
|
"optionalDependencies": {
|
|
52
|
-
"svelte": "^3.
|
|
59
|
+
"svelte": "^3.59.1"
|
|
53
60
|
},
|
|
54
61
|
"devDependencies": {
|
|
55
|
-
"@alexaegis/eslint-config-vitest": "^0.
|
|
56
|
-
"@alexaegis/ts": "^0.
|
|
57
|
-
"@alexaegis/vite": "^0.
|
|
58
|
-
"@alexaegis/vitest": "^0.
|
|
62
|
+
"@alexaegis/eslint-config-vitest": "^0.3.0",
|
|
63
|
+
"@alexaegis/ts": "^0.3.0",
|
|
64
|
+
"@alexaegis/vite": "^0.3.0",
|
|
65
|
+
"@alexaegis/vitest": "^0.3.0",
|
|
59
66
|
"@types/eslint": "^8.37.0",
|
|
60
|
-
"@types/
|
|
61
|
-
"@
|
|
62
|
-
"
|
|
63
|
-
"
|
|
67
|
+
"@types/lint-staged": "^13.2.0",
|
|
68
|
+
"@types/node": "^20.2.1",
|
|
69
|
+
"@vitest/coverage-c8": "^0.31.1",
|
|
70
|
+
"publint": "^0.1.11",
|
|
71
|
+
"vite": "^4.3.8",
|
|
72
|
+
"vitest": "^0.31.1"
|
|
64
73
|
},
|
|
65
74
|
"scripts": {
|
|
66
|
-
"build": "turbo run build-lib_ --concurrency
|
|
75
|
+
"build": "turbo run build-lib_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
67
76
|
"build-lib_": "vite build",
|
|
68
|
-
"lint:depcheck": "turbo run lint:depcheck_ --concurrency
|
|
77
|
+
"lint:depcheck": "turbo run lint:depcheck_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
69
78
|
"lint:depcheck_": "depcheck",
|
|
70
|
-
"lint:es": "turbo run lint:es_ --concurrency
|
|
79
|
+
"lint:es": "turbo run lint:es_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
71
80
|
"lint:es_": "eslint --max-warnings=0 --fix --no-error-on-unmatched-pattern .",
|
|
72
|
-
"lint:format": "turbo run lint:format_ --concurrency
|
|
81
|
+
"lint:format": "turbo run lint:format_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
73
82
|
"lint:format_": "prettier --check .",
|
|
74
|
-
"lint:md": "turbo run lint:md_ --concurrency
|
|
83
|
+
"lint:md": "turbo run lint:md_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
75
84
|
"lint:md_": "remark --frail --no-stdout --silently-ignore *.md docs/**/*.md",
|
|
76
|
-
"lint:tsc": "turbo run lint:tsc_ --concurrency
|
|
85
|
+
"lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
77
86
|
"lint:tsc_": "tsc --noEmit",
|
|
87
|
+
"publint": "turbo run publint_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
88
|
+
"publint_": "publint dist",
|
|
78
89
|
"format": "prettier --write .",
|
|
79
|
-
"test": "turbo run test_ --concurrency
|
|
90
|
+
"test": "turbo run test_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
|
|
80
91
|
"test_": "vitest --passWithNoTests --coverage --run",
|
|
81
92
|
"test:watch": "vitest --passWithNoTests --coverage"
|
|
82
93
|
}
|