@alessiofrittoli/package-configs 1.5.0 → 1.6.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 +29 -28
- package/dist/oxlint/index.cjs +1 -1
- package/dist/oxlint/index.mjs +1 -1
- package/dist/oxlint/profiles/index.cjs +1 -1
- package/dist/oxlint/profiles/index.mjs +1 -1
- package/dist/{standard-qoaXGrbN.mjs → standard-C52ivef-.mjs} +1 -1
- package/dist/{standard-cvaDa4jU.cjs → standard-DahEN_JJ.cjs} +1 -1
- package/package.json +2 -3
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)
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
|
|
64
65
|
---
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
### Development
|
|
67
68
|
|
|
68
69
|
Run the following to start development
|
|
69
70
|
|
|
@@ -73,7 +74,7 @@ nvm use
|
|
|
73
74
|
pnpm i
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
#### Local development
|
|
77
78
|
|
|
78
79
|
Run the following
|
|
79
80
|
|
|
@@ -85,7 +86,7 @@ This will generate unminified output code, sourcemaps and will enable source fil
|
|
|
85
86
|
|
|
86
87
|
---
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
#### Production build
|
|
89
90
|
|
|
90
91
|
Run the following to create a local production build
|
|
91
92
|
|
|
@@ -97,7 +98,7 @@ This will generate minified output code without sourcemaps.
|
|
|
97
98
|
|
|
98
99
|
---
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
#### Unit tests
|
|
101
102
|
|
|
102
103
|
Run all the defined test suites by running the following:
|
|
103
104
|
|
|
@@ -111,7 +112,7 @@ pnpm test:ci
|
|
|
111
112
|
|
|
112
113
|
---
|
|
113
114
|
|
|
114
|
-
|
|
115
|
+
##### Run tests with coverage
|
|
115
116
|
|
|
116
117
|
An HTTP server is then started to serve coverage files from `./coverage` folder.
|
|
117
118
|
|
|
@@ -123,7 +124,7 @@ pnpm test:coverage:serve
|
|
|
123
124
|
|
|
124
125
|
---
|
|
125
126
|
|
|
126
|
-
|
|
127
|
+
#### Contributing
|
|
127
128
|
|
|
128
129
|
Contributions are truly welcome!
|
|
129
130
|
|
|
@@ -135,19 +136,19 @@ Help keep this project up to date with [GitHub Sponsor][sponsor-url].
|
|
|
135
136
|
|
|
136
137
|
---
|
|
137
138
|
|
|
138
|
-
|
|
139
|
+
#### Security
|
|
139
140
|
|
|
140
141
|
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
142
|
|
|
142
143
|
---
|
|
143
144
|
|
|
144
|
-
|
|
145
|
+
### API Reference
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
#### TypeScript configurations
|
|
147
148
|
|
|
148
149
|
This project exports different configurations JSON files as well as some utility functions that you might need in your projects.
|
|
149
150
|
|
|
150
|
-
|
|
151
|
+
##### TypeScript configurations files
|
|
151
152
|
|
|
152
153
|
<details>
|
|
153
154
|
|
|
@@ -184,9 +185,9 @@ This file is intended for `base` processes and it mainly contains all the requir
|
|
|
184
185
|
|
|
185
186
|
---
|
|
186
187
|
|
|
187
|
-
|
|
188
|
+
##### TypeScript utility functions
|
|
188
189
|
|
|
189
|
-
|
|
190
|
+
###### `parseTsConfig()`
|
|
190
191
|
|
|
191
192
|
Parse TypeScript configuration file.
|
|
192
193
|
|
|
@@ -239,7 +240,7 @@ const parsedTsConfig = parseTsConfig({ filepath: './tsconfig.build.json' })
|
|
|
239
240
|
|
|
240
241
|
---
|
|
241
242
|
|
|
242
|
-
|
|
243
|
+
###### `getTSConfigCompilerTarget()`
|
|
243
244
|
|
|
244
245
|
Get TypeScript compiler target from resolved configuration file.
|
|
245
246
|
|
|
@@ -285,9 +286,9 @@ const compilerTarget = getTSConfigCompilerTarget({
|
|
|
285
286
|
|
|
286
287
|
---
|
|
287
288
|
|
|
288
|
-
|
|
289
|
+
#### ESlint configurations
|
|
289
290
|
|
|
290
|
-
|
|
291
|
+
##### `eslintConfig()`
|
|
291
292
|
|
|
292
293
|
Get `ESLint` base configuration.
|
|
293
294
|
|
|
@@ -330,9 +331,9 @@ export default eslintConfig( {...}, {...} );
|
|
|
330
331
|
|
|
331
332
|
---
|
|
332
333
|
|
|
333
|
-
|
|
334
|
+
#### Oxlint configurations
|
|
334
335
|
|
|
335
|
-
|
|
336
|
+
##### `oxlintConfig()`
|
|
336
337
|
|
|
337
338
|
Get `Oxlint` base configuration.
|
|
338
339
|
|
|
@@ -375,9 +376,9 @@ export default oxlintConfig( {...} );
|
|
|
375
376
|
|
|
376
377
|
---
|
|
377
378
|
|
|
378
|
-
|
|
379
|
+
#### Prettier configurations
|
|
379
380
|
|
|
380
|
-
|
|
381
|
+
##### `prettierConfig()`
|
|
381
382
|
|
|
382
383
|
Get `Prettier` base configuration.
|
|
383
384
|
|
|
@@ -420,9 +421,9 @@ export default prettierConfig( {...} );
|
|
|
420
421
|
|
|
421
422
|
---
|
|
422
423
|
|
|
423
|
-
|
|
424
|
+
#### Tsdown configurations
|
|
424
425
|
|
|
425
|
-
|
|
426
|
+
##### `tsdownConfig()`
|
|
426
427
|
|
|
427
428
|
Get `tsdown` base configuration.
|
|
428
429
|
|
|
@@ -499,9 +500,9 @@ export default tsdownConfig(({ outDir = 'example-custom-directory' }) => ({
|
|
|
499
500
|
|
|
500
501
|
---
|
|
501
502
|
|
|
502
|
-
|
|
503
|
+
#### Vite configurations
|
|
503
504
|
|
|
504
|
-
|
|
505
|
+
##### `viteConfig()`
|
|
505
506
|
|
|
506
507
|
Get `vite` base configuration.
|
|
507
508
|
|
|
@@ -560,7 +561,7 @@ export default viteConfig( {...} )
|
|
|
560
561
|
|
|
561
562
|
---
|
|
562
563
|
|
|
563
|
-
|
|
564
|
+
#### Markdownlint configurations
|
|
564
565
|
|
|
565
566
|
To help you having a better DX while writing markdown documentations this library provides you a set of base linting rules.
|
|
566
567
|
|
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-DahEN_JJ.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.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../standard-
|
|
1
|
+
import{t as e}from"../standard-C52ivef-.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-DahEN_JJ.cjs");exports.standardProfile=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../../standard-
|
|
1
|
+
import{t as e}from"../../standard-C52ivef-.mjs";export{e as standardProfile};
|
|
@@ -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`}};export{e as t};
|
|
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`}};export{e as t};
|
|
@@ -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`}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
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`}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alessiofrittoli/package-configs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Utility library that offers base configurations for your packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -76,8 +76,7 @@
|
|
|
76
76
|
"//1b": "******************** DEV - BUILD - LINT - RELEASE *******************",
|
|
77
77
|
"//1c": "*********************************************************************",
|
|
78
78
|
"dev": "tsdown --watch",
|
|
79
|
-
"build
|
|
80
|
-
"build": "pnpm lint && pnpm build:prod",
|
|
79
|
+
"build": "pnpm lint && pnpm tsc && pnpm tsdown",
|
|
81
80
|
"eslint": "eslint -c legacy-eslint.config.ts --report-unused-disable-directives --max-warnings 0 --cache --cache-location .cache/eslint",
|
|
82
81
|
"lint": "oxlint --report-unused-disable-directives --max-warnings 0",
|
|
83
82
|
"release": "node scripts/release.ts --verbose --npm",
|