@alessiofrittoli/package-configs 1.5.0 → 1.7.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/README.md +30 -28
- package/dist/eslint/index.cjs +1 -1
- package/dist/eslint/index.d.cts +1 -3
- package/dist/eslint/index.d.mts +1 -3
- package/dist/eslint/profiles/index.cjs +1 -1
- package/dist/eslint/profiles/index.d.cts +1 -3
- package/dist/eslint/profiles/index.d.mts +1 -3
- package/dist/eslint/profiles/index.mjs +1 -1
- package/dist/eslint/profiles/nextjs/index.cjs +1 -0
- package/dist/eslint/profiles/nextjs/index.d.cts +1 -0
- package/dist/eslint/profiles/nextjs/index.d.mts +1 -0
- package/dist/eslint/profiles/nextjs/index.mjs +1 -0
- package/dist/index.cjs +0 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/oxlint/index.cjs +1 -1
- package/dist/oxlint/index.d.cts +0 -2
- package/dist/oxlint/index.d.mts +0 -2
- package/dist/oxlint/index.mjs +1 -1
- package/dist/oxlint/profiles/index.cjs +1 -1
- package/dist/oxlint/profiles/index.d.cts +1 -3
- package/dist/oxlint/profiles/index.d.mts +1 -3
- package/dist/oxlint/profiles/index.mjs +1 -1
- package/dist/prettier/index.d.cts +0 -2
- package/dist/prettier/index.d.mts +0 -2
- package/dist/prettier/profiles/index.d.cts +1 -3
- package/dist/prettier/profiles/index.d.mts +1 -3
- package/dist/prettier/profiles/index.mjs +1 -1
- package/dist/rolldown-runtime-BocRIvOZ.cjs +1 -0
- package/dist/{standard-qoaXGrbN.mjs → standard-CObuhDHj.cjs} +1 -1
- package/dist/standard-DDkFL_et.cjs +1 -0
- package/dist/{standard-cvaDa4jU.cjs → standard-ty7dwh8r.mjs} +1 -1
- package/dist/tsconfig/configs/base.json +0 -1
- package/dist/tsconfig/configs/nextjs-bundler.json +16 -0
- package/dist/tsconfig/configs/react-bundler.json +0 -1
- package/dist/tsconfig/index.d.cts +1 -3
- package/dist/tsconfig/index.d.mts +1 -3
- package/dist/tsdown/index.d.cts +1 -3
- package/dist/tsdown/index.d.mts +1 -3
- package/dist/vite/index.d.cts +1 -3
- package/dist/vite/index.d.mts +1 -3
- package/package.json +186 -167
- package/dist/standard-BgmRUkms.cjs +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<h1 align="center">Package configs ⚙️</h1>
|
|
2
|
-
<
|
|
2
|
+
<h2 align="center">
|
|
3
3
|
Handle package configuration with ease
|
|
4
|
-
</
|
|
4
|
+
</h2>
|
|
5
5
|
<p align="center">
|
|
6
6
|
<a href="https://npmjs.org/package/@alessiofrittoli/package-configs">
|
|
7
7
|
<img src="https://img.shields.io/npm/v/@alessiofrittoli/package-configs" alt="Latest version"/>
|
|
@@ -42,14 +42,15 @@
|
|
|
42
42
|
[sponsor-badge]: https://img.shields.io/static/v1?label=Fund%20this%20package&message=%E2%9D%A4&logo=GitHub&color=%23DB61A2
|
|
43
43
|
[sponsor-url]: https://github.com/sponsors/alessiofrittoli
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
### Table of Content
|
|
46
46
|
|
|
47
47
|
- [Development](#development)
|
|
48
48
|
- [Local development](#local-development)
|
|
49
49
|
- [Production build](#production-build)
|
|
50
50
|
- [Unit tests](#unit-tests)
|
|
51
|
-
|
|
51
|
+
- [Run tests with coverage](#run-tests-with-coverage)
|
|
52
52
|
- [Contributing](#contributing)
|
|
53
|
+
- [Security](#security)
|
|
53
54
|
- [API Reference](#api-reference)
|
|
54
55
|
- [TypeScript configurations](#typescript-configurations)
|
|
55
56
|
- [TypeScript configurations files](#typescript-configurations-files)
|
|
@@ -60,10 +61,11 @@
|
|
|
60
61
|
- [Tsdown configurations](#tsdown-configurations)
|
|
61
62
|
- [Vite configurations](#vite-configurations)
|
|
62
63
|
- [Markdownlint configurations](#markdownlint-configurations)
|
|
64
|
+
- [Credits](#made-with-)
|
|
63
65
|
|
|
64
66
|
---
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
### Development
|
|
67
69
|
|
|
68
70
|
Run the following to start development
|
|
69
71
|
|
|
@@ -73,7 +75,7 @@ nvm use
|
|
|
73
75
|
pnpm i
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
#### Local development
|
|
77
79
|
|
|
78
80
|
Run the following
|
|
79
81
|
|
|
@@ -85,7 +87,7 @@ This will generate unminified output code, sourcemaps and will enable source fil
|
|
|
85
87
|
|
|
86
88
|
---
|
|
87
89
|
|
|
88
|
-
|
|
90
|
+
#### Production build
|
|
89
91
|
|
|
90
92
|
Run the following to create a local production build
|
|
91
93
|
|
|
@@ -97,7 +99,7 @@ This will generate minified output code without sourcemaps.
|
|
|
97
99
|
|
|
98
100
|
---
|
|
99
101
|
|
|
100
|
-
|
|
102
|
+
#### Unit tests
|
|
101
103
|
|
|
102
104
|
Run all the defined test suites by running the following:
|
|
103
105
|
|
|
@@ -111,7 +113,7 @@ pnpm test:ci
|
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
##### Run tests with coverage
|
|
115
117
|
|
|
116
118
|
An HTTP server is then started to serve coverage files from `./coverage` folder.
|
|
117
119
|
|
|
@@ -123,7 +125,7 @@ pnpm test:coverage:serve
|
|
|
123
125
|
|
|
124
126
|
---
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
#### Contributing
|
|
127
129
|
|
|
128
130
|
Contributions are truly welcome!
|
|
129
131
|
|
|
@@ -135,19 +137,19 @@ Help keep this project up to date with [GitHub Sponsor][sponsor-url].
|
|
|
135
137
|
|
|
136
138
|
---
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
#### Security
|
|
139
141
|
|
|
140
142
|
If you believe you have found a security vulnerability, we encourage you to **_responsibly disclose this and NOT open a public issue_**. We will investigate all legitimate reports. Email `security@alessiofrittoli.it` to disclose any security vulnerabilities.
|
|
141
143
|
|
|
142
144
|
---
|
|
143
145
|
|
|
144
|
-
|
|
146
|
+
### API Reference
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
#### TypeScript configurations
|
|
147
149
|
|
|
148
150
|
This project exports different configurations JSON files as well as some utility functions that you might need in your projects.
|
|
149
151
|
|
|
150
|
-
|
|
152
|
+
##### TypeScript configurations files
|
|
151
153
|
|
|
152
154
|
<details>
|
|
153
155
|
|
|
@@ -184,9 +186,9 @@ This file is intended for `base` processes and it mainly contains all the requir
|
|
|
184
186
|
|
|
185
187
|
---
|
|
186
188
|
|
|
187
|
-
|
|
189
|
+
##### TypeScript utility functions
|
|
188
190
|
|
|
189
|
-
|
|
191
|
+
###### `parseTsConfig()`
|
|
190
192
|
|
|
191
193
|
Parse TypeScript configuration file.
|
|
192
194
|
|
|
@@ -239,7 +241,7 @@ const parsedTsConfig = parseTsConfig({ filepath: './tsconfig.build.json' })
|
|
|
239
241
|
|
|
240
242
|
---
|
|
241
243
|
|
|
242
|
-
|
|
244
|
+
###### `getTSConfigCompilerTarget()`
|
|
243
245
|
|
|
244
246
|
Get TypeScript compiler target from resolved configuration file.
|
|
245
247
|
|
|
@@ -285,9 +287,9 @@ const compilerTarget = getTSConfigCompilerTarget({
|
|
|
285
287
|
|
|
286
288
|
---
|
|
287
289
|
|
|
288
|
-
|
|
290
|
+
#### ESlint configurations
|
|
289
291
|
|
|
290
|
-
|
|
292
|
+
##### `eslintConfig()`
|
|
291
293
|
|
|
292
294
|
Get `ESLint` base configuration.
|
|
293
295
|
|
|
@@ -330,9 +332,9 @@ export default eslintConfig( {...}, {...} );
|
|
|
330
332
|
|
|
331
333
|
---
|
|
332
334
|
|
|
333
|
-
|
|
335
|
+
#### Oxlint configurations
|
|
334
336
|
|
|
335
|
-
|
|
337
|
+
##### `oxlintConfig()`
|
|
336
338
|
|
|
337
339
|
Get `Oxlint` base configuration.
|
|
338
340
|
|
|
@@ -375,9 +377,9 @@ export default oxlintConfig( {...} );
|
|
|
375
377
|
|
|
376
378
|
---
|
|
377
379
|
|
|
378
|
-
|
|
380
|
+
#### Prettier configurations
|
|
379
381
|
|
|
380
|
-
|
|
382
|
+
##### `prettierConfig()`
|
|
381
383
|
|
|
382
384
|
Get `Prettier` base configuration.
|
|
383
385
|
|
|
@@ -420,9 +422,9 @@ export default prettierConfig( {...} );
|
|
|
420
422
|
|
|
421
423
|
---
|
|
422
424
|
|
|
423
|
-
|
|
425
|
+
#### Tsdown configurations
|
|
424
426
|
|
|
425
|
-
|
|
427
|
+
##### `tsdownConfig()`
|
|
426
428
|
|
|
427
429
|
Get `tsdown` base configuration.
|
|
428
430
|
|
|
@@ -499,9 +501,9 @@ export default tsdownConfig(({ outDir = 'example-custom-directory' }) => ({
|
|
|
499
501
|
|
|
500
502
|
---
|
|
501
503
|
|
|
502
|
-
|
|
504
|
+
#### Vite configurations
|
|
503
505
|
|
|
504
|
-
|
|
506
|
+
##### `viteConfig()`
|
|
505
507
|
|
|
506
508
|
Get `vite` base configuration.
|
|
507
509
|
|
|
@@ -560,7 +562,7 @@ export default viteConfig( {...} )
|
|
|
560
562
|
|
|
561
563
|
---
|
|
562
564
|
|
|
563
|
-
|
|
565
|
+
#### Markdownlint configurations
|
|
564
566
|
|
|
565
567
|
To help you having a better DX while writing markdown documentations this library provides you a set of base linting rules.
|
|
566
568
|
|
package/dist/eslint/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../standard-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../standard-DDkFL_et.cjs"),t=(...t)=>[...e.t,...t];exports.eslintConfig=t;
|
package/dist/eslint/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Linter } from "eslint";
|
|
2
|
-
//#region src/eslint/index.d.ts
|
|
3
2
|
export type LinterConfig = Linter.Config;
|
|
4
3
|
export type LinterConfigArray = LinterConfig[];
|
|
5
4
|
/**
|
|
@@ -9,5 +8,4 @@ export type LinterConfigArray = LinterConfig[];
|
|
|
9
8
|
*
|
|
10
9
|
* @returns The ESLint configuration array.
|
|
11
10
|
*/
|
|
12
|
-
export declare const eslintConfig: (...configs: LinterConfigArray) => LinterConfigArray;
|
|
13
|
-
//#endregion
|
|
11
|
+
export declare const eslintConfig: (...configs: LinterConfigArray) => LinterConfigArray;
|
package/dist/eslint/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Linter } from "eslint";
|
|
2
|
-
//#region src/eslint/index.d.ts
|
|
3
2
|
export type LinterConfig = Linter.Config;
|
|
4
3
|
export type LinterConfigArray = LinterConfig[];
|
|
5
4
|
/**
|
|
@@ -9,5 +8,4 @@ export type LinterConfigArray = LinterConfig[];
|
|
|
9
8
|
*
|
|
10
9
|
* @returns The ESLint configuration array.
|
|
11
10
|
*/
|
|
12
|
-
export declare const eslintConfig: (...configs: LinterConfigArray) => LinterConfigArray;
|
|
13
|
-
//#endregion
|
|
11
|
+
export declare const eslintConfig: (...configs: LinterConfigArray) => LinterConfigArray;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../standard-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../standard-DDkFL_et.cjs");exports.standardProfile=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as standardProfile}from"../../standard-9H_vBPqI.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../rolldown-runtime-BocRIvOZ.cjs");let t=require("path"),n=require("eslint-config-next/core-web-vitals");n=e.t(n,1);let r=require("eslint/config"),i=require("eslint-config-next/typescript");i=e.t(i,1);let a=require("@eslint/compat"),o=require("@eslint/eslintrc");const s=(0,require("url").fileURLToPath)(require("url").pathToFileURL(__filename).href),c=(0,t.dirname)(s),l=new o.FlatCompat({baseDirectory:c}),u=(0,r.defineConfig)([...n.default,...i.default,(0,r.globalIgnores)([`.next/**`,`out/**`,`build/**`,`next-env.d.ts`]),...(0,a.fixupConfigRules)(l.extends(`plugin:react-server-components/recommended`)),{settings:{react:{version:`detect`}}}]);exports.nextjsProfile=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const nextjsProfile: import("eslint/config").ConfigObject[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const nextjsProfile: import("eslint/config").ConfigObject[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dirname as e}from"path";import t from"eslint-config-next/core-web-vitals";import{defineConfig as n,globalIgnores as r}from"eslint/config";import i from"eslint-config-next/typescript";import{fixupConfigRules as a}from"@eslint/compat";import{FlatCompat as o}from"@eslint/eslintrc";import{fileURLToPath as s}from"url";const c=s(import.meta.url),l=e(c),u=new o({baseDirectory:l}),d=n([...t,...i,r([`.next/**`,`out/**`,`build/**`,`next-env.d.ts`]),...a(u.extends(`plugin:react-server-components/recommended`)),{settings:{react:{version:`detect`}}}]);export{d as nextjsProfile};
|
package/dist/index.cjs
ADDED
|
File without changes
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/dist/oxlint/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../standard-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../standard-CObuhDHj.cjs");let t=require("oxlint");const{categories:n,rules:r,plugins:i}=e.t,a=e=>{let a=[...i||[],...e?.plugins||[]];return(0,t.defineConfig)({...e,categories:{...n,...e?.categories},plugins:a.length>0?a:void 0,rules:{...r,...e?.rules}})};exports.oxlintConfig=a;
|
package/dist/oxlint/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OxlintConfig, OxlintConfig as OxlintConfig$1, defineConfig } from "oxlint";
|
|
2
|
-
//#region src/oxlint/index.d.ts
|
|
3
2
|
export type LintPlugins = OxlintConfig$1['plugins'];
|
|
4
3
|
/**
|
|
5
4
|
* Get `Oxlint` base configuration.
|
|
@@ -17,5 +16,4 @@ export type LintPlugins = OxlintConfig$1['plugins'];
|
|
|
17
16
|
* [Oxlint Supported Plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins)
|
|
18
17
|
*/
|
|
19
18
|
export declare const oxlintConfig: <T extends OxlintConfig$1>(configs?: T & OxlintConfig$1) => ReturnType<typeof defineConfig>;
|
|
20
|
-
//#endregion
|
|
21
19
|
export type { OxlintConfig };
|
package/dist/oxlint/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { OxlintConfig, OxlintConfig as OxlintConfig$1, defineConfig } from "oxlint";
|
|
2
|
-
//#region src/oxlint/index.d.ts
|
|
3
2
|
export type LintPlugins = OxlintConfig$1['plugins'];
|
|
4
3
|
/**
|
|
5
4
|
* Get `Oxlint` base configuration.
|
|
@@ -17,5 +16,4 @@ export type LintPlugins = OxlintConfig$1['plugins'];
|
|
|
17
16
|
* [Oxlint Supported Plugins](https://oxc.rs/docs/guide/usage/linter/plugins.html#supported-plugins)
|
|
18
17
|
*/
|
|
19
18
|
export declare const oxlintConfig: <T extends OxlintConfig$1>(configs?: T & OxlintConfig$1) => ReturnType<typeof defineConfig>;
|
|
20
|
-
//#endregion
|
|
21
19
|
export type { OxlintConfig };
|
package/dist/oxlint/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../standard-
|
|
1
|
+
import{t as e}from"../standard-ty7dwh8r.mjs";import{defineConfig as t}from"oxlint";const{categories:n,rules:r,plugins:i}=e,a=e=>{let a=[...i||[],...e?.plugins||[]];return t({...e,categories:{...n,...e?.categories},plugins:a.length>0?a:void 0,rules:{...r,...e?.rules}})};export{a as oxlintConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../standard-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../standard-CObuhDHj.cjs");exports.standardProfile=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as standardProfile}from"../../standard-ty7dwh8r.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Config, Config as PrettierConfig } from "prettier";
|
|
2
|
-
//#region src/prettier/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get `Prettier` base configuration.
|
|
5
4
|
*
|
|
@@ -8,5 +7,4 @@ import { Config, Config as PrettierConfig } from "prettier";
|
|
|
8
7
|
* @returns The Prettier configuration array.
|
|
9
8
|
*/
|
|
10
9
|
export declare const prettierConfig: (configs?: Config) => Config;
|
|
11
|
-
//#endregion
|
|
12
10
|
export type { PrettierConfig };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Config, Config as PrettierConfig } from "prettier";
|
|
2
|
-
//#region src/prettier/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get `Prettier` base configuration.
|
|
5
4
|
*
|
|
@@ -8,5 +7,4 @@ import { Config, Config as PrettierConfig } from "prettier";
|
|
|
8
7
|
* @returns The Prettier configuration array.
|
|
9
8
|
*/
|
|
10
9
|
export declare const prettierConfig: (configs?: Config) => Config;
|
|
11
|
-
//#endregion
|
|
12
10
|
export type { PrettierConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{t as standardProfile}from"../../standard-CRskCPOC.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={categories:{correctness:`warn`},plugins:[`eslint`,`typescript`,`unicorn`,`oxc`],rules:{"eslint/no-unused-vars":`error`,"prefer-const":[`error`,{ignoreReadBeforeAssign:!0}],"typescript/explicit-function-return-type":`error`,"typescript/consistent-type-imports":`warn`,"typescript/no-floating-promises":`error`,"typescript/no-misused-promises":`error`,"typescript/no-explicit-any":`error`}};
|
|
1
|
+
const e={categories:{correctness:`warn`},plugins:[`eslint`,`typescript`,`unicorn`,`oxc`],rules:{"eslint/no-unused-vars":`error`,"prefer-const":[`error`,{ignoreReadBeforeAssign:!0}],"typescript/explicit-function-return-type":`error`,"typescript/consistent-type-imports":`warn`,"typescript/no-floating-promises":`error`,"typescript/no-misused-promises":`error`,"typescript/no-explicit-any":`error`,"typescript/explicit-member-accessibility":`error`,"no-param-reassign":`error`}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-BocRIvOZ.cjs");let t=require("typescript-eslint");t=e.t(t,1);let n=require("@eslint/js");n=e.t(n,1);let r=require("globals");r=e.t(r,1);const i=[{languageOptions:{globals:{...r.default.browser,...r.default.node}}},n.default.configs.recommended,...t.default.configs.recommended,{ignores:[`**/dist/*`,`**/coverage/*`,`.vscode`]},{rules:{"@typescript-eslint/no-namespace":`off`,"@typescript-eslint/consistent-type-imports":`warn`}}];Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={categories:{correctness:`warn`},plugins:[`eslint`,`typescript`,`unicorn`,`oxc`],rules:{"eslint/no-unused-vars":`error`,"prefer-const":[`error`,{ignoreReadBeforeAssign:!0}],"typescript/explicit-function-return-type":`error`,"typescript/consistent-type-imports":`warn`,"typescript/no-floating-promises":`error`,"typescript/no-misused-promises":`error`,"typescript/no-explicit-any":`error`}};
|
|
1
|
+
const e={categories:{correctness:`warn`},plugins:[`eslint`,`typescript`,`unicorn`,`oxc`],rules:{"eslint/no-unused-vars":`error`,"prefer-const":[`error`,{ignoreReadBeforeAssign:!0}],"typescript/explicit-function-return-type":`error`,"typescript/consistent-type-imports":`warn`,"typescript/no-floating-promises":`error`,"typescript/no-misused-promises":`error`,"typescript/no-explicit-any":`error`,"typescript/explicit-member-accessibility":`error`,"no-param-reassign":`error`}};export{e as t};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/tsconfig",
|
|
3
|
+
"extends": "./react-bundler.json",
|
|
4
|
+
"compilerOptions": {
|
|
5
|
+
"target": "ES2017",
|
|
6
|
+
"allowJs": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"module": "esnext",
|
|
9
|
+
"incremental": true,
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "next"
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ParsedCommandLine } from "typescript";
|
|
2
|
-
//#region src/tsconfig/index.d.ts
|
|
3
2
|
export interface ParseTsConfigOptions {
|
|
4
3
|
/**
|
|
5
4
|
* The TypeScript configuration file path.
|
|
@@ -32,5 +31,4 @@ export declare const parseTsConfig: (options?: ParseTsConfigOptions) => ParsedCo
|
|
|
32
31
|
*
|
|
33
32
|
* @returns The resolved TypeScript compiler target if any, `undefined` otherwise.
|
|
34
33
|
*/
|
|
35
|
-
export declare const getTSConfigCompilerTarget: (options?: GetTSConfigCompilerTargetOptions) => string | undefined;
|
|
36
|
-
//#endregion
|
|
34
|
+
export declare const getTSConfigCompilerTarget: (options?: GetTSConfigCompilerTargetOptions) => string | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ParsedCommandLine } from "typescript";
|
|
2
|
-
//#region src/tsconfig/index.d.ts
|
|
3
2
|
export interface ParseTsConfigOptions {
|
|
4
3
|
/**
|
|
5
4
|
* The TypeScript configuration file path.
|
|
@@ -32,5 +31,4 @@ export declare const parseTsConfig: (options?: ParseTsConfigOptions) => ParsedCo
|
|
|
32
31
|
*
|
|
33
32
|
* @returns The resolved TypeScript compiler target if any, `undefined` otherwise.
|
|
34
33
|
*/
|
|
35
|
-
export declare const getTSConfigCompilerTarget: (options?: GetTSConfigCompilerTargetOptions) => string | undefined;
|
|
36
|
-
//#endregion
|
|
34
|
+
export declare const getTSConfigCompilerTarget: (options?: GetTSConfigCompilerTargetOptions) => string | undefined;
|
package/dist/tsdown/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ParsedCommandLine } from "typescript";
|
|
2
2
|
import { InlineConfig, UserConfig, UserConfigFn as UserConfigFn$1, UserConfigFnContext } from "tsdown";
|
|
3
|
-
//#region src/tsdown/index.d.ts
|
|
4
3
|
export interface UserTsdownConfig extends UserConfig {
|
|
5
4
|
/**
|
|
6
5
|
* The already parsed TS config.
|
|
@@ -38,5 +37,4 @@ inlineConfig: InlineConfig, context: UserConfigFnContext) => UserTsdownConfig |
|
|
|
38
37
|
* | `target` | resolved tsconfig target |
|
|
39
38
|
* | `deps` | `{ ... }` |
|
|
40
39
|
*/
|
|
41
|
-
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
|
42
|
-
//#endregion
|
|
40
|
+
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
package/dist/tsdown/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ParsedCommandLine } from "typescript";
|
|
2
2
|
import { InlineConfig, UserConfig, UserConfigFn as UserConfigFn$1, UserConfigFnContext } from "tsdown";
|
|
3
|
-
//#region src/tsdown/index.d.ts
|
|
4
3
|
export interface UserTsdownConfig extends UserConfig {
|
|
5
4
|
/**
|
|
6
5
|
* The already parsed TS config.
|
|
@@ -38,5 +37,4 @@ inlineConfig: InlineConfig, context: UserConfigFnContext) => UserTsdownConfig |
|
|
|
38
37
|
* | `target` | resolved tsconfig target |
|
|
39
38
|
* | `deps` | `{ ... }` |
|
|
40
39
|
*/
|
|
41
|
-
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
|
42
|
-
//#endregion
|
|
40
|
+
export declare const tsdownConfig: (options?: UserTsdownConfig | UserConfigFn) => UserConfigFn$1;
|
package/dist/vite/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UserConfig, defineConfig } from "vite";
|
|
2
|
-
//#region src/vite/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get `vite` base configuration.
|
|
5
4
|
*
|
|
@@ -17,5 +16,4 @@ import { UserConfig, defineConfig } from "vite";
|
|
|
17
16
|
* | `test.reporters` | `['tree']\|[]` based on `VITEST_VSCODE` environment variable. |
|
|
18
17
|
* | `test.coverage.exclude` | `['**\/*.mock.ts', '**\/__tests__/**\/*.mock.ts']` |
|
|
19
18
|
*/
|
|
20
|
-
export declare const viteConfig: (configs?: UserConfig) => ReturnType<typeof defineConfig>;
|
|
21
|
-
//#endregion
|
|
19
|
+
export declare const viteConfig: (configs?: UserConfig) => ReturnType<typeof defineConfig>;
|
package/dist/vite/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { UserConfig, defineConfig } from "vite";
|
|
2
|
-
//#region src/vite/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Get `vite` base configuration.
|
|
5
4
|
*
|
|
@@ -17,5 +16,4 @@ import { UserConfig, defineConfig } from "vite";
|
|
|
17
16
|
* | `test.reporters` | `['tree']\|[]` based on `VITEST_VSCODE` environment variable. |
|
|
18
17
|
* | `test.coverage.exclude` | `['**\/*.mock.ts', '**\/__tests__/**\/*.mock.ts']` |
|
|
19
18
|
*/
|
|
20
|
-
export declare const viteConfig: (configs?: UserConfig) => ReturnType<typeof defineConfig>;
|
|
21
|
-
//#endregion
|
|
19
|
+
export declare const viteConfig: (configs?: UserConfig) => ReturnType<typeof defineConfig>;
|
package/package.json
CHANGED
|
@@ -1,168 +1,187 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
2
|
+
"name": "@alessiofrittoli/package-configs",
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Utility library that offers base configurations for your packages.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Alessio Frittoli",
|
|
8
|
+
"email": "info@alessiofrittoli.it",
|
|
9
|
+
"url": "https://alessiofrittoli.it"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"funding": [
|
|
13
|
+
{
|
|
14
|
+
"type": "github",
|
|
15
|
+
"url": "https://github.com/sponsors/alessiofrittoli"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"tsdown",
|
|
20
|
+
"eslint",
|
|
21
|
+
"vite",
|
|
22
|
+
"vitest"
|
|
23
|
+
],
|
|
24
|
+
"homepage": "https://github.com/alessiofrittoli/package-configs#readme",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/alessiofrittoli/package-configs/issues",
|
|
27
|
+
"email": "info@alessiofrittoli.it"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/alessiofrittoli/package-configs.git"
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=24.15.0",
|
|
36
|
+
"pnpm": ">=11.27.1"
|
|
37
|
+
},
|
|
38
|
+
"main": "./dist/index.cjs",
|
|
39
|
+
"module": "./dist/index.mjs",
|
|
40
|
+
"types": "./dist/index.d.mts",
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"exports": {
|
|
45
|
+
".": {
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./dist/index.d.mts",
|
|
48
|
+
"default": "./dist/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/index.d.cts",
|
|
52
|
+
"default": "./dist/index.cjs"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"./*": {
|
|
56
|
+
"import": {
|
|
57
|
+
"types": "./dist/*/index.d.mts",
|
|
58
|
+
"default": "./dist/*/index.mjs"
|
|
59
|
+
},
|
|
60
|
+
"require": {
|
|
61
|
+
"types": "./dist/*/index.d.cts",
|
|
62
|
+
"default": "./dist/*/index.cjs"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"./tsconfig/*.json": {
|
|
66
|
+
"import": "./dist/tsconfig/configs/*.json",
|
|
67
|
+
"require": "./dist/tsconfig/configs/*.json"
|
|
68
|
+
},
|
|
69
|
+
"./markdownlint/*.json": {
|
|
70
|
+
"import": "./dist/markdownlint/configs/*.json",
|
|
71
|
+
"require": "./dist/markdownlint/configs/*.json"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"@eslint/compat": "^2.1.1",
|
|
76
|
+
"@eslint/eslintrc": "^3.3.7",
|
|
77
|
+
"@eslint/js": "^10.0.1",
|
|
78
|
+
"eslint": "^10.11.0",
|
|
79
|
+
"eslint-config-next": "^16.4.2",
|
|
80
|
+
"eslint-plugin-react-server-components": "^1.2.0",
|
|
81
|
+
"globals": "^17.12.0",
|
|
82
|
+
"oxlint": "^1.85.0",
|
|
83
|
+
"prettier": "^3.9.9",
|
|
84
|
+
"prettier-plugin-sort-imports": "^1.8.11",
|
|
85
|
+
"tsdown": "^0.23.0",
|
|
86
|
+
"typescript": "^6.0.3",
|
|
87
|
+
"typescript-eslint": "^8.70.1",
|
|
88
|
+
"vite": "^8.3.0",
|
|
89
|
+
"vitest": "^5.0.1"
|
|
90
|
+
},
|
|
91
|
+
"peerDependenciesMeta": {
|
|
92
|
+
"@eslint/compat": {
|
|
93
|
+
"optional": true
|
|
94
|
+
},
|
|
95
|
+
"@eslint/eslintrc": {
|
|
96
|
+
"optional": true
|
|
97
|
+
},
|
|
98
|
+
"@eslint/js": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"eslint": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"eslint-config-next": {
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
"eslint-plugin-react-server-components": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
110
|
+
"globals": {
|
|
111
|
+
"optional": true
|
|
112
|
+
},
|
|
113
|
+
"oxlint": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
116
|
+
"prettier": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"prettier-plugin-sort-imports": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"tsdown": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
125
|
+
"typescript": {
|
|
126
|
+
"optional": false
|
|
127
|
+
},
|
|
128
|
+
"typescript-eslint": {
|
|
129
|
+
"optional": true
|
|
130
|
+
},
|
|
131
|
+
"vite": {
|
|
132
|
+
"optional": true
|
|
133
|
+
},
|
|
134
|
+
"vitest": {
|
|
135
|
+
"optional": true
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"devDependencies": {
|
|
139
|
+
"@alessiofrittoli/node-scripts": "^4.1.0",
|
|
140
|
+
"@eslint/compat": "^2.1.1",
|
|
141
|
+
"@eslint/eslintrc": "^3.3.7",
|
|
142
|
+
"@eslint/js": "^10.0.1",
|
|
143
|
+
"@types/node": "^24.13.2",
|
|
144
|
+
"@vitest/coverage-v8": "5.0.5",
|
|
145
|
+
"concurrently": "^10.0.6",
|
|
146
|
+
"eslint": "^10.11.0",
|
|
147
|
+
"eslint-config-next": "^16.4.2",
|
|
148
|
+
"eslint-plugin-react-server-components": "^1.2.0",
|
|
149
|
+
"globals": "^17.13.0",
|
|
150
|
+
"http-server": "^14.1.1",
|
|
151
|
+
"jiti": "^2.7.0",
|
|
152
|
+
"oxlint": "^1.89.0",
|
|
153
|
+
"prettier": "^3.9.10",
|
|
154
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
155
|
+
"prettier-plugin-sh": "^0.20.2",
|
|
156
|
+
"prettier-plugin-sort-imports": "^1.8.11",
|
|
157
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
158
|
+
"tsdown": "^0.23.1",
|
|
159
|
+
"typescript": "6.0.3",
|
|
160
|
+
"typescript-eslint": "^8.72.0",
|
|
161
|
+
"vite": "^8.3.5",
|
|
162
|
+
"vitest": "^5.0.5"
|
|
163
|
+
},
|
|
164
|
+
"scripts": {
|
|
165
|
+
"//1a": "*********************************************************************",
|
|
166
|
+
"//1b": "******************** DEV - BUILD - LINT - RELEASE *******************",
|
|
167
|
+
"//1c": "*********************************************************************",
|
|
168
|
+
"dev": "tsdown --watch",
|
|
169
|
+
"build": "pnpm lint && pnpm tsc && pnpm tsdown",
|
|
170
|
+
"eslint": "eslint -c legacy-eslint.config.ts --report-unused-disable-directives --max-warnings 0 --cache --cache-location .cache/eslint",
|
|
171
|
+
"lint": "oxlint --report-unused-disable-directives --max-warnings 0",
|
|
172
|
+
"release": "node scripts/release.ts --verbose --npm",
|
|
173
|
+
"//2a": "*********************************************************************",
|
|
174
|
+
"//2b": "***************************** UNIT TESTS ****************************",
|
|
175
|
+
"//2c": "*********************************************************************",
|
|
176
|
+
"test": "vitest --reporter=tree",
|
|
177
|
+
"test:watch": "pnpm test watch",
|
|
178
|
+
"test:ci": "pnpm test run",
|
|
179
|
+
"//3a": "*********************************************************************",
|
|
180
|
+
"//3b": "************************ UNIT TESTS COVERAGE ************************",
|
|
181
|
+
"//3c": "*********************************************************************",
|
|
182
|
+
"test:coverage": "pnpm test:watch --coverage",
|
|
183
|
+
"test:coverage:ci": "pnpm test:ci --coverage",
|
|
184
|
+
"test:serve-coverage": "http-server ./coverage --gzip true -p 0 -o /index.html --silent",
|
|
185
|
+
"test:coverage:serve": "concurrently --prefix none --kill-others \"pnpm test:coverage\" \"pnpm test:serve-coverage\""
|
|
186
|
+
}
|
|
187
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("typescript-eslint");c=s(c,1);let l=require("@eslint/js");l=s(l,1);let u=require("globals");u=s(u,1);const d=[{languageOptions:{globals:{...u.default.browser,...u.default.node}}},l.default.configs.recommended,...c.default.configs.recommended,{ignores:[`**/dist/*`,`**/coverage/*`,`.vscode`]},{rules:{"@typescript-eslint/no-namespace":`off`,"@typescript-eslint/consistent-type-imports":`warn`}}];Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return d}});
|