@santi020k/eslint-config-integrations 2.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/compose.d.ts +21 -0
- package/dist/compose.js +137 -0
- package/dist/compose.js.map +1 -0
- package/dist/extensions/a11y.d.ts +9 -0
- package/dist/extensions/a11y.js +25 -0
- package/dist/extensions/a11y.js.map +1 -0
- package/dist/extensions/best-practices.d.ts +16 -0
- package/dist/extensions/best-practices.js +27 -0
- package/dist/extensions/best-practices.js.map +1 -0
- package/dist/extensions/biome.d.ts +9 -0
- package/dist/extensions/biome.js +18 -0
- package/dist/extensions/biome.js.map +1 -0
- package/dist/extensions/boundaries.d.ts +12 -0
- package/dist/extensions/boundaries.js +40 -0
- package/dist/extensions/boundaries.js.map +1 -0
- package/dist/extensions/compat.d.ts +9 -0
- package/dist/extensions/compat.js +16 -0
- package/dist/extensions/compat.js.map +1 -0
- package/dist/extensions/de-morgan.d.ts +9 -0
- package/dist/extensions/de-morgan.js +16 -0
- package/dist/extensions/de-morgan.js.map +1 -0
- package/dist/extensions/depend.d.ts +10 -0
- package/dist/extensions/depend.js +16 -0
- package/dist/extensions/depend.js.map +1 -0
- package/dist/extensions/index.d.ts +16 -0
- package/dist/extensions/index.js +33 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/extensions/no-only-tests.d.ts +9 -0
- package/dist/extensions/no-only-tests.js +21 -0
- package/dist/extensions/no-only-tests.js.map +1 -0
- package/dist/extensions/node.d.ts +11 -0
- package/dist/extensions/node.js +25 -0
- package/dist/extensions/node.js.map +1 -0
- package/dist/extensions/oxlint.d.ts +10 -0
- package/dist/extensions/oxlint.js +14 -0
- package/dist/extensions/oxlint.js.map +1 -0
- package/dist/extensions/perfectionist.d.ts +9 -0
- package/dist/extensions/perfectionist.js +25 -0
- package/dist/extensions/perfectionist.js.map +1 -0
- package/dist/extensions/regexp.d.ts +10 -0
- package/dist/extensions/regexp.js +28 -0
- package/dist/extensions/regexp.js.map +1 -0
- package/dist/extensions/security.d.ts +9 -0
- package/dist/extensions/security.js +21 -0
- package/dist/extensions/security.js.map +1 -0
- package/dist/extensions/sonarjs.d.ts +5 -0
- package/dist/extensions/sonarjs.js +16 -0
- package/dist/extensions/sonarjs.js.map +1 -0
- package/dist/extensions/unicorn.d.ts +9 -0
- package/dist/extensions/unicorn.js +47 -0
- package/dist/extensions/unicorn.js.map +1 -0
- package/dist/formats/css.d.ts +9 -0
- package/dist/formats/css.js +21 -0
- package/dist/formats/css.js.map +1 -0
- package/dist/formats/graphql.d.ts +9 -0
- package/dist/formats/graphql.js +41 -0
- package/dist/formats/graphql.js.map +1 -0
- package/dist/formats/html.d.ts +9 -0
- package/dist/formats/html.js +29 -0
- package/dist/formats/html.js.map +1 -0
- package/dist/formats/index.d.ts +10 -0
- package/dist/formats/index.js +21 -0
- package/dist/formats/index.js.map +1 -0
- package/dist/formats/jsonc.d.ts +9 -0
- package/dist/formats/jsonc.js +73 -0
- package/dist/formats/jsonc.js.map +1 -0
- package/dist/formats/markdown.d.ts +9 -0
- package/dist/formats/markdown.js +73 -0
- package/dist/formats/markdown.js.map +1 -0
- package/dist/formats/mdx.d.ts +9 -0
- package/dist/formats/mdx.js +55 -0
- package/dist/formats/mdx.js.map +1 -0
- package/dist/formats/package-json.d.ts +9 -0
- package/dist/formats/package-json.js +16 -0
- package/dist/formats/package-json.js.map +1 -0
- package/dist/formats/toml.d.ts +9 -0
- package/dist/formats/toml.js +14 -0
- package/dist/formats/toml.js.map +1 -0
- package/dist/formats/yaml.d.ts +9 -0
- package/dist/formats/yaml.js +28 -0
- package/dist/formats/yaml.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/lazy.d.ts +24 -0
- package/dist/lazy.js +46 -0
- package/dist/lazy.js.map +1 -0
- package/dist/libraries/ai.d.ts +8 -0
- package/dist/libraries/ai.js +29 -0
- package/dist/libraries/ai.js.map +1 -0
- package/dist/libraries/autogen.d.ts +8 -0
- package/dist/libraries/autogen.js +24 -0
- package/dist/libraries/autogen.js.map +1 -0
- package/dist/libraries/google-genai.d.ts +8 -0
- package/dist/libraries/google-genai.js +30 -0
- package/dist/libraries/google-genai.js.map +1 -0
- package/dist/libraries/i18next.d.ts +9 -0
- package/dist/libraries/i18next.js +29 -0
- package/dist/libraries/i18next.js.map +1 -0
- package/dist/libraries/index.d.ts +17 -0
- package/dist/libraries/index.js +38 -0
- package/dist/libraries/index.js.map +1 -0
- package/dist/libraries/langchain.d.ts +8 -0
- package/dist/libraries/langchain.js +30 -0
- package/dist/libraries/langchain.js.map +1 -0
- package/dist/libraries/llamaindex.d.ts +8 -0
- package/dist/libraries/llamaindex.js +30 -0
- package/dist/libraries/llamaindex.js.map +1 -0
- package/dist/libraries/mastra.d.ts +8 -0
- package/dist/libraries/mastra.js +30 -0
- package/dist/libraries/mastra.js.map +1 -0
- package/dist/libraries/mcp.d.ts +8 -0
- package/dist/libraries/mcp.js +33 -0
- package/dist/libraries/mcp.js.map +1 -0
- package/dist/libraries/openai-agents.d.ts +8 -0
- package/dist/libraries/openai-agents.js +32 -0
- package/dist/libraries/openai-agents.js.map +1 -0
- package/dist/libraries/orm.d.ts +31 -0
- package/dist/libraries/orm.js +104 -0
- package/dist/libraries/orm.js.map +1 -0
- package/dist/libraries/stencil.d.ts +9 -0
- package/dist/libraries/stencil.js +49 -0
- package/dist/libraries/stencil.js.map +1 -0
- package/dist/libraries/storybook.d.ts +9 -0
- package/dist/libraries/storybook.js +11 -0
- package/dist/libraries/storybook.js.map +1 -0
- package/dist/libraries/tailwind.d.ts +9 -0
- package/dist/libraries/tailwind.js +21 -0
- package/dist/libraries/tailwind.js.map +1 -0
- package/dist/libraries/tanstack.d.ts +12 -0
- package/dist/libraries/tanstack.js +37 -0
- package/dist/libraries/tanstack.js.map +1 -0
- package/dist/libraries/turbo.d.ts +9 -0
- package/dist/libraries/turbo.js +25 -0
- package/dist/libraries/turbo.js.map +1 -0
- package/dist/libraries/zod.d.ts +9 -0
- package/dist/libraries/zod.js +21 -0
- package/dist/libraries/zod.js.map +1 -0
- package/dist/testing/cypress.d.ts +9 -0
- package/dist/testing/cypress.js +26 -0
- package/dist/testing/cypress.js.map +1 -0
- package/dist/testing/index.d.ts +7 -0
- package/dist/testing/index.js +15 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/jest-dom.d.ts +9 -0
- package/dist/testing/jest-dom.js +21 -0
- package/dist/testing/jest-dom.js.map +1 -0
- package/dist/testing/jest.d.ts +9 -0
- package/dist/testing/jest.js +24 -0
- package/dist/testing/jest.js.map +1 -0
- package/dist/testing/playwright.d.ts +9 -0
- package/dist/testing/playwright.js +21 -0
- package/dist/testing/playwright.js.map +1 -0
- package/dist/testing/testing-library.d.ts +9 -0
- package/dist/testing/testing-library.js +34 -0
- package/dist/testing/testing-library.js.map +1 -0
- package/dist/testing/vitest.d.ts +9 -0
- package/dist/testing/vitest.js +57 -0
- package/dist/testing/vitest.js.map +1 -0
- package/dist/tools/command.d.ts +9 -0
- package/dist/tools/command.js +16 -0
- package/dist/tools/command.js.map +1 -0
- package/dist/tools/cspell.d.ts +9 -0
- package/dist/tools/cspell.js +26 -0
- package/dist/tools/cspell.js.map +1 -0
- package/dist/tools/docker.d.ts +10 -0
- package/dist/tools/docker.js +21 -0
- package/dist/tools/docker.js.map +1 -0
- package/dist/tools/github-actions.d.ts +10 -0
- package/dist/tools/github-actions.js +16 -0
- package/dist/tools/github-actions.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.js +21 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/jsdoc.d.ts +9 -0
- package/dist/tools/jsdoc.js +36 -0
- package/dist/tools/jsdoc.js.map +1 -0
- package/dist/tools/nx.d.ts +9 -0
- package/dist/tools/nx.js +18 -0
- package/dist/tools/nx.js.map +1 -0
- package/dist/tools/pnpm.d.ts +10 -0
- package/dist/tools/pnpm.js +12 -0
- package/dist/tools/pnpm.js.map +1 -0
- package/dist/tools/prettier.d.ts +9 -0
- package/dist/tools/prettier.js +14 -0
- package/dist/tools/prettier.js.map +1 -0
- package/dist/tools/swagger.d.ts +9 -0
- package/dist/tools/swagger.js +22 -0
- package/dist/tools/swagger.js.map +1 -0
- package/package.json +136 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { defineLazyConfig, loadDefault } from "../lazy.js";
|
|
2
|
+
const markdown = defineLazyConfig("markdown", async () => {
|
|
3
|
+
const pluginMarkdown = await loadDefault("@eslint/markdown");
|
|
4
|
+
const tsEslint = await loadDefault("typescript-eslint");
|
|
5
|
+
return [
|
|
6
|
+
...pluginMarkdown.configs.recommended,
|
|
7
|
+
{
|
|
8
|
+
files: ["**/*.md"],
|
|
9
|
+
language: "markdown/commonmark",
|
|
10
|
+
name: "integrations/markdown",
|
|
11
|
+
rules: {
|
|
12
|
+
"@stylistic/indent": "off",
|
|
13
|
+
"@stylistic/jsx-closing-bracket-location": "off",
|
|
14
|
+
"@stylistic/jsx-tag-spacing": "off",
|
|
15
|
+
"@stylistic/lines-around-comment": "off",
|
|
16
|
+
"@stylistic/no-multi-spaces": "off",
|
|
17
|
+
"comma-dangle": "off",
|
|
18
|
+
// Disable js/ts Eslint rules that conflict with markdown
|
|
19
|
+
indent: "off",
|
|
20
|
+
"markdown/fenced-code-language": "error",
|
|
21
|
+
"markdown/heading-increment": "error",
|
|
22
|
+
"markdown/no-duplicate-headings": "off",
|
|
23
|
+
"markdown/no-empty-links": "error",
|
|
24
|
+
"markdown/no-html": "off",
|
|
25
|
+
"markdown/no-invalid-label-refs": "error",
|
|
26
|
+
"markdown/no-missing-label-refs": "off",
|
|
27
|
+
"no-irregular-whitespace": "off",
|
|
28
|
+
"no-multi-spaces": "off",
|
|
29
|
+
"no-unused-vars": "off"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
files: ["**/*.md/*.ts", "**/*.md/*.tsx", "**/*.md/*.js", "**/*.md/*.jsx"],
|
|
34
|
+
languageOptions: {
|
|
35
|
+
parserOptions: {
|
|
36
|
+
allowDefaultProject: true,
|
|
37
|
+
program: null,
|
|
38
|
+
project: null,
|
|
39
|
+
projectService: false
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
name: "integrations/markdown-code-blocks",
|
|
43
|
+
rules: {
|
|
44
|
+
"@typescript-eslint/await-thenable": "off",
|
|
45
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
46
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
47
|
+
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
|
48
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
49
|
+
// Disable type-aware rules — code blocks in markdown have no tsconfig
|
|
50
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
51
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
52
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
53
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
54
|
+
"@typescript-eslint/require-await": "off",
|
|
55
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
56
|
+
"@typescript-eslint/unbound-method": "off",
|
|
57
|
+
// Disable other rules that don't make sense for code snippets
|
|
58
|
+
...tsEslint.configs.disableTypeChecked.rules,
|
|
59
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
60
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
61
|
+
"@typescript-eslint/no-unused-expressions": "off",
|
|
62
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
63
|
+
"no-undef": "off",
|
|
64
|
+
"no-unused-expressions": "off",
|
|
65
|
+
"no-unused-vars": "off"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
markdown
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formats/markdown.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils'\n\nimport { type ConfigWithRules, defineLazyConfig, loadDefault } from '../lazy.js'\n\ninterface MarkdownPlugin {\n configs: {\n recommended: TSESLint.FlatConfig.ConfigArray\n }\n}\n\ninterface TypescriptEslint {\n configs: {\n disableTypeChecked: ConfigWithRules\n }\n}\n\n/**\n * Markdown ESLint configuration\n * Lints markdown files for common issues\n */\nexport const markdown: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('markdown', async () => {\n const pluginMarkdown = await loadDefault<MarkdownPlugin>('@eslint/markdown')\n const tsEslint = await loadDefault<TypescriptEslint>('typescript-eslint')\n\n return [\n ...(pluginMarkdown.configs.recommended),\n {\n files: ['**/*.md'],\n language: 'markdown/commonmark',\n name: 'integrations/markdown',\n rules: {\n '@stylistic/indent': 'off',\n '@stylistic/jsx-closing-bracket-location': 'off',\n '@stylistic/jsx-tag-spacing': 'off',\n '@stylistic/lines-around-comment': 'off',\n '@stylistic/no-multi-spaces': 'off',\n 'comma-dangle': 'off',\n // Disable js/ts Eslint rules that conflict with markdown\n indent: 'off',\n 'markdown/fenced-code-language': 'error',\n 'markdown/heading-increment': 'error',\n 'markdown/no-duplicate-headings': 'off',\n 'markdown/no-empty-links': 'error',\n 'markdown/no-html': 'off',\n 'markdown/no-invalid-label-refs': 'error',\n 'markdown/no-missing-label-refs': 'off',\n 'no-irregular-whitespace': 'off',\n 'no-multi-spaces': 'off',\n 'no-unused-vars': 'off'\n }\n },\n {\n files: ['**/*.md/*.ts', '**/*.md/*.tsx', '**/*.md/*.js', '**/*.md/*.jsx'],\n languageOptions: {\n parserOptions: {\n allowDefaultProject: true,\n program: null,\n project: null,\n projectService: false\n }\n },\n name: 'integrations/markdown-code-blocks',\n rules: {\n '@typescript-eslint/await-thenable': 'off',\n '@typescript-eslint/no-floating-promises': 'off',\n '@typescript-eslint/no-misused-promises': 'off',\n '@typescript-eslint/no-unnecessary-type-assertion': 'off',\n '@typescript-eslint/no-unsafe-argument': 'off',\n // Disable type-aware rules — code blocks in markdown have no tsconfig\n '@typescript-eslint/no-unsafe-assignment': 'off',\n '@typescript-eslint/no-unsafe-call': 'off',\n '@typescript-eslint/no-unsafe-member-access': 'off',\n '@typescript-eslint/no-unsafe-return': 'off',\n '@typescript-eslint/require-await': 'off',\n '@typescript-eslint/restrict-template-expressions': 'off',\n '@typescript-eslint/unbound-method': 'off',\n // Disable other rules that don't make sense for code snippets\n ...tsEslint.configs.disableTypeChecked.rules,\n '@typescript-eslint/consistent-type-imports': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-unused-expressions': 'off',\n '@typescript-eslint/no-unused-vars': 'off',\n 'no-undef': 'off',\n 'no-unused-expressions': 'off',\n 'no-unused-vars': 'off'\n }\n }\n ]\n})\n"],"mappings":"AAEA,SAA+B,kBAAkB,mBAAmB;AAkB7D,MAAM,WAA2D,iBAAiB,YAAY,YAAY;AAC/G,QAAM,iBAAiB,MAAM,YAA4B,kBAAkB;AAC3E,QAAM,WAAW,MAAM,YAA8B,mBAAmB;AAExE,SAAO;AAAA,IACL,GAAI,eAAe,QAAQ;AAAA,IAC3B;AAAA,MACE,OAAO,CAAC,SAAS;AAAA,MACjB,UAAU;AAAA,MACV,MAAM;AAAA,MACN,OAAO;AAAA,QACL,qBAAqB;AAAA,QACrB,2CAA2C;AAAA,QAC3C,8BAA8B;AAAA,QAC9B,mCAAmC;AAAA,QACnC,8BAA8B;AAAA,QAC9B,gBAAgB;AAAA;AAAA,QAEhB,QAAQ;AAAA,QACR,iCAAiC;AAAA,QACjC,8BAA8B;AAAA,QAC9B,kCAAkC;AAAA,QAClC,2BAA2B;AAAA,QAC3B,oBAAoB;AAAA,QACpB,kCAAkC;AAAA,QAClC,kCAAkC;AAAA,QAClC,2BAA2B;AAAA,QAC3B,mBAAmB;AAAA,QACnB,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,gBAAgB,iBAAiB,gBAAgB,eAAe;AAAA,MACxE,iBAAiB;AAAA,QACf,eAAe;AAAA,UACb,qBAAqB;AAAA,UACrB,SAAS;AAAA,UACT,SAAS;AAAA,UACT,gBAAgB;AAAA,QAClB;AAAA,MACF;AAAA,MACA,MAAM;AAAA,MACN,OAAO;AAAA,QACL,qCAAqC;AAAA,QACrC,2CAA2C;AAAA,QAC3C,0CAA0C;AAAA,QAC1C,oDAAoD;AAAA,QACpD,yCAAyC;AAAA;AAAA,QAEzC,2CAA2C;AAAA,QAC3C,qCAAqC;AAAA,QACrC,8CAA8C;AAAA,QAC9C,uCAAuC;AAAA,QACvC,oCAAoC;AAAA,QACpC,oDAAoD;AAAA,QACpD,qCAAqC;AAAA;AAAA,QAErC,GAAG,SAAS,QAAQ,mBAAmB;AAAA,QACvC,8CAA8C;AAAA,QAC9C,sCAAsC;AAAA,QACtC,4CAA4C;AAAA,QAC5C,qCAAqC;AAAA,QACrC,YAAY;AAAA,QACZ,yBAAyB;AAAA,QACzB,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { defineLazyConfig, loadDefault, loadModule } from "../lazy.js";
|
|
2
|
+
const mdx = defineLazyConfig("mdx", async () => {
|
|
3
|
+
const pluginMdx = await loadModule("eslint-plugin-mdx");
|
|
4
|
+
const tsEslint = await loadDefault("typescript-eslint");
|
|
5
|
+
const rules = {
|
|
6
|
+
...pluginMdx.flatCodeBlocks.rules,
|
|
7
|
+
"@stylistic/indent": "off",
|
|
8
|
+
"@stylistic/jsx-closing-bracket-location": "off",
|
|
9
|
+
"@stylistic/jsx-tag-spacing": "off",
|
|
10
|
+
"@stylistic/no-multi-spaces": "off",
|
|
11
|
+
"comma-dangle": "off",
|
|
12
|
+
indent: "off",
|
|
13
|
+
"no-multi-spaces": "off",
|
|
14
|
+
"no-unused-vars": "off",
|
|
15
|
+
"no-var": "error",
|
|
16
|
+
"prefer-const": "error"
|
|
17
|
+
};
|
|
18
|
+
return [
|
|
19
|
+
{
|
|
20
|
+
files: ["**/*.mdx"],
|
|
21
|
+
...pluginMdx.flat,
|
|
22
|
+
processor: pluginMdx.createRemarkProcessor({
|
|
23
|
+
languageMapper: {},
|
|
24
|
+
lintCodeBlocks: true
|
|
25
|
+
}),
|
|
26
|
+
rules
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
files: ["**/*.mdx"],
|
|
30
|
+
...pluginMdx.flatCodeBlocks,
|
|
31
|
+
rules
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
files: ["**/*.mdx/*.ts", "**/*.mdx/*.tsx"],
|
|
35
|
+
languageOptions: {
|
|
36
|
+
parserOptions: {
|
|
37
|
+
allowDefaultProject: true,
|
|
38
|
+
program: null,
|
|
39
|
+
project: null,
|
|
40
|
+
projectService: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
name: "eslint-config-mdx/disable-type-checked",
|
|
44
|
+
rules: {
|
|
45
|
+
...tsEslint.configs.disableTypeChecked.rules,
|
|
46
|
+
"@typescript-eslint/no-unused-expressions": "off",
|
|
47
|
+
"no-unused-expressions": "off"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
mdx
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=mdx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formats/mdx.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils'\nimport type * as PluginMdx from 'eslint-plugin-mdx'\nimport type TsEslint from 'typescript-eslint'\n\nimport { defineLazyConfig, loadDefault, loadModule } from '../lazy.js'\n\n/**\n * MDX ESLint configuration\n * Lints MDX files with proper code block handling\n */\nexport const mdx: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('mdx', async () => {\n const pluginMdx = await loadModule<typeof PluginMdx>('eslint-plugin-mdx')\n const tsEslint = await loadDefault<typeof TsEslint>('typescript-eslint')\n\n const rules: TSESLint.Linter.RulesRecord = {\n ...pluginMdx.flatCodeBlocks.rules,\n '@stylistic/indent': 'off',\n '@stylistic/jsx-closing-bracket-location': 'off',\n '@stylistic/jsx-tag-spacing': 'off',\n '@stylistic/no-multi-spaces': 'off',\n 'comma-dangle': 'off',\n indent: 'off',\n 'no-multi-spaces': 'off',\n 'no-unused-vars': 'off',\n 'no-var': 'error',\n 'prefer-const': 'error'\n }\n\n return [\n {\n files: ['**/*.mdx'],\n ...pluginMdx.flat,\n processor: pluginMdx.createRemarkProcessor({\n languageMapper: {},\n lintCodeBlocks: true\n }),\n rules\n },\n {\n files: ['**/*.mdx'],\n ...pluginMdx.flatCodeBlocks,\n rules\n },\n {\n files: ['**/*.mdx/*.ts', '**/*.mdx/*.tsx'],\n languageOptions: {\n parserOptions: {\n allowDefaultProject: true,\n program: null,\n project: null,\n projectService: false\n }\n },\n name: 'eslint-config-mdx/disable-type-checked',\n rules: {\n ...tsEslint.configs.disableTypeChecked.rules,\n '@typescript-eslint/no-unused-expressions': 'off',\n 'no-unused-expressions': 'off'\n }\n }\n ]\n})\n"],"mappings":"AAIA,SAAS,kBAAkB,aAAa,kBAAkB;AAMnD,MAAM,MAAsD,iBAAiB,OAAO,YAAY;AACrG,QAAM,YAAY,MAAM,WAA6B,mBAAmB;AACxE,QAAM,WAAW,MAAM,YAA6B,mBAAmB;AAEvE,QAAM,QAAqC;AAAA,IACzC,GAAG,UAAU,eAAe;AAAA,IAC5B,qBAAqB;AAAA,IACrB,2CAA2C;AAAA,IAC3C,8BAA8B;AAAA,IAC9B,8BAA8B;AAAA,IAC9B,gBAAgB;AAAA,IAChB,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,gBAAgB;AAAA,EAClB;AAEA,SAAO;AAAA,IACL;AAAA,MACE,OAAO,CAAC,UAAU;AAAA,MAClB,GAAG,UAAU;AAAA,MACb,WAAW,UAAU,sBAAsB;AAAA,QACzC,gBAAgB,CAAC;AAAA,QACjB,gBAAgB;AAAA,MAClB,CAAC;AAAA,MACD;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,UAAU;AAAA,MAClB,GAAG,UAAU;AAAA,MACb;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO,CAAC,iBAAiB,gBAAgB;AAAA,MACzC,iBAAiB;AAAA,QACf,eAAe;AAAA,UACb,qBAAqB;AAAA,UACrB,SAAS;AAAA,UACT,SAAS;AAAA,UACT,gBAAgB;AAAA,QAClB;AAAA,MACF;AAAA,MACA,MAAM;AAAA,MACN,OAAO;AAAA,QACL,GAAG,SAAS,QAAQ,mBAAmB;AAAA,QACvC,4CAA4C;AAAA,QAC5C,yBAAyB;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineLazyConfig, loadDefault } from "../lazy.js";
|
|
2
|
+
const packageJson = defineLazyConfig("packageJson", async () => {
|
|
3
|
+
const pluginPackageJson = await loadDefault("eslint-plugin-package-json");
|
|
4
|
+
const config = { ...pluginPackageJson.configs.recommended };
|
|
5
|
+
delete config.name;
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
...config,
|
|
9
|
+
name: "eslint-config-integrations/package-json"
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
packageJson
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formats/package-json.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils'\nimport type PluginPackageJson from 'eslint-plugin-package-json'\n\nimport { defineLazyConfig, loadDefault } from '../lazy.js'\n\n/**\n * Package.json ESLint configuration\n * Provides validation for npm package standards\n */\nexport const packageJson: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('packageJson', async () => {\n const pluginPackageJson = await loadDefault<typeof PluginPackageJson>('eslint-plugin-package-json')\n const config = { ...pluginPackageJson.configs.recommended } as TSESLint.FlatConfig.Config\n\n delete config.name\n\n return [\n {\n ...config,\n name: 'eslint-config-integrations/package-json'\n }\n ]\n})\n"],"mappings":"AAGA,SAAS,kBAAkB,mBAAmB;AAMvC,MAAM,cAA8D,iBAAiB,eAAe,YAAY;AACrH,QAAM,oBAAoB,MAAM,YAAsC,4BAA4B;AAClG,QAAM,SAAS,EAAE,GAAG,kBAAkB,QAAQ,YAAY;AAE1D,SAAO,OAAO;AAEd,SAAO;AAAA,IACL;AAAA,MACE,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineLazyConfig, loadDefault } from "../lazy.js";
|
|
2
|
+
const toml = defineLazyConfig("toml", async () => {
|
|
3
|
+
const pluginToml = await loadDefault("eslint-plugin-toml");
|
|
4
|
+
return [
|
|
5
|
+
...pluginToml.configs["flat/recommended"].map((config, index) => ({
|
|
6
|
+
...config,
|
|
7
|
+
name: config.name ?? `integrations/toml/${index}`
|
|
8
|
+
}))
|
|
9
|
+
];
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
toml
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=toml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formats/toml.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils'\nimport type PluginToml from 'eslint-plugin-toml'\n\nimport { defineLazyConfig, loadDefault } from '../lazy.js'\n\n/**\n * TOML ESLint configuration\n * Provides rules for TOML file linting\n */\nexport const toml: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('toml', async () => {\n const pluginToml = await loadDefault<typeof PluginToml>('eslint-plugin-toml')\n\n return [\n ...(pluginToml.configs['flat/recommended'] as TSESLint.FlatConfig.ConfigArray).map((config, index) => ({\n ...config,\n name: config.name ?? `integrations/toml/${index}`\n }))\n ]\n})\n"],"mappings":"AAGA,SAAS,kBAAkB,mBAAmB;AAMvC,MAAM,OAAuD,iBAAiB,QAAQ,YAAY;AACvG,QAAM,aAAa,MAAM,YAA+B,oBAAoB;AAE5E,SAAO;AAAA,IACL,GAAI,WAAW,QAAQ,kBAAkB,EAAsC,IAAI,CAAC,QAAQ,WAAW;AAAA,MACrG,GAAG;AAAA,MACH,MAAM,OAAO,QAAQ,qBAAqB,KAAK;AAAA,IACjD,EAAE;AAAA,EACJ;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineLazyConfig, loadDefault } from "../lazy.js";
|
|
2
|
+
const yaml = defineLazyConfig("yaml", async () => {
|
|
3
|
+
const pluginYml = await loadDefault("eslint-plugin-yml");
|
|
4
|
+
return [
|
|
5
|
+
{
|
|
6
|
+
ignores: [
|
|
7
|
+
// Lockfiles are machine-generated; linting them is extremely slow (6+ s)
|
|
8
|
+
"**/pnpm-lock.yaml",
|
|
9
|
+
"**/yarn.lock",
|
|
10
|
+
"**/bun.lock"
|
|
11
|
+
],
|
|
12
|
+
name: "integrations/yaml/lockfile-ignores"
|
|
13
|
+
},
|
|
14
|
+
...pluginYml.configs["flat/recommended"],
|
|
15
|
+
{
|
|
16
|
+
files: ["**/*.{yml,yaml}"],
|
|
17
|
+
name: "integrations/yaml/rules",
|
|
18
|
+
rules: {
|
|
19
|
+
"yml/no-empty-mapping-value": "warn",
|
|
20
|
+
"yml/no-empty-sequence-entry": "warn"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
});
|
|
25
|
+
export {
|
|
26
|
+
yaml
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=yaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/formats/yaml.ts"],"sourcesContent":["import type { TSESLint } from '@typescript-eslint/utils'\nimport type PluginYml from 'eslint-plugin-yml'\n\nimport { defineLazyConfig, loadDefault } from '../lazy.js'\n\n/**\n * YAML ESLint configuration\n * Provides rules for YAML file linting\n */\nexport const yaml: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('yaml', async () => {\n const pluginYml = await loadDefault<typeof PluginYml>('eslint-plugin-yml')\n\n return [\n {\n ignores: [\n // Lockfiles are machine-generated; linting them is extremely slow (6+ s)\n '**/pnpm-lock.yaml',\n '**/yarn.lock',\n '**/bun.lock'\n ],\n name: 'integrations/yaml/lockfile-ignores'\n },\n ...(pluginYml.configs['flat/recommended']),\n {\n files: ['**/*.{yml,yaml}'],\n name: 'integrations/yaml/rules',\n rules: {\n 'yml/no-empty-mapping-value': 'warn',\n 'yml/no-empty-sequence-entry': 'warn'\n }\n }\n ]\n})\n"],"mappings":"AAGA,SAAS,kBAAkB,mBAAmB;AAMvC,MAAM,OAAuD,iBAAiB,QAAQ,YAAY;AACvG,QAAM,YAAY,MAAM,YAA8B,mBAAmB;AAEzE,SAAO;AAAA,IACL;AAAA,MACE,SAAS;AAAA;AAAA,QAEP;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,MAAM;AAAA,IACR;AAAA,IACA,GAAI,UAAU,QAAQ,kBAAkB;AAAA,IACxC;AAAA,MACE,OAAO,CAAC,iBAAiB;AAAA,MACzB,MAAM;AAAA,MACN,OAAO;AAAA,QACL,8BAA8B;AAAA,QAC9B,+BAA+B;AAAA,MACjC;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export { getIntegrationConfigs, getPrettierConfig } from './compose.js';
|
|
2
|
+
export { a11y } from './extensions/a11y.js';
|
|
3
|
+
export { bestPractices } from './extensions/best-practices.js';
|
|
4
|
+
export { biome } from './extensions/biome.js';
|
|
5
|
+
export { compat } from './extensions/compat.js';
|
|
6
|
+
export { deMorgan } from './extensions/de-morgan.js';
|
|
7
|
+
export { depend } from './extensions/depend.js';
|
|
8
|
+
export { noOnlyTests } from './extensions/no-only-tests.js';
|
|
9
|
+
export { node } from './extensions/node.js';
|
|
10
|
+
export { oxlint } from './extensions/oxlint.js';
|
|
11
|
+
export { perfectionist } from './extensions/perfectionist.js';
|
|
12
|
+
export { regexp } from './extensions/regexp.js';
|
|
13
|
+
export { security } from './extensions/security.js';
|
|
14
|
+
export { sonarjs } from './extensions/sonarjs.js';
|
|
15
|
+
export { unicorn } from './extensions/unicorn.js';
|
|
16
|
+
export { css } from './formats/css.js';
|
|
17
|
+
export { graphql } from './formats/graphql.js';
|
|
18
|
+
export { html } from './formats/html.js';
|
|
19
|
+
export { jsonc } from './formats/jsonc.js';
|
|
20
|
+
export { markdown } from './formats/markdown.js';
|
|
21
|
+
export { mdx } from './formats/mdx.js';
|
|
22
|
+
export { packageJson } from './formats/package-json.js';
|
|
23
|
+
export { toml } from './formats/toml.js';
|
|
24
|
+
export { yaml } from './formats/yaml.js';
|
|
25
|
+
export { aiSdk } from './libraries/ai.js';
|
|
26
|
+
export { autogen } from './libraries/autogen.js';
|
|
27
|
+
export { googleGenAi } from './libraries/google-genai.js';
|
|
28
|
+
export { i18next } from './libraries/i18next.js';
|
|
29
|
+
export { langchain } from './libraries/langchain.js';
|
|
30
|
+
export { llamaIndex } from './libraries/llamaindex.js';
|
|
31
|
+
export { mastra } from './libraries/mastra.js';
|
|
32
|
+
export { mcp } from './libraries/mcp.js';
|
|
33
|
+
export { openAiAgents } from './libraries/openai-agents.js';
|
|
34
|
+
export { drizzle, mikroOrm, prisma, sequelize, typeorm } from './libraries/orm.js';
|
|
35
|
+
export { stencil } from './libraries/stencil.js';
|
|
36
|
+
export { storybook } from './libraries/storybook.js';
|
|
37
|
+
export { tailwind } from './libraries/tailwind.js';
|
|
38
|
+
export { tanstackQuery, tanstackRouter } from './libraries/tanstack.js';
|
|
39
|
+
export { turbo } from './libraries/turbo.js';
|
|
40
|
+
export { zod } from './libraries/zod.js';
|
|
41
|
+
export { cypress } from './testing/cypress.js';
|
|
42
|
+
export { jestDom } from './testing/jest-dom.js';
|
|
43
|
+
export { jest } from './testing/jest.js';
|
|
44
|
+
export { playwright } from './testing/playwright.js';
|
|
45
|
+
export { testingLibrary } from './testing/testing-library.js';
|
|
46
|
+
export { vitest } from './testing/vitest.js';
|
|
47
|
+
export { command } from './tools/command.js';
|
|
48
|
+
export { cspell } from './tools/cspell.js';
|
|
49
|
+
export { docker } from './tools/docker.js';
|
|
50
|
+
export { githubActions } from './tools/github-actions.js';
|
|
51
|
+
export { jsdoc } from './tools/jsdoc.js';
|
|
52
|
+
export { nx } from './tools/nx.js';
|
|
53
|
+
export { pnpm } from './tools/pnpm.js';
|
|
54
|
+
export { prettier } from './tools/prettier.js';
|
|
55
|
+
export { swagger } from './tools/swagger.js';
|
|
56
|
+
import '@santi020k/eslint-config-core';
|
|
57
|
+
import '@typescript-eslint/utils';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { getIntegrationConfigs, getPrettierConfig } from "./compose.js";
|
|
2
|
+
export * from "./extensions/a11y.js";
|
|
3
|
+
export * from "./extensions/best-practices.js";
|
|
4
|
+
export * from "./extensions/biome.js";
|
|
5
|
+
import { compat } from "./extensions/compat.js";
|
|
6
|
+
import { deMorgan } from "./extensions/de-morgan.js";
|
|
7
|
+
import { depend } from "./extensions/depend.js";
|
|
8
|
+
import { noOnlyTests } from "./extensions/no-only-tests.js";
|
|
9
|
+
import { node } from "./extensions/node.js";
|
|
10
|
+
import { oxlint } from "./extensions/oxlint.js";
|
|
11
|
+
import { perfectionist } from "./extensions/perfectionist.js";
|
|
12
|
+
import { regexp } from "./extensions/regexp.js";
|
|
13
|
+
import { security } from "./extensions/security.js";
|
|
14
|
+
import { sonarjs } from "./extensions/sonarjs.js";
|
|
15
|
+
import { unicorn } from "./extensions/unicorn.js";
|
|
16
|
+
import { css } from "./formats/css.js";
|
|
17
|
+
import { graphql } from "./formats/graphql.js";
|
|
18
|
+
import { html } from "./formats/html.js";
|
|
19
|
+
import { jsonc } from "./formats/jsonc.js";
|
|
20
|
+
import { markdown } from "./formats/markdown.js";
|
|
21
|
+
import { mdx } from "./formats/mdx.js";
|
|
22
|
+
import { packageJson } from "./formats/package-json.js";
|
|
23
|
+
import { toml } from "./formats/toml.js";
|
|
24
|
+
import { yaml } from "./formats/yaml.js";
|
|
25
|
+
import { aiSdk } from "./libraries/ai.js";
|
|
26
|
+
import { autogen } from "./libraries/autogen.js";
|
|
27
|
+
import { googleGenAi } from "./libraries/google-genai.js";
|
|
28
|
+
import { i18next } from "./libraries/i18next.js";
|
|
29
|
+
import { langchain } from "./libraries/langchain.js";
|
|
30
|
+
import { llamaIndex } from "./libraries/llamaindex.js";
|
|
31
|
+
import { mastra } from "./libraries/mastra.js";
|
|
32
|
+
import { mcp } from "./libraries/mcp.js";
|
|
33
|
+
import { openAiAgents } from "./libraries/openai-agents.js";
|
|
34
|
+
import { drizzle, mikroOrm, prisma, sequelize, typeorm } from "./libraries/orm.js";
|
|
35
|
+
import { stencil } from "./libraries/stencil.js";
|
|
36
|
+
import { storybook } from "./libraries/storybook.js";
|
|
37
|
+
import { tailwind } from "./libraries/tailwind.js";
|
|
38
|
+
import { tanstackQuery, tanstackRouter } from "./libraries/tanstack.js";
|
|
39
|
+
export * from "./libraries/turbo.js";
|
|
40
|
+
export * from "./libraries/zod.js";
|
|
41
|
+
import { cypress } from "./testing/cypress.js";
|
|
42
|
+
import { jestDom } from "./testing/jest-dom.js";
|
|
43
|
+
import { jest } from "./testing/jest.js";
|
|
44
|
+
import { playwright } from "./testing/playwright.js";
|
|
45
|
+
import { testingLibrary } from "./testing/testing-library.js";
|
|
46
|
+
import { vitest } from "./testing/vitest.js";
|
|
47
|
+
import { command } from "./tools/command.js";
|
|
48
|
+
import { cspell } from "./tools/cspell.js";
|
|
49
|
+
import { docker } from "./tools/docker.js";
|
|
50
|
+
import { githubActions } from "./tools/github-actions.js";
|
|
51
|
+
import { jsdoc } from "./tools/jsdoc.js";
|
|
52
|
+
import { nx } from "./tools/nx.js";
|
|
53
|
+
import { pnpm } from "./tools/pnpm.js";
|
|
54
|
+
import { prettier } from "./tools/prettier.js";
|
|
55
|
+
import { swagger } from "./tools/swagger.js";
|
|
56
|
+
export {
|
|
57
|
+
aiSdk,
|
|
58
|
+
autogen,
|
|
59
|
+
command,
|
|
60
|
+
compat,
|
|
61
|
+
cspell,
|
|
62
|
+
css,
|
|
63
|
+
cypress,
|
|
64
|
+
deMorgan,
|
|
65
|
+
depend,
|
|
66
|
+
docker,
|
|
67
|
+
drizzle,
|
|
68
|
+
getIntegrationConfigs,
|
|
69
|
+
getPrettierConfig,
|
|
70
|
+
githubActions,
|
|
71
|
+
googleGenAi,
|
|
72
|
+
graphql,
|
|
73
|
+
html,
|
|
74
|
+
i18next,
|
|
75
|
+
jest,
|
|
76
|
+
jestDom,
|
|
77
|
+
jsdoc,
|
|
78
|
+
jsonc,
|
|
79
|
+
langchain,
|
|
80
|
+
llamaIndex,
|
|
81
|
+
markdown,
|
|
82
|
+
mastra,
|
|
83
|
+
mcp,
|
|
84
|
+
mdx,
|
|
85
|
+
mikroOrm,
|
|
86
|
+
noOnlyTests,
|
|
87
|
+
node,
|
|
88
|
+
nx,
|
|
89
|
+
openAiAgents,
|
|
90
|
+
oxlint,
|
|
91
|
+
packageJson,
|
|
92
|
+
perfectionist,
|
|
93
|
+
playwright,
|
|
94
|
+
pnpm,
|
|
95
|
+
prettier,
|
|
96
|
+
prisma,
|
|
97
|
+
regexp,
|
|
98
|
+
security,
|
|
99
|
+
sequelize,
|
|
100
|
+
sonarjs,
|
|
101
|
+
stencil,
|
|
102
|
+
storybook,
|
|
103
|
+
swagger,
|
|
104
|
+
tailwind,
|
|
105
|
+
tanstackQuery,
|
|
106
|
+
tanstackRouter,
|
|
107
|
+
testingLibrary,
|
|
108
|
+
toml,
|
|
109
|
+
typeorm,
|
|
110
|
+
unicorn,
|
|
111
|
+
vitest,
|
|
112
|
+
yaml
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Re-export all integrations from categorized subdirectories\nexport { getIntegrationConfigs, getPrettierConfig } from './compose.js'\n\n// Extensions\nexport * from './extensions/a11y.js'\nexport * from './extensions/best-practices.js'\nexport * from './extensions/biome.js'\nexport { compat } from './extensions/compat.js'\nexport { deMorgan } from './extensions/de-morgan.js'\nexport { depend } from './extensions/depend.js'\nexport { noOnlyTests } from './extensions/no-only-tests.js'\nexport { node } from './extensions/node.js'\nexport { oxlint } from './extensions/oxlint.js'\nexport { perfectionist } from './extensions/perfectionist.js'\nexport { regexp } from './extensions/regexp.js'\nexport { security } from './extensions/security.js'\nexport { sonarjs } from './extensions/sonarjs.js'\nexport { unicorn } from './extensions/unicorn.js'\n// Formats\nexport { css } from './formats/css.js'\nexport { graphql } from './formats/graphql.js'\nexport { html } from './formats/html.js'\nexport { jsonc } from './formats/jsonc.js'\nexport { markdown } from './formats/markdown.js'\nexport { mdx } from './formats/mdx.js'\nexport { packageJson } from './formats/package-json.js'\nexport { toml } from './formats/toml.js'\nexport { yaml } from './formats/yaml.js'\nexport { aiSdk } from './libraries/ai.js'\nexport { autogen } from './libraries/autogen.js'\nexport { googleGenAi } from './libraries/google-genai.js'\nexport { i18next } from './libraries/i18next.js'\nexport { langchain } from './libraries/langchain.js'\nexport { llamaIndex } from './libraries/llamaindex.js'\nexport { mastra } from './libraries/mastra.js'\nexport { mcp } from './libraries/mcp.js'\nexport { openAiAgents } from './libraries/openai-agents.js'\n// Libraries\nexport { drizzle, mikroOrm, prisma, sequelize, typeorm } from './libraries/orm.js'\nexport { stencil } from './libraries/stencil.js'\nexport { storybook } from './libraries/storybook.js'\nexport { tailwind } from './libraries/tailwind.js'\nexport { tanstackQuery, tanstackRouter } from './libraries/tanstack.js'\nexport * from './libraries/turbo.js'\nexport * from './libraries/zod.js'\n// Testing\nexport { cypress } from './testing/cypress.js'\nexport { jestDom } from './testing/jest-dom.js'\nexport { jest } from './testing/jest.js'\nexport { playwright } from './testing/playwright.js'\nexport { testingLibrary } from './testing/testing-library.js'\nexport { vitest } from './testing/vitest.js'\n// Tools\nexport { command } from './tools/command.js'\nexport { cspell } from './tools/cspell.js'\nexport { docker } from './tools/docker.js'\nexport { githubActions } from './tools/github-actions.js'\nexport { jsdoc } from './tools/jsdoc.js'\nexport { nx } from './tools/nx.js'\nexport { pnpm } from './tools/pnpm.js'\nexport { prettier } from './tools/prettier.js'\nexport { swagger } from './tools/swagger.js'\n"],"mappings":"AACA,SAAS,uBAAuB,yBAAyB;AAGzD,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,eAAe;AAExB,SAAS,WAAW;AACpB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,WAAW;AACpB,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,SAAS,WAAW;AACpB,SAAS,oBAAoB;AAE7B,SAAS,SAAS,UAAU,QAAQ,WAAW,eAAe;AAC9D,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,gBAAgB;AACzB,SAAS,eAAe,sBAAsB;AAC9C,cAAc;AACd,cAAc;AAEd,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,cAAc;AAEvB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,eAAe;","names":[]}
|
package/dist/lazy.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
|
|
3
|
+
type ConfigWithRules = FlatConfig & {
|
|
4
|
+
rules?: FlatRules;
|
|
5
|
+
};
|
|
6
|
+
type FlatParser = NonNullable<FlatConfig['languageOptions']>['parser'];
|
|
7
|
+
type FlatPlugin = NonNullable<FlatConfig['plugins']>[string];
|
|
8
|
+
type FlatRules = NonNullable<FlatConfig['rules']>;
|
|
9
|
+
type PluginWithConfigs<ConfigName extends string = string> = FlatPlugin & {
|
|
10
|
+
configs: Record<ConfigName, ConfigWithRules>;
|
|
11
|
+
};
|
|
12
|
+
type ConfigArray = TSESLint.FlatConfig.ConfigArray;
|
|
13
|
+
type FlatConfig = TSESLint.FlatConfig.Config;
|
|
14
|
+
declare const loadDefault: <T = unknown>(specifier: string) => Promise<T>;
|
|
15
|
+
declare const loadModule: <T = unknown>(specifier: string) => Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Keeps optional integrations import-safe for consumers that do not enable them.
|
|
18
|
+
* @param name - The name of the integration
|
|
19
|
+
* @param load - Function to load the configuration
|
|
20
|
+
* @returns A function that resolves the configuration array lazily
|
|
21
|
+
*/
|
|
22
|
+
declare const defineLazyConfig: (name: string, load: () => ConfigArray | Promise<ConfigArray>) => () => Promise<ConfigArray>;
|
|
23
|
+
|
|
24
|
+
export { type ConfigWithRules, type FlatParser, type FlatPlugin, type FlatRules, type PluginWithConfigs, defineLazyConfig, loadDefault, loadModule };
|
package/dist/lazy.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
const getErrorMessage = (error) => error instanceof Error ? error.message : String(error);
|
|
4
|
+
const hasDefaultExport = (module) => typeof module === "object" && module !== null && "default" in module;
|
|
5
|
+
const isVitest = typeof process !== "undefined" && process.env.VITEST;
|
|
6
|
+
const dynamicImport = isVitest ? (specifier) => import(
|
|
7
|
+
/* @vite-ignore */
|
|
8
|
+
specifier
|
|
9
|
+
) : Reflect.construct(Function, ["specifier", "return import(specifier)"]);
|
|
10
|
+
const req = createRequire(import.meta.url);
|
|
11
|
+
const resolveSpecifier = (specifier) => {
|
|
12
|
+
let resolved = specifier;
|
|
13
|
+
try {
|
|
14
|
+
resolved = pathToFileURL(req.resolve(specifier)).href;
|
|
15
|
+
} catch {
|
|
16
|
+
}
|
|
17
|
+
return resolved;
|
|
18
|
+
};
|
|
19
|
+
const loadDefault = async (specifier) => {
|
|
20
|
+
const module = await dynamicImport(resolveSpecifier(specifier));
|
|
21
|
+
if (hasDefaultExport(module)) {
|
|
22
|
+
return module.default ?? module;
|
|
23
|
+
}
|
|
24
|
+
return module;
|
|
25
|
+
};
|
|
26
|
+
const loadModule = async (specifier) => await dynamicImport(resolveSpecifier(specifier));
|
|
27
|
+
const defineLazyConfig = (name, load) => {
|
|
28
|
+
let config;
|
|
29
|
+
return async () => {
|
|
30
|
+
try {
|
|
31
|
+
config ??= await load();
|
|
32
|
+
return config;
|
|
33
|
+
} catch (error) {
|
|
34
|
+
throw new Error(
|
|
35
|
+
`Unable to load optional ESLint config "${name}". Install the peer dependencies for that integration or remove it from your eslintConfig options. Original error: ${getErrorMessage(error)}`,
|
|
36
|
+
{ cause: error }
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
defineLazyConfig,
|
|
43
|
+
loadDefault,
|
|
44
|
+
loadModule
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=lazy.js.map
|
package/dist/lazy.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lazy.ts"],"sourcesContent":["import { createRequire } from 'node:module'\nimport { pathToFileURL } from 'node:url'\n\nimport type { TSESLint } from '@typescript-eslint/utils'\n\nexport type ConfigWithRules = FlatConfig & { rules?: FlatRules }\n\nexport type FlatParser = NonNullable<FlatConfig['languageOptions']>['parser']\n\nexport type FlatPlugin = NonNullable<FlatConfig['plugins']>[string]\nexport type FlatRules = NonNullable<FlatConfig['rules']>\nexport type PluginWithConfigs<ConfigName extends string = string> = FlatPlugin & {\n configs: Record<ConfigName, ConfigWithRules>\n}\n\ntype ConfigArray = TSESLint.FlatConfig.ConfigArray\n\ntype FlatConfig = TSESLint.FlatConfig.Config\n\nconst getErrorMessage = (error: unknown): string => error instanceof Error ?\n error.message :\n String(error)\n\nconst hasDefaultExport = (module: unknown): module is { default?: unknown } => (\n typeof module === 'object' &&\n module !== null &&\n 'default' in module\n)\n\n// Bypass jiti/bundler transformation of import() to require().\n// Reflect.construct avoids a direct `new Function()` reference (which triggers\n// no-implied-eval) while achieving the same runtime behaviour: the string body\n// is opaque to static analyser so jiti cannot transform it to require().\n\nconst isVitest = typeof process !== 'undefined' && process.env.VITEST\n\n// v8 ignore next 3 -- Reflect.construct branch only runs outside Vitest; not reachable in test suite\nconst dynamicImport: (specifier: string) => Promise<unknown> = isVitest\n ? (specifier: string) => import(/* @vite-ignore */ specifier)\n : Reflect.construct(Function, ['specifier', 'return import(specifier)']) as (specifier: string) => Promise<unknown>\n\nconst req = createRequire(import.meta.url)\n\nconst resolveSpecifier = (specifier: string): string => {\n let resolved = specifier\n\n try {\n resolved = pathToFileURL(req.resolve(specifier)).href\n } catch {\n // Ignore and let dynamicImport throw natural error\n }\n\n return resolved\n}\n\nexport const loadDefault = async <T = unknown>(specifier: string): Promise<T> => {\n const module = await dynamicImport(resolveSpecifier(specifier))\n\n if (hasDefaultExport(module)) {\n return (module.default ?? module) as T\n }\n\n return module as T\n}\n\nexport const loadModule = async <T = unknown>(specifier: string): Promise<T> => await dynamicImport(resolveSpecifier(specifier)) as T\n\n/**\n * Keeps optional integrations import-safe for consumers that do not enable them.\n * @param name - The name of the integration\n * @param load - Function to load the configuration\n * @returns A function that resolves the configuration array lazily\n */\nexport const defineLazyConfig = (\n name: string,\n load: () => ConfigArray | Promise<ConfigArray>\n): () => Promise<ConfigArray> => {\n let config: ConfigArray | undefined\n\n return async (): Promise<ConfigArray> => {\n try {\n config ??= await load()\n\n return config\n } catch (error) {\n throw new Error(\n `Unable to load optional ESLint config \"${name}\". ` +\n 'Install the peer dependencies for that integration or remove it from your eslintConfig options. ' +\n `Original error: ${getErrorMessage(error)}`, { cause: error }\n )\n }\n }\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAkB9B,MAAM,kBAAkB,CAAC,UAA2B,iBAAiB,QACnE,MAAM,UACN,OAAO,KAAK;AAEd,MAAM,mBAAmB,CAAC,WACxB,OAAO,WAAW,YAClB,WAAW,QACX,aAAa;AAQf,MAAM,WAAW,OAAO,YAAY,eAAe,QAAQ,IAAI;AAG/D,MAAM,gBAAyD,WAC3D,CAAC,cAAsB;AAAA;AAAA,EAA0B;AAAA,IACjD,QAAQ,UAAU,UAAU,CAAC,aAAa,0BAA0B,CAAC;AAEzE,MAAM,MAAM,cAAc,YAAY,GAAG;AAEzC,MAAM,mBAAmB,CAAC,cAA8B;AACtD,MAAI,WAAW;AAEf,MAAI;AACF,eAAW,cAAc,IAAI,QAAQ,SAAS,CAAC,EAAE;AAAA,EACnD,QAAQ;AAAA,EAER;AAEA,SAAO;AACT;AAEO,MAAM,cAAc,OAAoB,cAAkC;AAC/E,QAAM,SAAS,MAAM,cAAc,iBAAiB,SAAS,CAAC;AAE9D,MAAI,iBAAiB,MAAM,GAAG;AAC5B,WAAQ,OAAO,WAAW;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,MAAM,aAAa,OAAoB,cAAkC,MAAM,cAAc,iBAAiB,SAAS,CAAC;AAQxH,MAAM,mBAAmB,CAC9B,MACA,SAC+B;AAC/B,MAAI;AAEJ,SAAO,YAAkC;AACvC,QAAI;AACF,iBAAW,MAAM,KAAK;AAEtB,aAAO;AAAA,IACT,SAAS,OAAO;AACd,YAAM,IAAI;AAAA,QACR,0CAA0C,IAAI,sHAE3B,gBAAgB,KAAK,CAAC;AAAA,QAAI,EAAE,OAAO,MAAM;AAAA,MAC9D;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { GLOB_JS_TS_ALL } from "@santi020k/eslint-config-core";
|
|
2
|
+
import { defineLazyConfig, loadModule } from "../lazy.js";
|
|
3
|
+
const hasRecommendedConfig = (value) => typeof value === "object" && value !== null && "configs" in value && typeof value.configs.recommended === "object";
|
|
4
|
+
const resolveAiSecurityPlugin = (module) => {
|
|
5
|
+
if (hasRecommendedConfig(module)) return module;
|
|
6
|
+
const candidate = module;
|
|
7
|
+
if (hasRecommendedConfig(candidate.default)) return candidate.default;
|
|
8
|
+
if (hasRecommendedConfig(candidate.plugin)) return candidate.plugin;
|
|
9
|
+
throw new Error("eslint-plugin-vercel-ai-security did not expose a recommended config.");
|
|
10
|
+
};
|
|
11
|
+
const aiSdk = defineLazyConfig("ai-sdk", async () => {
|
|
12
|
+
const plugin = resolveAiSecurityPlugin(await loadModule("eslint-plugin-vercel-ai-security"));
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
files: GLOB_JS_TS_ALL,
|
|
16
|
+
name: "eslint-config-integrations/ai-sdk",
|
|
17
|
+
plugins: {
|
|
18
|
+
"vercel-ai-security": plugin
|
|
19
|
+
},
|
|
20
|
+
rules: {
|
|
21
|
+
...plugin.configs.recommended.rules
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
aiSdk
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/libraries/ai.ts"],"sourcesContent":["import { GLOB_JS_TS_ALL } from '@santi020k/eslint-config-core'\n\nimport type { TSESLint } from '@typescript-eslint/utils'\n\nimport { defineLazyConfig, loadModule, type PluginWithConfigs } from '../lazy.js'\n\ntype AiSecurityPlugin = PluginWithConfigs<'recommended'> & {\n plugin?: PluginWithConfigs<'recommended'>\n}\n\nconst hasRecommendedConfig = (value: unknown): value is PluginWithConfigs<'recommended'> => (\n typeof value === 'object' &&\n value !== null &&\n 'configs' in value &&\n typeof (value as PluginWithConfigs<'recommended'>).configs.recommended === 'object'\n)\n\nconst resolveAiSecurityPlugin = (module: unknown): PluginWithConfigs<'recommended'> => {\n if (hasRecommendedConfig(module)) return module\n\n const candidate = module as AiSecurityPlugin & { default?: unknown }\n\n if (hasRecommendedConfig(candidate.default)) return candidate.default\n\n if (hasRecommendedConfig(candidate.plugin)) return candidate.plugin\n\n throw new Error('eslint-plugin-vercel-ai-security did not expose a recommended config.')\n}\n\n/**\n * Vercel AI SDK security ESLint configuration.\n */\nexport const aiSdk: () => Promise<TSESLint.FlatConfig.ConfigArray> = defineLazyConfig('ai-sdk', async () => {\n const plugin = resolveAiSecurityPlugin(await loadModule('eslint-plugin-vercel-ai-security'))\n\n return [\n {\n files: GLOB_JS_TS_ALL,\n name: 'eslint-config-integrations/ai-sdk',\n plugins: {\n 'vercel-ai-security': plugin\n },\n rules: {\n ...plugin.configs.recommended.rules\n }\n }\n ]\n})\n"],"mappings":"AAAA,SAAS,sBAAsB;AAI/B,SAAS,kBAAkB,kBAA0C;AAMrE,MAAM,uBAAuB,CAAC,UAC5B,OAAO,UAAU,YACjB,UAAU,QACV,aAAa,SACb,OAAQ,MAA2C,QAAQ,gBAAgB;AAG7E,MAAM,0BAA0B,CAAC,WAAsD;AACrF,MAAI,qBAAqB,MAAM,EAAG,QAAO;AAEzC,QAAM,YAAY;AAElB,MAAI,qBAAqB,UAAU,OAAO,EAAG,QAAO,UAAU;AAE9D,MAAI,qBAAqB,UAAU,MAAM,EAAG,QAAO,UAAU;AAE7D,QAAM,IAAI,MAAM,uEAAuE;AACzF;AAKO,MAAM,QAAwD,iBAAiB,UAAU,YAAY;AAC1G,QAAM,SAAS,wBAAwB,MAAM,WAAW,kCAAkC,CAAC;AAE3F,SAAO;AAAA,IACL;AAAA,MACE,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,QACP,sBAAsB;AAAA,MACxB;AAAA,MACA,OAAO;AAAA,QACL,GAAG,OAAO,QAAQ,YAAY;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GLOB_JS_TS_ALL } from "@santi020k/eslint-config-core";
|
|
2
|
+
const autogen = () => [
|
|
3
|
+
{
|
|
4
|
+
files: GLOB_JS_TS_ALL,
|
|
5
|
+
name: "eslint-config-integrations/autogen",
|
|
6
|
+
rules: {
|
|
7
|
+
"no-restricted-imports": ["error", {
|
|
8
|
+
patterns: [
|
|
9
|
+
{
|
|
10
|
+
group: [
|
|
11
|
+
"autogen-agentchat/dist/*",
|
|
12
|
+
"autogen-core/dist/*"
|
|
13
|
+
],
|
|
14
|
+
message: "Import AutoGen APIs from their designated package entry points instead of internals."
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
export {
|
|
22
|
+
autogen
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=autogen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/libraries/autogen.ts"],"sourcesContent":["import { GLOB_JS_TS_ALL } from '@santi020k/eslint-config-core'\n\nimport type { TSESLint } from '@typescript-eslint/utils'\n\n/**\n * AutoGen SDK ESLint configuration.\n */\nexport const autogen = (): TSESLint.FlatConfig.ConfigArray => [\n {\n files: GLOB_JS_TS_ALL,\n name: 'eslint-config-integrations/autogen',\n rules: {\n 'no-restricted-imports': ['error', {\n patterns: [\n {\n group: [\n 'autogen-agentchat/dist/*',\n 'autogen-core/dist/*'\n ],\n message: 'Import AutoGen APIs from their designated package entry points instead of internals.'\n }\n ]\n }]\n }\n }\n]\n"],"mappings":"AAAA,SAAS,sBAAsB;AAOxB,MAAM,UAAU,MAAuC;AAAA,EAC5D;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO;AAAA,MACL,yBAAyB,CAAC,SAAS;AAAA,QACjC,UAAU;AAAA,UACR;AAAA,YACE,OAAO;AAAA,cACL;AAAA,cACA;AAAA,YACF;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|