@qwezey/typescript 2.1.0 → 3.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/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +30 -0
- package/dist/bin.js.map +1 -0
- package/dist/eslint.d.ts +1 -1
- package/dist/eslint.d.ts.map +1 -1
- package/dist/eslint.js +5 -0
- package/dist/eslint.js.map +1 -1
- package/package.json +11 -7
- package/src/eslint.ts +5 -0
- package/src/tsconfig.json +1 -0
- package/dist/bin/index.js +0 -5676
- package/dist/bin/package.json +0 -3
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
|
package/dist/bin.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { exec } from '@actions/exec';
|
|
3
|
+
import { program } from 'commander';
|
|
4
|
+
import { writeFile } from 'fs/promises';
|
|
5
|
+
const packageJson = `{
|
|
6
|
+
"type": "module"
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
const eslintConfig = `import {qwezeyEslintConfig} from '@qwezey/typescript/eslint';
|
|
10
|
+
|
|
11
|
+
export default qwezeyEslintConfig;
|
|
12
|
+
`;
|
|
13
|
+
const prettierConfig = `import {qwezeyPrettierConfig} from '@qwezey/typescript/prettier';
|
|
14
|
+
|
|
15
|
+
export default qwezeyPrettierConfig;
|
|
16
|
+
`;
|
|
17
|
+
const typescriptConfig = `{"extends": "@qwezey/typescript"}
|
|
18
|
+
`;
|
|
19
|
+
program
|
|
20
|
+
.command('init')
|
|
21
|
+
.description("Initialize a new project with QweZey's TypeScript configuration")
|
|
22
|
+
.action(async () => {
|
|
23
|
+
await writeFile('package.json', packageJson, 'utf-8');
|
|
24
|
+
await writeFile('eslint.config.ts', eslintConfig, 'utf-8');
|
|
25
|
+
await writeFile('prettier.config.ts', prettierConfig, 'utf-8');
|
|
26
|
+
await writeFile('tsconfig.json', typescriptConfig, 'utf-8');
|
|
27
|
+
await exec('npm i -D @qwezey/typescript');
|
|
28
|
+
});
|
|
29
|
+
await program.parseAsync();
|
|
30
|
+
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,IAAI,EAAC,MAAM,eAAe,CAAC;AACnC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,MAAM,WAAW,GAAG;;;CAGnB,CAAC;AAEF,MAAM,YAAY,GAAG;;;CAGpB,CAAC;AAEF,MAAM,cAAc,GAAG;;;CAGtB,CAAC;AAEF,MAAM,gBAAgB,GAAG;CACxB,CAAC;AAEF,OAAO;KACJ,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CACV,iEAAiE,CAClE;KACA,MAAM,CAAC,KAAK,IAAI,EAAE;IACjB,MAAM,SAAS,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,SAAS,CAAC,kBAAkB,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAC3D,MAAM,SAAS,CAAC,oBAAoB,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;IAC/D,MAAM,SAAS,CAAC,eAAe,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC5D,MAAM,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAC5C,CAAC,CAAC,CAAC;AAEL,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC"}
|
package/dist/eslint.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const qwezeyEslintConfig: import("eslint/config").
|
|
1
|
+
export declare const qwezeyEslintConfig: import("eslint/config").ConfigObject[];
|
|
2
2
|
//# sourceMappingURL=eslint.d.ts.map
|
package/dist/eslint.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,wCAiB9B,CAAC"}
|
package/dist/eslint.js
CHANGED
|
@@ -3,9 +3,14 @@ import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
|
|
|
3
3
|
import { defineConfig } from 'eslint/config';
|
|
4
4
|
import tseslint from 'typescript-eslint';
|
|
5
5
|
export const qwezeyEslintConfig = defineConfig(eslint.configs.recommended, tseslint.configs.recommendedTypeChecked, tseslint.configs.stylisticTypeChecked, { languageOptions: { parserOptions: { projectService: true } } }, {
|
|
6
|
+
linterOptions: { noInlineConfig: true },
|
|
6
7
|
rules: {
|
|
7
8
|
'no-warning-comments': ['warn', { terms: ['todo'], location: 'start' }],
|
|
8
9
|
'@typescript-eslint/no-unnecessary-condition': 'warn',
|
|
10
|
+
'@typescript-eslint/consistent-type-assertions': [
|
|
11
|
+
'warn',
|
|
12
|
+
{ assertionStyle: 'never' },
|
|
13
|
+
],
|
|
9
14
|
},
|
|
10
15
|
}, eslintPluginPrettier);
|
|
11
16
|
//# sourceMappingURL=eslint.js.map
|
package/dist/eslint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint.js","sourceRoot":"","sources":["../src/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,OAAO,oBAAoB,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAC3C,OAAO,QAAQ,MAAM,mBAAmB,CA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
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "24"
|
|
6
6
|
},
|
|
7
|
-
"version": "
|
|
7
|
+
"version": "3.1.0",
|
|
8
8
|
"description": "An opinionated and strict ESLint, Prettier, and TypeScript configuration with a simple setup command to get you started quickly.",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./tsconfig.json",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./prettier": "./dist/prettier.js"
|
|
13
13
|
},
|
|
14
14
|
"bin": {
|
|
15
|
-
"qwezey-typescript": "dist/bin
|
|
15
|
+
"qwezey-typescript": "dist/bin.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
@@ -23,7 +23,11 @@
|
|
|
23
23
|
"tsconfig.json"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc -p tsconfig.build.json
|
|
26
|
+
"build": "tsc -p tsconfig.build.json",
|
|
27
|
+
"clean": "npx -y rimraf dist",
|
|
28
|
+
"local:npm:start": "npx -y verdaccio --listen 0.0.0.0:4873",
|
|
29
|
+
"local:npm:publish": "npm run clean && npm run build && npm run local:npm:unpublish && npm publish --registry http://localhost:4873",
|
|
30
|
+
"local:npm:unpublish": "npm unpublish @qwezey/typescript --registry http://localhost:4873 --force"
|
|
27
31
|
},
|
|
28
32
|
"repository": {
|
|
29
33
|
"type": "git",
|
|
@@ -44,18 +48,18 @@
|
|
|
44
48
|
},
|
|
45
49
|
"homepage": "https://github.com/qwezey/typescript#readme",
|
|
46
50
|
"dependencies": {
|
|
51
|
+
"@actions/exec": "^3",
|
|
47
52
|
"@eslint/js": "^10",
|
|
53
|
+
"commander": "^15",
|
|
48
54
|
"eslint": "^10",
|
|
49
55
|
"eslint-config-prettier": "^10",
|
|
50
56
|
"eslint-plugin-prettier": "^5",
|
|
51
57
|
"jiti": "^2",
|
|
52
58
|
"prettier": "^3",
|
|
53
|
-
"typescript": "^
|
|
59
|
+
"typescript": "^6",
|
|
54
60
|
"typescript-eslint": "^8"
|
|
55
61
|
},
|
|
56
62
|
"devDependencies": {
|
|
57
|
-
"@
|
|
58
|
-
"@types/node": "^24",
|
|
59
|
-
"commander": "^14"
|
|
63
|
+
"@types/node": "^24"
|
|
60
64
|
}
|
|
61
65
|
}
|
package/src/eslint.ts
CHANGED
|
@@ -9,9 +9,14 @@ export const qwezeyEslintConfig = defineConfig(
|
|
|
9
9
|
tseslint.configs.stylisticTypeChecked,
|
|
10
10
|
{languageOptions: {parserOptions: {projectService: true}}},
|
|
11
11
|
{
|
|
12
|
+
linterOptions: {noInlineConfig: true},
|
|
12
13
|
rules: {
|
|
13
14
|
'no-warning-comments': ['warn', {terms: ['todo'], location: 'start'}],
|
|
14
15
|
'@typescript-eslint/no-unnecessary-condition': 'warn',
|
|
16
|
+
'@typescript-eslint/consistent-type-assertions': [
|
|
17
|
+
'warn',
|
|
18
|
+
{assertionStyle: 'never'},
|
|
19
|
+
],
|
|
15
20
|
},
|
|
16
21
|
},
|
|
17
22
|
eslintPluginPrettier,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"extends": "../tsconfig.json", "compilerOptions": {"types": ["node"]}}
|