@qwezey/typescript 0.0.8 → 1.0.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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/dist/eslint.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const qwezeyEslintConfig: import("@eslint/core", { with: { "resolution-mode": "require" } }).ConfigObject<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
1
+ export declare const qwezeyEslintConfig: import("eslint/config").Config[];
2
2
  //# sourceMappingURL=eslint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,mKAW9B,CAAC"}
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,kCAW9B,CAAC"}
package/package.json CHANGED
@@ -1,13 +1,19 @@
1
1
  {
2
2
  "name": "@qwezey/typescript",
3
3
  "type": "module",
4
- "version": "0.0.8",
5
- "description": "QweZey's opinionated typescript/eslint/prettier config for any typescript project",
4
+ "engines": {
5
+ "node": "22"
6
+ },
7
+ "version": "1.0.0",
8
+ "description": "An opinionated and strict ESLint, Prettier, and TypeScript configuration with a simple setup command to get you started quickly.",
6
9
  "exports": {
7
10
  ".": "./tsconfig.json",
8
11
  "./eslint": "./dist/eslint.js",
9
12
  "./prettier": "./dist/prettier.js"
10
13
  },
14
+ "bin": {
15
+ "qwezey-typescript": "./dist/bin/index.js"
16
+ },
11
17
  "files": [
12
18
  "dist",
13
19
  "src",
@@ -17,7 +23,7 @@
17
23
  "tsconfig.json"
18
24
  ],
19
25
  "scripts": {
20
- "build": "tsc -p tsconfig.build.json"
26
+ "build": "tsc -p tsconfig.build.json && npx -yp @vercel/ncc build src/bin.ts -o dist/bin"
21
27
  },
22
28
  "repository": {
23
29
  "type": "git",
@@ -38,13 +44,18 @@
38
44
  },
39
45
  "homepage": "https://github.com/qwezey/typescript#readme",
40
46
  "dependencies": {
41
- "@eslint/js": "^9.37.0",
42
- "eslint": "^9.37.0",
47
+ "@eslint/js": "^9.38.0",
48
+ "eslint": "^9.38.0",
43
49
  "eslint-config-prettier": "^10.1.8",
44
50
  "eslint-plugin-prettier": "^5.5.4",
45
51
  "jiti": "^2.6.1",
46
52
  "prettier": "^3.6.2",
47
53
  "typescript": "^5.9.3",
48
54
  "typescript-eslint": "^8.46.1"
55
+ },
56
+ "devDependencies": {
57
+ "@actions/exec": "^1.1.1",
58
+ "@types/node": "^22",
59
+ "commander": "^14.0.1"
49
60
  }
50
61
  }
package/src/bin.ts ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ import {exec} from '@actions/exec';
4
+ import {program} from 'commander';
5
+ import {writeFile} from 'fs/promises';
6
+
7
+ const packageJson = `{
8
+ "type": "module"
9
+ }
10
+ `;
11
+
12
+ const eslintConfig = `import {qwezeyEslintConfig} from '@qwezey/typescript/eslint';
13
+
14
+ export default qwezeyEslintConfig;
15
+ `;
16
+
17
+ const prettierConfig = `import {qwezeyPrettierConfig} from '@qwezey/typescript/prettier';
18
+
19
+ export default qwezeyPrettierConfig;
20
+ `;
21
+
22
+ const typescriptConfig = `{"extends": "@qwezey/typescript"}
23
+ `;
24
+
25
+ program
26
+ .command('init')
27
+ .description(
28
+ "Initialize a new project with QweZey's TypeScript configuration",
29
+ )
30
+ .action(async () => {
31
+ await writeFile('package.json', packageJson, 'utf-8');
32
+ await writeFile('eslint.config.ts', eslintConfig, 'utf-8');
33
+ await writeFile('prettier.config.ts', prettierConfig, 'utf-8');
34
+ await writeFile('tsconfig.json', typescriptConfig, 'utf-8');
35
+ await exec('npm i -D @qwezey/typescript');
36
+ });
37
+
38
+ await program.parseAsync();