@alexaegis/lint-staged-config 0.3.3 → 0.4.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 CHANGED
@@ -7,13 +7,13 @@ 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)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)": (filenames) => {
10
+ "**/!(shims|public)/(*.(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")}`
14
14
  );
15
15
  },
16
- "**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
16
+ "**/!(shims|public)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
17
17
  "*.css": ["stylelint", prettierCommand],
18
18
  "*.scss": ["stylelint --customSyntax=postcss-scss", prettierCommand],
19
19
  "*.(html|svelte|vue|astro|xml|php)": ["stylelint --customSyntax=postcss-html"],
@@ -27,4 +27,3 @@ const lintStagedConfig = {
27
27
  "*.(yml|yaml)": [prettierCommand]
28
28
  };
29
29
  exports.lintStagedConfig = lintStagedConfig;
30
- //# sourceMappingURL=index.cjs.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
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"}
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,13 +5,13 @@ 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)/(*.(ts|js|cts|cjs|mts|mjs|jsx|tsx)|tsconfig*.json)?(x)": (filenames) => {
8
+ "**/!(shims|public)/(*.(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")}`
12
12
  );
13
13
  },
14
- "**/!(shims)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
14
+ "**/!(shims|public)/*.(ts|js|cts|cjs|mts|mjs)": [eslintSingleFileCommand, prettierCommand],
15
15
  "*.css": ["stylelint", prettierCommand],
16
16
  "*.scss": ["stylelint --customSyntax=postcss-scss", prettierCommand],
17
17
  "*.(html|svelte|vue|astro|xml|php)": ["stylelint --customSyntax=postcss-html"],
@@ -27,4 +27,3 @@ const lintStagedConfig = {
27
27
  export {
28
28
  lintStagedConfig
29
29
  };
30
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../../../src/index.spec.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alexaegis/lint-staged-config",
3
3
  "description": "Lint staged config",
4
- "version": "0.3.3",
4
+ "version": "0.4.0",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "archetype": {
@@ -50,24 +50,24 @@
50
50
  "./readme": "./readme.md"
51
51
  },
52
52
  "dependencies": {
53
- "@alexaegis/fs": "^0.2.3",
54
- "lint-staged": "13.2.2",
55
- "typescript": "^5.1.3"
53
+ "@alexaegis/fs": "^0.4.0",
54
+ "lint-staged": "13.2.3",
55
+ "typescript": "^5.1.6"
56
56
  },
57
57
  "optionalDependencies": {
58
- "svelte": "^4.0.0"
58
+ "svelte": "^4.0.4"
59
59
  },
60
60
  "devDependencies": {
61
- "@alexaegis/eslint-config-vitest": "^0.3.3",
62
- "@alexaegis/ts": "^0.3.3",
63
- "@alexaegis/vite": "^0.3.3",
64
- "@alexaegis/vitest": "^0.3.3",
61
+ "@alexaegis/eslint-config-vitest": "^0.4.0",
62
+ "@alexaegis/ts": "^0.4.0",
63
+ "@alexaegis/vite": "^0.4.0",
64
+ "@alexaegis/vitest": "^0.4.0",
65
65
  "@types/eslint": "^8.40.2",
66
66
  "@types/lint-staged": "^13.2.0",
67
- "@types/node": "^20.3.2",
68
- "publint": "^0.1.12",
67
+ "@types/node": "^20.4.0",
68
+ "publint": "^0.1.16",
69
69
  "vite": "^4.3.9",
70
- "vitest": "^0.32.2"
70
+ "vitest": "^0.32.4"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "turbo run build-lib_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
@@ -77,7 +77,7 @@
77
77
  "lint:es": "turbo run lint:es_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
78
78
  "lint:es_": "eslint --max-warnings=0 --fix --no-error-on-unmatched-pattern .",
79
79
  "lint:format": "turbo run lint:format_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
80
- "lint:format_": "prettier --no-plugin-search --cache-location .cache/prettier --check .",
80
+ "lint:format_": "prettier --cache-location .cache/prettier --check .",
81
81
  "lint:md": "turbo run lint:md_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
82
82
  "lint:md_": "remark --frail --no-stdout --silently-ignore .",
83
83
  "lint:tsc": "turbo run lint:tsc_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
@@ -86,7 +86,7 @@
86
86
  "publint_": "publint dist",
87
87
  "all": "turbo run all_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
88
88
  "format": "turbo run format_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
89
- "format_": "prettier --no-plugin-search --cache-location .cache/prettier --write .",
89
+ "format_": "prettier --cache-location .cache/prettier --write .",
90
90
  "test": "turbo run test_ --concurrency 16 --cache-dir .cache/turbo --filter @alexaegis/lint-staged-config",
91
91
  "test_": "vitest --passWithNoTests --coverage --run",
92
92
  "test:watch": "vitest --passWithNoTests --coverage"
package/index.cjs.map DELETED
@@ -1 +0,0 @@
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.js.map DELETED
@@ -1 +0,0 @@
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;"}