@paperless/conventions 2.22.0-alpha.7 → 3.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.
- package/{.prettierrc.js → .prettierrc.cjs} +14 -0
- package/CHANGELOG.md +381 -0
- package/README.md +4 -31
- package/eslint.config.js +152 -0
- package/index.js +1 -0
- package/package.json +28 -34
- package/.eslintrc.js +0 -97
- package/commitlint.config.js +0 -8
|
@@ -16,6 +16,20 @@ const config = {
|
|
|
16
16
|
arrowParens: 'avoid',
|
|
17
17
|
singleAttributePerLine: true,
|
|
18
18
|
plugins: ['prettier-plugin-tailwindcss'],
|
|
19
|
+
overrides: [
|
|
20
|
+
{
|
|
21
|
+
files: '*.html',
|
|
22
|
+
options: {
|
|
23
|
+
parser: 'html',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: '*.component.html',
|
|
28
|
+
options: {
|
|
29
|
+
parser: 'angular',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
19
33
|
};
|
|
20
34
|
|
|
21
35
|
module.exports = config;
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,387 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.48...v3.0.0) (2026-02-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ci:** Set correct script to run for prerelease promotion ([dc191a6](https://github.com/Employes/Paperless/commit/dc191a6ee8b0dbd40c739a07b59f6a263cf135b0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.22.0-alpha.48](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.47...v2.22.0-alpha.48) (2026-02-06)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [2.22.0-alpha.47](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.46...v2.22.0-alpha.47) (2026-02-05)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [2.22.0-alpha.46](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.45...v2.22.0-alpha.46) (2026-02-03)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# [2.22.0-alpha.45](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.44...v2.22.0-alpha.45) (2026-02-03)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* **conventions/eslint:** Set early return to warn ([707d6d6](https://github.com/Employes/Paperless/commit/707d6d61659563872fa4ab26f2f07c3d15ffe3f2))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# [2.22.0-alpha.44](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.43...v2.22.0-alpha.44) (2026-02-03)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# [2.22.0-alpha.43](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.42...v2.22.0-alpha.43) (2026-02-03)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# [2.22.0-alpha.42](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.41...v2.22.0-alpha.42) (2026-02-02)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Features
|
|
72
|
+
|
|
73
|
+
* **conventions:** Add early return and if/else rules ([d41b65b](https://github.com/Employes/Paperless/commit/d41b65bb4ec380499788dbab28a83262a0ba3d9c))
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# [2.22.0-alpha.41](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.40...v2.22.0-alpha.41) (2026-01-27)
|
|
80
|
+
|
|
81
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# [2.22.0-alpha.40](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.39...v2.22.0-alpha.40) (2026-01-27)
|
|
88
|
+
|
|
89
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# [2.22.0-alpha.39](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.38...v2.22.0-alpha.39) (2026-01-27)
|
|
96
|
+
|
|
97
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
# [2.22.0-alpha.38](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.37...v2.22.0-alpha.38) (2026-01-22)
|
|
104
|
+
|
|
105
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# [2.22.0-alpha.37](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.36...v2.22.0-alpha.37) (2026-01-21)
|
|
112
|
+
|
|
113
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# [2.22.0-alpha.36](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.35...v2.22.0-alpha.36) (2026-01-21)
|
|
120
|
+
|
|
121
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# [2.22.0-alpha.35](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.34...v2.22.0-alpha.35) (2026-01-20)
|
|
128
|
+
|
|
129
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
# [2.22.0-alpha.34](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.33...v2.22.0-alpha.34) (2026-01-20)
|
|
136
|
+
|
|
137
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# [2.22.0-alpha.33](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.32...v2.22.0-alpha.33) (2026-01-20)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
* **eslint:** Improve configuration for tsx & jsx files ([d865fc6](https://github.com/Employes/Paperless/commit/d865fc6912f008074f36990d857c034c482b0cef))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# [2.22.0-alpha.32](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.31...v2.22.0-alpha.32) (2026-01-19)
|
|
155
|
+
|
|
156
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# [2.22.0-alpha.31](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.30...v2.22.0-alpha.31) (2026-01-16)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# [2.22.0-alpha.30](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.29...v2.22.0-alpha.30) (2026-01-16)
|
|
171
|
+
|
|
172
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# [2.22.0-alpha.29](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.28...v2.22.0-alpha.29) (2026-01-16)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# [2.22.0-alpha.28](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.27...v2.22.0-alpha.28) (2026-01-16)
|
|
187
|
+
|
|
188
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
# [2.22.0-alpha.27](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.26...v2.22.0-alpha.27) (2026-01-15)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
# [2.22.0-alpha.26](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.25...v2.22.0-alpha.26) (2026-01-15)
|
|
203
|
+
|
|
204
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
# [2.22.0-alpha.25](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.24...v2.22.0-alpha.25) (2026-01-15)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Features
|
|
214
|
+
|
|
215
|
+
* Apply linting to all files ([0483a1d](https://github.com/Employes/Paperless/commit/0483a1d39187e9edde810aca3a72089d41c712e5))
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
# [2.22.0-alpha.24](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.23...v2.22.0-alpha.24) (2026-01-14)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Bug Fixes
|
|
225
|
+
|
|
226
|
+
* **conventions:** Correctly parse eslint for react files ([7ad6da2](https://github.com/Employes/Paperless/commit/7ad6da29fe7916f35e0ecb47117344e8af1980e9))
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
# [2.22.0-alpha.23](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.22...v2.22.0-alpha.23) (2026-01-14)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
# [2.22.0-alpha.22](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.21...v2.22.0-alpha.22) (2026-01-14)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### Features
|
|
244
|
+
|
|
245
|
+
* **angular:** Update to ng 19 ([5d807b7](https://github.com/Employes/Paperless/commit/5d807b785deac88492fdc098fe0a8d5948738f59))
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
# [2.22.0-alpha.21](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.20...v2.22.0-alpha.21) (2026-01-14)
|
|
252
|
+
|
|
253
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
# [2.22.0-alpha.20](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.19...v2.22.0-alpha.20) (2026-01-14)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Features
|
|
263
|
+
|
|
264
|
+
* **conventions:** update typescript ([67a7382](https://github.com/Employes/Paperless/commit/67a738271a065da88a987cf467686713cb5cc9c0))
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
# [2.22.0-alpha.19](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.18...v2.22.0-alpha.19) (2026-01-14)
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
### Bug Fixes
|
|
274
|
+
|
|
275
|
+
* **conventions/eslint:** Only apply import plugin to javascript files ([f25f84c](https://github.com/Employes/Paperless/commit/f25f84cc29b6dafdb4db673573428894c9b79e18))
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
# [2.22.0-alpha.18](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.17...v2.22.0-alpha.18) (2026-01-14)
|
|
282
|
+
|
|
283
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
# [2.22.0-alpha.17](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.16...v2.22.0-alpha.17) (2026-01-14)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
### Bug Fixes
|
|
293
|
+
|
|
294
|
+
* **conventions:** Correctly import unicorn plugin ([f530459](https://github.com/Employes/Paperless/commit/f530459a9c7f7749ad40e3d236904245b4c7b5c1))
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# [2.22.0-alpha.16](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.15...v2.22.0-alpha.16) (2026-01-14)
|
|
301
|
+
|
|
302
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# [2.22.0-alpha.15](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.14...v2.22.0-alpha.15) (2026-01-14)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Bug Fixes
|
|
312
|
+
|
|
313
|
+
* **conventions:** Add typescript resolver ([1c3d7bd](https://github.com/Employes/Paperless/commit/1c3d7bdeab2c561f941046347c5d1f76e53d9783))
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
# [2.22.0-alpha.14](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.13...v2.22.0-alpha.14) (2026-01-14)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
### Features
|
|
323
|
+
|
|
324
|
+
* **conventions:** Add eslint ([5dcbf7c](https://github.com/Employes/Paperless/commit/5dcbf7c7782302eeca621f33b2f7dcef1cda2334))
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
# [2.22.0-alpha.13](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.12...v2.22.0-alpha.13) (2026-01-14)
|
|
331
|
+
|
|
332
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# [2.22.0-alpha.12](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.11...v2.22.0-alpha.12) (2026-01-14)
|
|
339
|
+
|
|
340
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
# [2.22.0-alpha.11](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.10...v2.22.0-alpha.11) (2026-01-13)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
### Bug Fixes
|
|
350
|
+
|
|
351
|
+
* **conventions:** Update typescript eslint plugins ([acc2401](https://github.com/Employes/Paperless/commit/acc240179caaeff0f4e27c557e1eee44b48c1a2b))
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
# [2.22.0-alpha.10](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.9...v2.22.0-alpha.10) (2026-01-13)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
### Bug Fixes
|
|
361
|
+
|
|
362
|
+
* **conventions:** Set correct nx version ([6ce137e](https://github.com/Employes/Paperless/commit/6ce137e1860289a2cf95f365b740c8dace97b33a))
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
# [2.22.0-alpha.9](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.8...v2.22.0-alpha.9) (2026-01-13)
|
|
369
|
+
|
|
370
|
+
**Note:** Version bump only for package @paperless/conventions
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
# [2.22.0-alpha.8](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.7...v2.22.0-alpha.8) (2026-01-13)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### Reverts
|
|
380
|
+
|
|
381
|
+
* Revert "refactor(conventions): Remove nx" ([2c1e00f](https://github.com/Employes/Paperless/commit/2c1e00fdbc0fb7ba784ac463827175520a7cfc56))
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
6
387
|
# [2.22.0-alpha.7](https://github.com/Employes/Paperless/compare/v2.22.0-alpha.6...v2.22.0-alpha.7) (2026-01-13)
|
|
7
388
|
|
|
8
389
|
**Note:** Version bump only for package @paperless/conventions
|
package/README.md
CHANGED
|
@@ -77,42 +77,15 @@ const App = () => <Button>Click me!</Button>;
|
|
|
77
77
|
#### Angular
|
|
78
78
|
|
|
79
79
|
```jsx
|
|
80
|
-
|
|
81
|
-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
82
|
-
import { applyPolyfills, defineCustomElements } from '@paperless/core/loader';
|
|
83
|
-
|
|
84
|
-
applyPolyfills()
|
|
85
|
-
.then(() => defineCustomElements())
|
|
86
|
-
.then(() => platformBrowserDynamic().bootstrapModule(AppModule))
|
|
87
|
-
.catch((err) => console.error(err));
|
|
88
|
-
|
|
89
|
-
// App Module
|
|
90
|
-
import { PaperlessModule } from '@employes/paperless-ngx';
|
|
91
|
-
|
|
92
|
-
@NgModule({
|
|
93
|
-
declarations: [AppComponent],
|
|
94
|
-
imports: [
|
|
95
|
-
BrowserModule,
|
|
96
|
-
|
|
97
|
-
// add this in your app module
|
|
98
|
-
PaperlessModule.forRoot(),
|
|
99
|
-
|
|
100
|
-
// add this in any module using paperless components
|
|
101
|
-
PaperlessModule,
|
|
102
|
-
],
|
|
103
|
-
providers: [],
|
|
104
|
-
bootstrap: [AppComponent],
|
|
105
|
-
})
|
|
106
|
-
export class AppModule {}
|
|
80
|
+
import { PButton } from '@paperless/angular';
|
|
107
81
|
|
|
108
|
-
// Any component
|
|
109
82
|
@Component({
|
|
110
|
-
|
|
111
|
-
templateUrl: `
|
|
83
|
+
templateUrl: `
|
|
112
84
|
<p-button>Click me!</p-button>
|
|
113
85
|
`,
|
|
86
|
+
imports: [PButton],
|
|
114
87
|
})
|
|
115
|
-
export class
|
|
88
|
+
export class MyComponent {}
|
|
116
89
|
```
|
|
117
90
|
|
|
118
91
|
#### Web Components
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import eslint from '@eslint/js';
|
|
2
|
+
import nxPlugin from '@nx/eslint-plugin';
|
|
3
|
+
import earlyReturnPlugin from '@regru/eslint-plugin-prefer-early-return';
|
|
4
|
+
import angularPlugin from 'angular-eslint';
|
|
5
|
+
import { defineConfig } from 'eslint/config';
|
|
6
|
+
import importPlugin from 'eslint-plugin-import';
|
|
7
|
+
import jsoncPlugin from 'eslint-plugin-jsonc';
|
|
8
|
+
import prettierPlugin from 'eslint-plugin-prettier/recommended';
|
|
9
|
+
import reactPlugin from 'eslint-plugin-react';
|
|
10
|
+
import unicornPlugin from 'eslint-plugin-unicorn';
|
|
11
|
+
import globals from 'globals';
|
|
12
|
+
import typescriptPlugin from 'typescript-eslint';
|
|
13
|
+
|
|
14
|
+
export default defineConfig([
|
|
15
|
+
eslint.configs.recommended,
|
|
16
|
+
prettierPlugin,
|
|
17
|
+
...jsoncPlugin.configs['flat/recommended-with-json'],
|
|
18
|
+
...jsoncPlugin.configs['flat/recommended-with-jsonc'],
|
|
19
|
+
|
|
20
|
+
nxPlugin.configs['flat/javascript'],
|
|
21
|
+
nxPlugin.configs['flat/react-typescript'],
|
|
22
|
+
nxPlugin.configs['flat/angular'],
|
|
23
|
+
{
|
|
24
|
+
languageOptions: {
|
|
25
|
+
globals: globals.builtin,
|
|
26
|
+
},
|
|
27
|
+
settings: {
|
|
28
|
+
'import/parsers': {
|
|
29
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
30
|
+
},
|
|
31
|
+
'import/resolver': {
|
|
32
|
+
typescript: true,
|
|
33
|
+
node: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
39
|
+
extends: [importPlugin.flatConfigs.recommended, unicornPlugin.configs.all],
|
|
40
|
+
plugins: { '@regru/prefer-early-return': earlyReturnPlugin },
|
|
41
|
+
rules: {
|
|
42
|
+
'no-else-return': 'error',
|
|
43
|
+
'@regru/prefer-early-return/prefer-early-return': [
|
|
44
|
+
'warn',
|
|
45
|
+
{
|
|
46
|
+
maximumStatements: 1,
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
50
|
+
'unicorn/no-null': 'off',
|
|
51
|
+
'unicorn/prevent-abbreviations': 'off',
|
|
52
|
+
'unicorn/no-nested-ternary': 'off',
|
|
53
|
+
'unicorn/consistent-function-scoping': [
|
|
54
|
+
'error',
|
|
55
|
+
{
|
|
56
|
+
checkArrowFunctions: false,
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
'@typescript-eslint/no-unused-vars': [
|
|
60
|
+
'error',
|
|
61
|
+
{
|
|
62
|
+
argsIgnorePattern: '^h|_$',
|
|
63
|
+
caughtErrorsIgnorePattern: '^h|_$',
|
|
64
|
+
varsIgnorePattern: '^h|_$',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
'import/no-unresolved': 'off',
|
|
68
|
+
'import/order': [
|
|
69
|
+
'error',
|
|
70
|
+
{
|
|
71
|
+
pathGroups: [
|
|
72
|
+
{
|
|
73
|
+
pattern: '@paperless/**',
|
|
74
|
+
group: 'external',
|
|
75
|
+
position: 'after',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
pathGroupsExcludedImportTypes: ['builtin'],
|
|
79
|
+
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
80
|
+
'newlines-between': 'always',
|
|
81
|
+
alphabetize: {
|
|
82
|
+
order: 'asc',
|
|
83
|
+
caseInsensitive: true,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
files: ['**/*.{tsx,jsx}'],
|
|
91
|
+
extends: [reactPlugin.configs.flat.recommended],
|
|
92
|
+
rules: {
|
|
93
|
+
'react/react-in-jsx-scope': 'off',
|
|
94
|
+
'react/jsx-sort-props': [
|
|
95
|
+
'error',
|
|
96
|
+
{
|
|
97
|
+
callbacksLast: true,
|
|
98
|
+
shorthandLast: true,
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
files: ['**/*.ts'],
|
|
105
|
+
extends: [
|
|
106
|
+
typescriptPlugin.configs.recommended,
|
|
107
|
+
typescriptPlugin.configs.stylistic,
|
|
108
|
+
angularPlugin.configs.tsRecommended,
|
|
109
|
+
],
|
|
110
|
+
processor: angularPlugin.processInlineTemplates,
|
|
111
|
+
rules: {
|
|
112
|
+
'@angular-eslint/prefer-standalone': 'off',
|
|
113
|
+
'@angular-eslint/directive-selector': [
|
|
114
|
+
'error',
|
|
115
|
+
{
|
|
116
|
+
type: 'attribute',
|
|
117
|
+
prefix: 'app',
|
|
118
|
+
style: 'camelCase',
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
'@angular-eslint/component-selector': [
|
|
122
|
+
'error',
|
|
123
|
+
{
|
|
124
|
+
type: 'element',
|
|
125
|
+
prefix: 'app',
|
|
126
|
+
style: 'kebab-case',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
files: ['**/*.html'],
|
|
133
|
+
extends: [angularPlugin.configs.templateRecommended],
|
|
134
|
+
rules: {
|
|
135
|
+
'@angular-eslint/template/prefer-self-closing-tags': ['error'],
|
|
136
|
+
'@angular-eslint/template/attributes-order': [
|
|
137
|
+
'error',
|
|
138
|
+
{
|
|
139
|
+
alphabetical: true,
|
|
140
|
+
order: [
|
|
141
|
+
'STRUCTURAL_DIRECTIVE',
|
|
142
|
+
'TEMPLATE_REFERENCE',
|
|
143
|
+
'ATTRIBUTE_BINDING',
|
|
144
|
+
'INPUT_BINDING',
|
|
145
|
+
'OUTPUT_BINDING',
|
|
146
|
+
'TWO_WAY_BINDING',
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
]);
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {};
|
package/package.json
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paperless/conventions",
|
|
3
3
|
"description": "Paperless eslint, typescript & prettier recommended configuration",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"license": "ISC",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"publishConfig": {
|
|
7
8
|
"registry": "https://registry.npmjs.org"
|
|
8
9
|
},
|
|
10
|
+
"exports": {
|
|
11
|
+
".": "./index.js",
|
|
12
|
+
"./prettier": "./.prettierrc.cjs",
|
|
13
|
+
"./eslint": "./eslint.config.js",
|
|
14
|
+
"./editorconfig": "./.editorconfig",
|
|
15
|
+
"./tsconfig": "./tsconfig.json"
|
|
16
|
+
},
|
|
9
17
|
"repository": {
|
|
10
18
|
"type": "git",
|
|
11
19
|
"url": "git+https://github.com/Employes/Paperless.git"
|
|
@@ -19,41 +27,27 @@
|
|
|
19
27
|
"prettier:check": "yarn prettier \"./**/*.{ts,tsx,html,scss,json}\"",
|
|
20
28
|
"prettier:write": "yarn prettier:check -w"
|
|
21
29
|
},
|
|
22
|
-
"
|
|
30
|
+
"dependencies": {
|
|
23
31
|
"@angular-eslint/builder": "~19.0.0",
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"eslint": "~
|
|
31
|
-
"eslint-
|
|
32
|
-
"eslint-
|
|
33
|
-
"eslint-plugin-
|
|
34
|
-
"eslint-plugin-
|
|
35
|
-
"eslint-plugin-
|
|
36
|
-
"eslint-plugin-
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"typescript": "4.9.3"
|
|
32
|
+
"@eslint/js": "~9.39.1",
|
|
33
|
+
"@nx/eslint-plugin": "~22.3.3",
|
|
34
|
+
"@regru/eslint-plugin-prefer-early-return": "~1.0.0",
|
|
35
|
+
"angular-eslint": "~19.0.0",
|
|
36
|
+
"eslint-config-prettier": "~10.1.8",
|
|
37
|
+
"eslint-import-resolver-typescript": "~4.4.4",
|
|
38
|
+
"eslint-plugin-import": "~2.32.0",
|
|
39
|
+
"eslint-plugin-jsonc": "~2.21.0",
|
|
40
|
+
"eslint-plugin-jsx-a11y": "~6.10.2",
|
|
41
|
+
"eslint-plugin-prettier": "~5.5.4",
|
|
42
|
+
"eslint-plugin-react": "~7.37.5",
|
|
43
|
+
"eslint-plugin-react-hooks": "~7.0.1",
|
|
44
|
+
"eslint-plugin-unicorn": "~62.0.0",
|
|
45
|
+
"nx": "~22.3.3",
|
|
46
|
+
"typescript-eslint": "~8.46.4"
|
|
40
47
|
},
|
|
41
48
|
"peerDependencies": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"@angular-eslint/schematics": "~19.0.0",
|
|
46
|
-
"@angular-eslint/template-parser": "~19.0.0",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "5.36.1",
|
|
48
|
-
"@typescript-eslint/parser": "5.36.1",
|
|
49
|
-
"eslint": "~8.57.0",
|
|
50
|
-
"eslint-plugin-ava": "14.0.0",
|
|
51
|
-
"eslint-plugin-import": "2.29.1",
|
|
52
|
-
"eslint-plugin-jsonc": "2.16.0",
|
|
53
|
-
"eslint-plugin-only-error": "1.0.2",
|
|
54
|
-
"eslint-plugin-unicorn": "55.0.0",
|
|
55
|
-
"prettier": "2.8.8",
|
|
56
|
-
"prettier-plugin-tailwindcss": "0.4.1",
|
|
57
|
-
"typescript": "4.9.3"
|
|
49
|
+
"eslint": "~9.39.1",
|
|
50
|
+
"prettier": "~3.7.4",
|
|
51
|
+
"typescript": "5.8.3"
|
|
58
52
|
}
|
|
59
53
|
}
|
package/.eslintrc.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
ignorePatterns: ['**/*'],
|
|
4
|
-
plugins: ['only-error', 'import', 'unicorn', 'ava'],
|
|
5
|
-
settings: {
|
|
6
|
-
'import/parsers': {
|
|
7
|
-
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
8
|
-
},
|
|
9
|
-
'import/resolver': {
|
|
10
|
-
typescript: {
|
|
11
|
-
alwaysTryTypes: true,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
overrides: [
|
|
16
|
-
{
|
|
17
|
-
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
18
|
-
rules: {
|
|
19
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
20
|
-
'import/order': [
|
|
21
|
-
'error',
|
|
22
|
-
{
|
|
23
|
-
pathGroups: [
|
|
24
|
-
{
|
|
25
|
-
pattern: '@paperless/**',
|
|
26
|
-
group: 'external',
|
|
27
|
-
position: 'after',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
pathGroupsExcludedImportTypes: ['builtin'],
|
|
31
|
-
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
|
|
32
|
-
'newlines-between': 'always',
|
|
33
|
-
alphabetize: {
|
|
34
|
-
order: 'asc',
|
|
35
|
-
caseInsensitive: true,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
extends: [
|
|
41
|
-
'plugin:@angular-eslint/all',
|
|
42
|
-
'plugin:@angular-eslint/template/process-inline-templates',
|
|
43
|
-
'prettier',
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
files: ['*.html'],
|
|
48
|
-
plugins: ['@angular-eslint/template'],
|
|
49
|
-
extends: ['plugin:@angular-eslint/all'],
|
|
50
|
-
rules: {
|
|
51
|
-
'@angular-eslint/template/attributes-order': [
|
|
52
|
-
'error',
|
|
53
|
-
{
|
|
54
|
-
alphabetical: true,
|
|
55
|
-
order: [
|
|
56
|
-
'STRUCTURAL_DIRECTIVE',
|
|
57
|
-
'TEMPLATE_REFERENCE',
|
|
58
|
-
'ATTRIBUTE_BINDING',
|
|
59
|
-
'INPUT_BINDING',
|
|
60
|
-
'OUTPUT_BINDING',
|
|
61
|
-
'TWO_WAY_BINDING',
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
files: ['*.ts', '*.tsx'],
|
|
69
|
-
extends: ['plugin:unicorn/all', 'plugin:import/recommended'],
|
|
70
|
-
rules: {
|
|
71
|
-
'unicorn/no-null': 'off',
|
|
72
|
-
'import/no-unresolved': 'off',
|
|
73
|
-
'unicorn/prevent-abbreviations': 'off',
|
|
74
|
-
'unicorn/no-nested-ternary': 'off',
|
|
75
|
-
'unicorn/consistent-function-scoping': [
|
|
76
|
-
'error',
|
|
77
|
-
{
|
|
78
|
-
checkArrowFunctions: false,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
files: ['*.spec.ts', '*.spec.tsx', '*.spec.js', '*.spec.jsx'],
|
|
85
|
-
extends: ['plugin:ava/recommended'],
|
|
86
|
-
env: {
|
|
87
|
-
jest: true,
|
|
88
|
-
},
|
|
89
|
-
rules: {},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
files: ['*.json', '*.json5'],
|
|
93
|
-
extends: ['plugin:jsonc/recommended-with-jsonc'],
|
|
94
|
-
rules: {},
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
};
|
package/commitlint.config.js
DELETED