@cluerise/tools 4.0.1 → 4.0.2

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.
@@ -1,4 +1,4 @@
1
- import { RuleConfigSeverity, UserConfig } from '@commitlint/types';
1
+ import { RuleConfigSeverity, type UserConfig } from '@commitlint/types';
2
2
 
3
3
  const commitlintConfig: UserConfig = {
4
4
  extends: ['@commitlint/config-conventional'],
@@ -1,8 +1,3 @@
1
1
  import eslintMarkdown from '@eslint/markdown';
2
2
 
3
- export default [
4
- {
5
- ignores: ['**/*.(j|t)sx?']
6
- },
7
- ...eslintMarkdown.configs.recommended
8
- ];
3
+ export default eslintMarkdown.configs.recommended;
@@ -75,7 +75,7 @@ export default defineConfig([
75
75
  },
76
76
  {
77
77
  name: 'cluerise: typescript-eslint/rules',
78
- files: ['**/*.tsx?'],
78
+ files: ['**/*.{ts,tsx}'],
79
79
  rules: {
80
80
  '@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }]
81
81
  }
@@ -135,7 +135,7 @@ export default defineConfig([
135
135
  },
136
136
  {
137
137
  name: 'cluerise: eslint/import/ts',
138
- files: ['**/*.tsx?'],
138
+ files: ['**/*.{ts,tsx}'],
139
139
  extends: [eslintPluginImport.flatConfigs.recommended, eslintPluginImport.flatConfigs.typescript],
140
140
  rules: {
141
141
  'import/first': 'error',
@@ -160,7 +160,7 @@ export default defineConfig([
160
160
  },
161
161
  {
162
162
  name: 'cluerise: eslint/import/rules/config.js,ts',
163
- files: ['*.config.js', '*.config.ts'],
163
+ files: ['*.config.{js,ts}'],
164
164
  rules: {
165
165
  'import/no-default-export': 'off'
166
166
  }
@@ -254,12 +254,14 @@ class FileUtils {
254
254
  await FileSystem.mkdir(Path.dirname(absolutePath), { recursive: true });
255
255
  return FileSystem.writeFile(absolutePath, fileContent);
256
256
  }
257
- static async copyFile(sourceDirectory, filePath, destinationFilePath) {
257
+ static async copyFile(sourceDirectory, filePath, destinationFilePath, mode) {
258
258
  const sourcePath = Path.resolve(sourceDirectory, filePath);
259
259
  const destinationPath = Path.resolve(Process.cwd(), destinationFilePath ?? filePath);
260
- const sourceStat = await FileSystem.stat(sourcePath);
261
260
  await FileSystem.mkdir(Path.dirname(destinationPath), { recursive: true });
262
- return FileSystem.copyFile(sourcePath, destinationPath, sourceStat.mode);
261
+ await FileSystem.copyFile(sourcePath, destinationPath);
262
+ if (mode !== void 0) {
263
+ await FileSystem.chmod(destinationPath, mode);
264
+ }
263
265
  }
264
266
  }
265
267
  class JsonUtils {
@@ -373,7 +375,9 @@ initGit_fn = async function() {
373
375
  Path.join(gitHookDirectory, "pre-commit"),
374
376
  Path.join(gitHookDirectory, "prepare-commit-msg")
375
377
  ];
376
- await Promise.all(gitHookPaths.map((gitHookPath) => FileUtils.copyFile(__privateGet(this, _configDirectory), gitHookPath)));
378
+ await Promise.all(
379
+ gitHookPaths.map((gitHookPath) => FileUtils.copyFile(__privateGet(this, _configDirectory), gitHookPath, void 0, 493))
380
+ );
377
381
  };
378
382
  initLintStaged_fn = async function() {
379
383
  const configPath = "lint-staged.config.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluerise/tools",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Tools for maintaining TypeScript projects.",
5
5
  "author": "Branislav Holý <brano@holy.am>",
6
6
  "repository": "github:cluerise/tools",