eslint-config-un 1.0.0-alpha.36 → 1.0.0-alpha.38
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 +69 -36
- package/dist/angular-mGVsrvRz.js +94 -0
- package/dist/astro-CR8hgzS7.js +50 -0
- package/dist/{ava-DreLHOLx.js → ava-KsCRqNrF.js} +6 -7
- package/dist/better-tailwind-C399FWfl.js +20 -0
- package/dist/case-police-WimUhNdF.js +21 -0
- package/dist/{cli-_yK7iRl-.js → cli-DI46UyPP.js} +5 -6
- package/dist/{cloudfront-functions-DvOhHtgd.js → cloudfront-functions-CxWs7x0V.js} +10 -11
- package/dist/{compat-BtbMyX3f.js → compat-DtsSKlen.js} +6 -7
- package/dist/configs-RfHo5xBa.js +2166 -0
- package/dist/{cspell-BpkxOwTq.js → cspell-XJxH7frL.js} +6 -7
- package/dist/css-B8goexwM.js +45 -0
- package/dist/{css-in-js-DkC3kse4.js → css-in-js-CCSC_7Gj.js} +6 -7
- package/dist/{cypress-CLlFm0ko.js → cypress-D7urRpxR.js} +7 -8
- package/dist/{de-morgan-BW2U7Ku5.js → de-morgan-DhlqJEsf.js} +6 -7
- package/dist/depend-w0xnGOnN.js +21 -0
- package/dist/ember-Dx8qA0LA.js +55 -0
- package/dist/{erasable-syntax-only-DDAVipmW.js → erasable-syntax-only-n8oXPBwX.js} +6 -7
- package/dist/es-DXEzrW-x.js +49 -0
- package/dist/es-IiUtARPJ.js +4 -0
- package/dist/eslint-comments-BDMvx-cU.js +20 -0
- package/dist/{eslint-plugin-Da16pXvO.js → eslint-plugin-CKdXCr8k.js} +17 -10
- package/dist/file-progress-C9MKNe5f.js +19 -0
- package/dist/{graphql-DA8HMTyV.js → graphql-CKZkMZWj.js} +11 -14
- package/dist/{header-BNiYAljk.js → header-DHZERpZJ.js} +6 -7
- package/dist/{headers-CusVicoU.js → headers-BwFZmorW.js} +6 -7
- package/dist/html-CglAfdUo.js +28 -0
- package/dist/import-BjNbesLQ.js +75 -0
- package/dist/{import-zod-CLw5Xfvt.js → import-zod-CohavluR.js} +5 -6
- package/dist/index.d.ts +4205 -1802
- package/dist/index.js +704 -450
- package/dist/{jest-Bwh2ArC-.js → jest-BU3Yy2sz.js} +14 -14
- package/dist/js-B7He-jVI.js +94 -0
- package/dist/{js-inline-QqJCyCET.js → js-inline-CprZ8AQL.js} +5 -6
- package/dist/{jsdoc-nM_sgD2J.js → jsdoc-Dpt3QMLN.js} +9 -10
- package/dist/{json-schema-validator-Cs1WHsB6.js → json-schema-validator-CvgoU3L1.js} +11 -10
- package/dist/jsonc-BHi3oAX4.js +55 -0
- package/dist/{jsx-a11y-BqvZ3ccE.js → jsx-a11y-CguMk4CG.js} +10 -10
- package/dist/{lit-D3aAAvLF.js → lit-DZWXaYJI.js} +9 -10
- package/dist/{markdown-2fLLdw1p.js → markdown-BWErGd1o.js} +11 -12
- package/dist/{markdown-links-DvJesRgN.js → markdown-links-Crm-xgH5.js} +6 -7
- package/dist/markdown-preferences-B87iSKhU.js +35 -0
- package/dist/{math-BoFUb91Y.js → math-BCqPSur7.js} +6 -7
- package/dist/{mdx-CJYad7qz.js → mdx-c24ASicF.js} +12 -16
- package/dist/{mocha-BWKV8_Cq.js → mocha-D4RQd2MX.js} +7 -8
- package/dist/{nextjs-C2e--hxE.js → nextjs-ClAflQxk.js} +6 -7
- package/dist/no-only-tests-E6-Z4iU8.js +19 -0
- package/dist/{no-stylistic-rules-D8BzTWIM.js → no-stylistic-rules-C8rrXF9p.js} +108 -55
- package/dist/no-unsanitized-B27DMMhQ.js +15 -0
- package/dist/{node-DguED0PI.js → node-BaZsrX0F.js} +8 -9
- package/dist/node-dependencies-5Jn5jKIS.js +24 -0
- package/dist/nx-DVpRfWkP.js +25 -0
- package/dist/package-json-B6e1xOeN.js +4 -0
- package/dist/package-json-Da0OdriF.js +47 -0
- package/dist/{perfectionist-D_1UbAhF.js → perfectionist-CFITt1ua.js} +7 -8
- package/dist/{playwright-Cr9UG4_j.js → playwright-DASzFsKT.js} +7 -8
- package/dist/pnpm-e_MIFnGE.js +38 -0
- package/dist/prefer-arrow-functions-0TJ_wb32.js +18 -0
- package/dist/{promise-D0sojRgq.js → promise-kmbJB4AZ.js} +6 -7
- package/dist/{qunit-CtigC5Pu.js → qunit-BJ5VJw5Q.js} +7 -8
- package/dist/qwik-Cd893DWy.js +22 -0
- package/dist/{react-DqKzxQZS.js → react-BhSvHPxE.js} +51 -24
- package/dist/regexp-Cg7txBtY.js +18 -0
- package/dist/{rxjs-D9jpGH1g.js → rxjs-4HP9fWoy.js} +10 -8
- package/dist/{security-BFP8yIsL.js → security-BeQYk3IA.js} +6 -7
- package/dist/{shared-B8FN-ISh.js → shared-BtRqB0mx.js} +3 -3
- package/dist/{solid-DIFF3F5p.js → solid-D4Hoh1QJ.js} +6 -7
- package/dist/sonar-Bgk8zPBt.js +27 -0
- package/dist/{storybook-CblTQI6e.js → storybook-gYujx3h9.js} +6 -7
- package/dist/{svelte-vPvfew-m.js → svelte-BtA-_1P4.js} +14 -14
- package/dist/{tailwind-BluUAa-E.js → tailwind-D0qMB6lg.js} +6 -7
- package/dist/{tanstack-query-CJkDdy0h.js → tanstack-query-_pnMePzH.js} +6 -7
- package/dist/{testing-library-DG7nUZoF.js → testing-library-DuV3Nkpq.js} +7 -8
- package/dist/{toml-DTVv8SYb.js → toml-BP1Yx_h4.js} +8 -9
- package/dist/{ts-BrmzTWl5.js → ts-BzrDeXXM.js} +81 -21
- package/dist/turbo-Bacqlvkh.js +16 -0
- package/dist/un-DbLKjoD6.js +18 -0
- package/dist/{unicorn-BoqaXv0f.js → unicorn-CSzCGnyY.js} +10 -10
- package/dist/unnecessary-abstractions-O-U24Nck.js +15 -0
- package/dist/{unocss-5lI3L9iD.js → unocss-BkmTkBc0.js} +6 -7
- package/dist/unused-imports-BsoBUkOW.js +19 -0
- package/dist/vitest-DEeAzA2y.js +50 -0
- package/dist/{vue-LmR3I7MP.js → vue-BQRrnvLf.js} +40 -39
- package/dist/web-components-CRrxbPFE.js +16 -0
- package/dist/yaml-BQWFLo7Z.js +28 -0
- package/dist/{you-dont-need-lodash-underscore-ASlNGdMX.js → you-dont-need-lodash-underscore-CcdDFa8U.js} +6 -7
- package/dist/zod-BF6qCIqj.js +21 -0
- package/package.json +100 -84
- package/dist/angular-DzhwP92O.js +0 -101
- package/dist/astro-coGZNASs.js +0 -51
- package/dist/better-tailwind-Yw9Fz_cv.js +0 -21
- package/dist/case-police-CDbI1qs1.js +0 -22
- package/dist/css-BOhwpUyF.js +0 -41
- package/dist/depend-CCkNflFY.js +0 -22
- package/dist/ember-AncvdIrz.js +0 -39
- package/dist/es-BOe6HbuO.js +0 -4
- package/dist/es-DiWvAGZU.js +0 -49
- package/dist/eslint-C09-ESBh.js +0 -870
- package/dist/eslint-comments-Do4NBnd2.js +0 -21
- package/dist/file-progress-BLRSYU3l.js +0 -17
- package/dist/html-Dq7pDxiy.js +0 -32
- package/dist/import-Cus22Qtl.js +0 -64
- package/dist/js-BPesuRlu.js +0 -95
- package/dist/jsonc-BTx2EnNQ.js +0 -56
- package/dist/markdown-preferences-Dd6CGbOh.js +0 -36
- package/dist/no-only-tests-AJXjVOzi.js +0 -20
- package/dist/no-unsanitized-BZuSyi0V.js +0 -16
- package/dist/node-dependencies-CNDpqNB7.js +0 -25
- package/dist/nx-ljRTXR9W.js +0 -26
- package/dist/package-json-B3fpV6uj.js +0 -4
- package/dist/package-json-CijIanli.js +0 -51
- package/dist/pnpm-mT2qacx0.js +0 -35
- package/dist/prefer-arrow-functions-Cmr2ptQj.js +0 -19
- package/dist/qwik-CetgdI_s.js +0 -23
- package/dist/regexp-D_10T-b1.js +0 -19
- package/dist/sonar-C6aMVO4J.js +0 -28
- package/dist/turbo-DPmUW0Eg.js +0 -17
- package/dist/un-D27-M8OP.js +0 -19
- package/dist/unnecessary-abstractions-Bfrh90NP.js +0 -16
- package/dist/unused-imports-BnCW-ea5.js +0 -20
- package/dist/vitest-wiVRj0Im.js +0 -41
- package/dist/web-components-CXJ_lrfQ.js +0 -17
- package/dist/yaml-DH_Ir0tC.js +0 -29
- /package/dist/{plugin-un-DvQbZcjO.js → plugin-un-DHcXaIGK.js} +0 -0
package/README.md
CHANGED
|
@@ -188,7 +188,7 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
188
188
|
| 🦄 `unicorn` | ✅ | [eslint-plugin-unicorn](https://npmjs.com/eslint-plugin-unicorn) (`unicorn`) | - |
|
|
189
189
|
| ⭐ `regexp` | ✅ | [eslint-plugin-regexp](https://npmjs.com/eslint-plugin-regexp) (`regexp`) | - |
|
|
190
190
|
| `promise` | ✅ | [eslint-plugin-promise](https://npmjs.com/eslint-plugin-promise) (`promise`) | - |
|
|
191
|
-
| `import` | ✅ | [eslint-plugin-import-x]
|
|
191
|
+
| `import` | ✅ | [eslint-plugin-import-x] (`import`) | - |
|
|
192
192
|
| `sonarjs` | ✅ | [eslint-plugin-sonarjs](https://npmjs.com/eslint-plugin-sonarjs) (`sonarjs`) | - |
|
|
193
193
|
| `eslintComments` | ✅ | [@eslint-community/eslint-plugin-eslint-comments](https://npmjs.com/package/@eslint-community/eslint-plugin-eslint-comments) (`@eslint-community/eslint-comments`) | Since v0.1.3 |
|
|
194
194
|
| `jsdoc` | ✅ | [eslint-plugin-jsdoc](https://npmjs.com/eslint-plugin-jsdoc) (`jsdoc`) | Since v0.3.1 |
|
|
@@ -278,40 +278,41 @@ Sub-config is a Config located within Config's options. If the parent config is
|
|
|
278
278
|
|
|
279
279
|
### Libraries
|
|
280
280
|
|
|
281
|
-
| Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes
|
|
282
|
-
| ----------------------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
283
|
-
| `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0
|
|
284
|
-
| `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | -
|
|
285
|
-
| `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest`
|
|
286
|
-
| `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
287
|
-
| `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0
|
|
288
|
-
| `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
289
|
-
| `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0
|
|
290
|
-
| `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
291
|
-
| `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0
|
|
292
|
-
| `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
293
|
-
| ![Testing Library] `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0
|
|
294
|
-
| ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0
|
|
295
|
-
| ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0
|
|
296
|
-
| ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0
|
|
297
|
-
| ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0
|
|
298
|
-
| ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0
|
|
299
|
-
| ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
300
|
-
| `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
301
|
-
| `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0
|
|
302
|
-
|  `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0
|
|
303
|
-
|  `cypress` | ✅ (`cypress` is installed) | [eslint-plugin-cypress](https://npmjs.com/eslint-plugin-cypress) (`cypress`) | Since v1.0.0
|
|
304
|
-
|  `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
305
|
-
|  `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0
|
|
306
|
-
|  `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
307
|
-
|  `turbo` | ✅ (`turbo` is installed) | [eslint-plugin-turbo](https://npmjs.com/eslint-plugin-turbo) (`turbo`) | Since v1.0.0
|
|
308
|
-
|  `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0
|
|
309
|
-
|  `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0
|
|
310
|
-
|  `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
|
|
311
|
-
|  `rxjs` | ✅ (`rxjs` is installed) | [@smarttools/eslint-plugin-rxjs](https://npmjs.com/@smarttools/eslint-plugin-rxjs) (`rxjs`) | Since v1.0.0
|
|
312
|
-
|  `nx` | ✅ (`nx` is installed) | [@nx/eslint-plugin](https://npmjs.com/@nx/eslint-plugin) (`nx`) | Since v1.0.0
|
|
313
|
-
|
|
|
314
|
-
|  `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0
|
|
281
|
+
| Un config name | Enabled by default?<br>(optional condition) | Primary plugin(s) (`default-prefix`) | Description/Notes |
|
|
282
|
+
| ----------------------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
283
|
+
| `jest` | ✅ (`jest` is installed) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Since v0.3.0 |
|
|
284
|
+
| `jest/extended` | ✅ (`jest-extended` is installed) | [eslint-plugin-jest-extended](https://npmjs.com/eslint-plugin-jest-extended) (`jest-extended`) | - |
|
|
285
|
+
| `jest/typescript` | ✅ (`ts` config is enabled) | [eslint-plugin-jest](https://npmjs.com/eslint-plugin-jest) (`jest`) | Only TypeScript-specific rules from `eslint-plugin-jest` |
|
|
286
|
+
| `jest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
287
|
+
| `vitest` | ✅ (`vitest` is installed) | [@vitest/eslint-plugin](https://npmjs.com/package/@vitest/eslint-plugin) (`vitest`) | Since v0.3.0 |
|
|
288
|
+
| `vitest/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
289
|
+
| `ava` | ✅ (`ava` is installed) | [eslint-plugin-ava](https://npmjs.com/eslint-plugin-ava) (`ava`) | Since v1.0.0 |
|
|
290
|
+
| `ava/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
291
|
+
| `qunit` | ✅ (`qunit` is installed) | [eslint-plugin-qunit](https://npmjs.com/eslint-plugin-qunit) (`qunit`) | Since v1.0.0 |
|
|
292
|
+
| `qunit/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
293
|
+
| ![Testing Library] `testingLibrary` | ✅ (`@testing-library/dom` is installed) | [eslint-plugin-testing-library](https://npmjs.com/eslint-plugin-testing-library) (`testing-library`) | Since v1.0.0 |
|
|
294
|
+
| ![Testing Library] `testingLibrary/angular` | ✅ (`angular` config is enabled) | ^ | Since v1.0.0 |
|
|
295
|
+
| ![Testing Library] `testingLibrary/marko` | ✅ (`marko` is installed) | ^ | Since v1.0.0 |
|
|
296
|
+
| ![Testing Library] `testingLibrary/react` | ✅ (`react` config is enabled) | ^ | Since v1.0.0 |
|
|
297
|
+
| ![Testing Library] `testingLibrary/svelte` | ✅ (`svelte` config is enabled) | ^ | Since v1.0.0 |
|
|
298
|
+
| ![Testing Library] `testingLibrary/vue` | ✅ (`vue` config is enabled) | ^ | Since v1.0.0 |
|
|
299
|
+
| ![Testing Library] `testingLibrary/*/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
300
|
+
| `noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
301
|
+
| `tanstackQuery` | ✅ (`@tanstack/query-core` is installed) | [@tanstack/eslint-plugin-query](https://npmjs.com/package/@tanstack/eslint-plugin-query) (`@tanstack/query`) | Since v1.0.0 |
|
|
302
|
+
|  `storybook` | ✅ (`storybook` is installed) | [eslint-plugin-storybook](https://npmjs.com/eslint-plugin-storybook) (`storybook`) | Since v1.0.0 |
|
|
303
|
+
|  `cypress` | ✅ (`cypress` is installed) | [eslint-plugin-cypress](https://npmjs.com/eslint-plugin-cypress) (`cypress`) | Since v1.0.0 |
|
|
304
|
+
|  `cypress/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
305
|
+
|  `mocha` | ✅ (`mocha` is installed) | [eslint-plugin-mocha](https://npmjs.com/eslint-plugin-mocha) (`mocha`) | Since v1.0.0 |
|
|
306
|
+
|  `mocha/noOnlyTests` | ✅ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
307
|
+
|  `turbo` | ✅ (`turbo` is installed) | [eslint-plugin-turbo](https://npmjs.com/eslint-plugin-turbo) (`turbo`) | Since v1.0.0 |
|
|
308
|
+
|  `playwright` | ✅ (`playwright` is installed) | [eslint-plugin-playwright](https://npmjs.com/eslint-plugin-playwright) (`playwright`) | Since v1.0.0 |
|
|
309
|
+
|  `playwright/noOnlyTests` | ❌ | [eslint-plugin-no-only-tests] (`no-only-tests`) | Since v1.0.0 |
|
|
310
|
+
|  `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 |
|
|
311
|
+
|  `rxjs` | ✅ (`rxjs` is installed) | [@smarttools/eslint-plugin-rxjs](https://npmjs.com/@smarttools/eslint-plugin-rxjs) (`rxjs`) | Since v1.0.0 |
|
|
312
|
+
|  `nx` | ✅ (`nx` is installed) | [@nx/eslint-plugin](https://npmjs.com/@nx/eslint-plugin) (`nx`) | Since v1.0.0 |
|
|
313
|
+
|  `importZod` | ❌ | [eslint-plugin-import-zod](https://npmjs.com/eslint-plugin-import-zod) (`import-zod`) | Enforces namespace imports for `zod`. You should probably use `zod` config instead.<br>Since v1.0.0 |
|
|
314
|
+
|  `unocss` | ✅ (`unocss` is installed) | [@unocss/eslint-plugin](https://npmjs.com/@unocss/eslint-plugin) (`unocss`) | Since v1.0.0 |
|
|
315
|
+
|  `zod` | ✅ (`zod@>=4` is installed) | [eslint-plugin-zod-x](https://npmjs.com/eslint-plugin-zod-x) (`zod`) | Since v1.0.0 |
|
|
315
316
|
|
|
316
317
|
### Miscellaneous
|
|
317
318
|
|
|
@@ -406,10 +407,11 @@ eslint-config-un provides the ability to change any registered plugin prefix. Ad
|
|
|
406
407
|
| Plugin | Suggested prefix | Our prefix | Reason |
|
|
407
408
|
| ------------------------------------------------------------------------ | -------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
408
409
|
| [`typescript-eslint`](https://npmjs.com/typescript-eslint) | `@typescript-eslint` | `ts` | More concise and convenient to use |
|
|
409
|
-
| [`eslint-plugin-import-x`]
|
|
410
|
+
| [`eslint-plugin-import-x`] | `import-x` | `import` | This plugin is a fork and is meant to replace the original plugin with `import` prefix |
|
|
410
411
|
| [`eslint-plugin-n`](https://npmjs.com/eslint-plugin-n) | `n` | `node` | Same ^ |
|
|
411
412
|
| [`eslint-plugin-css`](https://npmjs.com/eslint-plugin-css) | `css` | `css-in-js` | Conflicts with [`@eslint/css`](https://npmjs.com/package/@eslint/css) and our name better captures the essence of the plugin |
|
|
412
413
|
| [`eslint-plugin-jsx-a11y-x`](https://npmjs.com/eslint-plugin-jsx-a11y-x) | `jsx-a11y-x` | `jsx-a11y` | This plugin is a fork and is meant to replace the original plugin with `jsx-a11y` prefix |
|
|
414
|
+
| [`eslint-plugin-zod-x`](https://npmjs.com/eslint-plugin-zod-x) | `zod-x` | `zod` | Better replacement for an existing `eslint-plugin-zod` plugin |
|
|
413
415
|
|
|
414
416
|
> [!NOTE]
|
|
415
417
|
> If you rename a plugin, you still have to use the original prefix within `overrides`, `overridesAny` and `extraConfigs`. eslint-config-un will rename the rules accordingly for you.
|
|
@@ -531,6 +533,35 @@ Disables rules that are potentially conflicting with Prettier. [`eslint-config-p
|
|
|
531
533
|
|
|
532
534
|
Globally forces non-zero severity of all the rules configured by eslint-config-un (i.e. not within `overrides`, `overridesAny` or `extraConfigs`). This can also be configured per-config.
|
|
533
535
|
|
|
536
|
+
### `offlineMode`
|
|
537
|
+
|
|
538
|
+
Enables "Offline mode" which can be useful to (temporarily) disable rules performing network requests, such as [`markdown-links/no-dead-urls`](https://ota-meshi.github.io/eslint-plugin-markdown-links/rules/no-dead-urls.html).
|
|
539
|
+
|
|
540
|
+
It can also be enabled by setting `ESLINT_CONFIG_UN_OFFLINE_MODE` environment variable to non-empty string, but the explicitly passed value takes precedence.
|
|
541
|
+
|
|
542
|
+
### `useFastImport`
|
|
543
|
+
|
|
544
|
+
Allows to override certain [`eslint-plugin-import-x`] plugin rules with implementations from [`eslint-plugin-fast-import`](https://npmjs.com/eslint-plugin-fast-import).
|
|
545
|
+
|
|
546
|
+
### `cacheConfigs`
|
|
547
|
+
|
|
548
|
+
Enables flat config caching. This option is enabled by default when running in editor (detected by [`is-in-editor`](https://npmjs.com/is-in-editor)). It can also be enabled by setting `ESLINT_CONFIG_UN_CACHE_CONFIGS` environment variable to non-empty string, but the explicitly passed value takes precedence.
|
|
549
|
+
|
|
550
|
+
Note that caching might fail if the config contains unserializable data, such as functions.
|
|
551
|
+
|
|
552
|
+
Cache will be stored in `node_modules/.cache/eslint-config-un/config.json` and considered fresh for 1 hour, unless one of the following is changed:
|
|
553
|
+
|
|
554
|
+
- Current git revision (`git rev-parse HEAD`) or root `.gitignore` contents
|
|
555
|
+
- `package.json`, lockfile contents or package manager
|
|
556
|
+
- ESLint config file contents
|
|
557
|
+
- Node.JS version
|
|
558
|
+
|
|
559
|
+
### `extraPlugins`
|
|
560
|
+
|
|
561
|
+
Allows to provide additional ESLint plugins. Their prefixes and possibly rule names will appear in configs' `rules` property type. They will be lazy-loaded only if used.
|
|
562
|
+
|
|
563
|
+
Note that their prefixes must not match the built-it/known ones (like `ts` or `unicorn`) or even prefixes you've renamed via `pluginRenames`.
|
|
564
|
+
|
|
534
565
|
## FAQ
|
|
535
566
|
|
|
536
567
|
### How do I add my own flat configs?
|
|
@@ -585,6 +616,8 @@ If you would like not to wait until the dependencies of `eslint-config-un` are u
|
|
|
585
616
|
[Testing Library]: ./assets/logos-testing-library.svg
|
|
586
617
|
[TypeScript]: ./assets/devicon-typescript.svg
|
|
587
618
|
[VueJS]: ./assets/devicon-vuejs.svg
|
|
619
|
+
[`eslint-plugin-import-x`]: https://npmjs.com/eslint-plugin-import-x
|
|
620
|
+
[eslint-plugin-import-x]: https://npmjs.com/eslint-plugin-import-x
|
|
588
621
|
[eslint-plugin-no-only-tests]: https://npmjs.com/eslint-plugin-no-only-tests
|
|
589
622
|
[npm]: ./assets/devicon-npm.svg
|
|
590
623
|
[pnpm]: ./assets/devicon-pnpm.svg
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { At as OFF, C as assignDefaults, D as fetchPackageInfo, Mt as WARNING, _ as pluginsLoaders, ct as GLOB_HTML, ht as GLOB_JS_TS_X, m as generatePackageToLoadProperty, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
|
|
3
|
+
//#region src/configs/angular.ts
|
|
4
|
+
const SUPPORTED_ANGULAR_VERSIONS = [
|
|
5
|
+
13,
|
|
6
|
+
14,
|
|
7
|
+
15,
|
|
8
|
+
16,
|
|
9
|
+
17,
|
|
10
|
+
18,
|
|
11
|
+
19,
|
|
12
|
+
20
|
|
13
|
+
];
|
|
14
|
+
const LATEST_SUPPORTED_ANGULAR_VERSION = SUPPORTED_ANGULAR_VERSIONS.at(-1);
|
|
15
|
+
var angular_default = (async (context, optionsRaw) => {
|
|
16
|
+
const optionsResolved = assignDefaults(optionsRaw, {
|
|
17
|
+
configTemplate: true,
|
|
18
|
+
processInlineTemplates: true,
|
|
19
|
+
componentClassSuffixes: ["Component"],
|
|
20
|
+
componentSelector: true,
|
|
21
|
+
componentStylesStyle: true,
|
|
22
|
+
directiveClassSuffixes: ["Directive"],
|
|
23
|
+
directiveSelector: true,
|
|
24
|
+
disallowedInputPrefixes: ["on"],
|
|
25
|
+
disallowAttributeDecorator: false,
|
|
26
|
+
disallowForwardRef: false
|
|
27
|
+
});
|
|
28
|
+
const angularVersion = optionsResolved.angularVersion ?? (() => {
|
|
29
|
+
const majorVersion = context.packagesInfo["@angular/core"]?.versions.major;
|
|
30
|
+
if (majorVersion != null && majorVersion >= SUPPORTED_ANGULAR_VERSIONS[0] && majorVersion <= LATEST_SUPPORTED_ANGULAR_VERSION) return majorVersion;
|
|
31
|
+
return LATEST_SUPPORTED_ANGULAR_VERSION;
|
|
32
|
+
})();
|
|
33
|
+
const { configTemplate, processInlineTemplates, componentClassSuffixes, componentSelector, componentStylesStyle, directiveClassSuffixes, directiveSelector, disallowedInputPrefixes, disallowAttributeDecorator, disallowForwardRef, pipePrefixes } = optionsResolved;
|
|
34
|
+
optionsResolved.preferStandaloneComponents ??= angularVersion >= 19;
|
|
35
|
+
const { preferStandaloneComponents } = optionsResolved;
|
|
36
|
+
const forbiddenMetadataProperties = {
|
|
37
|
+
inputs: true,
|
|
38
|
+
outputs: true,
|
|
39
|
+
queries: true,
|
|
40
|
+
...optionsResolved.forbiddenMetadataProperties
|
|
41
|
+
};
|
|
42
|
+
const configBuilderGeneral = context.createConfigBuilder(optionsResolved, "@angular-eslint");
|
|
43
|
+
const [angularEslintPlugin, angularEslintPluginPackageInfo, angularTemplateEslintPlugin, angularTemplateEslintPluginPackageInfo, angularTemplateParserPackageInfo] = await Promise.all([
|
|
44
|
+
pluginsLoaders["@angular-eslint"](context).then(({ module }) => module),
|
|
45
|
+
fetchPackageInfo("@angular-eslint/eslint-plugin"),
|
|
46
|
+
pluginsLoaders["@angular-eslint/template"](context).then(({ module }) => module),
|
|
47
|
+
fetchPackageInfo("@angular-eslint/eslint-plugin-template"),
|
|
48
|
+
fetchPackageInfo("@angular-eslint/template-parser")
|
|
49
|
+
]);
|
|
50
|
+
[
|
|
51
|
+
[angularEslintPluginPackageInfo, "@angular-eslint/eslint-plugin"],
|
|
52
|
+
[angularTemplateEslintPluginPackageInfo, "@angular-eslint/eslint-plugin-template"],
|
|
53
|
+
[angularTemplateParserPackageInfo, "@angular-eslint/template-parser"]
|
|
54
|
+
].forEach(([packageInfo, packageName]) => {
|
|
55
|
+
if (packageInfo?.versions.major != null && packageInfo.versions.major !== angularVersion) context.logger.warn(`Your \`${packageName}\` major version (${packageInfo.versions.major}) might not be compatible with the configured (or detected) Angular major version (${angularVersion}).`);
|
|
56
|
+
});
|
|
57
|
+
const angularEslintPluginRules = Object.keys(angularEslintPlugin?.rules || {});
|
|
58
|
+
const getPluginRuleSeverity = (ruleName, severity) => [ruleName, angularEslintPlugin && !angularEslintPluginRules.includes(ruleName) ? OFF : severity];
|
|
59
|
+
configBuilderGeneral?.addConfig(["angular/general", {
|
|
60
|
+
includeDefaultFilesAndIgnores: true,
|
|
61
|
+
filesFallback: [GLOB_JS_TS_X]
|
|
62
|
+
}], { ...processInlineTemplates && generatePackageToLoadProperty("processor", "angularExtractInlineHtmlProcessor") }).addRule(...getPluginRuleSeverity("component-class-suffix", componentClassSuffixes.length === 0 ? OFF : ERROR), [{ ...componentClassSuffixes.length > 0 && { suffixes: componentClassSuffixes } }]).addRule(...getPluginRuleSeverity("component-max-inline-declarations", OFF)).addRule(...getPluginRuleSeverity("component-selector", componentSelector === false ? OFF : ERROR), [{
|
|
63
|
+
type: ["element"],
|
|
64
|
+
style: "kebab-case",
|
|
65
|
+
...typeof componentSelector === "object" && componentSelector
|
|
66
|
+
}]).addRule(...getPluginRuleSeverity("consistent-component-styles", componentStylesStyle === false ? OFF : ERROR), [typeof componentStylesStyle === "string" ? componentStylesStyle : "string"]).addRule(...getPluginRuleSeverity("contextual-decorator", ERROR)).addRule(...getPluginRuleSeverity("contextual-lifecycle", ERROR)).addRule(...getPluginRuleSeverity("directive-class-suffix", directiveClassSuffixes.length === 0 ? OFF : ERROR), [{ ...directiveClassSuffixes.length > 0 && { suffixes: directiveClassSuffixes } }]).addRule(...getPluginRuleSeverity("directive-selector", directiveSelector === false ? OFF : ERROR), [{
|
|
67
|
+
type: ["attribute"],
|
|
68
|
+
style: "camelCase",
|
|
69
|
+
...typeof directiveSelector === "object" && directiveSelector
|
|
70
|
+
}]).addRule(...getPluginRuleSeverity("no-async-lifecycle-method", ERROR)).addRule(...getPluginRuleSeverity("no-attribute-decorator", disallowAttributeDecorator ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-conflicting-lifecycle", ERROR)).addRule(...getPluginRuleSeverity("no-developer-preview", WARNING)).addRule(...getPluginRuleSeverity("no-duplicates-in-metadata-arrays", ERROR)).addRule(...getPluginRuleSeverity("no-empty-lifecycle-method", ERROR)).addRule(...getPluginRuleSeverity("no-experimental", WARNING)).addRule(...getPluginRuleSeverity("no-forward-ref", disallowForwardRef ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-host-metadata-property", forbiddenMetadataProperties.host ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-input-prefix", ERROR), [{ prefixes: disallowedInputPrefixes }]).addRule(...getPluginRuleSeverity("no-input-rename", ERROR)).addRule(...getPluginRuleSeverity("no-inputs-metadata-property", forbiddenMetadataProperties.inputs ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-lifecycle-call", ERROR)).addRule(...getPluginRuleSeverity("no-output-native", ERROR)).addRule(...getPluginRuleSeverity("no-output-on-prefix", ERROR)).addRule(...getPluginRuleSeverity("no-output-rename", ERROR)).addRule(...getPluginRuleSeverity("no-outputs-metadata-property", forbiddenMetadataProperties.outputs ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-pipe-impure", ERROR)).addRule(...getPluginRuleSeverity("no-queries-metadata-property", forbiddenMetadataProperties.queries ? ERROR : OFF)).addRule(...getPluginRuleSeverity("no-uncalled-signals", ERROR)).addRule(...getPluginRuleSeverity("pipe-prefix", ERROR), [{ prefixes: pipePrefixes }]).addRule(...getPluginRuleSeverity("prefer-host-metadata-property", forbiddenMetadataProperties.host ? OFF : ERROR)).addRule(...getPluginRuleSeverity("prefer-inject", ERROR)).addRule(...getPluginRuleSeverity("prefer-on-push-component-change-detection", OFF)).addRule(...getPluginRuleSeverity("prefer-output-emitter-ref", ERROR)).addRule(...getPluginRuleSeverity("prefer-output-readonly", ERROR)).addRule(...getPluginRuleSeverity("prefer-signals", OFF)).addRule(...getPluginRuleSeverity("prefer-standalone", preferStandaloneComponents && angularVersion >= 17 ? ERROR : OFF)).addRule(...getPluginRuleSeverity("prefer-standalone-component", preferStandaloneComponents && angularVersion < 17 ? ERROR : OFF)).addRule(...getPluginRuleSeverity("relative-url-prefix", ERROR)).addRule(...getPluginRuleSeverity("require-lifecycle-on-prototype", ERROR)).addRule(...getPluginRuleSeverity("require-localize-metadata", ERROR)).addRule(...getPluginRuleSeverity("runtime-localize", ERROR)).addRule(...getPluginRuleSeverity("sort-keys-in-type-decorator", ERROR)).addRule(...getPluginRuleSeverity("sort-lifecycle-methods", ERROR)).addRule(...getPluginRuleSeverity("sort-ngmodule-metadata-arrays", OFF)).addRule(...getPluginRuleSeverity("use-component-selector", ERROR)).addRule(...getPluginRuleSeverity("use-component-view-encapsulation", ERROR)).addRule(...getPluginRuleSeverity("use-injectable-provided-in", ERROR)).addRule(...getPluginRuleSeverity("use-lifecycle-interface", ERROR)).addRule(...getPluginRuleSeverity("use-pipe-transform-interface", ERROR)).enableConfigTesterForPlugin("@angular-eslint", { includeDeprecated: true }).addOverrides();
|
|
71
|
+
const angularTemplateEslintPluginRules = Object.keys(angularTemplateEslintPlugin?.rules || {});
|
|
72
|
+
const getTemplatePluginRuleSeverity = (ruleName, severity) => [ruleName, angularTemplateEslintPlugin && !angularTemplateEslintPluginRules.includes(ruleName) ? OFF : severity];
|
|
73
|
+
const { a11yRules, preferControlFlow, preferNgSrc, requireLoopIndexes } = assignDefaults(configTemplate, {
|
|
74
|
+
a11yRules: true,
|
|
75
|
+
preferControlFlow: angularVersion >= 19,
|
|
76
|
+
preferNgSrc: false,
|
|
77
|
+
requireLoopIndexes: false
|
|
78
|
+
});
|
|
79
|
+
const a11yRulesSeverity = a11yRules === true ? ERROR : a11yRules === "warn" ? WARNING : OFF;
|
|
80
|
+
const configBuilderTemplate = context.createConfigBuilder(configTemplate, "@angular-eslint/template");
|
|
81
|
+
configBuilderTemplate?.addConfig(["angular/template", {
|
|
82
|
+
includeDefaultFilesAndIgnores: true,
|
|
83
|
+
filesFallback: [GLOB_HTML],
|
|
84
|
+
parser: "@angular-eslint/template-parser",
|
|
85
|
+
doNotIgnoreHtml: true
|
|
86
|
+
}]).addRule(...getTemplatePluginRuleSeverity("accessibility-alt-text", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-elements-content", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-interactive-supports-focus", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-label-for", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-label-has-associated-control", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-role-has-required-aria", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-table-scope", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("accessibility-valid-aria", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("alt-text", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("attributes-order", ERROR)).addRule(...getTemplatePluginRuleSeverity("banana-in-box", ERROR)).addRule(...getTemplatePluginRuleSeverity("button-has-type", ERROR)).addRule(...getTemplatePluginRuleSeverity("click-events-have-key-events", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("conditional-complexity", OFF)).addRule(...getTemplatePluginRuleSeverity("cyclomatic-complexity", OFF)).addRule(...getTemplatePluginRuleSeverity("elements-content", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("eqeqeq", ERROR), [{ allowNullOrUndefined: true }]).addRule(...getTemplatePluginRuleSeverity("i18n", OFF)).addRule(...getTemplatePluginRuleSeverity("interactive-supports-focus", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("label-has-associated-control", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("mouse-events-have-key-events", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("no-any", WARNING)).addRule(...getTemplatePluginRuleSeverity("no-autofocus", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("no-call-expression", OFF)).addRule(...getTemplatePluginRuleSeverity("no-distracting-elements", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("no-duplicate-attributes", ERROR)).addRule(...getTemplatePluginRuleSeverity("no-empty-control-flow", ERROR)).addRule(...getTemplatePluginRuleSeverity("no-inline-styles", OFF)).addRule(...getTemplatePluginRuleSeverity("no-interpolation-in-attributes", ERROR)).addRule(...getTemplatePluginRuleSeverity("no-negated-async", ERROR)).addRule(...getTemplatePluginRuleSeverity("no-nested-tags", ERROR)).addRule(...getTemplatePluginRuleSeverity("no-positive-tabindex", ERROR)).addRule(...getTemplatePluginRuleSeverity("prefer-at-else", ERROR)).addRule(...getTemplatePluginRuleSeverity("prefer-at-empty", ERROR)).addRule(...getTemplatePluginRuleSeverity("prefer-built-in-pipes", OFF)).addRule(...getTemplatePluginRuleSeverity("prefer-contextual-for-variables", ERROR)).addRule(...getTemplatePluginRuleSeverity("prefer-control-flow", preferControlFlow ? ERROR : OFF)).addRule(...getTemplatePluginRuleSeverity("prefer-ngsrc", preferNgSrc ? ERROR : OFF)).addRule(...getTemplatePluginRuleSeverity("prefer-self-closing-tags", OFF)).addRule(...getTemplatePluginRuleSeverity("prefer-static-string-properties", ERROR)).addRule(...getTemplatePluginRuleSeverity("prefer-template-literal", ERROR)).addRule(...getTemplatePluginRuleSeverity("role-has-required-aria", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("table-scope", a11yRulesSeverity)).addRule(...getTemplatePluginRuleSeverity("use-track-by-function", requireLoopIndexes ? ERROR : OFF)).addRule(...getTemplatePluginRuleSeverity("valid-aria", a11yRulesSeverity)).enableConfigTesterForPlugin("@angular-eslint/template", { includeDeprecated: true }).addOverrides();
|
|
87
|
+
return {
|
|
88
|
+
configs: [configBuilderGeneral, configBuilderTemplate],
|
|
89
|
+
optionsResolved
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
export { angular_default as default };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { At as OFF, C as assignDefaults, Mt as WARNING, _ as pluginsLoaders, m as generatePackageToLoadProperty, nt as GLOB_ASTRO, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
|
|
3
|
+
//#region src/configs/astro.ts
|
|
4
|
+
const DEFAULT_ASTRO_FILES = [GLOB_ASTRO];
|
|
5
|
+
var astro_default = (async (context, optionsRaw) => {
|
|
6
|
+
const eslintPluginAstro = await pluginsLoaders.astro(context).then(({ module }) => module);
|
|
7
|
+
context.usedPlugins.add("astro");
|
|
8
|
+
if (!eslintPluginAstro) return null;
|
|
9
|
+
const optionsResolved = assignDefaults(optionsRaw, {
|
|
10
|
+
files: DEFAULT_ASTRO_FILES,
|
|
11
|
+
configJsxA11y: true
|
|
12
|
+
});
|
|
13
|
+
const { files: parentConfigFiles, ignores: parentConfigIgnores, configJsxA11y } = optionsResolved;
|
|
14
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, "astro");
|
|
15
|
+
const isTypescriptEnabled = context.configsMeta.ts.enabled;
|
|
16
|
+
configBuilder?.addConfig(["astro/setup", {
|
|
17
|
+
filesFallback: [...DEFAULT_ASTRO_FILES, ...parentConfigFiles],
|
|
18
|
+
doNotIgnoreMarkdown: true,
|
|
19
|
+
parser: "astro-eslint-parser"
|
|
20
|
+
}], {
|
|
21
|
+
languageOptions: {
|
|
22
|
+
globals: eslintPluginAstro.environments.astro.globals,
|
|
23
|
+
parserOptions: { ...isTypescriptEnabled && generatePackageToLoadProperty("parser", "typescriptEslintParser") },
|
|
24
|
+
sourceType: "module"
|
|
25
|
+
},
|
|
26
|
+
...isTypescriptEnabled && generatePackageToLoadProperty("processor", "astroClientSideTsProcessor")
|
|
27
|
+
});
|
|
28
|
+
configBuilder?.addConfig(["astro", {
|
|
29
|
+
doNotIgnoreMarkdown: true,
|
|
30
|
+
includeDefaultFilesAndIgnores: true,
|
|
31
|
+
filesFallback: DEFAULT_ASTRO_FILES
|
|
32
|
+
}]).markCategory("Possible Errors").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).markCategory("Security Vulnerability").addRule("no-set-html-directive", ERROR).addRule("no-unsafe-inline-scripts", ERROR).markCategory("Best Practices").addRule("no-set-text-directive", OFF).addRule("no-unused-css-selector", WARNING).markCategory("Stylistic Issues").addRule("prefer-class-list-directive", ERROR).addRule("prefer-object-class-list", ERROR).addRule("prefer-split-class-list", ERROR).addRule("sort-attributes", ERROR).markCategory("Extension Rules").addRule("semi", OFF).enableConfigTesterForPlugin("astro", { rulesToSkipInConfig: (ruleName) => ruleName.startsWith("jsx-a11y/") }).addOverrides();
|
|
33
|
+
return {
|
|
34
|
+
configs: [configBuilder, ...configJsxA11y === false ? [] : await (async () => {
|
|
35
|
+
const { default: jsxA11yUnConfig } = await import("./jsx-a11y-CguMk4CG.js");
|
|
36
|
+
return jsxA11yUnConfig(context, void 0, {
|
|
37
|
+
prefix: "astro",
|
|
38
|
+
options: {
|
|
39
|
+
files: parentConfigFiles,
|
|
40
|
+
ignores: parentConfigIgnores,
|
|
41
|
+
...typeof configJsxA11y === "object" && configJsxA11y
|
|
42
|
+
}
|
|
43
|
+
}).configs;
|
|
44
|
+
})()],
|
|
45
|
+
optionsResolved
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { astro_default as default };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { At as OFF, C as assignDefaults, Mt as WARNING, gt as GLOB_JS_TS_X_EXTENSION, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
import { c as generateDefaultTestFiles, o as generateConfigNoOnlyTestsBuilder, r as RULES_TO_DISABLE_IN_TEST_FILES } from "./shared-BtRqB0mx.js";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/ava.ts
|
|
5
|
-
|
|
6
|
-
const optionsRaw = context.rootOptions.configs?.ava;
|
|
5
|
+
var ava_default = ((context, optionsRaw) => {
|
|
7
6
|
const optionsResolved = assignDefaults(optionsRaw, { configNoOnlyTests: false });
|
|
8
7
|
const { configNoOnlyTests, enforceAssertionMessage, enforceMaxAssertions } = optionsResolved;
|
|
9
|
-
const configBuilder = createConfigBuilder(
|
|
8
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, "ava");
|
|
10
9
|
const configFilesFallback = generateDefaultTestFiles(GLOB_JS_TS_X_EXTENSION);
|
|
11
10
|
configBuilder?.addConfig(["ava", {
|
|
12
11
|
includeDefaultFilesAndIgnores: true,
|
|
@@ -16,7 +15,7 @@ const avaUnConfig = (context) => {
|
|
|
16
15
|
configs: [configBuilder, generateConfigNoOnlyTestsBuilder(context, "ava", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback })],
|
|
17
16
|
optionsResolved
|
|
18
17
|
};
|
|
19
|
-
};
|
|
18
|
+
});
|
|
20
19
|
|
|
21
20
|
//#endregion
|
|
22
|
-
export {
|
|
21
|
+
export { ava_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { At as OFF, C as assignDefaults, Mt as WARNING, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
|
|
3
|
+
//#region src/configs/better-tailwind.ts
|
|
4
|
+
var better_tailwind_default = ((context, optionsRaw) => {
|
|
5
|
+
const optionsResolved = assignDefaults(optionsRaw, { classOrder: "official" });
|
|
6
|
+
const { settings: pluginSettings, breakUpClassesIntoMultipleLines, classOrder, restrictedClasses } = optionsResolved;
|
|
7
|
+
const tailwindRealMajorVersion = context.packagesInfo.tailwindcss?.versions.major;
|
|
8
|
+
const tailwindMajorVersion = tailwindRealMajorVersion === 3 ? 3 : 4;
|
|
9
|
+
if (tailwindRealMajorVersion === 4 && !pluginSettings?.entryPoint) context.logger.warn("[betterTailwind] You haven't specified `settings.entryPoint` option which is required for `eslint-plugin-better-tailwindcss` to work properly with Tailwind 4");
|
|
10
|
+
if (tailwindRealMajorVersion != null && (tailwindRealMajorVersion < 3 || tailwindRealMajorVersion > 4)) context.logger.warn("[betterTailwind] The detected Tailwind version is not supported by `eslint-plugin-better-tailwindcss`");
|
|
11
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, "better-tailwindcss");
|
|
12
|
+
configBuilder?.addConfig(["better-tailwindcss", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: { "better-tailwindcss": pluginSettings } } }).markCategory("Stylistic rules").addRule("enforce-consistent-class-order", typeof classOrder === "string" ? WARNING : OFF, typeof classOrder === "string" ? [{ order: classOrder }] : []).addRule("enforce-consistent-important-position", ERROR, [{ position: tailwindMajorVersion === 3 ? "legacy" : "recommended" }]).addRule("enforce-consistent-line-wrapping", breakUpClassesIntoMultipleLines ? WARNING : OFF, breakUpClassesIntoMultipleLines ? [breakUpClassesIntoMultipleLines] : []).addRule("enforce-consistent-variable-syntax", tailwindMajorVersion === 3 ? OFF : WARNING).addRule("enforce-shorthand-classes", ERROR, []).addRule("no-deprecated-classes", WARNING).addRule("no-duplicate-classes", WARNING).addRule("no-unnecessary-whitespace", WARNING).markCategory("Correctness rules").addRule("no-conflicting-classes", ERROR).addRule("no-restricted-classes", restrictedClasses?.length ? ERROR : OFF, restrictedClasses?.length ? [{ restrict: restrictedClasses }] : []).addRule("no-unregistered-classes", OFF).enableConfigTesterForPlugin("better-tailwindcss").addOverrides();
|
|
13
|
+
return {
|
|
14
|
+
configs: [configBuilder],
|
|
15
|
+
optionsResolved
|
|
16
|
+
};
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { better_tailwind_default as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { C as assignDefaults, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
|
|
3
|
+
//#region src/configs/case-police.ts
|
|
4
|
+
var case_police_default = ((context, optionsRaw) => {
|
|
5
|
+
const optionsResolved = assignDefaults(optionsRaw, {});
|
|
6
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, "case-police");
|
|
7
|
+
configBuilder?.addConfig(["case-police", {
|
|
8
|
+
includeDefaultFilesAndIgnores: true,
|
|
9
|
+
doNotIgnoreCss: true,
|
|
10
|
+
doNotIgnoreHtml: true,
|
|
11
|
+
doNotIgnoreMarkdown: true,
|
|
12
|
+
doNotIgnoreMdx: true
|
|
13
|
+
}]).addRule("string-check", ERROR).enableConfigTesterForPlugin("case-police").addOverrides();
|
|
14
|
+
return {
|
|
15
|
+
configs: [configBuilder],
|
|
16
|
+
optionsResolved
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { case_police_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as assignDefaults, mt as GLOB_JS_TS_EXTENSION, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/extra/cli.ts
|
|
4
4
|
const DEFAULT_CLI_DIRS = [
|
|
@@ -7,11 +7,10 @@ const DEFAULT_CLI_DIRS = [
|
|
|
7
7
|
"cli"
|
|
8
8
|
];
|
|
9
9
|
const DEFAULT_CLI_FILES = ["cli"];
|
|
10
|
-
|
|
11
|
-
const optionsRaw = context.rootOptions.configs?.cli;
|
|
10
|
+
var cli_default = ((context, optionsRaw) => {
|
|
12
11
|
const optionsResolved = assignDefaults(optionsRaw, {});
|
|
13
12
|
const { onlyTopLevelDirs } = optionsResolved;
|
|
14
|
-
const configBuilder = createConfigBuilder(
|
|
13
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, null);
|
|
15
14
|
configBuilder?.addConfig(["cli", {
|
|
16
15
|
includeDefaultFilesAndIgnores: true,
|
|
17
16
|
filesFallback: [...DEFAULT_CLI_DIRS.map((dir) => `${onlyTopLevelDirs ? "" : "**/"}${dir}/**/*.${GLOB_JS_TS_EXTENSION}`), ...DEFAULT_CLI_FILES.map((file) => `${onlyTopLevelDirs ? "" : "**/"}${file}.${GLOB_JS_TS_EXTENSION}`)]
|
|
@@ -20,7 +19,7 @@ const cliUnConfig = (context) => {
|
|
|
20
19
|
configs: [configBuilder],
|
|
21
20
|
optionsResolved
|
|
22
21
|
};
|
|
23
|
-
};
|
|
22
|
+
});
|
|
24
23
|
|
|
25
24
|
//#endregion
|
|
26
|
-
export {
|
|
25
|
+
export { cli_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { At as OFF, C as assignDefaults, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
|
+
import { t as es_default } from "./es-DXEzrW-x.js";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/extra/cloudfront-functions.ts
|
|
5
5
|
const genSyntaxNotAllowedErrorMessage = (syntax, isPlural = false) => `${syntax} ${isPlural ? "are" : "is"} not allowed in CloudFront functions`;
|
|
@@ -8,15 +8,14 @@ const getAllowedImports = (isV2 = true) => [
|
|
|
8
8
|
"crypto",
|
|
9
9
|
isV2 && "cloudfront"
|
|
10
10
|
].filter((v) => typeof v === "string");
|
|
11
|
-
|
|
12
|
-
const optionsRaw = context.rootOptions.configs?.cloudfrontFunctions;
|
|
11
|
+
var cloudfront_functions_default = ((context, optionsRaw) => {
|
|
13
12
|
const optionsResolved = assignDefaults(optionsRaw, {});
|
|
14
13
|
return {
|
|
15
|
-
configs:
|
|
14
|
+
configs: [[1, optionsResolved.configV1 || {}], [2, optionsResolved]].flatMap(([runtimeVersion, options]) => {
|
|
16
15
|
const isV2 = runtimeVersion === 2;
|
|
17
16
|
const { files, ignores } = options;
|
|
18
17
|
if (!files?.length && !ignores?.length) return [];
|
|
19
|
-
const configsEs = (
|
|
18
|
+
const configsEs = es_default(context, void 0, {
|
|
20
19
|
prefix: `cloudfront-functions/v${runtimeVersion}/es-features`,
|
|
21
20
|
options: {
|
|
22
21
|
files,
|
|
@@ -94,9 +93,9 @@ const cloudfrontFunctionsEslintConfig = async (context) => {
|
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
}
|
|
97
|
-
})
|
|
96
|
+
}).configs;
|
|
98
97
|
const allowedImports = getAllowedImports(isV2);
|
|
99
|
-
const configBuilder = createConfigBuilder(
|
|
98
|
+
const configBuilder = context.createConfigBuilder(options, "");
|
|
100
99
|
configBuilder?.addConfig([`cloudfront-functions/v${runtimeVersion}`, { includeDefaultFilesAndIgnores: true }]).addAnyRule("", "no-unused-vars", ERROR, [{ varsIgnorePattern: "^handler$" }]).addRule("no-var", isV2 ? null : OFF).addRule("prefer-destructuring", OFF).addRule("prefer-object-has-own", OFF).addRule("vars-on-top", isV2 ? null : OFF).addAnyRule("unicorn", "prefer-logical-operator-over-ternary", OFF).addAnyRule("node", "prefer-node-protocol", OFF).addRule("no-restricted-syntax", ERROR, [
|
|
101
100
|
{
|
|
102
101
|
selector: "ExportNamedDeclaration",
|
|
@@ -145,10 +144,10 @@ const cloudfrontFunctionsEslintConfig = async (context) => {
|
|
|
145
144
|
}
|
|
146
145
|
]).addAnyRule("node", "no-missing-import", ERROR, [{ allowModules: allowedImports }]).addAnyRule("node", "no-missing-require", ERROR, [{ allowModules: allowedImports }]).addOverrides();
|
|
147
146
|
return [...configsEs, configBuilder];
|
|
148
|
-
})
|
|
147
|
+
}),
|
|
149
148
|
optionsResolved
|
|
150
149
|
};
|
|
151
|
-
};
|
|
150
|
+
});
|
|
152
151
|
|
|
153
152
|
//#endregion
|
|
154
|
-
export {
|
|
153
|
+
export { cloudfront_functions_default as default };
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as assignDefaults, tt as ERROR } from "./configs-RfHo5xBa.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/compat.ts
|
|
4
|
-
|
|
5
|
-
const optionsRaw = context.rootOptions.configs?.compat;
|
|
4
|
+
var compat_default = ((context, optionsRaw) => {
|
|
6
5
|
const optionsResolved = assignDefaults(optionsRaw, {});
|
|
7
6
|
const { settings: pluginSettings } = optionsResolved;
|
|
8
|
-
const configBuilder = createConfigBuilder(
|
|
9
|
-
configBuilder?.addConfig(["compat", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: pluginSettings } }).addRule("compat", ERROR).addOverrides();
|
|
7
|
+
const configBuilder = context.createConfigBuilder(optionsResolved, "compat");
|
|
8
|
+
configBuilder?.addConfig(["compat", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: pluginSettings } }).addRule("compat", ERROR).enableConfigTesterForPlugin("compat").addOverrides();
|
|
10
9
|
return {
|
|
11
10
|
configs: [configBuilder],
|
|
12
11
|
optionsResolved
|
|
13
12
|
};
|
|
14
|
-
};
|
|
13
|
+
});
|
|
15
14
|
|
|
16
15
|
//#endregion
|
|
17
|
-
export {
|
|
16
|
+
export { compat_default as default };
|