@workleap/eslint-configs 1.1.2 → 1.1.3
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/CHANGELOG.md +6 -0
- package/dist/by-project-type/defineMonorepoWorkspaceConfig.js +1 -0
- package/dist/by-project-type/defineMonorepoWorkspaceConfig.js.map +1 -1
- package/dist/by-project-type/defineReactLibraryConfig.js +1 -0
- package/dist/by-project-type/defineReactLibraryConfig.js.map +1 -1
- package/dist/by-project-type/defineTypescriptLibraryConfig.d.ts +4 -2
- package/dist/by-project-type/defineTypescriptLibraryConfig.js +8 -1
- package/dist/by-project-type/defineTypescriptLibraryConfig.js.map +1 -1
- package/dist/by-project-type/defineWebApplicationConfig.js +1 -0
- package/dist/by-project-type/defineWebApplicationConfig.js.map +1 -1
- package/package.json +1 -1
- package/src/by-project-type/defineMonorepoWorkspaceConfig.ts +1 -0
- package/src/by-project-type/defineReactLibraryConfig.ts +1 -0
- package/src/by-project-type/defineTypescriptLibraryConfig.ts +8 -2
- package/src/by-project-type/defineWebApplicationConfig.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @workleap/eslint-configs
|
|
2
2
|
|
|
3
|
+
## 1.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#329](https://github.com/workleap/wl-web-configs/pull/329) [`b05864c`](https://github.com/workleap/wl-web-configs/commit/b05864ce3583f7b31e04b86c5d67465a4ddd28b2) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Added testing-library rules to TypeScript Library config.
|
|
8
|
+
|
|
3
9
|
## 1.1.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"by-project-type/defineMonorepoWorkspaceConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineMonorepoWorkspaceConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineMonorepoWorkspaceConfigOptions {\n core?: CoreConfigOptions;\n json?: JsonConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n typescript?: TypeScriptConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport function defineMonorepoWorkspaceConfig(tsconfigRootDir: string, options: DefineMonorepoWorkspaceConfigOptions = {}) {\n const {\n core,\n json,\n packageJson,\n typescript,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jsonGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJsonConfig(json),\n ...definePackageJsonConfig(packageJson),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n ...defineYamlConfig(yaml),\n {\n rules: {\n \"package-json/valid-version\": \"off\"\n }\n }\n ]);\n}\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJsonConfig","jsonGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineMonorepoWorkspaceConfig","tsconfigRootDir","options","core","json","packageJson","typescript","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACL;AACiC;AACJ;AACxB;AAUzF;;;CAGC,GACM,SAASY,8BAA8BC,eAAuB,EAAEC,UAAgD,CAAC,CAAC;IACrH,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,IAAI,EACP,GAAGL;IAEJ,OAAOd,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,wBAAwBA;eACxBE,uBAAuBA;eACvBE,iBAAiBA;SACvB;WACER,gBAAgBA,CAACY;WACjBX,gBAAgBA,CAACY;WACjBV,uBAAuBA,CAACW;WACxBT,sBAAsBA,CAACK,iBAAiBK;WACxCR,gBAAgBA,CAACS;QACpB;YACI,OAAO;gBACH,8BAA8B;YAClC;QACJ;KACH;AACL"}
|
|
1
|
+
{"version":3,"file":"by-project-type/defineMonorepoWorkspaceConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineMonorepoWorkspaceConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineMonorepoWorkspaceConfigOptions {\n core?: CoreConfigOptions;\n json?: JsonConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n typescript?: TypeScriptConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport function defineMonorepoWorkspaceConfig(tsconfigRootDir: string, options: DefineMonorepoWorkspaceConfigOptions = {}) {\n const {\n core,\n json,\n packageJson,\n typescript,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \".playwright\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jsonGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJsonConfig(json),\n ...definePackageJsonConfig(packageJson),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n ...defineYamlConfig(yaml),\n {\n rules: {\n \"package-json/valid-version\": \"off\"\n }\n }\n ]);\n}\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJsonConfig","jsonGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineMonorepoWorkspaceConfig","tsconfigRootDir","options","core","json","packageJson","typescript","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACL;AACiC;AACJ;AACxB;AAUzF;;;CAGC,GACM,SAASY,8BAA8BC,eAAuB,EAAEC,UAAgD,CAAC,CAAC;IACrH,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,IAAI,EACP,GAAGL;IAEJ,OAAOd,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,wBAAwBA;eACxBE,uBAAuBA;eACvBE,iBAAiBA;SACvB;WACER,gBAAgBA,CAACY;WACjBX,gBAAgBA,CAACY;WACjBV,uBAAuBA,CAACW;WACxBT,sBAAsBA,CAACK,iBAAiBK;WACxCR,gBAAgBA,CAACS;QACpB;YACI,OAAO;gBACH,8BAA8B;YAClC;QACJ;KACH;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"by-project-type/defineReactLibraryConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineReactLibraryConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { defineJsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineReactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { defineStorybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineReactLibraryConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n jsxAlly?: JsxAllyConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n react?: ReactConfigOptions;\n storybook?: StorybookConfigOptions;\n testingLibrary?: TestingLibraryConfigOptions;\n typescript?: TypeScriptConfigOptions;\n vitest?: VitestConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport function defineReactLibraryConfig(tsconfigRootDir: string, options: DefineReactLibraryConfigOptions = {}) {\n const {\n testFramework = \"vitest\",\n core,\n jest,\n json,\n jsxAlly,\n packageJson,\n react,\n storybook,\n testingLibrary,\n typescript,\n vitest,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \"**/__snapshots__/*\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJestConfig({\n ...jest,\n enabled: jest?.enabled ?? testFramework === \"jest\"\n }),\n ...defineJsonConfig(json),\n ...defineJsxAllyConfig(jsxAlly),\n ...definePackageJsonConfig(packageJson),\n ...defineReactConfig(react),\n ...defineStorybookConfig(storybook),\n ...defineTestingLibraryConfig(testingLibrary),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n ...(defineVitestConfig({\n ...vitest,\n enabled: vitest?.enabled ?? testFramework === \"vitest\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any),\n ...defineYamlConfig(yaml),\n {\n plugins: {\n \"@workleap\": WorkleapPlugin\n },\n rules: {\n \"@workleap/strict-css-modules-names\": \"warn\"\n }\n }\n ]);\n}\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJestConfig","jestGlobalIgnores","defineJsonConfig","jsonGlobalIgnores","defineJsxAllyConfig","jsxAllyGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","defineReactConfig","reactGlobalIgnores","defineStorybookConfig","storybookGlobalIgnores","defineTestingLibraryConfig","testingLibraryGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineVitestConfig","vitestGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineReactLibraryConfig","tsconfigRootDir","options","testFramework","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACA;AACL;AACiB;AACgB;AACvD;AAC+B;AACgB;AACoB;AAChB;AAChB;AACR;AAiBzF;;;CAGC,GACM,SAASyB,yBAAyBC,eAAuB,EAAEC,UAA2C,CAAC,CAAC;IAC3G,MAAM,EACFC,gBAAgB,QAAQ,EACxBC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGZ;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACErB,gBAAgBA,CAAC0B;WACjBzB,gBAAgBA,CAAC;YAChB,GAAG0B,IAAI;YACP,SAASA,MAAM,WAAWF,kBAAkB;QAChD;WACGtB,gBAAgBA,CAACyB;WACjBvB,mBAAmBA,CAACwB;WACpBtB,uBAAuBA,CAACuB;WACxBpB,iBAAiBA,CAACqB;WAClBnB,qBAAqBA,CAACoB;WACtBlB,0BAA0BA,CAACmB;WAC3BjB,sBAAsBA,CAACO,iBAAiBW;QAC3C,sFAAsF;WAClFhB,kBAAkBA,CAAC;YACnB,GAAGiB,MAAM;YACT,SAASA,QAAQ,WAAWV,kBAAkB;QAElD;WACGL,gBAAgBA,CAACgB;QACpB;YACI,SAAS;gBACL,aAAa3B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
|
|
1
|
+
{"version":3,"file":"by-project-type/defineReactLibraryConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineReactLibraryConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { defineJsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineReactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { defineStorybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineReactLibraryConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n jsxAlly?: JsxAllyConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n react?: ReactConfigOptions;\n storybook?: StorybookConfigOptions;\n testingLibrary?: TestingLibraryConfigOptions;\n typescript?: TypeScriptConfigOptions;\n vitest?: VitestConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport function defineReactLibraryConfig(tsconfigRootDir: string, options: DefineReactLibraryConfigOptions = {}) {\n const {\n testFramework = \"vitest\",\n core,\n jest,\n json,\n jsxAlly,\n packageJson,\n react,\n storybook,\n testingLibrary,\n typescript,\n vitest,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \"**/__snapshots__/*\",\n \".playwright\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJestConfig({\n ...jest,\n enabled: jest?.enabled ?? testFramework === \"jest\"\n }),\n ...defineJsonConfig(json),\n ...defineJsxAllyConfig(jsxAlly),\n ...definePackageJsonConfig(packageJson),\n ...defineReactConfig(react),\n ...defineStorybookConfig(storybook),\n ...defineTestingLibraryConfig(testingLibrary),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n ...(defineVitestConfig({\n ...vitest,\n enabled: vitest?.enabled ?? testFramework === \"vitest\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any),\n ...defineYamlConfig(yaml),\n {\n plugins: {\n \"@workleap\": WorkleapPlugin\n },\n rules: {\n \"@workleap/strict-css-modules-names\": \"warn\"\n }\n }\n ]);\n}\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJestConfig","jestGlobalIgnores","defineJsonConfig","jsonGlobalIgnores","defineJsxAllyConfig","jsxAllyGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","defineReactConfig","reactGlobalIgnores","defineStorybookConfig","storybookGlobalIgnores","defineTestingLibraryConfig","testingLibraryGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineVitestConfig","vitestGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineReactLibraryConfig","tsconfigRootDir","options","testFramework","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACA;AACL;AACiB;AACgB;AACvD;AAC+B;AACgB;AACoB;AAChB;AAChB;AACR;AAiBzF;;;CAGC,GACM,SAASyB,yBAAyBC,eAAuB,EAAEC,UAA2C,CAAC,CAAC;IAC3G,MAAM,EACFC,gBAAgB,QAAQ,EACxBC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGZ;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACErB,gBAAgBA,CAAC0B;WACjBzB,gBAAgBA,CAAC;YAChB,GAAG0B,IAAI;YACP,SAASA,MAAM,WAAWF,kBAAkB;QAChD;WACGtB,gBAAgBA,CAACyB;WACjBvB,mBAAmBA,CAACwB;WACpBtB,uBAAuBA,CAACuB;WACxBpB,iBAAiBA,CAACqB;WAClBnB,qBAAqBA,CAACoB;WACtBlB,0BAA0BA,CAACmB;WAC3BjB,sBAAsBA,CAACO,iBAAiBW;QAC3C,sFAAsF;WAClFhB,kBAAkBA,CAAC;YACnB,GAAGiB,MAAM;YACT,SAASA,QAAQ,WAAWV,kBAAkB;QAElD;WACGL,gBAAgBA,CAACgB;QACpB;YACI,SAAS;gBACL,aAAa3B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
|
|
@@ -2,17 +2,19 @@ import { type CoreConfigOptions } from "../core.ts";
|
|
|
2
2
|
import { type JestConfigOptions } from "../jest.ts";
|
|
3
3
|
import { JsonConfigOptions } from "../json.ts";
|
|
4
4
|
import { type PackageJsonConfigOptions } from "../packageJson.ts";
|
|
5
|
+
import { type TestingLibraryConfigOptions } from "../testingLibrary.ts";
|
|
5
6
|
import { type TypeScriptConfigOptions } from "../typescript.ts";
|
|
6
7
|
import { type VitestConfigOptions } from "../vitest.ts";
|
|
7
8
|
import { type YamlConfigOptions } from "../yaml.ts";
|
|
8
9
|
export interface DefineTypeScriptLibraryConfigOptions {
|
|
9
10
|
testFramework?: "vitest" | "jest";
|
|
10
11
|
core?: CoreConfigOptions;
|
|
11
|
-
typescript?: TypeScriptConfigOptions;
|
|
12
12
|
jest?: JestConfigOptions;
|
|
13
13
|
json?: JsonConfigOptions;
|
|
14
|
-
vitest?: VitestConfigOptions;
|
|
15
14
|
packageJson?: PackageJsonConfigOptions;
|
|
15
|
+
testingLibrary?: TestingLibraryConfigOptions;
|
|
16
|
+
typescript?: TypeScriptConfigOptions;
|
|
17
|
+
vitest?: VitestConfigOptions;
|
|
16
18
|
yaml?: YamlConfigOptions;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
@@ -4,6 +4,7 @@ import { defineJestConfig, jestGlobalIgnores } from "../jest.js";
|
|
|
4
4
|
import { defineJsonConfig, jsonGlobalIgnores } from "../json.js";
|
|
5
5
|
import { definePackageJsonConfig, packageJsonGlobalIgnores } from "../packageJson.js";
|
|
6
6
|
import { WorkleapPlugin } from "../plugins/workleapPlugin.js";
|
|
7
|
+
import { defineTestingLibraryConfig, testingLibraryGlobalIgnores } from "../testingLibrary.js";
|
|
7
8
|
import { defineTypeScriptConfig, typescriptGlobalIgnores } from "../typescript.js";
|
|
8
9
|
import { defineVitestConfig, vitestGlobalIgnores } from "../vitest.js";
|
|
9
10
|
import { defineYamlConfig, yamlGlobalIgnores } from "../yaml.js";
|
|
@@ -20,6 +21,8 @@ import { defineYamlConfig, yamlGlobalIgnores } from "../yaml.js";
|
|
|
20
21
|
|
|
21
22
|
;// CONCATENATED MODULE: external "../plugins/workleapPlugin.js"
|
|
22
23
|
|
|
24
|
+
;// CONCATENATED MODULE: external "../testingLibrary.js"
|
|
25
|
+
|
|
23
26
|
;// CONCATENATED MODULE: external "../typescript.js"
|
|
24
27
|
|
|
25
28
|
;// CONCATENATED MODULE: external "../vitest.js"
|
|
@@ -36,21 +39,24 @@ import { defineYamlConfig, yamlGlobalIgnores } from "../yaml.js";
|
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
|
|
42
|
+
|
|
39
43
|
/**
|
|
40
44
|
* @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.
|
|
41
45
|
* @param options An optional object of options for the ESlint core and plugins rules.
|
|
42
46
|
*/ function defineTypeScriptLibraryConfig(tsconfigRootDir, options = {}) {
|
|
43
|
-
const { testFramework = "vitest", core, jest, json, packageJson, typescript, vitest, yaml } = options;
|
|
47
|
+
const { testFramework = "vitest", core, jest, json, packageJson, testingLibrary, typescript, vitest, yaml } = options;
|
|
44
48
|
return defineConfig([
|
|
45
49
|
// node_modules folder is ignored by default.
|
|
46
50
|
globalIgnores([
|
|
47
51
|
"dist",
|
|
48
52
|
"**/__snapshots__/*",
|
|
53
|
+
".playwright",
|
|
49
54
|
".turbo",
|
|
50
55
|
...coreGlobalIgnores,
|
|
51
56
|
...jestGlobalIgnores,
|
|
52
57
|
...jsonGlobalIgnores,
|
|
53
58
|
...packageJsonGlobalIgnores,
|
|
59
|
+
...testingLibraryGlobalIgnores,
|
|
54
60
|
...typescriptGlobalIgnores,
|
|
55
61
|
...vitestGlobalIgnores,
|
|
56
62
|
...yamlGlobalIgnores
|
|
@@ -62,6 +68,7 @@ import { defineYamlConfig, yamlGlobalIgnores } from "../yaml.js";
|
|
|
62
68
|
}),
|
|
63
69
|
...defineJsonConfig(json),
|
|
64
70
|
...definePackageJsonConfig(packageJson),
|
|
71
|
+
...defineTestingLibraryConfig(testingLibrary),
|
|
65
72
|
...defineTypeScriptConfig(tsconfigRootDir, typescript),
|
|
66
73
|
// Temporary fix until the vitest plugin support defineConfig and the types are fixed.
|
|
67
74
|
...defineVitestConfig({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"by-project-type/defineTypescriptLibraryConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineTypescriptLibraryConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineTypeScriptLibraryConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n
|
|
1
|
+
{"version":3,"file":"by-project-type/defineTypescriptLibraryConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineTypescriptLibraryConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineTypeScriptLibraryConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n testingLibrary?: TestingLibraryConfigOptions;\n typescript?: TypeScriptConfigOptions;\n vitest?: VitestConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport function defineTypeScriptLibraryConfig(tsconfigRootDir: string, options: DefineTypeScriptLibraryConfigOptions = {}) {\n const {\n testFramework = \"vitest\",\n core,\n jest,\n json,\n packageJson,\n testingLibrary,\n typescript,\n vitest,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \"**/__snapshots__/*\",\n \".playwright\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJestConfig({\n ...jest,\n enabled: jest?.enabled ?? testFramework === \"jest\"\n }),\n ...defineJsonConfig(json),\n ...definePackageJsonConfig(packageJson),\n ...defineTestingLibraryConfig(testingLibrary),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n ...(defineVitestConfig({\n ...vitest,\n enabled: vitest?.enabled ?? testFramework === \"vitest\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any),\n ...defineYamlConfig(yaml),\n {\n plugins: {\n \"@workleap\": WorkleapPlugin\n },\n rules: {\n \"@workleap/strict-css-modules-names\": \"warn\"\n }\n }\n ]);\n}\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJestConfig","jestGlobalIgnores","defineJsonConfig","jsonGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","defineTestingLibraryConfig","testingLibraryGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineVitestConfig","vitestGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineTypeScriptLibraryConfig","tsconfigRootDir","options","testFramework","core","jest","json","packageJson","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACA;AACL;AACiC;AACvD;AACmE;AAChB;AAChB;AACR;AAczF;;;CAGC,GACM,SAASmB,8BAA8BC,eAAuB,EAAEC,UAAgD,CAAC,CAAC;IACrH,MAAM,EACFC,gBAAgB,QAAQ,EACxBC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,WAAW,EACXC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGT;IAEJ,OAAOrB,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,iBAAiBA;eACjBE,wBAAwBA;eACxBG,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEf,gBAAgBA,CAACoB;WACjBnB,gBAAgBA,CAAC;YAChB,GAAGoB,IAAI;YACP,SAASA,MAAM,WAAWF,kBAAkB;QAChD;WACGhB,gBAAgBA,CAACmB;WACjBjB,uBAAuBA,CAACkB;WACxBf,0BAA0BA,CAACgB;WAC3Bd,sBAAsBA,CAACO,iBAAiBQ;QAC3C,sFAAsF;WAClFb,kBAAkBA,CAAC;YACnB,GAAGc,MAAM;YACT,SAASA,QAAQ,WAAWP,kBAAkB;QAElD;WACGL,gBAAgBA,CAACa;QACpB;YACI,SAAS;gBACL,aAAapB,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"by-project-type/defineWebApplicationConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineWebApplicationConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { defineJsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineReactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { defineStorybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineWebApplicationConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n jsxAlly?: JsxAllyConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n react?: ReactConfigOptions;\n storybook?: StorybookConfigOptions;\n testingLibrary?: TestingLibraryConfigOptions;\n typescript?: TypeScriptConfigOptions;\n vitest?: VitestConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport const defineWebApplicationConfig = (tsconfigRootDir: string, options: DefineWebApplicationConfigOptions = {}) => {\n const {\n testFramework = \"vitest\",\n core,\n jest,\n json,\n jsxAlly,\n packageJson,\n react,\n storybook,\n testingLibrary,\n typescript,\n vitest,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \"**/__snapshots__/*\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJestConfig({\n ...jest,\n enabled: jest?.enabled ?? testFramework === \"jest\"\n }),\n ...defineJsonConfig(json),\n ...defineJsxAllyConfig(jsxAlly),\n ...definePackageJsonConfig(packageJson),\n ...defineReactConfig(react),\n ...defineStorybookConfig(storybook),\n ...defineTestingLibraryConfig(testingLibrary),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n ...(defineVitestConfig({\n ...vitest,\n enabled: vitest?.enabled ?? testFramework === \"vitest\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any),\n ...defineYamlConfig(yaml),\n {\n plugins: {\n \"@workleap\": WorkleapPlugin\n },\n rules: {\n \"@workleap/strict-css-modules-names\": \"warn\"\n }\n }\n ]);\n};\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJestConfig","jestGlobalIgnores","defineJsonConfig","jsonGlobalIgnores","defineJsxAllyConfig","jsxAllyGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","defineReactConfig","reactGlobalIgnores","defineStorybookConfig","storybookGlobalIgnores","defineTestingLibraryConfig","testingLibraryGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineVitestConfig","vitestGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineWebApplicationConfig","tsconfigRootDir","options","testFramework","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACA;AACL;AACiB;AACgB;AACvD;AAC+B;AACgB;AACoB;AAChB;AAChB;AACR;AAiBzF;;;CAGC,GACM,MAAMyB,6BAA6B,CAACC,iBAAyBC,UAA6C,CAAC,CAAC;IAC/G,MAAM,EACFC,gBAAgB,QAAQ,EACxBC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGZ;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACErB,gBAAgBA,CAAC0B;WACjBzB,gBAAgBA,CAAC;YAChB,GAAG0B,IAAI;YACP,SAASA,MAAM,WAAWF,kBAAkB;QAChD;WACGtB,gBAAgBA,CAACyB;WACjBvB,mBAAmBA,CAACwB;WACpBtB,uBAAuBA,CAACuB;WACxBpB,iBAAiBA,CAACqB;WAClBnB,qBAAqBA,CAACoB;WACtBlB,0BAA0BA,CAACmB;WAC3BjB,sBAAsBA,CAACO,iBAAiBW;QAC3C,sFAAsF;WAClFhB,kBAAkBA,CAAC;YACnB,GAAGiB,MAAM;YACT,SAASA,QAAQ,WAAWV,kBAAkB;QAElD;WACGL,gBAAgBA,CAACgB;QACpB;YACI,SAAS;gBACL,aAAa3B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL,EAAE"}
|
|
1
|
+
{"version":3,"file":"by-project-type/defineWebApplicationConfig.js","sources":["webpack://@workleap/eslint-configs/./src/by-project-type/defineWebApplicationConfig.ts"],"sourcesContent":["import { defineConfig, globalIgnores } from \"eslint/config\";\nimport { type CoreConfigOptions, coreGlobalIgnores, defineCoreConfig } from \"../core.ts\";\nimport { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { defineJsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { defineReactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { defineStorybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineWebApplicationConfigOptions {\n testFramework?: \"vitest\" | \"jest\";\n core?: CoreConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n jsxAlly?: JsxAllyConfigOptions;\n packageJson?: PackageJsonConfigOptions;\n react?: ReactConfigOptions;\n storybook?: StorybookConfigOptions;\n testingLibrary?: TestingLibraryConfigOptions;\n typescript?: TypeScriptConfigOptions;\n vitest?: VitestConfigOptions;\n yaml?: YamlConfigOptions;\n}\n\n/**\n * @param tsconfigRootDir The directory of the tsconfig file to use for rules that needs a TypeScript type check: https://typescript-eslint.io/packages/parser/#tsconfigrootdir.\n * @param options An optional object of options for the ESlint core and plugins rules.\n */\nexport const defineWebApplicationConfig = (tsconfigRootDir: string, options: DefineWebApplicationConfigOptions = {}) => {\n const {\n testFramework = \"vitest\",\n core,\n jest,\n json,\n jsxAlly,\n packageJson,\n react,\n storybook,\n testingLibrary,\n typescript,\n vitest,\n yaml\n } = options;\n\n return defineConfig([\n // node_modules folder is ignored by default.\n globalIgnores([\n \"dist\",\n \"**/__snapshots__/*\",\n \".playwright\",\n \".turbo\",\n ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...defineCoreConfig(core),\n ...defineJestConfig({\n ...jest,\n enabled: jest?.enabled ?? testFramework === \"jest\"\n }),\n ...defineJsonConfig(json),\n ...defineJsxAllyConfig(jsxAlly),\n ...definePackageJsonConfig(packageJson),\n ...defineReactConfig(react),\n ...defineStorybookConfig(storybook),\n ...defineTestingLibraryConfig(testingLibrary),\n ...defineTypeScriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n ...(defineVitestConfig({\n ...vitest,\n enabled: vitest?.enabled ?? testFramework === \"vitest\"\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }) as any),\n ...defineYamlConfig(yaml),\n {\n plugins: {\n \"@workleap\": WorkleapPlugin\n },\n rules: {\n \"@workleap/strict-css-modules-names\": \"warn\"\n }\n }\n ]);\n};\n"],"names":["defineConfig","globalIgnores","coreGlobalIgnores","defineCoreConfig","defineJestConfig","jestGlobalIgnores","defineJsonConfig","jsonGlobalIgnores","defineJsxAllyConfig","jsxAllyGlobalIgnores","definePackageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","defineReactConfig","reactGlobalIgnores","defineStorybookConfig","storybookGlobalIgnores","defineTestingLibraryConfig","testingLibraryGlobalIgnores","defineTypeScriptConfig","typescriptGlobalIgnores","defineVitestConfig","vitestGlobalIgnores","defineYamlConfig","yamlGlobalIgnores","defineWebApplicationConfig","tsconfigRootDir","options","testFramework","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AAC6B;AACA;AACL;AACiB;AACgB;AACvD;AAC+B;AACgB;AACoB;AAChB;AAChB;AACR;AAiBzF;;;CAGC,GACM,MAAMyB,6BAA6B,CAACC,iBAAyBC,UAA6C,CAAC,CAAC;IAC/G,MAAM,EACFC,gBAAgB,QAAQ,EACxBC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGZ;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;YACA;eACGC,iBAAiBA;eACjBG,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACErB,gBAAgBA,CAAC0B;WACjBzB,gBAAgBA,CAAC;YAChB,GAAG0B,IAAI;YACP,SAASA,MAAM,WAAWF,kBAAkB;QAChD;WACGtB,gBAAgBA,CAACyB;WACjBvB,mBAAmBA,CAACwB;WACpBtB,uBAAuBA,CAACuB;WACxBpB,iBAAiBA,CAACqB;WAClBnB,qBAAqBA,CAACoB;WACtBlB,0BAA0BA,CAACmB;WAC3BjB,sBAAsBA,CAACO,iBAAiBW;QAC3C,sFAAsF;WAClFhB,kBAAkBA,CAAC;YACnB,GAAGiB,MAAM;YACT,SAASA,QAAQ,WAAWV,kBAAkB;QAElD;WACGL,gBAAgBA,CAACgB;QACpB;YACI,SAAS;gBACL,aAAa3B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL,EAAE"}
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { defineJestConfig, type JestConfigOptions, jestGlobalIgnores } from "../
|
|
|
4
4
|
import { defineJsonConfig, JsonConfigOptions, jsonGlobalIgnores } from "../json.ts";
|
|
5
5
|
import { definePackageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from "../packageJson.ts";
|
|
6
6
|
import { WorkleapPlugin } from "../plugins/workleapPlugin.ts";
|
|
7
|
+
import { defineTestingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from "../testingLibrary.ts";
|
|
7
8
|
import { defineTypeScriptConfig, type TypeScriptConfigOptions, typescriptGlobalIgnores } from "../typescript.ts";
|
|
8
9
|
import { defineVitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from "../vitest.ts";
|
|
9
10
|
import { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from "../yaml.ts";
|
|
@@ -11,11 +12,12 @@ import { defineYamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from "../
|
|
|
11
12
|
export interface DefineTypeScriptLibraryConfigOptions {
|
|
12
13
|
testFramework?: "vitest" | "jest";
|
|
13
14
|
core?: CoreConfigOptions;
|
|
14
|
-
typescript?: TypeScriptConfigOptions;
|
|
15
15
|
jest?: JestConfigOptions;
|
|
16
16
|
json?: JsonConfigOptions;
|
|
17
|
-
vitest?: VitestConfigOptions;
|
|
18
17
|
packageJson?: PackageJsonConfigOptions;
|
|
18
|
+
testingLibrary?: TestingLibraryConfigOptions;
|
|
19
|
+
typescript?: TypeScriptConfigOptions;
|
|
20
|
+
vitest?: VitestConfigOptions;
|
|
19
21
|
yaml?: YamlConfigOptions;
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -30,6 +32,7 @@ export function defineTypeScriptLibraryConfig(tsconfigRootDir: string, options:
|
|
|
30
32
|
jest,
|
|
31
33
|
json,
|
|
32
34
|
packageJson,
|
|
35
|
+
testingLibrary,
|
|
33
36
|
typescript,
|
|
34
37
|
vitest,
|
|
35
38
|
yaml
|
|
@@ -40,11 +43,13 @@ export function defineTypeScriptLibraryConfig(tsconfigRootDir: string, options:
|
|
|
40
43
|
globalIgnores([
|
|
41
44
|
"dist",
|
|
42
45
|
"**/__snapshots__/*",
|
|
46
|
+
".playwright",
|
|
43
47
|
".turbo",
|
|
44
48
|
...coreGlobalIgnores,
|
|
45
49
|
...jestGlobalIgnores,
|
|
46
50
|
...jsonGlobalIgnores,
|
|
47
51
|
...packageJsonGlobalIgnores,
|
|
52
|
+
...testingLibraryGlobalIgnores,
|
|
48
53
|
...typescriptGlobalIgnores,
|
|
49
54
|
...vitestGlobalIgnores,
|
|
50
55
|
...yamlGlobalIgnores
|
|
@@ -56,6 +61,7 @@ export function defineTypeScriptLibraryConfig(tsconfigRootDir: string, options:
|
|
|
56
61
|
}),
|
|
57
62
|
...defineJsonConfig(json),
|
|
58
63
|
...definePackageJsonConfig(packageJson),
|
|
64
|
+
...defineTestingLibraryConfig(testingLibrary),
|
|
59
65
|
...defineTypeScriptConfig(tsconfigRootDir, typescript),
|
|
60
66
|
// Temporary fix until the vitest plugin support defineConfig and the types are fixed.
|
|
61
67
|
...(defineVitestConfig({
|