@rtorcato/js-tooling 1.0.9 → 1.1.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/dist/cli/index.js CHANGED
@@ -44,8 +44,9 @@ program
44
44
  try {
45
45
  const fs = (await import('fs-extra')).default;
46
46
  const path = (await import('node:path')).default;
47
- // Get the package installation path
48
- const packagePath = path.dirname(path.dirname(new URL(import.meta.url).pathname));
47
+ // Get the package installation path - CLI is in dist/cli/index.js, need to go up 3 levels
48
+ const cliFile = new URL(import.meta.url).pathname;
49
+ const packagePath = path.dirname(path.dirname(path.dirname(cliFile)));
49
50
  const sourcePath = path.join(packagePath, source);
50
51
  const targetPath = path.join(process.cwd(), target);
51
52
  await fs.copy(sourcePath, targetPath);
@@ -64,12 +65,18 @@ program
64
65
  .action(() => {
65
66
  console.log(chalk.cyan('\nšŸ› ļø Available tooling configurations:\n'));
66
67
  const configs = [
67
- { name: 'TypeScript', desc: 'Base, React, Next.js, Node.js, Express configurations' },
68
+ {
69
+ name: 'TypeScript',
70
+ desc: 'Base, React, Next.js, Node.js, Express configurations',
71
+ },
68
72
  { name: 'ESLint', desc: 'Base and Next.js ESLint configurations' },
69
73
  { name: 'Biome', desc: 'Fast formatter and linter configuration' },
70
74
  { name: 'Prettier', desc: 'Code formatter configuration' },
71
75
  { name: 'Vitest', desc: 'Testing framework configuration' },
72
- { name: 'Jest', desc: 'Testing framework presets for browser and Node.js' },
76
+ {
77
+ name: 'Jest',
78
+ desc: 'Testing framework presets for browser and Node.js',
79
+ },
73
80
  { name: 'Playwright', desc: 'End-to-end testing configuration' },
74
81
  { name: 'Commitlint', desc: 'Conventional commit linting' },
75
82
  { name: 'Husky', desc: 'Git hooks for pre-commit validation' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rtorcato/js-tooling",
3
- "version": "1.0.9",
3
+ "version": "1.1.0",
4
4
  "description": "JavaScript and TypeScript tooling for Node.js, React, Next.js, and Vitest.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -1,38 +1,38 @@
1
1
  export default {
2
- extends: ['@commitlint/config-conventional'],
3
- ignores: [(commit) => commit.includes('[skip ci]')],
2
+ extends: ["@commitlint/config-conventional"],
3
+ ignores: [(commit) => commit.includes("[skip ci]")],
4
4
  rules: {
5
5
  // Enforce strict type validation
6
- 'type-enum': [
6
+ "type-enum": [
7
7
  2,
8
- 'always',
8
+ "always",
9
9
  [
10
- 'build',
11
- 'chore',
12
- 'ci',
13
- 'docs',
14
- 'feat',
15
- 'fix',
16
- 'perf',
17
- 'refactor',
18
- 'revert',
19
- 'style',
20
- 'test',
10
+ "build",
11
+ "chore",
12
+ "ci",
13
+ "docs",
14
+ "feat",
15
+ "fix",
16
+ "perf",
17
+ "refactor",
18
+ "revert",
19
+ "style",
20
+ "test",
21
21
  ],
22
22
  ],
23
- // Enforce length limits
24
- 'header-max-length': [2, 'always', 72],
25
- 'body-max-line-length': [2, 'always', 100],
26
- 'footer-max-line-length': [2, 'always', 100],
23
+ // Enforce length limits (strict)
24
+ "header-max-length": [2, "always", 50],
25
+ "body-max-line-length": [2, "always", 72],
26
+ "footer-max-line-length": [2, "always", 72],
27
27
  // Enforce case rules (allow common patterns)
28
- 'subject-case': [0], // Disable case enforcement to allow flexibility
29
- 'type-case': [2, 'always', 'lower-case'],
28
+ "subject-case": [0], // Disable case enforcement to allow flexibility
29
+ "type-case": [2, "always", "lower-case"],
30
30
  // Enforce required elements
31
- 'type-empty': [2, 'never'],
32
- 'subject-empty': [2, 'never'],
31
+ "type-empty": [2, "never"],
32
+ "subject-empty": [2, "never"],
33
33
  // Enforce punctuation rules
34
- 'subject-full-stop': [2, 'never', '.'],
34
+ "subject-full-stop": [2, "never", "."],
35
35
  // Enforce scope rules (optional but recommended)
36
- 'scope-case': [2, 'always', 'lower-case'],
36
+ "scope-case": [2, "always", "lower-case"],
37
37
  },
38
- }
38
+ };