@workleap/eslint-configs 0.0.4 → 0.0.6

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @workleap/eslint-configs
2
2
 
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#309](https://github.com/workleap/wl-web-configs/pull/309) [`6eff339`](https://github.com/workleap/wl-web-configs/commit/6eff339662c6e46dac48ba5c23f8e52b2c7b157d) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fine tuning ESLint rules.
8
+
9
+ ## 0.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [#307](https://github.com/workleap/wl-web-configs/pull/307) [`6e0701a`](https://github.com/workleap/wl-web-configs/commit/6e0701a9c1086f618b01857847519797d7cd39f4) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Fine tuning ESLint rules.
14
+
3
15
  ## 0.0.4
4
16
 
5
17
  ### Patch Changes
@@ -62,6 +62,7 @@ import { yamlConfig, yamlGlobalIgnores } from "../yaml.js";
62
62
  globalIgnores([
63
63
  "dist",
64
64
  "**/__snapshots__/*",
65
+ ".turbo",
65
66
  ...coreGlobalIgnores,
66
67
  ...jestGlobalIgnores,
67
68
  ...jsonGlobalIgnores,
@@ -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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { jsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { reactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { storybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { testingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineReactLibraryConfigOptions {\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 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 ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...jsxAllyConfig(jsxAlly),\n ...packageJsonConfig(packageJson),\n ...reactConfig(react),\n ...storybookConfig(storybook),\n ...testingLibraryConfig(testingLibrary),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","jsxAllyConfig","jsxAllyGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","reactConfig","reactGlobalIgnores","storybookConfig","storybookGlobalIgnores","testingLibraryConfig","testingLibraryGlobalIgnores","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineReactLibraryConfig","tsconfigRootDir","options","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiB;AACgB;AACjD;AACyB;AACgB;AACoB;AAChB;AAChB;AACR;AAgBnF;;;CAGC,GACM,SAASyB,yBAAyBC,eAAuB,EAAEC,UAA2C,CAAC,CAAC;IAC3G,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGX;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEtB,UAAUA,CAAC0B;WACXxB,UAAUA,CAACyB;WACXvB,UAAUA,CAACwB;WACXtB,aAAaA,CAACuB;WACdrB,iBAAiBA,CAACsB;WAClBnB,WAAWA,CAACoB;WACZlB,eAAeA,CAACmB;WAChBjB,oBAAoBA,CAACkB;WACrBhB,gBAAgBA,CAACO,iBAAiBU;QACrC,sFAAsF;QACtF,8DAA8D;WAC1Df,YAAYA,CAACgB;WACdd,UAAUA,CAACe;QACd;YACI,SAAS;gBACL,aAAa1B,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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { jsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { reactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { storybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { testingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineReactLibraryConfigOptions {\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 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 ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...jsxAllyConfig(jsxAlly),\n ...packageJsonConfig(packageJson),\n ...reactConfig(react),\n ...storybookConfig(storybook),\n ...testingLibraryConfig(testingLibrary),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","jsxAllyConfig","jsxAllyGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","reactConfig","reactGlobalIgnores","storybookConfig","storybookGlobalIgnores","testingLibraryConfig","testingLibraryGlobalIgnores","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineReactLibraryConfig","tsconfigRootDir","options","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiB;AACgB;AACjD;AACyB;AACgB;AACoB;AAChB;AAChB;AACR;AAgBnF;;;CAGC,GACM,SAASyB,yBAAyBC,eAAuB,EAAEC,UAA2C,CAAC,CAAC;IAC3G,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGX;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEtB,UAAUA,CAAC0B;WACXxB,UAAUA,CAACyB;WACXvB,UAAUA,CAACwB;WACXtB,aAAaA,CAACuB;WACdrB,iBAAiBA,CAACsB;WAClBnB,WAAWA,CAACoB;WACZlB,eAAeA,CAACmB;WAChBjB,oBAAoBA,CAACkB;WACrBhB,gBAAgBA,CAACO,iBAAiBU;QACrC,sFAAsF;QACtF,8DAA8D;WAC1Df,YAAYA,CAACgB;WACdd,UAAUA,CAACe;QACd;YACI,SAAS;gBACL,aAAa1B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
@@ -46,6 +46,7 @@ import { yamlConfig, yamlGlobalIgnores } from "../yaml.js";
46
46
  globalIgnores([
47
47
  "dist",
48
48
  "**/__snapshots__/*",
49
+ ".turbo",
49
50
  ...coreGlobalIgnores,
50
51
  ...jestGlobalIgnores,
51
52
  ...jsonGlobalIgnores,
@@ -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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineTypeScriptLibraryConfigOptions {\n core?: CoreConfigOptions;\n typescript?: TypescriptConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n vitest?: VitestConfigOptions;\n packageJson?: PackageJsonConfigOptions;\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 core,\n jest,\n json,\n packageJson,\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 ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...packageJsonConfig(packageJson),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineTypeScriptLibraryConfig","tsconfigRootDir","options","core","jest","json","packageJson","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiC;AACjD;AAC6C;AAChB;AACR;AAYnF;;;CAGC,GACM,SAASiB,8BAA8BC,eAAuB,EAAEC,UAAgD,CAAC,CAAC;IACrH,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGP;IAEJ,OAAOnB,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,wBAAwBA;eACxBG,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEd,UAAUA,CAACkB;WACXhB,UAAUA,CAACiB;WACXf,UAAUA,CAACgB;WACXd,iBAAiBA,CAACe;WAClBZ,gBAAgBA,CAACO,iBAAiBM;QACrC,sFAAsF;QACtF,8DAA8D;WAC1DX,YAAYA,CAACY;WACdV,UAAUA,CAACW;QACd;YACI,SAAS;gBACL,aAAahB,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\nexport interface DefineTypeScriptLibraryConfigOptions {\n core?: CoreConfigOptions;\n typescript?: TypescriptConfigOptions;\n jest?: JestConfigOptions;\n json?: JsonConfigOptions;\n vitest?: VitestConfigOptions;\n packageJson?: PackageJsonConfigOptions;\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 core,\n jest,\n json,\n packageJson,\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 ...packageJsonGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...packageJsonConfig(packageJson),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineTypeScriptLibraryConfig","tsconfigRootDir","options","core","jest","json","packageJson","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiC;AACjD;AAC6C;AAChB;AACR;AAYnF;;;CAGC,GACM,SAASiB,8BAA8BC,eAAuB,EAAEC,UAAgD,CAAC,CAAC;IACrH,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGP;IAEJ,OAAOnB,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,wBAAwBA;eACxBG,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEd,UAAUA,CAACkB;WACXhB,UAAUA,CAACiB;WACXf,UAAUA,CAACgB;WACXd,iBAAiBA,CAACe;WAClBZ,gBAAgBA,CAACO,iBAAiBM;QACrC,sFAAsF;QACtF,8DAA8D;WAC1DX,YAAYA,CAACY;WACdV,UAAUA,CAACW;QACd;YACI,SAAS;gBACL,aAAahB,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL"}
@@ -62,6 +62,7 @@ import { yamlConfig, yamlGlobalIgnores } from "../yaml.js";
62
62
  globalIgnores([
63
63
  "dist",
64
64
  "**/__snapshots__/*",
65
+ ".turbo",
65
66
  ...coreGlobalIgnores,
66
67
  ...jestGlobalIgnores,
67
68
  ...jsonGlobalIgnores,
@@ -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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { jsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { reactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { storybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { testingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\n/*\n\nThe WHY for the interface instead of using nested \"extends\".\n\n1- ESlint flat config doesn't support nested \"extends\":\n\nEach configuration object may have an extends key, but only at the top level — not inside another config that already came from an extends.\n\nFlat config was designed to be explicitly ordered and fully expanded:\n\n- \"extends\" in flat config is syntactic sugar for concatenating multiple config objects.\n- Allowing recursion would make config evaluation order ambiguous and slow.\n\nSo ESLint enforces a one-level-deep rule:\n\n- only a top-level config object can have extends.\n\n2- Each object in the array is evaluated independently. \"plugins\" declared in one object are not inherited by the next object.\nSo when a second object sets the rule using a plugin \"xyz\", it doesn’t \"see\" the plugin \"xyz\" that’s defined inside a predefine config, and ESLint throws.\n\n3- Trying to redefine a plugin that as already been define in a configuration object will throw: Cannot redefine plugin \"xyz\".\n\n*/\n\n/*\n\nerror Parsing error: C:\\Dev\\workleap\\wl-web-configs\\samples\\storybook\\rsbuild\\.storybook\\main.ts was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject\n\n-> It usually means that the project tsconfig.json file cannot find the specified file\n-> Make sure to clear the ESLint cache after such an error because update the tsconfig.json file doesn't invalidate the ESLint cache\n\n*/\n\nexport interface DefineWebApplicationConfigOptions {\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 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 ...coreGlobalIgnores,\n ...jestGlobalIgnores,\n ...jsonGlobalIgnores,\n ...jsxAllyGlobalIgnores,\n ...packageJsonGlobalIgnores,\n ...reactGlobalIgnores,\n ...storybookGlobalIgnores,\n ...testingLibraryGlobalIgnores,\n ...typescriptGlobalIgnores,\n ...vitestGlobalIgnores,\n ...yamlGlobalIgnores\n ]),\n ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...jsxAllyConfig(jsxAlly),\n ...packageJsonConfig(packageJson),\n ...reactConfig(react),\n ...storybookConfig(storybook),\n ...testingLibraryConfig(testingLibrary),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","jsxAllyConfig","jsxAllyGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","reactConfig","reactGlobalIgnores","storybookConfig","storybookGlobalIgnores","testingLibraryConfig","testingLibraryGlobalIgnores","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineWebApplicationConfig","tsconfigRootDir","options","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiB;AACgB;AACjD;AACyB;AACgB;AACoB;AAChB;AAChB;AACR;AAiDnF;;;CAGC,GACM,MAAMyB,6BAA6B,CAACC,iBAAyBC,UAA6C,CAAC,CAAC;IAC/G,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGX;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEtB,UAAUA,CAAC0B;WACXxB,UAAUA,CAACyB;WACXvB,UAAUA,CAACwB;WACXtB,aAAaA,CAACuB;WACdrB,iBAAiBA,CAACsB;WAClBnB,WAAWA,CAACoB;WACZlB,eAAeA,CAACmB;WAChBjB,oBAAoBA,CAACkB;WACrBhB,gBAAgBA,CAACO,iBAAiBU;QACrC,sFAAsF;QACtF,8DAA8D;WAC1Df,YAAYA,CAACgB;WACdd,UAAUA,CAACe;QACd;YACI,SAAS;gBACL,aAAa1B,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 { coreConfig, type CoreConfigOptions, coreGlobalIgnores } from \"../core.ts\";\nimport { jestConfig, type JestConfigOptions, jestGlobalIgnores } from \"../jest.ts\";\nimport { jsonConfig, JsonConfigOptions, jsonGlobalIgnores } from \"../json.ts\";\nimport { jsxAllyConfig, type JsxAllyConfigOptions, jsxAllyGlobalIgnores } from \"../jsxAlly.ts\";\nimport { packageJsonConfig, type PackageJsonConfigOptions, packageJsonGlobalIgnores } from \"../packageJson.ts\";\nimport { WorkleapPlugin } from \"../plugins/workleapPlugin.ts\";\nimport { reactConfig, type ReactConfigOptions, reactGlobalIgnores } from \"../react.ts\";\nimport { storybookConfig, type StorybookConfigOptions, storybookGlobalIgnores } from \"../storybook.ts\";\nimport { testingLibraryConfig, type TestingLibraryConfigOptions, testingLibraryGlobalIgnores } from \"../testingLibrary.ts\";\nimport { typescriptConfig, type TypescriptConfigOptions, typescriptGlobalIgnores } from \"../typescript.ts\";\nimport { vitestConfig, type VitestConfigOptions, vitestGlobalIgnores } from \"../vitest.ts\";\nimport { yamlConfig, type YamlConfigOptions, yamlGlobalIgnores } from \"../yaml.ts\";\n\n/*\n\nThe WHY for the interface instead of using nested \"extends\".\n\n1- ESlint flat config doesn't support nested \"extends\":\n\nEach configuration object may have an extends key, but only at the top level — not inside another config that already came from an extends.\n\nFlat config was designed to be explicitly ordered and fully expanded:\n\n- \"extends\" in flat config is syntactic sugar for concatenating multiple config objects.\n- Allowing recursion would make config evaluation order ambiguous and slow.\n\nSo ESLint enforces a one-level-deep rule:\n\n- only a top-level config object can have extends.\n\n2- Each object in the array is evaluated independently. \"plugins\" declared in one object are not inherited by the next object.\nSo when a second object sets the rule using a plugin \"xyz\", it doesn’t \"see\" the plugin \"xyz\" that’s defined inside a predefine config, and ESLint throws.\n\n3- Trying to redefine a plugin that as already been define in a configuration object will throw: Cannot redefine plugin \"xyz\".\n\n*/\n\n/*\n\nerror Parsing error: C:\\Dev\\workleap\\wl-web-configs\\samples\\storybook\\rsbuild\\.storybook\\main.ts was not found by the project service. Consider either including it in the tsconfig.json or including it in allowDefaultProject\n\n-> It usually means that the project tsconfig.json file cannot find the specified file\n-> Make sure to clear the ESLint cache after such an error because update the tsconfig.json file doesn't invalidate the ESLint cache\n\n*/\n\n/*\n\nimport { defineConfig, globalIgnores } from \"eslint/config\";\nimport { defineReactLibraryConfig } from \"@workleap/eslint-configs\";\n\nexport default defineConfig([\n globalIgnores([\n \"/reports/**\"\n ]),\n defineReactLibraryConfig(import.meta.dirname)\n]);\n\n*/\n\n/*\n\nThe key insight was that ESLint 9's flat config system requires ignores to be specified in the configuration\nfile itself for optimal performance, rather than relying on CLI flags (--ignore-pattern). The ignores array at the beginning of the\n config ensures files are filtered out during the file discovery phase, not after.\n\n*/\n\nexport interface DefineWebApplicationConfigOptions {\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 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 ...coreConfig(core),\n ...jestConfig(jest),\n ...jsonConfig(json),\n ...jsxAllyConfig(jsxAlly),\n ...packageJsonConfig(packageJson),\n ...reactConfig(react),\n ...storybookConfig(storybook),\n ...testingLibraryConfig(testingLibrary),\n ...typescriptConfig(tsconfigRootDir, typescript),\n // Temporary fix until the vitest plugin support defineConfig and the types are fixed.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(vitestConfig(vitest) as any),\n ...yamlConfig(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","coreConfig","coreGlobalIgnores","jestConfig","jestGlobalIgnores","jsonConfig","jsonGlobalIgnores","jsxAllyConfig","jsxAllyGlobalIgnores","packageJsonConfig","packageJsonGlobalIgnores","WorkleapPlugin","reactConfig","reactGlobalIgnores","storybookConfig","storybookGlobalIgnores","testingLibraryConfig","testingLibraryGlobalIgnores","typescriptConfig","typescriptGlobalIgnores","vitestConfig","vitestGlobalIgnores","yamlConfig","yamlGlobalIgnores","defineWebApplicationConfig","tsconfigRootDir","options","core","jest","json","jsxAlly","packageJson","react","storybook","testingLibrary","typescript","vitest","yaml"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAA4D;AACuB;AACA;AACL;AACiB;AACgB;AACjD;AACyB;AACgB;AACoB;AAChB;AAChB;AACR;AAuEnF;;;CAGC,GACM,MAAMyB,6BAA6B,CAACC,iBAAyBC,UAA6C,CAAC,CAAC;IAC/G,MAAM,EACFC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,OAAO,EACPC,WAAW,EACXC,KAAK,EACLC,SAAS,EACTC,cAAc,EACdC,UAAU,EACVC,MAAM,EACNC,IAAI,EACP,GAAGX;IAEJ,OAAO3B,YAAYA,CAAC;QAChB,6CAA6C;QAC7CC,aAAaA,CAAC;YACV;YACA;YACA;eACGE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,iBAAiBA;eACjBE,oBAAoBA;eACpBE,wBAAwBA;eACxBG,kBAAkBA;eAClBE,sBAAsBA;eACtBE,2BAA2BA;eAC3BE,uBAAuBA;eACvBE,mBAAmBA;eACnBE,iBAAiBA;SACvB;WACEtB,UAAUA,CAAC0B;WACXxB,UAAUA,CAACyB;WACXvB,UAAUA,CAACwB;WACXtB,aAAaA,CAACuB;WACdrB,iBAAiBA,CAACsB;WAClBnB,WAAWA,CAACoB;WACZlB,eAAeA,CAACmB;WAChBjB,oBAAoBA,CAACkB;WACrBhB,gBAAgBA,CAACO,iBAAiBU;QACrC,sFAAsF;QACtF,8DAA8D;WAC1Df,YAAYA,CAACgB;WACdd,UAAUA,CAACe;QACd;YACI,SAAS;gBACL,aAAa1B,cAAcA;YAC/B;YACA,OAAO;gBACH,sCAAsC;YAC1C;QACJ;KACH;AACL,EAAE"}
package/dist/core.js CHANGED
@@ -81,44 +81,10 @@ function coreConfig(options = {}) {
81
81
  "no-label-var": "warn",
82
82
  "no-lone-blocks": "warn",
83
83
  "no-loop-func": "warn",
84
- "no-mixed-operators": [
85
- "warn",
86
- {
87
- groups: [
88
- [
89
- "&",
90
- "|",
91
- "^",
92
- "~",
93
- "<<",
94
- ">>",
95
- ">>>"
96
- ],
97
- [
98
- "==",
99
- "!=",
100
- "===",
101
- "!==",
102
- ">",
103
- ">=",
104
- "<",
105
- "<="
106
- ],
107
- [
108
- "&&",
109
- "||"
110
- ],
111
- [
112
- "in",
113
- "instanceof"
114
- ]
115
- ],
116
- allowSamePrecedence: false
117
- }
118
- ],
119
84
  "no-multi-str": "warn",
120
85
  "no-new-func": "warn",
121
- "no-new-object": "warn",
86
+ // Deprecated but still no replacement in @stylistic.
87
+ // "no-new-object": "warn",
122
88
  "no-new-wrappers": "warn",
123
89
  "no-octal-escape": "warn",
124
90
  "no-param-reassign": "warn",
package/dist/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sources":["webpack://@workleap/eslint-configs/./src/core.ts"],"sourcesContent":["import js from \"@eslint/js\";\nimport type { Linter } from \"eslint\";\nimport importPlugin from \"eslint-plugin-import\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface CoreConfigOptions {\n rules?: Partial<Linter.RulesRecord>;\n}\n\nexport const coreGlobalIgnores = [];\n\nexport function coreConfig(options: CoreConfigOptions = {}) {\n const {\n rules\n } = options;\n\n const config: ConfigWithExtends[] = [{\n name: \"@workleap/eslint-configs/core\",\n files: [\n \"**/*.{js,jsx,ts,tsx,cjs,mjs}\"\n ],\n plugins: {\n js,\n import: importPlugin\n },\n extends: [\n js.configs.recommended\n ],\n languageOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n globals: {\n ...globals.browser,\n ...globals.es2024,\n ...globals.node,\n ...globals.commonjs\n }\n },\n rules: {\n // Recommended rules overrides\n \"no-cond-assign\": [\"error\", \"except-parens\"],\n \"no-labels\": [\"warn\", { allowLoop: true, allowSwitch: false }],\n \"no-prototype-builtins\": \"off\",\n\n // Possible problems\n \"array-callback-return\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-use-before-define\": [\n \"error\",\n {\n functions: false,\n classes: false,\n variables: false\n }\n ],\n\n // Suggestions\n curly: \"warn\",\n eqeqeq: [\"warn\", \"smart\"],\n \"no-array-constructor\": \"warn\",\n \"no-caller\": \"warn\",\n \"no-eval\": \"warn\",\n \"no-extend-native\": \"warn\",\n \"no-extra-bind\": \"warn\",\n \"no-extra-label\": \"warn\",\n \"no-implied-eval\": \"warn\",\n \"no-iterator\": \"warn\",\n \"no-label-var\": \"warn\",\n \"no-lone-blocks\": \"warn\",\n \"no-loop-func\": \"warn\",\n \"no-mixed-operators\": [\n \"warn\",\n {\n groups: [\n [\"&\", \"|\", \"^\", \"~\", \"<<\", \">>\", \">>>\"],\n [\"==\", \"!=\", \"===\", \"!==\", \">\", \">=\", \"<\", \"<=\"],\n [\"&&\", \"||\"],\n [\"in\", \"instanceof\"]\n ],\n allowSamePrecedence: false\n }\n ],\n \"no-multi-str\": \"warn\",\n \"no-new-func\": \"warn\",\n \"no-new-object\": \"warn\",\n \"no-new-wrappers\": \"warn\",\n \"no-octal-escape\": \"warn\",\n \"no-param-reassign\": \"warn\",\n \"no-restricted-properties\": \"warn\",\n \"no-restricted-globals\": [\"error\"],\n \"no-restricted-syntax\": [\"error\", \"WithStatement\"],\n \"no-script-url\": \"warn\",\n \"no-sequences\": \"warn\",\n \"no-shadow\": \"warn\",\n \"no-throw-literal\": \"warn\",\n \"no-unneeded-ternary\": \"warn\",\n \"no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTernary: true,\n allowTaggedTemplates: true\n }\n ],\n \"no-useless-computed-key\": \"warn\",\n \"no-useless-concat\": \"warn\",\n \"no-useless-constructor\": \"warn\",\n \"no-useless-rename\": [\n \"warn\",\n {\n ignoreDestructuring: false,\n ignoreImport: false,\n ignoreExport: false\n }\n ],\n \"no-var\": \"warn\",\n \"prefer-const\": \"warn\",\n strict: [\"warn\", \"never\"],\n\n // Layout & Formatting\n \"unicode-bom\": [\"warn\", \"never\"],\n\n // https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules\n \"import/newline-after-import\": \"warn\",\n \"import/no-amd\": \"error\",\n \"import/no-duplicates\": \"warn\",\n \"import/no-self-import\": \"error\",\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // Positioned last to allow the consumer to override any rules.\n ...rules\n }\n }];\n\n return config;\n};\n"],"names":["js","importPlugin","globals","coreGlobalIgnores","coreConfig","options","rules","config"],"mappings":";;;;;;;;;;;AAA4B;AAEoB;AAClB;AAOvB,MAAMG,oBAAoB,EAAE,CAAC;AAE7B,SAASC,WAAWC,UAA6B,CAAC,CAAC;IACtD,MAAM,EACFC,KAAK,EACR,GAAGD;IAEJ,MAAME,SAA8B;QAAC;YACjC,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACLP,EAAEA,EAAAA,EAAAA;gBACF,QAAQC,oBAAYA;YACxB;YACA,SAAS;gBACLD,sBAAsB;aACzB;YACD,iBAAiB;gBACb,aAAa;gBACb,YAAY;gBACZ,SAAS;oBACL,GAAGE,eAAe;oBAClB,GAAGA,cAAc;oBACjB,GAAGA,YAAY;oBACf,GAAGA,gBAAgB;gBACvB;YACJ;YACA,OAAO;gBACH,8BAA8B;gBAC9B,kBAAkB;oBAAC;oBAAS;iBAAgB;gBAC5C,aAAa;oBAAC;oBAAQ;wBAAE,WAAW;wBAAM,aAAa;oBAAM;iBAAE;gBAC9D,yBAAyB;gBAEzB,oBAAoB;gBACpB,yBAAyB;gBACzB,mBAAmB;gBACnB,+BAA+B;gBAC/B,wBAAwB;oBACpB;oBACA;wBACI,WAAW;wBACX,SAAS;wBACT,WAAW;oBACf;iBACH;gBAED,cAAc;gBACd,OAAO;gBACP,QAAQ;oBAAC;oBAAQ;iBAAQ;gBACzB,wBAAwB;gBACxB,aAAa;gBACb,WAAW;gBACX,oBAAoB;gBACpB,iBAAiB;gBACjB,kBAAkB;gBAClB,mBAAmB;gBACnB,eAAe;gBACf,gBAAgB;gBAChB,kBAAkB;gBAClB,gBAAgB;gBAChB,sBAAsB;oBAClB;oBACA;wBACI,QAAQ;4BACJ;gCAAC;gCAAK;gCAAK;gCAAK;gCAAK;gCAAM;gCAAM;6BAAM;4BACvC;gCAAC;gCAAM;gCAAM;gCAAO;gCAAO;gCAAK;gCAAM;gCAAK;6BAAK;4BAChD;gCAAC;gCAAM;6BAAK;4BACZ;gCAAC;gCAAM;6BAAa;yBACvB;wBACD,qBAAqB;oBACzB;iBACH;gBACD,gBAAgB;gBAChB,eAAe;gBACf,iBAAiB;gBACjB,mBAAmB;gBACnB,mBAAmB;gBACnB,qBAAqB;gBACrB,4BAA4B;gBAC5B,yBAAyB;oBAAC;iBAAQ;gBAClC,wBAAwB;oBAAC;oBAAS;iBAAgB;gBAClD,iBAAiB;gBACjB,gBAAgB;gBAChB,aAAa;gBACb,oBAAoB;gBACpB,uBAAuB;gBACvB,yBAAyB;oBACrB;oBACA;wBACI,mBAAmB;wBACnB,cAAc;wBACd,sBAAsB;oBAC1B;iBACH;gBACD,2BAA2B;gBAC3B,qBAAqB;gBACrB,0BAA0B;gBAC1B,qBAAqB;oBACjB;oBACA;wBACI,qBAAqB;wBACrB,cAAc;wBACd,cAAc;oBAClB;iBACH;gBACD,UAAU;gBACV,gBAAgB;gBAChB,QAAQ;oBAAC;oBAAQ;iBAAQ;gBAEzB,sBAAsB;gBACtB,eAAe;oBAAC;oBAAQ;iBAAQ;gBAEhC,yEAAyE;gBACzE,+BAA+B;gBAC/B,iBAAiB;gBACjB,wBAAwB;gBACxB,yBAAyB;gBACzB,mCAAmC;gBAEnC,+DAA+D;gBAC/D,GAAGI,KAAK;YACZ;QACJ;KAAE;IAEF,OAAOC;AACX"}
1
+ {"version":3,"file":"core.js","sources":["webpack://@workleap/eslint-configs/./src/core.ts"],"sourcesContent":["import js from \"@eslint/js\";\nimport type { Linter } from \"eslint\";\nimport importPlugin from \"eslint-plugin-import\";\nimport globals from \"globals\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface CoreConfigOptions {\n rules?: Partial<Linter.RulesRecord>;\n}\n\nexport const coreGlobalIgnores = [];\n\nexport function coreConfig(options: CoreConfigOptions = {}) {\n const {\n rules\n } = options;\n\n const config: ConfigWithExtends[] = [{\n name: \"@workleap/eslint-configs/core\",\n files: [\n \"**/*.{js,jsx,ts,tsx,cjs,mjs}\"\n ],\n plugins: {\n js,\n import: importPlugin\n },\n extends: [\n js.configs.recommended\n ],\n languageOptions: {\n ecmaVersion: \"latest\",\n sourceType: \"module\",\n globals: {\n ...globals.browser,\n ...globals.es2024,\n ...globals.node,\n ...globals.commonjs\n }\n },\n rules: {\n // Recommended rules overrides\n \"no-cond-assign\": [\"error\", \"except-parens\"],\n \"no-labels\": [\"warn\", { allowLoop: true, allowSwitch: false }],\n \"no-prototype-builtins\": \"off\",\n\n // Possible problems\n \"array-callback-return\": \"error\",\n \"no-self-compare\": \"error\",\n \"no-template-curly-in-string\": \"error\",\n \"no-use-before-define\": [\n \"error\",\n {\n functions: false,\n classes: false,\n variables: false\n }\n ],\n\n // Suggestions\n curly: \"warn\",\n eqeqeq: [\"warn\", \"smart\"],\n \"no-array-constructor\": \"warn\",\n \"no-caller\": \"warn\",\n \"no-eval\": \"warn\",\n \"no-extend-native\": \"warn\",\n \"no-extra-bind\": \"warn\",\n \"no-extra-label\": \"warn\",\n \"no-implied-eval\": \"warn\",\n \"no-iterator\": \"warn\",\n \"no-label-var\": \"warn\",\n \"no-lone-blocks\": \"warn\",\n \"no-loop-func\": \"warn\",\n \"no-multi-str\": \"warn\",\n \"no-new-func\": \"warn\",\n // Deprecated but still no replacement in @stylistic.\n // \"no-new-object\": \"warn\",\n \"no-new-wrappers\": \"warn\",\n \"no-octal-escape\": \"warn\",\n \"no-param-reassign\": \"warn\",\n \"no-restricted-properties\": \"warn\",\n \"no-restricted-globals\": [\"error\"],\n \"no-restricted-syntax\": [\"error\", \"WithStatement\"],\n \"no-script-url\": \"warn\",\n \"no-sequences\": \"warn\",\n \"no-shadow\": \"warn\",\n \"no-throw-literal\": \"warn\",\n \"no-unneeded-ternary\": \"warn\",\n \"no-unused-expressions\": [\n \"error\",\n {\n allowShortCircuit: true,\n allowTernary: true,\n allowTaggedTemplates: true\n }\n ],\n \"no-useless-computed-key\": \"warn\",\n \"no-useless-concat\": \"warn\",\n \"no-useless-constructor\": \"warn\",\n \"no-useless-rename\": [\n \"warn\",\n {\n ignoreDestructuring: false,\n ignoreImport: false,\n ignoreExport: false\n }\n ],\n \"no-var\": \"warn\",\n \"prefer-const\": \"warn\",\n strict: [\"warn\", \"never\"],\n\n // Layout & Formatting\n \"unicode-bom\": [\"warn\", \"never\"],\n\n // https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules\n \"import/newline-after-import\": \"warn\",\n \"import/no-amd\": \"error\",\n \"import/no-duplicates\": \"warn\",\n \"import/no-self-import\": \"error\",\n \"import/no-webpack-loader-syntax\": \"error\",\n\n // Positioned last to allow the consumer to override any rules.\n ...rules\n }\n }];\n\n return config;\n};\n"],"names":["js","importPlugin","globals","coreGlobalIgnores","coreConfig","options","rules","config"],"mappings":";;;;;;;;;;;AAA4B;AAEoB;AAClB;AAOvB,MAAMG,oBAAoB,EAAE,CAAC;AAE7B,SAASC,WAAWC,UAA6B,CAAC,CAAC;IACtD,MAAM,EACFC,KAAK,EACR,GAAGD;IAEJ,MAAME,SAA8B;QAAC;YACjC,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACLP,EAAEA,EAAAA,EAAAA;gBACF,QAAQC,oBAAYA;YACxB;YACA,SAAS;gBACLD,sBAAsB;aACzB;YACD,iBAAiB;gBACb,aAAa;gBACb,YAAY;gBACZ,SAAS;oBACL,GAAGE,eAAe;oBAClB,GAAGA,cAAc;oBACjB,GAAGA,YAAY;oBACf,GAAGA,gBAAgB;gBACvB;YACJ;YACA,OAAO;gBACH,8BAA8B;gBAC9B,kBAAkB;oBAAC;oBAAS;iBAAgB;gBAC5C,aAAa;oBAAC;oBAAQ;wBAAE,WAAW;wBAAM,aAAa;oBAAM;iBAAE;gBAC9D,yBAAyB;gBAEzB,oBAAoB;gBACpB,yBAAyB;gBACzB,mBAAmB;gBACnB,+BAA+B;gBAC/B,wBAAwB;oBACpB;oBACA;wBACI,WAAW;wBACX,SAAS;wBACT,WAAW;oBACf;iBACH;gBAED,cAAc;gBACd,OAAO;gBACP,QAAQ;oBAAC;oBAAQ;iBAAQ;gBACzB,wBAAwB;gBACxB,aAAa;gBACb,WAAW;gBACX,oBAAoB;gBACpB,iBAAiB;gBACjB,kBAAkB;gBAClB,mBAAmB;gBACnB,eAAe;gBACf,gBAAgB;gBAChB,kBAAkB;gBAClB,gBAAgB;gBAChB,gBAAgB;gBAChB,eAAe;gBACf,qDAAqD;gBACrD,2BAA2B;gBAC3B,mBAAmB;gBACnB,mBAAmB;gBACnB,qBAAqB;gBACrB,4BAA4B;gBAC5B,yBAAyB;oBAAC;iBAAQ;gBAClC,wBAAwB;oBAAC;oBAAS;iBAAgB;gBAClD,iBAAiB;gBACjB,gBAAgB;gBAChB,aAAa;gBACb,oBAAoB;gBACpB,uBAAuB;gBACvB,yBAAyB;oBACrB;oBACA;wBACI,mBAAmB;wBACnB,cAAc;wBACd,sBAAsB;oBAC1B;iBACH;gBACD,2BAA2B;gBAC3B,qBAAqB;gBACrB,0BAA0B;gBAC1B,qBAAqB;oBACjB;oBACA;wBACI,qBAAqB;wBACrB,cAAc;wBACd,cAAc;oBAClB;iBACH;gBACD,UAAU;gBACV,gBAAgB;gBAChB,QAAQ;oBAAC;oBAAQ;iBAAQ;gBAEzB,sBAAsB;gBACtB,eAAe;oBAAC;oBAAQ;iBAAQ;gBAEhC,yEAAyE;gBACzE,+BAA+B;gBAC/B,iBAAiB;gBACjB,wBAAwB;gBACxB,yBAAyB;gBACzB,mCAAmC;gBAEnC,+DAA+D;gBAC/D,GAAGI,KAAK;YACZ;QACJ;KAAE;IAEF,OAAOC;AACX"}
@@ -80,6 +80,7 @@ function typescriptConfig(tsconfigRootDir, options = {}) {
80
80
  "@typescript-eslint/no-non-null-assertion": "off",
81
81
  "@typescript-eslint/no-unsafe-argument": "off",
82
82
  "@typescript-eslint/no-unsafe-assignment": "off",
83
+ "@typescript-eslint/no-unsafe-call": "off",
83
84
  "@typescript-eslint/no-unsafe-member-access": "off",
84
85
  "@typescript-eslint/no-unsafe-return": "off",
85
86
  "@typescript-eslint/only-throw-error": "off",
@@ -119,6 +120,41 @@ function typescriptConfig(tsconfigRootDir, options = {}) {
119
120
  }
120
121
  ],
121
122
  "@stylistic/multiline-ternary": "off",
123
+ "@stylistic/no-mixed-operators": [
124
+ "warn",
125
+ {
126
+ groups: [
127
+ [
128
+ "&",
129
+ "|",
130
+ "^",
131
+ "~",
132
+ "<<",
133
+ ">>",
134
+ ">>>"
135
+ ],
136
+ [
137
+ "==",
138
+ "!=",
139
+ "===",
140
+ "!==",
141
+ ">",
142
+ ">=",
143
+ "<",
144
+ "<="
145
+ ],
146
+ [
147
+ "&&",
148
+ "||"
149
+ ],
150
+ [
151
+ "in",
152
+ "instanceof"
153
+ ]
154
+ ],
155
+ allowSamePrecedence: false
156
+ }
157
+ ],
122
158
  "@stylistic/no-multiple-empty-lines": [
123
159
  "warn",
124
160
  {
@@ -1 +1 @@
1
- {"version":3,"file":"typescript.js","sources":["webpack://@workleap/eslint-configs/./src/typescript.ts"],"sourcesContent":["import js from \"@eslint/js\";\nimport stylisticPlugin from \"@stylistic/eslint-plugin\";\nimport type { Linter } from \"eslint\";\nimport tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface TypescriptConfigOptions {\n rules?: Partial<Linter.RulesRecord>;\n}\n\nexport const typescriptGlobalIgnores = [];\n\nexport function typescriptConfig(tsconfigRootDir: string, options: TypescriptConfigOptions = {}) {\n const {\n rules = {}\n } = options;\n\n const config: ConfigWithExtends[] = [{\n name: \"@workleap/eslint-configs/typescript\",\n files: [\n \"**/*.{ts,tsx}\"\n ],\n plugins: {\n \"@stylistic\": stylisticPlugin\n },\n extends: [\n js.configs.recommended,\n tseslint.configs.recommendedTypeChecked,\n tseslint.configs.stylisticTypeCheckedOnly,\n stylisticPlugin.configs.customize({\n braceStyle: \"1tbs\",\n commaDangle: \"never\",\n jsx: false,\n quotes: \"double\",\n semi: true,\n severity: \"warn\"\n })\n ],\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n // Rely on TypeScript's project service to automatically discover the \"tsconfig.json\" file\n // within the boundaries of \"tsconfigRootDir\".\n projectService: true,\n tsconfigRootDir\n }\n },\n rules: {\n // ESLint core rules overrides\n \"dot-notation\": \"off\",\n \"indent\": \"off\",\n \"no-dupe-class-members\": \"off\",\n \"no-empty-function\": \"off\",\n \"no-loop-func\": \"off\",\n \"no-shadow\": \"off\",\n \"no-unused-expressions\": \"off\",\n \"no-use-before-define\": \"off\",\n \"no-useless-constructor\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"quotes\": \"off\",\n \"semi\": \"off\",\n\n // ESlint deprecated core rules\n \"arrow-parens\": \"off\",\n \"comma-dangle\": \"off\",\n\n // @typescript-eslint recommended rules overrides\n \"@typescript-eslint/dot-notation\": \"off\",\n \"@typescript-eslint/no-base-to-string\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\"\n }\n ],\n \"@typescript-eslint/no-floating-promises\": \"off\",\n // This rule should be enabled but has several options that need to be investigated.\n \"@typescript-eslint/no-misused-promises\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unsafe-argument\": \"off\",\n \"@typescript-eslint/no-unsafe-assignment\": \"off\",\n \"@typescript-eslint/no-unsafe-member-access\": \"off\",\n \"@typescript-eslint/no-unsafe-return\": \"off\",\n \"@typescript-eslint/only-throw-error\": \"off\",\n \"@typescript-eslint/prefer-nullish-coalescing\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n\n // @stylistic recommend rules overrides\n \"@stylistic/arrow-parens\": [\n \"warn\",\n \"as-needed\",\n {\n requireForBlockBody: false\n }\n ],\n \"@stylistic/indent\": [\n \"warn\",\n 4,\n {\n SwitchCase: 1,\n CallExpression: { arguments: \"first\" }\n }\n ],\n \"@stylistic/indent-binary-ops\": [\"warn\", 4],\n \"@stylistic/member-delimiter-style\": [\n \"warn\",\n {\n multiline: {\n delimiter: \"semi\"\n },\n singleline: {\n delimiter: \"semi\"\n }\n }\n ],\n \"@stylistic/multiline-ternary\": \"off\",\n \"@stylistic/no-multiple-empty-lines\": [\n \"warn\",\n {\n // View https://eslint.style/rules/eol-last.\n max: 1\n }\n ],\n \"@stylistic/operator-linebreak\": \"off\",\n \"@stylistic/spaced-comment\": \"off\",\n // Should be the default but somehow it's not enforced if it's not explicitly specified.\n \"@stylistic/quote-props\": \"off\",\n\n // Positioned last to allow the consumer to override any rules.\n ...rules\n }\n }];\n\n return config;\n};\n"],"names":["js","stylisticPlugin","tseslint","typescriptGlobalIgnores","typescriptConfig","tsconfigRootDir","options","rules","config"],"mappings":";;;;;;;;;;;AAA4B;AAC2B;AAEd;AAOlC,MAAMG,0BAA0B,EAAE,CAAC;AAEnC,SAASC,iBAAiBC,eAAuB,EAAEC,UAAmC,CAAC,CAAC;IAC3F,MAAM,EACFC,QAAQ,CAAC,CAAC,EACb,GAAGD;IAEJ,MAAME,SAA8B;QAAC;YACjC,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACL,cAAcP,aAAeA;YACjC;YACA,SAAS;gBACLD,sBAAsB;gBACtBE,gDAAuC;gBACvCA,kDAAyC;gBACzCD,+BAAiC,CAAC;oBAC9B,YAAY;oBACZ,aAAa;oBACb,KAAK;oBACL,QAAQ;oBACR,MAAM;oBACN,UAAU;gBACd;aACH;YACD,iBAAiB;gBACb,QAAQC,wBAAe;gBACvB,eAAe;oBACX,0FAA0F;oBAC1F,8CAA8C;oBAC9C,gBAAgB;oBAChBG;gBACJ;YACJ;YACA,OAAO;gBACH,8BAA8B;gBAC9B,gBAAgB;gBAChB,UAAU;gBACV,yBAAyB;gBACzB,qBAAqB;gBACrB,gBAAgB;gBAChB,aAAa;gBACb,yBAAyB;gBACzB,wBAAwB;gBACxB,0BAA0B;gBAC1B,wBAAwB;gBACxB,UAAU;gBACV,QAAQ;gBAER,+BAA+B;gBAC/B,gBAAgB;gBAChB,gBAAgB;gBAEhB,iDAAiD;gBACjD,mCAAmC;gBACnC,wCAAwC;gBACxC,wCAAwC;gBACxC,2CAA2C;oBACvC;oBACA;wBACI,iBAAiB;wBACjB,kBAAkB;oBACtB;iBACH;gBACD,2CAA2C;gBAC3C,oFAAoF;gBACpF,0CAA0C;gBAC1C,4CAA4C;gBAC5C,yCAAyC;gBACzC,2CAA2C;gBAC3C,8CAA8C;gBAC9C,uCAAuC;gBACvC,uCAAuC;gBACvC,gDAAgD;gBAChD,oDAAoD;gBAEpD,uCAAuC;gBACvC,2BAA2B;oBACvB;oBACA;oBACA;wBACI,qBAAqB;oBACzB;iBACH;gBACD,qBAAqB;oBACjB;oBACA;oBACA;wBACI,YAAY;wBACZ,gBAAgB;4BAAE,WAAW;wBAAQ;oBACzC;iBACH;gBACD,gCAAgC;oBAAC;oBAAQ;iBAAE;gBAC3C,qCAAqC;oBACjC;oBACA;wBACI,WAAW;4BACP,WAAW;wBACf;wBACA,YAAY;4BACR,WAAW;wBACf;oBACJ;iBACH;gBACD,gCAAgC;gBAChC,sCAAsC;oBAClC;oBACA;wBACI,4CAA4C;wBAC5C,KAAK;oBACT;iBACH;gBACD,iCAAiC;gBACjC,6BAA6B;gBAC7B,wFAAwF;gBACxF,0BAA0B;gBAE1B,+DAA+D;gBAC/D,GAAGE,KAAK;YACZ;QACJ;KAAE;IAEF,OAAOC;AACX"}
1
+ {"version":3,"file":"typescript.js","sources":["webpack://@workleap/eslint-configs/./src/typescript.ts"],"sourcesContent":["import js from \"@eslint/js\";\nimport stylisticPlugin from \"@stylistic/eslint-plugin\";\nimport type { Linter } from \"eslint\";\nimport tseslint from \"typescript-eslint\";\nimport type { ConfigWithExtends } from \"./types.ts\";\n\nexport interface TypescriptConfigOptions {\n rules?: Partial<Linter.RulesRecord>;\n}\n\nexport const typescriptGlobalIgnores = [];\n\nexport function typescriptConfig(tsconfigRootDir: string, options: TypescriptConfigOptions = {}) {\n const {\n rules = {}\n } = options;\n\n const config: ConfigWithExtends[] = [{\n name: \"@workleap/eslint-configs/typescript\",\n files: [\n \"**/*.{ts,tsx}\"\n ],\n plugins: {\n \"@stylistic\": stylisticPlugin\n },\n extends: [\n js.configs.recommended,\n tseslint.configs.recommendedTypeChecked,\n tseslint.configs.stylisticTypeCheckedOnly,\n stylisticPlugin.configs.customize({\n braceStyle: \"1tbs\",\n commaDangle: \"never\",\n jsx: false,\n quotes: \"double\",\n semi: true,\n severity: \"warn\"\n })\n ],\n languageOptions: {\n parser: tseslint.parser,\n parserOptions: {\n // Rely on TypeScript's project service to automatically discover the \"tsconfig.json\" file\n // within the boundaries of \"tsconfigRootDir\".\n projectService: true,\n tsconfigRootDir\n }\n },\n rules: {\n // ESLint core rules overrides\n \"dot-notation\": \"off\",\n \"indent\": \"off\",\n \"no-dupe-class-members\": \"off\",\n \"no-empty-function\": \"off\",\n \"no-loop-func\": \"off\",\n \"no-shadow\": \"off\",\n \"no-unused-expressions\": \"off\",\n \"no-use-before-define\": \"off\",\n \"no-useless-constructor\": \"off\",\n \"object-curly-spacing\": \"off\",\n \"quotes\": \"off\",\n \"semi\": \"off\",\n\n // ESlint deprecated core rules\n \"arrow-parens\": \"off\",\n \"comma-dangle\": \"off\",\n\n // @typescript-eslint recommended rules overrides\n \"@typescript-eslint/dot-notation\": \"off\",\n \"@typescript-eslint/no-base-to-string\": \"off\",\n \"@typescript-eslint/no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-object-type\": [\n \"error\",\n {\n allowInterfaces: \"with-single-extends\",\n allowObjectTypes: \"never\"\n }\n ],\n \"@typescript-eslint/no-floating-promises\": \"off\",\n // This rule should be enabled but has several options that need to be investigated.\n \"@typescript-eslint/no-misused-promises\": \"off\",\n \"@typescript-eslint/no-non-null-assertion\": \"off\",\n \"@typescript-eslint/no-unsafe-argument\": \"off\",\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/only-throw-error\": \"off\",\n \"@typescript-eslint/prefer-nullish-coalescing\": \"off\",\n \"@typescript-eslint/restrict-template-expressions\": \"off\",\n\n // @stylistic recommend rules overrides\n \"@stylistic/arrow-parens\": [\n \"warn\",\n \"as-needed\",\n {\n requireForBlockBody: false\n }\n ],\n \"@stylistic/indent\": [\n \"warn\",\n 4,\n {\n SwitchCase: 1,\n CallExpression: { arguments: \"first\" }\n }\n ],\n \"@stylistic/indent-binary-ops\": [\"warn\", 4],\n \"@stylistic/member-delimiter-style\": [\n \"warn\",\n {\n multiline: {\n delimiter: \"semi\"\n },\n singleline: {\n delimiter: \"semi\"\n }\n }\n ],\n \"@stylistic/multiline-ternary\": \"off\",\n \"@stylistic/no-mixed-operators\": [\n \"warn\",\n {\n groups: [\n [\"&\", \"|\", \"^\", \"~\", \"<<\", \">>\", \">>>\"],\n [\"==\", \"!=\", \"===\", \"!==\", \">\", \">=\", \"<\", \"<=\"],\n [\"&&\", \"||\"],\n [\"in\", \"instanceof\"]\n ],\n allowSamePrecedence: false\n }\n ],\n \"@stylistic/no-multiple-empty-lines\": [\n \"warn\",\n {\n // View https://eslint.style/rules/eol-last.\n max: 1\n }\n ],\n \"@stylistic/operator-linebreak\": \"off\",\n \"@stylistic/spaced-comment\": \"off\",\n // Should be the default but somehow it's not enforced if it's not explicitly specified.\n \"@stylistic/quote-props\": \"off\",\n\n // Positioned last to allow the consumer to override any rules.\n ...rules\n }\n }];\n\n return config;\n};\n"],"names":["js","stylisticPlugin","tseslint","typescriptGlobalIgnores","typescriptConfig","tsconfigRootDir","options","rules","config"],"mappings":";;;;;;;;;;;AAA4B;AAC2B;AAEd;AAOlC,MAAMG,0BAA0B,EAAE,CAAC;AAEnC,SAASC,iBAAiBC,eAAuB,EAAEC,UAAmC,CAAC,CAAC;IAC3F,MAAM,EACFC,QAAQ,CAAC,CAAC,EACb,GAAGD;IAEJ,MAAME,SAA8B;QAAC;YACjC,MAAM;YACN,OAAO;gBACH;aACH;YACD,SAAS;gBACL,cAAcP,aAAeA;YACjC;YACA,SAAS;gBACLD,sBAAsB;gBACtBE,gDAAuC;gBACvCA,kDAAyC;gBACzCD,+BAAiC,CAAC;oBAC9B,YAAY;oBACZ,aAAa;oBACb,KAAK;oBACL,QAAQ;oBACR,MAAM;oBACN,UAAU;gBACd;aACH;YACD,iBAAiB;gBACb,QAAQC,wBAAe;gBACvB,eAAe;oBACX,0FAA0F;oBAC1F,8CAA8C;oBAC9C,gBAAgB;oBAChBG;gBACJ;YACJ;YACA,OAAO;gBACH,8BAA8B;gBAC9B,gBAAgB;gBAChB,UAAU;gBACV,yBAAyB;gBACzB,qBAAqB;gBACrB,gBAAgB;gBAChB,aAAa;gBACb,yBAAyB;gBACzB,wBAAwB;gBACxB,0BAA0B;gBAC1B,wBAAwB;gBACxB,UAAU;gBACV,QAAQ;gBAER,+BAA+B;gBAC/B,gBAAgB;gBAChB,gBAAgB;gBAEhB,iDAAiD;gBACjD,mCAAmC;gBACnC,wCAAwC;gBACxC,wCAAwC;gBACxC,2CAA2C;oBACvC;oBACA;wBACI,iBAAiB;wBACjB,kBAAkB;oBACtB;iBACH;gBACD,2CAA2C;gBAC3C,oFAAoF;gBACpF,0CAA0C;gBAC1C,4CAA4C;gBAC5C,yCAAyC;gBACzC,2CAA2C;gBAC3C,qCAAqC;gBACrC,8CAA8C;gBAC9C,uCAAuC;gBACvC,uCAAuC;gBACvC,gDAAgD;gBAChD,oDAAoD;gBAEpD,uCAAuC;gBACvC,2BAA2B;oBACvB;oBACA;oBACA;wBACI,qBAAqB;oBACzB;iBACH;gBACD,qBAAqB;oBACjB;oBACA;oBACA;wBACI,YAAY;wBACZ,gBAAgB;4BAAE,WAAW;wBAAQ;oBACzC;iBACH;gBACD,gCAAgC;oBAAC;oBAAQ;iBAAE;gBAC3C,qCAAqC;oBACjC;oBACA;wBACI,WAAW;4BACP,WAAW;wBACf;wBACA,YAAY;4BACR,WAAW;wBACf;oBACJ;iBACH;gBACD,gCAAgC;gBAChC,iCAAiC;oBAC7B;oBACA;wBACI,QAAQ;4BACJ;gCAAC;gCAAK;gCAAK;gCAAK;gCAAK;gCAAM;gCAAM;6BAAM;4BACvC;gCAAC;gCAAM;gCAAM;gCAAO;gCAAO;gCAAK;gCAAM;gCAAK;6BAAK;4BAChD;gCAAC;gCAAM;6BAAK;4BACZ;gCAAC;gCAAM;6BAAa;yBACvB;wBACD,qBAAqB;oBACzB;iBACH;gBACD,sCAAsC;oBAClC;oBACA;wBACI,4CAA4C;wBAC5C,KAAK;oBACT;iBACH;gBACD,iCAAiC;gBACjC,6BAA6B;gBAC7B,wFAAwF;gBACxF,0BAA0B;gBAE1B,+DAA+D;gBAC/D,GAAGE,KAAK;YACZ;QACJ;KAAE;IAEF,OAAOC;AACX"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@workleap/eslint-configs",
3
3
  "author": "Workleap",
4
4
  "description": "Workleap recommended ESLint configurations.",
5
- "version": "0.0.4",
5
+ "version": "0.0.6",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",
@@ -50,6 +50,7 @@ export function defineReactLibraryConfig(tsconfigRootDir: string, options: Defin
50
50
  globalIgnores([
51
51
  "dist",
52
52
  "**/__snapshots__/*",
53
+ ".turbo",
53
54
  ...coreGlobalIgnores,
54
55
  ...jestGlobalIgnores,
55
56
  ...jsonGlobalIgnores,
@@ -38,6 +38,7 @@ export function defineTypeScriptLibraryConfig(tsconfigRootDir: string, options:
38
38
  globalIgnores([
39
39
  "dist",
40
40
  "**/__snapshots__/*",
41
+ ".turbo",
41
42
  ...coreGlobalIgnores,
42
43
  ...jestGlobalIgnores,
43
44
  ...jsonGlobalIgnores,
@@ -45,6 +45,28 @@ error Parsing error: C:\Dev\workleap\wl-web-configs\samples\storybook\rsbuild\.
45
45
 
46
46
  */
47
47
 
48
+ /*
49
+
50
+ import { defineConfig, globalIgnores } from "eslint/config";
51
+ import { defineReactLibraryConfig } from "@workleap/eslint-configs";
52
+
53
+ export default defineConfig([
54
+ globalIgnores([
55
+ "/reports/**"
56
+ ]),
57
+ defineReactLibraryConfig(import.meta.dirname)
58
+ ]);
59
+
60
+ */
61
+
62
+ /*
63
+
64
+ The key insight was that ESLint 9's flat config system requires ignores to be specified in the configuration
65
+ file itself for optimal performance, rather than relying on CLI flags (--ignore-pattern). The ignores array at the beginning of the
66
+ config ensures files are filtered out during the file discovery phase, not after.
67
+
68
+ */
69
+
48
70
  export interface DefineWebApplicationConfigOptions {
49
71
  core?: CoreConfigOptions;
50
72
  jest?: JestConfigOptions;
@@ -83,6 +105,7 @@ export const defineWebApplicationConfig = (tsconfigRootDir: string, options: Def
83
105
  globalIgnores([
84
106
  "dist",
85
107
  "**/__snapshots__/*",
108
+ ".turbo",
86
109
  ...coreGlobalIgnores,
87
110
  ...jestGlobalIgnores,
88
111
  ...jsonGlobalIgnores,
package/src/core.ts CHANGED
@@ -70,21 +70,10 @@ export function coreConfig(options: CoreConfigOptions = {}) {
70
70
  "no-label-var": "warn",
71
71
  "no-lone-blocks": "warn",
72
72
  "no-loop-func": "warn",
73
- "no-mixed-operators": [
74
- "warn",
75
- {
76
- groups: [
77
- ["&", "|", "^", "~", "<<", ">>", ">>>"],
78
- ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
79
- ["&&", "||"],
80
- ["in", "instanceof"]
81
- ],
82
- allowSamePrecedence: false
83
- }
84
- ],
85
73
  "no-multi-str": "warn",
86
74
  "no-new-func": "warn",
87
- "no-new-object": "warn",
75
+ // Deprecated but still no replacement in @stylistic.
76
+ // "no-new-object": "warn",
88
77
  "no-new-wrappers": "warn",
89
78
  "no-octal-escape": "warn",
90
79
  "no-param-reassign": "warn",
package/src/typescript.ts CHANGED
@@ -81,6 +81,7 @@ export function typescriptConfig(tsconfigRootDir: string, options: TypescriptCon
81
81
  "@typescript-eslint/no-non-null-assertion": "off",
82
82
  "@typescript-eslint/no-unsafe-argument": "off",
83
83
  "@typescript-eslint/no-unsafe-assignment": "off",
84
+ "@typescript-eslint/no-unsafe-call": "off",
84
85
  "@typescript-eslint/no-unsafe-member-access": "off",
85
86
  "@typescript-eslint/no-unsafe-return": "off",
86
87
  "@typescript-eslint/only-throw-error": "off",
@@ -116,6 +117,18 @@ export function typescriptConfig(tsconfigRootDir: string, options: TypescriptCon
116
117
  }
117
118
  ],
118
119
  "@stylistic/multiline-ternary": "off",
120
+ "@stylistic/no-mixed-operators": [
121
+ "warn",
122
+ {
123
+ groups: [
124
+ ["&", "|", "^", "~", "<<", ">>", ">>>"],
125
+ ["==", "!=", "===", "!==", ">", ">=", "<", "<="],
126
+ ["&&", "||"],
127
+ ["in", "instanceof"]
128
+ ],
129
+ allowSamePrecedence: false
130
+ }
131
+ ],
119
132
  "@stylistic/no-multiple-empty-lines": [
120
133
  "warn",
121
134
  {