eslint-config-un 1.0.0-alpha.35 → 1.0.0-alpha.37
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 +51 -37
- package/dist/angular-jIwskBI5.js +100 -0
- package/dist/{astro-DPnrzOVN.js → astro-Da_outEx.js} +3 -3
- package/dist/{ava-CihB8DYD.js → ava-CbuzM59v.js} +3 -4
- package/dist/{better-tailwind-PsrIXgUc.js → better-tailwind-DemAVSYn.js} +2 -2
- package/dist/{case-police-DBT8awLe.js → case-police-Bhk8VJEv.js} +2 -2
- package/dist/{cli-CU4wgrRj.js → cli-RMLk3JGc.js} +1 -1
- package/dist/{cloudfront-functions-B2o5fL8_.js → cloudfront-functions-D1wIrqfc.js} +2 -2
- package/dist/{compat-BPnfGT48.js → compat-C9d_mOS4.js} +2 -2
- package/dist/{cspell-pFfV93fu.js → cspell-lGQqbjtk.js} +2 -2
- package/dist/{css-CKMDDy5s.js → css-De4qJRx_.js} +8 -6
- package/dist/{css-in-js-CyEZ34tK.js → css-in-js-Cej7BqH2.js} +2 -2
- package/dist/{cypress-CjP0WKWr.js → cypress-DVe3_w_r.js} +4 -5
- package/dist/{de-morgan-CKBoTMpb.js → de-morgan-pjU5aP2V.js} +2 -2
- package/dist/{depend-C-v-CYaG.js → depend-JhuWBMxD.js} +3 -3
- package/dist/ember-C42lASjF.js +56 -0
- package/dist/{erasable-syntax-only-Dt4-vhGT.js → erasable-syntax-only-DaJea78-.js} +2 -2
- package/dist/es-7LLqqRa0.js +4 -0
- package/dist/es-DeZRlxZp.js +49 -0
- package/dist/eslint-CaoFmjOr.js +2038 -0
- package/dist/eslint-comments-qpfwwbmo.js +21 -0
- package/dist/{eslint-plugin-Bt8UbEtK.js → eslint-plugin-BOvCjMZX.js} +12 -4
- package/dist/{file-progress-CEnCo_6b.js → file-progress-BzLxQPY2.js} +6 -3
- package/dist/{graphql-DBBwghIJ.js → graphql-BIi2O_XX.js} +2 -2
- package/dist/{header-NIt1ougJ.js → header-Bi34G-RH.js} +2 -2
- package/dist/{headers-CUL17zcJ.js → headers-MDR8x3IU.js} +2 -2
- package/dist/html-D97W6cUX.js +32 -0
- package/dist/{import-CVP6YeuG.js → import-h_396dcB.js} +10 -5
- package/dist/{import-zod-CJfSrBUW.js → import-zod-DX2O6xk3.js} +1 -1
- package/dist/index.d.ts +2758 -1208
- package/dist/index.js +336 -351
- package/dist/{jest-jtYAD-xv.js → jest-BsPD9M1_.js} +8 -7
- package/dist/js-B4crsIaF.js +95 -0
- package/dist/{js-inline-nyoBn81D.js → js-inline-B8f1KABy.js} +1 -1
- package/dist/{jsdoc-8JoK0OZb.js → jsdoc-BqCQ7ceo.js} +6 -3
- package/dist/{json-schema-validator-CQMfYKV3.js → json-schema-validator-CPrSL2yi.js} +3 -3
- package/dist/jsonc-CvYnT6HG.js +56 -0
- package/dist/{jsx-a11y-DKjGy3y7.js → jsx-a11y-BIdtj-0T.js} +6 -7
- package/dist/{lit-DuYwn3mg.js → lit-Bi86zio0.js} +3 -3
- package/dist/{markdown-mt53Akfy.js → markdown-Bu2B9JBA.js} +3 -3
- package/dist/{markdown-links-CjFkT3bs.js → markdown-links-Dtosgn03.js} +2 -2
- package/dist/markdown-preferences-CtUU7dab.js +36 -0
- package/dist/{math-XU9L2xy1.js → math-yhMomQz9.js} +2 -2
- package/dist/{mdx-qOS4tys4.js → mdx-BNEg3VYU.js} +3 -3
- package/dist/{mocha-YyCysTsc.js → mocha-ebL0ZanK.js} +4 -5
- package/dist/{nextjs-CKN-3aSa.js → nextjs-CTe5rfzl.js} +2 -2
- package/dist/{no-only-tests-Cs5JBHdn.js → no-only-tests-CY4wpbd0.js} +3 -3
- package/dist/{no-stylistic-rules-pxEm51NX.js → no-stylistic-rules-BXTrGk4A.js} +105 -51
- package/dist/{no-unsanitized-5-mvr9t1.js → no-unsanitized-DX5mEwHn.js} +2 -2
- package/dist/{node-CmoUjkf9.js → node-DFVrCLqH.js} +4 -4
- package/dist/{node-dependencies-D327bBPP.js → node-dependencies-6ScYknDk.js} +4 -4
- package/dist/{nx-BjZgWizy.js → nx-BeygHBpf.js} +2 -2
- package/dist/{package-json-BwLYvh-p.js → package-json-BjlwK0rG.js} +5 -5
- package/dist/package-json-CZDU8nEg.js +4 -0
- package/dist/{perfectionist-7D1yVEbI.js → perfectionist-dZFLujSP.js} +28 -29
- package/dist/{playwright-B63MITGP.js → playwright-CsOnXkKa.js} +4 -5
- package/dist/{pnpm-B9MeteGw.js → pnpm-B1gjfGzH.js} +8 -3
- package/dist/{prefer-arrow-functions-XertZAOp.js → prefer-arrow-functions-gyzpiaGM.js} +2 -2
- package/dist/{promise-BO3r6jkF.js → promise-Ipzne7W1.js} +2 -2
- package/dist/{qunit-DEhBUzcS.js → qunit-CVlJZysa.js} +4 -5
- package/dist/{qwik-CtWR26TJ.js → qwik-BgscptgR.js} +3 -3
- package/dist/{react-BOA7brNH.js → react-DJIuyUFZ.js} +40 -12
- package/dist/regexp-Buwyy1U_.js +19 -0
- package/dist/{rxjs-CVysg8U6.js → rxjs-B-3F8LTT.js} +6 -3
- package/dist/{security-BMIEYBMC.js → security-Dc0QV9am.js} +2 -2
- package/dist/{shared-BfrbDA8Y.js → shared-CwQIlSxu.js} +2 -2
- package/dist/{solid-BwMs5eaV.js → solid-B-dG48pi.js} +2 -2
- package/dist/sonar-5F_Zk1bD.js +28 -0
- package/dist/{storybook-yK0-ByMh.js → storybook-CBPG6YxU.js} +2 -2
- package/dist/{svelte-CrqiaAkD.js → svelte-KBhCdx3S.js} +7 -6
- package/dist/{tailwind-BMDrsHhX.js → tailwind-B6XA2vS7.js} +2 -2
- package/dist/{tanstack-query-B97bNKC9.js → tanstack-query-DEP1VNgK.js} +2 -2
- package/dist/{testing-library-CRj7Vgqc.js → testing-library-CAs4znmc.js} +4 -5
- package/dist/{toml-DCHHfyMy.js → toml-DP4zLwKD.js} +4 -4
- package/dist/{ts-CQr76DmP.js → ts-DUkJ6VWe.js} +68 -7
- package/dist/{turbo-BIjLCxmX.js → turbo-BMoFvFmJ.js} +2 -2
- package/dist/{un-ChTZuXYR.js → un-BuSNm_dA.js} +2 -2
- package/dist/{unicorn-RPPnNCYD.js → unicorn-CWMGFPMj.js} +6 -5
- package/dist/{unnecessary-abstractions-DLcQd0b1.js → unnecessary-abstractions-DHZcd6w1.js} +2 -2
- package/dist/{unocss-ktKlZ2K1.js → unocss-bPIUySNq.js} +2 -2
- package/dist/{unused-imports-DEOwHRMo.js → unused-imports-uppJbi80.js} +3 -3
- package/dist/vitest-BkX-b12G.js +51 -0
- package/dist/{vue-DEiN_gjl.js → vue-DsZ0KmKp.js} +9 -9
- package/dist/web-components-CBW8g8CV.js +17 -0
- package/dist/{yaml-DsAUnhnh.js → yaml-DfcwBcqE.js} +5 -5
- package/dist/{you-dont-need-lodash-underscore-DYXgGTQ3.js → you-dont-need-lodash-underscore-BqNDnNPc.js} +2 -2
- package/dist/zod--umO7QCQ.js +22 -0
- package/package.json +104 -83
- package/dist/angular-F9qCcdE6.js +0 -101
- package/dist/ember-Bl0U777e.js +0 -40
- package/dist/es-45sHkVBF.js +0 -50
- package/dist/es-CEJeBVF9.js +0 -4
- package/dist/eslint-DU9unf8c.js +0 -873
- package/dist/eslint-comments-DMzcVQWQ.js +0 -21
- package/dist/html-BbaOxlKS.js +0 -32
- package/dist/js--SRE4zHf.js +0 -95
- package/dist/jsonc-CnOutz13.js +0 -56
- package/dist/markdown-preferences-Bq_sYKqc.js +0 -40
- package/dist/package-json-BDPup-gO.js +0 -4
- package/dist/regexp-C30Zi6a5.js +0 -19
- package/dist/sonar-Bm2DxVM2.js +0 -28
- package/dist/vitest-CM6y5t89.js +0 -42
- package/dist/web-components-Cw4XPg2i.js +0 -17
- /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,16 @@ 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
|
+
|
|
534
546
|
## FAQ
|
|
535
547
|
|
|
536
548
|
### How do I add my own flat configs?
|
|
@@ -559,7 +571,7 @@ Alternatively, you can use [`@eslint/config-inspector`](https://npmjs.com/packag
|
|
|
559
571
|
|
|
560
572
|
## Troubleshooting & caveats
|
|
561
573
|
|
|
562
|
-
<!-- eslint-disable-next-line markdown-preferences/heading-casing
|
|
574
|
+
<!-- eslint-disable-next-line markdown-preferences/heading-casing -->
|
|
563
575
|
### TypeError: Key `languageOptions`: Key `globals`: Global `AudioWorkletGlobalScope ` has leading or trailing whitespace.
|
|
564
576
|
|
|
565
577
|
Install `globals` package as a dev dependency.
|
|
@@ -585,6 +597,8 @@ If you would like not to wait until the dependencies of `eslint-config-un` are u
|
|
|
585
597
|
[Testing Library]: ./assets/logos-testing-library.svg
|
|
586
598
|
[TypeScript]: ./assets/devicon-typescript.svg
|
|
587
599
|
[VueJS]: ./assets/devicon-vuejs.svg
|
|
600
|
+
[`eslint-plugin-import-x`]: https://npmjs.com/eslint-plugin-import-x
|
|
601
|
+
[eslint-plugin-import-x]: https://npmjs.com/eslint-plugin-import-x
|
|
588
602
|
[eslint-plugin-no-only-tests]: https://npmjs.com/eslint-plugin-no-only-tests
|
|
589
603
|
[npm]: ./assets/devicon-npm.svg
|
|
590
604
|
[pnpm]: ./assets/devicon-pnpm.svg
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { Dt as WARNING, E as fetchPackageInfo, S as assignDefaults, Tt as OFF, X as ERROR, b as pluginsLoaders, k as interopDefault, n as createConfigBuilder, rt as GLOB_HTML, ut as GLOB_JS_TS_X, w as cloneDeep } from "./eslint-CaoFmjOr.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
|
+
const angularUnConfig = async (context) => {
|
|
16
|
+
const optionsRaw = context.rootOptions.configs?.angular;
|
|
17
|
+
const optionsResolved = assignDefaults(optionsRaw, {
|
|
18
|
+
configTemplate: true,
|
|
19
|
+
processInlineTemplates: true,
|
|
20
|
+
componentClassSuffixes: ["Component"],
|
|
21
|
+
componentSelector: true,
|
|
22
|
+
componentStylesStyle: true,
|
|
23
|
+
directiveClassSuffixes: ["Directive"],
|
|
24
|
+
directiveSelector: true,
|
|
25
|
+
disallowedInputPrefixes: ["on"],
|
|
26
|
+
disallowAttributeDecorator: false,
|
|
27
|
+
disallowForwardRef: false
|
|
28
|
+
});
|
|
29
|
+
const angularVersion = optionsResolved.angularVersion ?? (() => {
|
|
30
|
+
const majorVersion = context.packagesInfo["@angular/core"]?.versions.major;
|
|
31
|
+
if (majorVersion != null && majorVersion >= SUPPORTED_ANGULAR_VERSIONS[0] && majorVersion <= LATEST_SUPPORTED_ANGULAR_VERSION) return majorVersion;
|
|
32
|
+
return LATEST_SUPPORTED_ANGULAR_VERSION;
|
|
33
|
+
})();
|
|
34
|
+
const { configTemplate, processInlineTemplates, componentClassSuffixes, componentSelector, componentStylesStyle, directiveClassSuffixes, directiveSelector, disallowedInputPrefixes, disallowAttributeDecorator, disallowForwardRef, pipePrefixes } = optionsResolved;
|
|
35
|
+
optionsResolved.preferStandaloneComponents ??= angularVersion >= 19;
|
|
36
|
+
const { preferStandaloneComponents } = optionsResolved;
|
|
37
|
+
const forbiddenMetadataProperties = {
|
|
38
|
+
inputs: true,
|
|
39
|
+
outputs: true,
|
|
40
|
+
queries: true,
|
|
41
|
+
...optionsResolved.forbiddenMetadataProperties
|
|
42
|
+
};
|
|
43
|
+
const configBuilderGeneral = createConfigBuilder(context, optionsResolved, "@angular-eslint");
|
|
44
|
+
const [angularEslintPlugin, angularEslintPluginPackageInfo, angularTemplateEslintPlugin, angularTemplateEslintPluginPackageInfo, angularTemplateParserPackageInfo, extractInlineHtmlProcessor] = await Promise.all([
|
|
45
|
+
pluginsLoaders["@angular-eslint"](context).then(({ module }) => module),
|
|
46
|
+
fetchPackageInfo("@angular-eslint/eslint-plugin"),
|
|
47
|
+
pluginsLoaders["@angular-eslint/template"](context).then(({ module }) => module),
|
|
48
|
+
fetchPackageInfo("@angular-eslint/eslint-plugin-template"),
|
|
49
|
+
fetchPackageInfo("@angular-eslint/template-parser"),
|
|
50
|
+
interopDefault(import("@angular-eslint/eslint-plugin-template")).then((m) => m.processors["extract-inline-html"]).then((processor) => {
|
|
51
|
+
const fixedProcessor = cloneDeep(processor);
|
|
52
|
+
fixedProcessor.meta ||= { name: "extract-inline-html" };
|
|
53
|
+
return fixedProcessor;
|
|
54
|
+
})
|
|
55
|
+
]);
|
|
56
|
+
[
|
|
57
|
+
[angularEslintPluginPackageInfo, "@angular-eslint/eslint-plugin"],
|
|
58
|
+
[angularTemplateEslintPluginPackageInfo, "@angular-eslint/eslint-plugin-template"],
|
|
59
|
+
[angularTemplateParserPackageInfo, "@angular-eslint/template-parser"]
|
|
60
|
+
].forEach(([packageInfo, packageName]) => {
|
|
61
|
+
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}).`);
|
|
62
|
+
});
|
|
63
|
+
const angularEslintPluginRules = Object.keys(angularEslintPlugin?.rules || {});
|
|
64
|
+
const getPluginRuleSeverity = (ruleName, severity) => [ruleName, angularEslintPlugin && !angularEslintPluginRules.includes(ruleName) ? OFF : severity];
|
|
65
|
+
configBuilderGeneral?.addConfig(["angular/general", {
|
|
66
|
+
includeDefaultFilesAndIgnores: true,
|
|
67
|
+
filesFallback: [GLOB_JS_TS_X]
|
|
68
|
+
}], { ...processInlineTemplates && { processor: extractInlineHtmlProcessor } }).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), [{
|
|
69
|
+
type: ["element"],
|
|
70
|
+
style: "kebab-case",
|
|
71
|
+
...typeof componentSelector === "object" && componentSelector
|
|
72
|
+
}]).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), [{
|
|
73
|
+
type: ["attribute"],
|
|
74
|
+
style: "camelCase",
|
|
75
|
+
...typeof directiveSelector === "object" && directiveSelector
|
|
76
|
+
}]).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();
|
|
77
|
+
const angularTemplateEslintPluginRules = Object.keys(angularTemplateEslintPlugin?.rules || {});
|
|
78
|
+
const getTemplatePluginRuleSeverity = (ruleName, severity) => [ruleName, angularTemplateEslintPlugin && !angularTemplateEslintPluginRules.includes(ruleName) ? OFF : severity];
|
|
79
|
+
const { a11yRules, preferControlFlow, preferNgSrc, requireLoopIndexes } = assignDefaults(configTemplate, {
|
|
80
|
+
a11yRules: true,
|
|
81
|
+
preferControlFlow: angularVersion >= 19,
|
|
82
|
+
preferNgSrc: false,
|
|
83
|
+
requireLoopIndexes: false
|
|
84
|
+
});
|
|
85
|
+
const a11yRulesSeverity = a11yRules === true ? ERROR : a11yRules === "warn" ? WARNING : OFF;
|
|
86
|
+
const configBuilderTemplate = createConfigBuilder(context, configTemplate, "@angular-eslint/template");
|
|
87
|
+
configBuilderTemplate?.addConfig(["angular/template", {
|
|
88
|
+
includeDefaultFilesAndIgnores: true,
|
|
89
|
+
filesFallback: [GLOB_HTML],
|
|
90
|
+
parser: "@angular-eslint/template-parser",
|
|
91
|
+
doNotIgnoreHtml: true
|
|
92
|
+
}]).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();
|
|
93
|
+
return {
|
|
94
|
+
configs: [configBuilderGeneral, configBuilderTemplate],
|
|
95
|
+
optionsResolved
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
export { angularUnConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as WARNING, S as assignDefaults, Tt as OFF, X as ERROR, Z as GLOB_ASTRO, b as pluginsLoaders, k as interopDefault, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/astro.ts
|
|
4
4
|
const DEFAULT_ASTRO_FILES = [GLOB_ASTRO];
|
|
@@ -30,10 +30,10 @@ const astroUnConfig = async (context) => {
|
|
|
30
30
|
doNotIgnoreMarkdown: true,
|
|
31
31
|
includeDefaultFilesAndIgnores: true,
|
|
32
32
|
filesFallback: DEFAULT_ASTRO_FILES
|
|
33
|
-
}]).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();
|
|
33
|
+
}]).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();
|
|
34
34
|
return {
|
|
35
35
|
configs: [configBuilder, ...configJsxA11y === false ? [] : await (async () => {
|
|
36
|
-
const { jsxA11yUnConfig } = await import("./jsx-a11y-
|
|
36
|
+
const { jsxA11yUnConfig } = await import("./jsx-a11y-BIdtj-0T.js");
|
|
37
37
|
return (await jsxA11yUnConfig(context, {
|
|
38
38
|
prefix: "astro",
|
|
39
39
|
options: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Dt as WARNING, S as assignDefaults, Tt as OFF, X as ERROR, dt as GLOB_JS_TS_X_EXTENSION, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
|
+
import { c as generateDefaultTestFiles, o as generateConfigNoOnlyTestsBuilder, r as RULES_TO_DISABLE_IN_TEST_FILES } from "./shared-CwQIlSxu.js";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/ava.ts
|
|
5
5
|
const avaUnConfig = (context) => {
|
|
@@ -12,9 +12,8 @@ const avaUnConfig = (context) => {
|
|
|
12
12
|
includeDefaultFilesAndIgnores: true,
|
|
13
13
|
filesFallback: configFilesFallback
|
|
14
14
|
}]).addRule("assertion-arguments", ERROR, enforceAssertionMessage == null ? [] : [{ message: enforceAssertionMessage ? "always" : "never" }]).addRule("hooks-order", ERROR).addRule("max-asserts", enforceMaxAssertions == null ? OFF : ERROR, enforceMaxAssertions == null ? [] : [enforceMaxAssertions]).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();
|
|
15
|
-
const configBuilderNoOnlyTests = generateConfigNoOnlyTestsBuilder(context, "ava", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback });
|
|
16
15
|
return {
|
|
17
|
-
configs: [configBuilder,
|
|
16
|
+
configs: [configBuilder, generateConfigNoOnlyTestsBuilder(context, "ava", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback })],
|
|
18
17
|
optionsResolved
|
|
19
18
|
};
|
|
20
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as WARNING, S as assignDefaults, Tt as OFF, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/better-tailwind.ts
|
|
4
4
|
const betterTailwindUnConfig = (context) => {
|
|
@@ -10,7 +10,7 @@ const betterTailwindUnConfig = (context) => {
|
|
|
10
10
|
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");
|
|
11
11
|
if (tailwindRealMajorVersion != null && (tailwindRealMajorVersion < 3 || tailwindRealMajorVersion > 4)) context.logger.warn("[betterTailwind] The detected Tailwind version is not supported by `eslint-plugin-better-tailwindcss`");
|
|
12
12
|
const configBuilder = createConfigBuilder(context, optionsResolved, "better-tailwindcss");
|
|
13
|
-
configBuilder?.addConfig(["better-tailwindcss", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: { "better-tailwindcss": pluginSettings } } }).addRule("enforce-consistent-
|
|
13
|
+
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();
|
|
14
14
|
return {
|
|
15
15
|
configs: [configBuilder],
|
|
16
16
|
optionsResolved
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as assignDefaults, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/case-police.ts
|
|
4
4
|
const casePoliceUnConfig = (context) => {
|
|
@@ -11,7 +11,7 @@ const casePoliceUnConfig = (context) => {
|
|
|
11
11
|
doNotIgnoreHtml: true,
|
|
12
12
|
doNotIgnoreMarkdown: true,
|
|
13
13
|
doNotIgnoreMdx: true
|
|
14
|
-
}]).addRule("string-check", ERROR).addOverrides();
|
|
14
|
+
}]).addRule("string-check", ERROR).enableConfigTesterForPlugin("case-police").addOverrides();
|
|
15
15
|
return {
|
|
16
16
|
configs: [configBuilder],
|
|
17
17
|
optionsResolved
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ERROR, GLOB_JS_TS_EXTENSION,
|
|
1
|
+
import { S as assignDefaults, X as ERROR, lt as GLOB_JS_TS_EXTENSION, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/extra/cli.ts
|
|
4
4
|
const DEFAULT_CLI_DIRS = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { esUnConfig } from "./es-
|
|
1
|
+
import { S as assignDefaults, Tt as OFF, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
|
+
import { t as esUnConfig } from "./es-DeZRlxZp.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`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as assignDefaults, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/compat.ts
|
|
4
4
|
const compatUnConfig = (context) => {
|
|
@@ -6,7 +6,7 @@ const compatUnConfig = (context) => {
|
|
|
6
6
|
const optionsResolved = assignDefaults(optionsRaw, {});
|
|
7
7
|
const { settings: pluginSettings } = optionsResolved;
|
|
8
8
|
const configBuilder = createConfigBuilder(context, optionsResolved, "compat");
|
|
9
|
-
configBuilder?.addConfig(["compat", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: pluginSettings } }).addRule("compat", ERROR).addOverrides();
|
|
9
|
+
configBuilder?.addConfig(["compat", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: pluginSettings } }).addRule("compat", ERROR).enableConfigTesterForPlugin("compat").addOverrides();
|
|
10
10
|
return {
|
|
11
11
|
configs: [configBuilder],
|
|
12
12
|
optionsResolved
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as assignDefaults, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/cspell.ts
|
|
4
4
|
const cspellUnConfig = (context) => {
|
|
@@ -12,7 +12,7 @@ const cspellUnConfig = (context) => {
|
|
|
12
12
|
doNotIgnoreHtml: true,
|
|
13
13
|
doNotIgnoreMarkdown: true,
|
|
14
14
|
doNotIgnoreMdx: true
|
|
15
|
-
}]).addRule("spellchecker", ERROR, options ? [options] : []).addOverrides();
|
|
15
|
+
}]).addRule("spellchecker", ERROR, options ? [options] : []).enableConfigTesterForPlugin("@cspell").addOverrides();
|
|
16
16
|
return {
|
|
17
17
|
configs: [configBuilder],
|
|
18
18
|
optionsResolved
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as GLOB_CSS, D as getKeysOfTruthyValues, Dt as WARNING, S as assignDefaults, Tt as OFF, X as ERROR, k as interopDefault, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/css.ts
|
|
4
4
|
const cssUnConfig = async (context) => {
|
|
5
|
-
const { tailwind3: tailwind3Syntax, tailwind4: tailwind4Syntax } = await interopDefault(import("tailwind-csstree"));
|
|
6
5
|
const optionsRaw = context.rootOptions.configs?.css;
|
|
7
6
|
const optionsResolved = assignDefaults(optionsRaw, { tolerantMode: false });
|
|
8
7
|
const { tolerantMode, customSyntax, allowedFontUnits, allowedFeatures } = optionsResolved;
|
|
@@ -18,19 +17,22 @@ const cssUnConfig = async (context) => {
|
|
|
18
17
|
languageOptions: {
|
|
19
18
|
...tolerantMode && { tolerant: true },
|
|
20
19
|
customSyntax: {
|
|
21
|
-
...
|
|
20
|
+
...await (async () => {
|
|
21
|
+
if (tailwindPackageInfo && (tailwindMajorVersion === 4 || tailwindMajorVersion === 3)) return (await interopDefault(import("tailwind-csstree")))[`tailwind${tailwindMajorVersion}`];
|
|
22
|
+
return null;
|
|
23
|
+
})(),
|
|
22
24
|
...customSyntax
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
|
-
}).addRule("font-family-fallbacks", WARNING).addRule("no-duplicate-
|
|
27
|
+
}).addRule("font-family-fallbacks", WARNING).addRule("no-duplicate-imports", ERROR).addRule("no-duplicate-keyframe-selectors", ERROR).addRule("no-empty-blocks", ERROR).addRule("no-important", WARNING).addRule("no-invalid-at-rule-placement", ERROR).addRule("no-invalid-at-rules", ERROR).addRule("no-invalid-named-grid-areas", ERROR).addRule("no-invalid-properties", ERROR, [{ allowUnknownVariables: true }]).addRule("no-unmatchable-selectors", ERROR).addRule("prefer-logical-properties", OFF).addRule("relative-font-units", ERROR, [{ allowUnits: getKeysOfTruthyValues({
|
|
26
28
|
rem: true,
|
|
27
29
|
em: true,
|
|
28
30
|
...allowedFontUnits
|
|
29
|
-
}) }]).addRule("
|
|
31
|
+
}) }]).addRule("selector-complexity", OFF).addRule("use-baseline", WARNING, [{
|
|
30
32
|
...allowedFeatures?.atRules?.length && { allowAtRules: allowedFeatures.atRules },
|
|
31
33
|
...allowedFeatures?.properties?.length && { allowProperties: allowedFeatures.properties },
|
|
32
34
|
...allowedFeatures?.selectors?.length && { allowSelectors: allowedFeatures.selectors }
|
|
33
|
-
}]).addRule("use-layers", OFF).addOverrides();
|
|
35
|
+
}]).addRule("use-layers", OFF).enableConfigTesterForPlugin("css").addOverrides();
|
|
34
36
|
return {
|
|
35
37
|
configs: [configBuilder],
|
|
36
38
|
optionsResolved
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as assignDefaults, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/css-in-js.ts
|
|
4
4
|
const cssInJsUnConfig = (context) => {
|
|
@@ -11,7 +11,7 @@ const cssInJsUnConfig = (context) => {
|
|
|
11
11
|
const { settings: pluginSettings, hexColorsStyle, preferNamedColors: preferNamedColorsRaw, avoidLeadingZero, propertyCasing } = optionsResolved;
|
|
12
12
|
const preferNamedColors = typeof preferNamedColorsRaw === "object" ? preferNamedColorsRaw : { flag: preferNamedColorsRaw ?? false };
|
|
13
13
|
const configBuilder = createConfigBuilder(context, optionsResolved, "css-in-js");
|
|
14
|
-
configBuilder?.addConfig(["css-in-js", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: { css: pluginSettings } } }).addRule("color-hex-style", ERROR, [hexColorsStyle === "long" ? "RRGGBB" : "RGB"]).addRule("named-color", ERROR, [preferNamedColors.flag ? "always" : "never", { ...preferNamedColors.ignoreProperties?.length && { ignoreProperties: preferNamedColors.ignoreProperties } }]).addRule("no-dupe-properties", ERROR).addRule("no-invalid-color-hex", ERROR).addRule("no-length-zero-unit", ERROR).addRule("no-number-trailing-zeros", ERROR).addRule("no-shorthand-property-overrides", ERROR).addRule("no-unknown-property", ERROR).addRule("no-unknown-unit", ERROR).addRule("no-useless-color-alpha", ERROR).addRule("number-leading-zero", ERROR, [avoidLeadingZero ? "never" : "always"]).addRule("prefer-reduce-shorthand-property-box-values", ERROR).addRule("property-casing", ERROR, [propertyCasing]).addOverrides();
|
|
14
|
+
configBuilder?.addConfig(["css-in-js", { includeDefaultFilesAndIgnores: true }], { ...pluginSettings && { settings: { css: pluginSettings } } }).addRule("color-hex-style", ERROR, [hexColorsStyle === "long" ? "RRGGBB" : "RGB"]).addRule("named-color", ERROR, [preferNamedColors.flag ? "always" : "never", { ...preferNamedColors.ignoreProperties?.length && { ignoreProperties: preferNamedColors.ignoreProperties } }]).addRule("no-dupe-properties", ERROR).addRule("no-invalid-color-hex", ERROR).addRule("no-length-zero-unit", ERROR).addRule("no-number-trailing-zeros", ERROR).addRule("no-shorthand-property-overrides", ERROR).addRule("no-unknown-property", ERROR).addRule("no-unknown-unit", ERROR).addRule("no-useless-color-alpha", ERROR).addRule("number-leading-zero", ERROR, [avoidLeadingZero ? "never" : "always"]).addRule("prefer-reduce-shorthand-property-box-values", ERROR).addRule("property-casing", ERROR, [propertyCasing]).enableConfigTesterForPlugin("css-in-js").addOverrides();
|
|
15
15
|
return {
|
|
16
16
|
configs: [configBuilder],
|
|
17
17
|
optionsResolved
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Dt as WARNING, S as assignDefaults, Tt as OFF, X as ERROR, dt as GLOB_JS_TS_X_EXTENSION, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
|
+
import { c as generateDefaultTestFiles, o as generateConfigNoOnlyTestsBuilder, r as RULES_TO_DISABLE_IN_TEST_FILES } from "./shared-CwQIlSxu.js";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/cypress.ts
|
|
5
5
|
const cypressUnConfig = (context) => {
|
|
@@ -11,10 +11,9 @@ const cypressUnConfig = (context) => {
|
|
|
11
11
|
configBuilder?.addConfig(["cypress", {
|
|
12
12
|
includeDefaultFilesAndIgnores: true,
|
|
13
13
|
filesFallback: configFilesFallback
|
|
14
|
-
}]).addRule("assertion-before-screenshot", WARNING).addRule("no-assigning-return-values", ERROR).addRule("no-async-before", ERROR).addRule("no-async-tests", ERROR).addRule("no-chained-get", WARNING).addRule("no-debug", ERROR).addRule("no-force", WARNING).addRule("no-pause", ERROR).addRule("no-unnecessary-waiting", ERROR).addRule("no-xpath", OFF).addRule("require-data-selectors", OFF).addRule("unsafe-to-chain-command", ERROR).disableBulkRules(RULES_TO_DISABLE_IN_TEST_FILES).addOverrides();
|
|
15
|
-
const configBuilderNoOnlyTests = generateConfigNoOnlyTestsBuilder(context, "cypress", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback });
|
|
14
|
+
}]).addRule("assertion-before-screenshot", WARNING).addRule("no-assigning-return-values", ERROR).addRule("no-async-before", ERROR).addRule("no-async-tests", ERROR).addRule("no-chained-get", WARNING).addRule("no-debug", ERROR).addRule("no-force", WARNING).addRule("no-pause", ERROR).addRule("no-unnecessary-waiting", ERROR).addRule("no-xpath", OFF).addRule("require-data-selectors", OFF).addRule("unsafe-to-chain-command", ERROR).disableBulkRules(RULES_TO_DISABLE_IN_TEST_FILES).enableConfigTesterForPlugin("cypress").addOverrides();
|
|
16
15
|
return {
|
|
17
|
-
configs: [configBuilder,
|
|
16
|
+
configs: [configBuilder, generateConfigNoOnlyTestsBuilder(context, "cypress", configNoOnlyTests, optionsResolved, { filesFallback: configFilesFallback })],
|
|
18
17
|
optionsResolved
|
|
19
18
|
};
|
|
20
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as assignDefaults, X as ERROR, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/de-morgan.ts
|
|
4
4
|
const deMorganUnConfig = (context) => {
|
|
@@ -8,7 +8,7 @@ const deMorganUnConfig = (context) => {
|
|
|
8
8
|
configBuilder?.addConfig(["de-morgan", {
|
|
9
9
|
includeDefaultFilesAndIgnores: true,
|
|
10
10
|
doNotIgnoreHtml: true
|
|
11
|
-
}]).addRule("no-negated-conjunction", ERROR).addRule("no-negated-disjunction", ERROR).addOverrides();
|
|
11
|
+
}]).addRule("no-negated-conjunction", ERROR).addRule("no-negated-disjunction", ERROR).enableConfigTesterForPlugin("de-morgan").addOverrides();
|
|
12
12
|
return {
|
|
13
13
|
configs: [configBuilder],
|
|
14
14
|
optionsResolved
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DEFAULT_FILES_PACKAGE_JSON } from "./package-json-
|
|
1
|
+
import { S as assignDefaults, X as ERROR, k as interopDefault, n as createConfigBuilder } from "./eslint-CaoFmjOr.js";
|
|
2
|
+
import { t as DEFAULT_FILES_PACKAGE_JSON } from "./package-json-BjlwK0rG.js";
|
|
3
3
|
|
|
4
4
|
//#region src/configs/depend.ts
|
|
5
5
|
const dependUnConfig = async (context) => {
|
|
@@ -11,7 +11,7 @@ const dependUnConfig = async (context) => {
|
|
|
11
11
|
configBuilder?.addConfig(["depend", {
|
|
12
12
|
includeDefaultFilesAndIgnores: true,
|
|
13
13
|
filesFallback: DEFAULT_FILES_PACKAGE_JSON
|
|
14
|
-
}], { languageOptions: { parser: jsoncEslintParser } }).addRule("ban-dependencies", ERROR, badDependencyOptions ? [badDependencyOptions] : []).addOverrides();
|
|
14
|
+
}], { languageOptions: { parser: jsoncEslintParser } }).addRule("ban-dependencies", ERROR, badDependencyOptions ? [badDependencyOptions] : []).enableConfigTesterForPlugin("depend").addOverrides();
|
|
15
15
|
return {
|
|
16
16
|
configs: [configBuilder],
|
|
17
17
|
optionsResolved
|