eslint-config-un 1.0.0-alpha.11 → 1.0.0-alpha.12
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 +72 -41
- package/dist/{angular-IOCLLPRU.js → angular-XI2MI3K5.js} +5 -5
- package/dist/{astro-FZ7NTZO3.js → astro-4DJYZ5SG.js} +14 -14
- package/dist/{ava-SPKNY6C7.js → ava-LYLDX23A.js} +18 -6
- package/dist/{better-tailwind-SXKBS2OR.js → better-tailwind-WUJ46FSH.js} +1 -1
- package/dist/{case-police-AVZKPAIJ.js → case-police-2G5M467O.js} +1 -1
- package/dist/{chunk-USNVLEKP.js → chunk-7IQYQ5KM.js} +1 -1
- package/dist/{chunk-PA4WMYU4.js → chunk-P5U53E6S.js} +26 -2
- package/dist/{chunk-EWFR3AJ3.js → chunk-T6VV7MSS.js} +366 -141
- package/dist/{chunk-Z7IFEYIW.js → chunk-X4NBNG32.js} +2 -2
- package/dist/{cli-YHZZKBAD.js → cli-ZHQZMKTG.js} +1 -1
- package/dist/{cloudfront-functions-IGB56LR6.js → cloudfront-functions-PWBWKYGS.js} +2 -2
- package/dist/compat-576LXOE5.js +25 -0
- package/dist/{cspell-QYGC4AV2.js → cspell-5C2GLYVK.js} +1 -1
- package/dist/{css-K2PUBHGV.js → css-6KBCDONZ.js} +1 -1
- package/dist/{css-in-js-GTA2LHAS.js → css-in-js-UQM27UJJ.js} +1 -1
- package/dist/{cypress-5CRB2EVZ.js → cypress-IPWBSGU7.js} +19 -7
- package/dist/{de-morgan-EVAJLFLN.js → de-morgan-XO5VE44N.js} +1 -1
- package/dist/{depend-WMT2DNBE.js → depend-PKDGMMUG.js} +2 -2
- package/dist/{ember-XNDVSVMW.js → ember-4C3RO2SE.js} +13 -4
- package/dist/{erasable-syntax-only-3ZGKZG2Y.js → erasable-syntax-only-WSFG4SIR.js} +1 -1
- package/dist/es-EBOG23MQ.js +7 -0
- package/dist/{eslint-comments-LSJGHPAT.js → eslint-comments-P73CTRCL.js} +1 -1
- package/dist/{eslint-plugin-QVG2TUYI.js → eslint-plugin-D6HTOH3A.js} +2 -2
- package/dist/{file-progress-GA5UVAFL.js → file-progress-7BZJBF65.js} +1 -1
- package/dist/{graphql-Y3GP4RSW.js → graphql-AA47YBWW.js} +2 -2
- package/dist/{html-2LZCCDSJ.js → html-KHPRNGDF.js} +1 -1
- package/dist/{import-JKJEXXRN.js → import-DL5R22Z4.js} +2 -4
- package/dist/index.d.ts +2915 -2598
- package/dist/index.js +102 -78
- package/dist/{jest-UC5PGGEN.js → jest-26GMNXUV.js} +24 -9
- package/dist/{js-5UH3NGDX.js → js-WDPLPUR2.js} +1 -1
- package/dist/{js-inline-VMYM3333.js → js-inline-RQAPWNV7.js} +2 -2
- package/dist/{jsdoc-XQ7YUVBB.js → jsdoc-OW6YBAZ7.js} +1 -1
- package/dist/{json-schema-validator-SRV2P3LS.js → json-schema-validator-FPJQLCEX.js} +2 -2
- package/dist/{jsonc-LUQEOPNC.js → jsonc-LXGQJNEA.js} +2 -2
- package/dist/{chunk-GO7MMWHS.js → jsx-a11y-J3V72ZWA.js} +20 -17
- package/dist/lit-ZEBL3QEF.js +50 -0
- package/dist/{markdown-MIG33O3R.js → markdown-KQMEKWD3.js} +2 -2
- package/dist/{math-QZYES46G.js → math-TQ3JAE5E.js} +1 -1
- package/dist/{mdx-IWT5PWWF.js → mdx-WOGC72GD.js} +3 -3
- package/dist/mocha-LFHKV2ES.js +69 -0
- package/dist/{nextjs-QGM7WKYQ.js → nextjs-7AA7VH77.js} +1 -1
- package/dist/no-only-tests-3UHK5YXG.js +30 -0
- package/dist/{no-stylistic-rules-BWQTLVLB.js → no-stylistic-rules-IAGZ5LEW.js} +292 -9
- package/dist/{no-unsanitized-ER43QAPL.js → no-unsanitized-WJOWSP2Z.js} +1 -1
- package/dist/{node-LUHYO23M.js → node-4ZM6SI3Z.js} +1 -1
- package/dist/{node-dependencies-FFKJMC3C.js → node-dependencies-UKZKNVLP.js} +2 -2
- package/dist/{package-json-VYOULPKH.js → package-json-4NOOWLWU.js} +2 -2
- package/dist/{perfectionist-P3XEX3HM.js → perfectionist-VV52KH64.js} +1 -1
- package/dist/{playwright-52UXXGAB.js → playwright-X2HAGPCF.js} +17 -5
- package/dist/{pnpm-B76QORQA.js → pnpm-JUBZ3QHS.js} +1 -1
- package/dist/{prefer-arrow-functions-Q4EDP75Z.js → prefer-arrow-functions-BGJHQHVQ.js} +1 -1
- package/dist/{promise-MDDD2VYP.js → promise-VOXHPR42.js} +1 -1
- package/dist/{qwik-EBJPRYUD.js → qwik-F7FNWCPF.js} +1 -1
- package/dist/{react-B6OLMQID.js → react-CWAVRAO3.js} +25 -8
- package/dist/{regexp-OMAUDAOO.js → regexp-2KU7EK6D.js} +1 -1
- package/dist/{security-TMFVZUYG.js → security-FQMZHJUR.js} +1 -1
- package/dist/{solid-Z62RKQ24.js → solid-KVLRVYIP.js} +1 -1
- package/dist/{sonar-LQQ46WPQ.js → sonar-ALONXKPU.js} +1 -1
- package/dist/{storybook-7WCQSNPB.js → storybook-IYPHDH3R.js} +1 -1
- package/dist/{svelte-DY32R35W.js → svelte-MNVTGZSQ.js} +3 -3
- package/dist/{tailwind-IYPSDCLO.js → tailwind-UDEDVTHD.js} +1 -1
- package/dist/{tanstack-query-63L5GIG3.js → tanstack-query-4SOEPLVI.js} +1 -1
- package/dist/{testing-library-HBVOALXF.js → testing-library-PQ3MPTVA.js} +22 -11
- package/dist/{toml-QZU7PK67.js → toml-DW546URM.js} +2 -2
- package/dist/{ts-ICG5SNIV.js → ts-SWTKLVKH.js} +3 -3
- package/dist/{turbo-4ADNRCUD.js → turbo-LH2IHVFI.js} +1 -1
- package/dist/{unicorn-OJ2I5WHC.js → unicorn-LPEDLOPK.js} +1 -1
- package/dist/{unused-imports-KNNR5LJU.js → unused-imports-MZESLGI2.js} +1 -1
- package/dist/{vitest-JHMNUUHD.js → vitest-SXGJSYYS.js} +26 -8
- package/dist/{vue-IQWNEI5Y.js → vue-INAUPVPW.js} +6 -3
- package/dist/{yaml-GL7VFXV7.js → yaml-EXZLKD4O.js} +2 -2
- package/dist/you-dont-need-lodash-underscore-YUUG6WN5.js +27 -0
- package/package.json +119 -44
- package/dist/es-Z4WHE2MW.js +0 -7
- package/dist/jsx-a11y-CL6PXHYJ.js +0 -7
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ and many more;
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
33
33
|
Minimum supported versions:
|
|
34
|
-
- NodeJS: ^20.
|
|
34
|
+
- NodeJS: ^20.12 or >=21.7
|
|
35
35
|
- ESLint: ^9.15.0 (peer dependency)
|
|
36
36
|
|
|
37
37
|
```shell
|
|
@@ -57,33 +57,43 @@ yarn add -D https://registry.npmjs.org/eslint-config-un/-/eslint-config-un-<VERS
|
|
|
57
57
|
<details>
|
|
58
58
|
<summary>List of optional peer dependencies</summary>
|
|
59
59
|
|
|
60
|
-
| Default plugin prefix
|
|
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
|
-
| `
|
|
60
|
+
| Default plugin prefix | Package name |
|
|
61
|
+
| ------------------------ | -------------------------------------- |
|
|
62
|
+
| `@cspell` | `@cspell/eslint-plugin` |
|
|
63
|
+
| `@eslint-react` | `@eslint-react/eslint-plugin` |
|
|
64
|
+
| `@next/next` | `@next/eslint-plugin-next` |
|
|
65
|
+
| `@tanstack/query` | `@tanstack/eslint-plugin-query` |
|
|
66
|
+
| `astro` | `eslint-plugin-astro` |
|
|
67
|
+
| `ava` | `eslint-plugin-ava` |
|
|
68
|
+
| `better-tailwindcss` | `eslint-plugin-better-tailwindcss` |
|
|
69
|
+
| `case-police` | `eslint-plugin-case-police` |
|
|
70
|
+
| `de-morgan` | `eslint-plugin-de-morgan` |
|
|
71
|
+
| `ember` | `eslint-plugin-ember` |
|
|
72
|
+
| `erasable-syntax-only` | `eslint-plugin-erasable-syntax-only` |
|
|
73
|
+
| `es` | `eslint-plugin-es-x` |
|
|
74
|
+
| `eslint-plugin` | `eslint-plugin-eslint-plugin` |
|
|
75
|
+
| `graphql` | `@graphql-eslint/eslint-plugin` |
|
|
76
|
+
| `jest-extended` | `eslint-plugin-jest-extended` |
|
|
77
|
+
| `jest` | `eslint-plugin-jest` |
|
|
78
|
+
| `perfectionist` | `eslint-plugin-perfectionist` |
|
|
79
|
+
| `pinia` | `eslint-plugin-pinia` |
|
|
80
|
+
| `playwright` | `eslint-plugin-playwright` |
|
|
81
|
+
| `pnpm` | `eslint-plugin-pnpm` |
|
|
82
|
+
| `prefer-arrow-functions` | `eslint-plugin-prefer-arrow-functions` |
|
|
83
|
+
| `qwik` | `eslint-plugin-qwik` |
|
|
84
|
+
| `react-compiler` | `eslint-plugin-react-compiler` |
|
|
85
|
+
| `react-hooks` | `eslint-plugin-react-hooks` |
|
|
86
|
+
| `react-refresh` | `eslint-plugin-react-refresh` |
|
|
87
|
+
| `react` | `eslint-plugin-react` |
|
|
88
|
+
| `solid` | `eslint-plugin-solid` |
|
|
89
|
+
| `storybook` | `eslint-plugin-storybook` |
|
|
90
|
+
| `svelte` | `eslint-plugin-svelte` |
|
|
91
|
+
| `tailwindcss` | `eslint-plugin-tailwindcss` |
|
|
92
|
+
| `testing-library` | `eslint-plugin-testing-library` |
|
|
93
|
+
| `turbo` | `eslint-plugin-turbo` |
|
|
94
|
+
| `vitest` | `@vitest/eslint-plugin` |
|
|
95
|
+
| `vue` | `eslint-plugin-vue` |
|
|
96
|
+
| `vuejs-accessibility` | `eslint-plugin-vuejs-accessibility` |
|
|
87
97
|
</details>
|
|
88
98
|
|
|
89
99
|
### Usage
|
|
@@ -189,6 +199,7 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
189
199
|
|  `react/dom` | ✅ (`react-dom` is installed) | [@eslint-react/eslint-plugin](https://npmjs.com/package/@eslint-react/eslint-plugin) (`@eslint-react`)<br>[eslint-plugin-react](https://npmjs.com/eslint-plugin-react) | Includes rules with `@eslint-react/dom` prefix from `@eslint-react/eslint-plugin` and DOM related rules from `eslint-plugin-react` |
|
|
190
200
|
|  `react/refresh` | ✅ | [eslint-plugin-react-refresh](https://npmjs.com/eslint-plugin-react-refresh) (`react-refresh`) | - |
|
|
191
201
|
|  `react/compiler` | ✅ (if React version is at least 19) | [eslint-plugin-react-compiler](https://npmjs.com/eslint-plugin-react-compiler) (`react-compiler`) | - |
|
|
202
|
+
|  `react/youMightNotNeedAnEffect` | ✅ | [eslint-plugin-react-you-might-not-need-an-effect](https://npmjs.com/eslint-plugin-react-you-might-not-need-an-effect) (`react-you-might-not-need-an-effect`) | Since v1.0.0 |
|
|
192
203
|
|  `react/allowDefaultExportsInJsxFiles` | ✅ | - | Config that allows default exports in all JSX files |
|
|
193
204
|
|  `nextJs` | ✅ (`next` is installed) | [@next/eslint-plugin-next](https://npmjs.com/package/@next/eslint-plugin-next) (`@next/next`) | Since v0.9.0 |
|
|
194
205
|
|  `solid` | ✅ (`solid-js` is installed) | [eslint-plugin-solid](https://npmjs.com/eslint-plugin-solid) (`solid`) | Since v0.10.0 |
|
|
@@ -197,6 +208,10 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
197
208
|
|  `astro/jsxA11y` | ✅ | ^ | Only A11Y rules from `eslint-plugin-astro` |
|
|
198
209
|
|  `svelte` | ✅ (`svelte` is installed) | [eslint-plugin-svelte](https://npmjs.com/eslint-plugin-svelte) (`svelte`) | Since v0.10.0 |
|
|
199
210
|
|  `ember` | ✅ (`ember-source` is installed) | [eslint-plugin-ember](https://npmjs.com/eslint-plugin-ember) (`ember`) | Since v1.0.0 |
|
|
211
|
+
|  `ember/testFiles` | ✅ | ^ | Since v1.0.0 |
|
|
212
|
+
|  `ember/testFiles/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
213
|
+
|  `lit` | ✅ (`lit` is installed) | [eslint-plugin-lit](https://npmjs.com/eslint-plugin-lit) (`lit`) | Since v1.0.0 |
|
|
214
|
+
|  `lit/a11y` | ✅ | [eslint-plugin-lit-a11y](https://npmjs.com/eslint-plugin-lit-a11y) (`lit-a11y`) | Since v1.0.0 |
|
|
200
215
|
|  `betterTailwind` | ✅ (`tailwindcss` is installed) | [eslint-plugin-better-tailwindcss](https://npmjs.com/eslint-plugin-better-tailwindcss) (`better-tailwindcss`) | Since v1.0.0<br>Supports v4 and v3 |
|
|
201
216
|
|  `tailwind` | ❌ | [eslint-plugin-tailwindcss](https://npmjs.com/eslint-plugin-tailwindcss) (`tailwindcss`) | Only supports v3 |
|
|
202
217
|
|
|
@@ -251,19 +266,34 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
251
266
|
|
|
252
267
|
### Libraries
|
|
253
268
|
|
|
254
|
-
| Un config name | Enabled by default?<br>(optional condition)
|
|
255
|
-
| -------------- |
|
|
256
|
-
| `jest`
|
|
257
|
-
| `jest/extended`
|
|
258
|
-
| `jest/typescript`
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
|
|
|
262
|
-
| `
|
|
263
|
-
|
|
|
264
|
-
|  (`jest`) | Since v0.3.0 |
|
|
272
|
+
| `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
|
|
273
|
+
| `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
|
|
274
|
+
| `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
275
|
+
| `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
|
|
276
|
+
| `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
277
|
+
| `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
|
|
278
|
+
| `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
279
|
+
|  `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
|
|
280
|
+
|  `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
|
|
281
|
+
|  `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
|
|
282
|
+
|  `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
|
|
283
|
+
|  `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
|
|
284
|
+
|  `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
|
|
285
|
+
|  `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
286
|
+
| `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
287
|
+
| `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
|
|
288
|
+
|  `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
|
|
289
|
+
|  `cypress` | ✅ (`cypress` is installed) | [eslint-plugin-cypress](https://npmjs.com/eslint-plugin-cypress) (`cypress`) | Since v1.0.0 |
|
|
290
|
+
|  `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
291
|
+
|  `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
|
|
292
|
+
|  `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
293
|
+
|  `turbo` | ✅ (`turbo` is installed) | [eslint-plugin-turbo](https://npmjs.com/eslint-plugin-turbo) (`turbo`) | Since v1.0.0 |
|
|
294
|
+
|  `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
|
|
295
|
+
|  `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests](https://npmjs.com/eslint-plugin-no-only-tests) (`no-only-tests`) | Since v1.0.0 |
|
|
296
|
+
|  `youDontNeedLodashUnderscore` | ✅ (`lodash`, `lodash-es` or `lodash.*` is installed) | [eslint-plugin-you-dont-need-lodash-underscore](https://npmjs.com/eslint-plugin-you-dont-need-lodash-underscore) (`you-dont-need-lodash-underscore`) | Since v1.0.0 |
|
|
267
297
|
|
|
268
298
|
### Miscellaneous
|
|
269
299
|
|
|
@@ -275,6 +305,7 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
275
305
|
|  `cspell` | ❌ | [@cspell/eslint-plugin](https://npmjs.com/package/@cspell/eslint-plugin) (`@cspell`) | Since v1.0.0 |
|
|
276
306
|
|  `eslintPlugin` | ❌ | [eslint-plugin-eslint-plugin](https://npmjs.com/eslint-plugin-eslint-plugin) (`eslint-plugin`) | Since v1.0.0<br>For linting ESLint plugins |
|
|
277
307
|
| `fileProgress` | ❌ | [eslint-plugin-file-progress](https://npmjs.com/eslint-plugin-file-progress) (`file-progress`) | Since v1.0.0<br>An ESlint plugin to print file progress |
|
|
308
|
+
| `compat` | ❌ | [eslint-plugin-compat](https://npmjs.com/eslint-plugin-compat) (`compat`) | Since v1.0.0 |
|
|
278
309
|
|
|
279
310
|
## How to use
|
|
280
311
|
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
defu,
|
|
9
9
|
interopDefault,
|
|
10
10
|
klona
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-T6VV7MSS.js";
|
|
12
12
|
|
|
13
13
|
// src/configs/angular.ts
|
|
14
14
|
import angularTemplateParser from "@angular-eslint/template-parser";
|
|
@@ -82,11 +82,11 @@ Object.entries(RULES_AVAILABILITY).forEach(([oldName, [, newName]]) => {
|
|
|
82
82
|
oldRuleNames.set(newName, [...oldRuleNames.get(newName) || [], oldName]);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
|
-
var generateAngularPlugins = async (configOptions, installedVersion) => {
|
|
85
|
+
var generateAngularPlugins = async (context, configOptions, installedVersion) => {
|
|
86
86
|
const latestPlugins = PACKAGES_FOR_SUPPORTED_ANGULAR_VERSIONS[LATEST_SUPPORTED_ANGULAR_VERSION];
|
|
87
87
|
const [latestPlugin, latestPluginTemplate] = await Promise.all([
|
|
88
|
-
latestPlugins.plugin(),
|
|
89
|
-
latestPlugins.pluginTemplate()
|
|
88
|
+
context.rootOptions.pluginsOverrides?.["@angular-eslint"] || latestPlugins.plugin(),
|
|
89
|
+
context.rootOptions.pluginsOverrides?.["@angular-eslint/template"] || latestPlugins.pluginTemplate()
|
|
90
90
|
]);
|
|
91
91
|
const pluginGeneral = {
|
|
92
92
|
...latestPlugin,
|
|
@@ -206,7 +206,7 @@ var angularUnConfig = async (context) => {
|
|
|
206
206
|
extractInlineHtmlProcessorLatest,
|
|
207
207
|
extractInlineHtmlProcessorV17
|
|
208
208
|
] = await Promise.all([
|
|
209
|
-
generateAngularPlugins(optionsResolved, angularVersion),
|
|
209
|
+
generateAngularPlugins(context, optionsResolved, angularVersion),
|
|
210
210
|
// Since v18, the processor uses `getDecorators` from `typescript` which does not exist prior to
|
|
211
211
|
// v4.8 of `typescript`, which might be used in older projects
|
|
212
212
|
interopDefault(import("@angular-eslint/eslint-plugin-template")).then(
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
jsxA11yUnConfig
|
|
3
|
-
} from "./chunk-GO7MMWHS.js";
|
|
4
1
|
import {
|
|
5
2
|
ERROR,
|
|
6
3
|
GLOB_ASTRO,
|
|
@@ -10,13 +7,13 @@ import {
|
|
|
10
7
|
defu,
|
|
11
8
|
interopDefault,
|
|
12
9
|
pluginsLoaders
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T6VV7MSS.js";
|
|
14
11
|
|
|
15
12
|
// src/configs/astro.ts
|
|
16
13
|
var DEFAULT_ASTRO_FILES = [GLOB_ASTRO];
|
|
17
14
|
var astroUnConfig = async (context) => {
|
|
18
15
|
const [eslintPluginAstro, astroEslintParser, { parser: typescriptEslintParser }] = await Promise.all([
|
|
19
|
-
pluginsLoaders.astro(context).then(({
|
|
16
|
+
pluginsLoaders.astro(context).then(({ module }) => module),
|
|
20
17
|
interopDefault(import("astro-eslint-parser")),
|
|
21
18
|
interopDefault(import("typescript-eslint"))
|
|
22
19
|
]);
|
|
@@ -61,18 +58,21 @@ var astroUnConfig = async (context) => {
|
|
|
61
58
|
filesFallback: DEFAULT_ASTRO_FILES
|
|
62
59
|
}
|
|
63
60
|
]).addRule("missing-client-only-directive-value", ERROR).addRule("no-conflict-set-directives", ERROR).addRule("no-deprecated-astro-canonicalurl", ERROR).addRule("no-deprecated-astro-fetchcontent", ERROR).addRule("no-deprecated-astro-resolve", ERROR).addRule("no-deprecated-getentrybyslug", ERROR).addRule("no-exports-from-components", ERROR).addRule("no-unused-define-vars-in-style", ERROR).addRule("valid-compile", ERROR).addRule("no-set-html-directive", ERROR).addRule("no-set-text-directive", OFF).addRule("no-unused-css-selector", WARNING).addRule("prefer-class-list-directive", ERROR).addRule("prefer-object-class-list", ERROR).addRule("prefer-split-class-list", ERROR).addRule("sort-attributes", ERROR).addRule("semi", OFF).addOverrides();
|
|
64
|
-
const optionsA11y = typeof configJsxA11y === "object" ? configJsxA11y : {};
|
|
65
61
|
return {
|
|
66
62
|
configs: [
|
|
67
63
|
configBuilder,
|
|
68
|
-
...configJsxA11y === false ? [] :
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
...configJsxA11y === false ? [] : await (async () => {
|
|
65
|
+
const { jsxA11yUnConfig } = await import("./jsx-a11y-J3V72ZWA.js");
|
|
66
|
+
const result = await jsxA11yUnConfig(context, {
|
|
67
|
+
prefix: "astro",
|
|
68
|
+
options: {
|
|
69
|
+
files: parentConfigFiles,
|
|
70
|
+
ignores: parentConfigIgnores,
|
|
71
|
+
...typeof configJsxA11y === "object" && configJsxA11y
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return result?.configs || [];
|
|
75
|
+
})()
|
|
76
76
|
],
|
|
77
77
|
optionsResolved
|
|
78
78
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RULES_TO_DISABLE_IN_TEST_FILES,
|
|
3
|
+
generateConfigNoOnlyTestsBuilder,
|
|
3
4
|
generateDefaultTestFiles
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-P5U53E6S.js";
|
|
5
6
|
import {
|
|
6
7
|
ERROR,
|
|
7
8
|
GLOB_JS_TS_X_EXTENSION,
|
|
@@ -9,19 +10,23 @@ import {
|
|
|
9
10
|
WARNING,
|
|
10
11
|
createConfigBuilder,
|
|
11
12
|
defu
|
|
12
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-T6VV7MSS.js";
|
|
13
14
|
|
|
14
15
|
// src/configs/ava.ts
|
|
15
16
|
var avaUnConfig = (context) => {
|
|
16
17
|
const optionsRaw = context.rootOptions.configs?.ava;
|
|
17
|
-
const optionsResolved = defu(optionsRaw, {
|
|
18
|
-
|
|
18
|
+
const optionsResolved = defu(optionsRaw, {
|
|
19
|
+
configNoOnlyTests: false
|
|
20
|
+
// has `no-only-test` rule
|
|
21
|
+
});
|
|
22
|
+
const { configNoOnlyTests, enforceAssertionMessage, enforceMaxAssertions } = optionsResolved;
|
|
19
23
|
const configBuilder = createConfigBuilder(context, optionsResolved, "ava");
|
|
24
|
+
const configFilesFallback = generateDefaultTestFiles(GLOB_JS_TS_X_EXTENSION);
|
|
20
25
|
configBuilder?.addConfig([
|
|
21
26
|
"ava",
|
|
22
27
|
{
|
|
23
28
|
includeDefaultFilesAndIgnores: true,
|
|
24
|
-
filesFallback:
|
|
29
|
+
filesFallback: configFilesFallback
|
|
25
30
|
}
|
|
26
31
|
]).addRule(
|
|
27
32
|
"assertion-arguments",
|
|
@@ -32,8 +37,15 @@ var avaUnConfig = (context) => {
|
|
|
32
37
|
enforceMaxAssertions == null ? OFF : ERROR,
|
|
33
38
|
enforceMaxAssertions == null ? [] : [enforceMaxAssertions]
|
|
34
39
|
).addRule("no-async-fn-without-await", ERROR).addRule("no-duplicate-modifiers", ERROR).addRule("no-identical-title", ERROR).addRule("no-ignored-test-files", ERROR).addRule("no-import-test-files", ERROR).addRule("no-incorrect-deep-equal", ERROR).addRule("no-inline-assertions", ERROR).addRule("no-nested-tests", ERROR).addRule("no-only-test", ERROR).addRule("no-skip-assert", ERROR).addRule("no-skip-test", ERROR).addRule("no-todo-implementation", ERROR).addRule("no-todo-test", WARNING).addRule("no-unknown-modifiers", ERROR).addRule("prefer-async-await", ERROR).addRule("prefer-power-assert", OFF).addRule("prefer-t-regex", ERROR).addRule("test-title", ERROR).addRule("test-title-format", OFF).addRule("use-t", ERROR).addRule("use-t-throws-async-well", ERROR).addRule("use-t-well", ERROR).addRule("use-test", ERROR).addRule("use-true-false", ERROR).disableBulkRules(RULES_TO_DISABLE_IN_TEST_FILES).addOverrides();
|
|
40
|
+
const configBuilderNoOnlyTests = generateConfigNoOnlyTestsBuilder(
|
|
41
|
+
context,
|
|
42
|
+
"ava",
|
|
43
|
+
configNoOnlyTests,
|
|
44
|
+
optionsResolved,
|
|
45
|
+
{ filesFallback: configFilesFallback }
|
|
46
|
+
);
|
|
35
47
|
return {
|
|
36
|
-
configs: [configBuilder],
|
|
48
|
+
configs: [configBuilder, configBuilderNoOnlyTests],
|
|
37
49
|
optionsResolved
|
|
38
50
|
};
|
|
39
51
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ERROR,
|
|
2
3
|
GLOB_JSON,
|
|
3
4
|
GLOB_JSON5,
|
|
4
5
|
GLOB_JSONC,
|
|
5
6
|
GLOB_TOML,
|
|
6
|
-
GLOB_YAML
|
|
7
|
-
|
|
7
|
+
GLOB_YAML,
|
|
8
|
+
createConfigBuilder,
|
|
9
|
+
pick
|
|
10
|
+
} from "./chunk-T6VV7MSS.js";
|
|
8
11
|
|
|
9
12
|
// src/configs/shared.ts
|
|
10
13
|
var generateDefaultTestFiles = (extensions, { includeCypressTests } = {}) => [
|
|
@@ -22,6 +25,26 @@ var generateDefaultTestFiles = (extensions, { includeCypressTests } = {}) => [
|
|
|
22
25
|
// 14k
|
|
23
26
|
...includeCypressTests ? [`**/*.cy.${extensions}`] : []
|
|
24
27
|
];
|
|
28
|
+
var generateConfigNoOnlyTestsBuilder = (context, prefix, configNoOnlyTests, parentConfig, {
|
|
29
|
+
filesFallback
|
|
30
|
+
} = {}) => {
|
|
31
|
+
const configBuilderNoOnlyTests = createConfigBuilder(
|
|
32
|
+
context,
|
|
33
|
+
configNoOnlyTests ? {
|
|
34
|
+
...typeof parentConfig === "object" && pick(parentConfig, ["files", "ignores"]),
|
|
35
|
+
...typeof configNoOnlyTests === "object" && configNoOnlyTests
|
|
36
|
+
} : configNoOnlyTests,
|
|
37
|
+
"no-only-tests"
|
|
38
|
+
);
|
|
39
|
+
configBuilderNoOnlyTests?.addConfig([
|
|
40
|
+
`${prefix}/no-only-tests`,
|
|
41
|
+
{
|
|
42
|
+
includeDefaultFilesAndIgnores: true,
|
|
43
|
+
filesFallback
|
|
44
|
+
}
|
|
45
|
+
]).addRule("no-only-tests", ERROR).addOverrides();
|
|
46
|
+
return configBuilderNoOnlyTests;
|
|
47
|
+
};
|
|
25
48
|
var RULES_TO_DISABLE_IN_TEST_FILES = [
|
|
26
49
|
"no-empty-function",
|
|
27
50
|
"sonarjs/no-hardcoded-ip",
|
|
@@ -257,6 +280,7 @@ var RULES_TO_DISABLE_IN_EMBEDDED_CODE_BLOCKS = [
|
|
|
257
280
|
|
|
258
281
|
export {
|
|
259
282
|
generateDefaultTestFiles,
|
|
283
|
+
generateConfigNoOnlyTestsBuilder,
|
|
260
284
|
RULES_TO_DISABLE_IN_TEST_FILES,
|
|
261
285
|
generateConsistentTestItOptions,
|
|
262
286
|
noRestrictedHtmlElementsDefault,
|