@stzhu/eslint-config 0.6.0 → 0.6.1

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.
Files changed (73) hide show
  1. package/README.md +25 -4
  2. package/dist/{chunk-5AKEETFH.mjs → chunk-LD4GK7PC.js} +2 -2
  3. package/dist/{chunk-ECAGGCDW.mjs → chunk-VT2KKBLH.js} +1 -1
  4. package/dist/expo.cjs +74 -0
  5. package/dist/expo.cjs.map +1 -0
  6. package/dist/expo.js +10 -71
  7. package/dist/expo.js.map +1 -1
  8. package/dist/index.cjs +33 -0
  9. package/dist/{index.mjs.map → index.cjs.map} +1 -1
  10. package/dist/index.js +3 -29
  11. package/dist/index.js.map +1 -1
  12. package/dist/lingui.cjs +39 -0
  13. package/dist/lingui.cjs.map +1 -0
  14. package/dist/lingui.js +6 -37
  15. package/dist/lingui.js.map +1 -1
  16. package/dist/node.cjs +163 -0
  17. package/dist/node.cjs.map +1 -0
  18. package/dist/node.js +11 -157
  19. package/dist/node.js.map +1 -1
  20. package/dist/react.cjs +201 -0
  21. package/dist/react.cjs.map +1 -0
  22. package/dist/react.js +22 -168
  23. package/dist/react.js.map +1 -1
  24. package/dist/storybook.cjs +39 -0
  25. package/dist/storybook.cjs.map +1 -0
  26. package/dist/storybook.js +6 -37
  27. package/dist/storybook.js.map +1 -1
  28. package/dist/tailwind.cjs +48 -0
  29. package/dist/{tailwind.mjs.map → tailwind.cjs.map} +1 -1
  30. package/dist/tailwind.js +8 -39
  31. package/dist/tailwind.js.map +1 -1
  32. package/dist/ts.cjs +152 -0
  33. package/dist/ts.cjs.map +1 -0
  34. package/dist/ts.js +6 -150
  35. package/dist/ts.js.map +1 -1
  36. package/dist/turbo.cjs +29 -0
  37. package/dist/turbo.cjs.map +1 -0
  38. package/dist/turbo.js +6 -27
  39. package/dist/turbo.js.map +1 -1
  40. package/dist/vitest.cjs +62 -0
  41. package/dist/{vitest.mjs.map → vitest.cjs.map} +1 -1
  42. package/dist/vitest.js +6 -37
  43. package/dist/vitest.js.map +1 -1
  44. package/package.json +2 -5
  45. package/dist/expo.mjs +0 -13
  46. package/dist/expo.mjs.map +0 -1
  47. package/dist/index.mjs +0 -7
  48. package/dist/lingui.mjs +0 -8
  49. package/dist/lingui.mjs.map +0 -1
  50. package/dist/node.mjs +0 -17
  51. package/dist/node.mjs.map +0 -1
  52. package/dist/react.mjs +0 -55
  53. package/dist/react.mjs.map +0 -1
  54. package/dist/storybook.mjs +0 -8
  55. package/dist/storybook.mjs.map +0 -1
  56. package/dist/tailwind.mjs +0 -17
  57. package/dist/ts.mjs +0 -8
  58. package/dist/ts.mjs.map +0 -1
  59. package/dist/turbo.mjs +0 -8
  60. package/dist/turbo.mjs.map +0 -1
  61. package/dist/vitest.mjs +0 -31
  62. /package/dist/{chunk-5AKEETFH.mjs.map → chunk-LD4GK7PC.js.map} +0 -0
  63. /package/dist/{chunk-ECAGGCDW.mjs.map → chunk-VT2KKBLH.js.map} +0 -0
  64. /package/dist/{expo.d.mts → expo.d.cts} +0 -0
  65. /package/dist/{index.d.mts → index.d.cts} +0 -0
  66. /package/dist/{lingui.d.mts → lingui.d.cts} +0 -0
  67. /package/dist/{node.d.mts → node.d.cts} +0 -0
  68. /package/dist/{react.d.mts → react.d.cts} +0 -0
  69. /package/dist/{storybook.d.mts → storybook.d.cts} +0 -0
  70. /package/dist/{tailwind.d.mts → tailwind.d.cts} +0 -0
  71. /package/dist/{ts.d.mts → ts.d.cts} +0 -0
  72. /package/dist/{turbo.d.mts → turbo.d.cts} +0 -0
  73. /package/dist/{vitest.d.mts → vitest.d.cts} +0 -0
package/README.md CHANGED
@@ -2,15 +2,34 @@
2
2
 
3
3
  A collection of ESLint configurations for TypeScript and React projects. This package provides a set of pre-configured ESLint rules that follow best practices and common coding standards.
4
4
 
5
+ ## Requirements
6
+
7
+ - ESLint v9 or higher
8
+ - TypeScript v5 or higher (optional, but recommended for TypeScript projects)
9
+ - Tailwind CSS v4 or higher (optional, required for tailwind config)
10
+
5
11
  ## Installation
6
12
 
7
13
  ```bash
8
14
  pnpm i -D eslint @stzhu/eslint-config
9
15
  ```
10
16
 
17
+ For projects using specific configurations, you may need additional peer dependencies:
18
+
19
+ - **Tailwind config**: Requires `tailwindcss` and `postcss`
20
+ - **TypeScript projects**: Requires `typescript`
21
+
22
+ ```bash
23
+ # For TypeScript projects
24
+ pnpm i -D typescript
25
+
26
+ # For Tailwind projects
27
+ pnpm i -D tailwindcss postcss
28
+ ```
29
+
11
30
  ## Usage
12
31
 
13
- Create an `eslint.config.js` file in your project root:
32
+ Create an `eslint.config.js` (or `eslint.config.ts` for TypeScript projects) file in your project root:
14
33
 
15
34
  ```javascript
16
35
  // @ts-check
@@ -35,14 +54,16 @@ Choose one of these based on your project type:
35
54
  - `@stzhu/eslint-config/node`: Node.js project configuration
36
55
  - `@stzhu/eslint-config/expo`: Expo/React Native project configuration
37
56
 
57
+ > **Note**: The React config automatically extends the TypeScript config, so you don't need to include both. Similarly, the Expo config includes its own base configuration.
58
+
38
59
  ### Optional Configs
39
60
 
40
61
  Add these as needed:
41
62
 
42
- - `@stzhu/eslint-config/vitest`: Vitest testing configuration
63
+ - `@stzhu/eslint-config/vitest`: Vitest testing configuration (applies to `**/*.test.{ts,tsx}` files)
43
64
  - `@stzhu/eslint-config/storybook`: Storybook configuration
44
- - `@stzhu/eslint-config/tailwind`: Tailwind CSS configuration
45
- - `@stzhu/eslint-config/turbo`: Turborepo monorepo
65
+ - `@stzhu/eslint-config/tailwind`: Tailwind CSS configuration (applies to `**/*.tsx` files only)
66
+ - `@stzhu/eslint-config/turbo`: Turborepo monorepo configuration
46
67
  - `@stzhu/eslint-config/lingui`: Lingui internationalization configuration
47
68
 
48
69
  ## Example Configurations
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  import_default
3
- } from "./chunk-ECAGGCDW.mjs";
3
+ } from "./chunk-VT2KKBLH.js";
4
4
 
5
5
  // src/ts.ts
6
6
  import js from "@eslint/js";
@@ -91,4 +91,4 @@ var ts_default = defineConfig2(
91
91
  export {
92
92
  ts_default
93
93
  };
94
- //# sourceMappingURL=chunk-5AKEETFH.mjs.map
94
+ //# sourceMappingURL=chunk-LD4GK7PC.js.map
@@ -33,4 +33,4 @@ var import_default = defineConfig(
33
33
  export {
34
34
  import_default
35
35
  };
36
- //# sourceMappingURL=chunk-ECAGGCDW.mjs.map
36
+ //# sourceMappingURL=chunk-VT2KKBLH.js.map
package/dist/expo.cjs ADDED
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/expo.ts
31
+ var expo_exports = {};
32
+ __export(expo_exports, {
33
+ default: () => expo_default
34
+ });
35
+ module.exports = __toCommonJS(expo_exports);
36
+ var import_config2 = require("eslint/config");
37
+ var import_flat = __toESM(require("eslint-config-expo/flat"), 1);
38
+ var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
39
+
40
+ // src/configs/import.ts
41
+ var import_config = require("eslint/config");
42
+ var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
43
+ var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"), 1);
44
+ var import_default = (0, import_config.defineConfig)(
45
+ import_eslint_plugin_import.default.flatConfigs.recommended,
46
+ {
47
+ name: "import/custom",
48
+ settings: {
49
+ "import/resolver": {
50
+ typescript: true,
51
+ node: true
52
+ }
53
+ },
54
+ rules: {
55
+ "import/enforce-node-protocol-usage": ["error", "always"],
56
+ "import/first": "error",
57
+ "import/newline-after-import": "error"
58
+ }
59
+ },
60
+ {
61
+ name: "simple-import-sort/custom",
62
+ plugins: {
63
+ "simple-import-sort": import_eslint_plugin_simple_import_sort.default
64
+ },
65
+ rules: {
66
+ "simple-import-sort/imports": "error",
67
+ "simple-import-sort/exports": "error"
68
+ }
69
+ }
70
+ );
71
+
72
+ // src/expo.ts
73
+ var expo_default = (0, import_config2.defineConfig)(import_flat.default, import_default, import_eslint_config_prettier.default);
74
+ //# sourceMappingURL=expo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/expo.ts","../src/configs/import.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\n// @ts-expect-error - doesn't support typescript\nimport expo from 'eslint-config-expo/flat';\nimport prettier from 'eslint-config-prettier';\n\nimport importConfig from './configs/import.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nexport default defineConfig(expo, importConfig, prettier);\n","import { defineConfig } from 'eslint/config';\nimport importPlugin from 'eslint-plugin-import';\nimport simpleImportSort from 'eslint-plugin-simple-import-sort';\n\nexport default defineConfig(\n importPlugin.flatConfigs.recommended,\n {\n name: 'import/custom',\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n rules: {\n 'import/enforce-node-protocol-usage': ['error', 'always'],\n 'import/first': 'error',\n 'import/newline-after-import': 'error',\n },\n },\n\n {\n name: 'simple-import-sort/custom',\n plugins: {\n 'simple-import-sort': simpleImportSort,\n },\n rules: {\n 'simple-import-sort/imports': 'error',\n 'simple-import-sort/exports': 'error',\n },\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,iBAA6B;AAE7B,kBAAiB;AACjB,oCAAqB;;;ACHrB,oBAA6B;AAC7B,kCAAyB;AACzB,8CAA6B;AAE7B,IAAO,qBAAQ;AAAA,EACb,4BAAAC,QAAa,YAAY;AAAA,EACzB;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,MACR,mBAAmB;AAAA,QACjB,YAAY;AAAA,QACZ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,sCAAsC,CAAC,SAAS,QAAQ;AAAA,MACxD,gBAAgB;AAAA,MAChB,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,sBAAsB,wCAAAC;AAAA,IACxB;AAAA,IACA,OAAO;AAAA,MACL,8BAA8B;AAAA,MAC9B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;;;ADvBA,IAAO,mBAAQ,6BAAa,YAAAC,SAAM,gBAAc,8BAAAC,OAAQ;","names":["import_config","importPlugin","simpleImportSort","expo","prettier"]}
package/dist/expo.js CHANGED
@@ -1,74 +1,13 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
- // src/expo.ts
31
- var expo_exports = {};
32
- __export(expo_exports, {
33
- default: () => expo_default
34
- });
35
- module.exports = __toCommonJS(expo_exports);
36
- var import_config2 = require("eslint/config");
37
- var import_flat = __toESM(require("eslint-config-expo/flat"));
38
- var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"));
39
-
40
- // src/configs/import.ts
41
- var import_config = require("eslint/config");
42
- var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"));
43
- var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"));
44
- var import_default = (0, import_config.defineConfig)(
45
- import_eslint_plugin_import.default.flatConfigs.recommended,
46
- {
47
- name: "import/custom",
48
- settings: {
49
- "import/resolver": {
50
- typescript: true,
51
- node: true
52
- }
53
- },
54
- rules: {
55
- "import/enforce-node-protocol-usage": ["error", "always"],
56
- "import/first": "error",
57
- "import/newline-after-import": "error"
58
- }
59
- },
60
- {
61
- name: "simple-import-sort/custom",
62
- plugins: {
63
- "simple-import-sort": import_eslint_plugin_simple_import_sort.default
64
- },
65
- rules: {
66
- "simple-import-sort/imports": "error",
67
- "simple-import-sort/exports": "error"
68
- }
69
- }
70
- );
1
+ import {
2
+ import_default
3
+ } from "./chunk-VT2KKBLH.js";
71
4
 
72
5
  // src/expo.ts
73
- var expo_default = (0, import_config2.defineConfig)(import_flat.default, import_default, import_eslint_config_prettier.default);
6
+ import { defineConfig } from "eslint/config";
7
+ import expo from "eslint-config-expo/flat";
8
+ import prettier from "eslint-config-prettier";
9
+ var expo_default = defineConfig(expo, import_default, prettier);
10
+ export {
11
+ expo_default as default
12
+ };
74
13
  //# sourceMappingURL=expo.js.map
package/dist/expo.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/expo.ts","../src/configs/import.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\n// @ts-expect-error - doesn't support typescript\nimport expo from 'eslint-config-expo/flat';\nimport prettier from 'eslint-config-prettier';\n\nimport importConfig from './configs/import.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nexport default defineConfig(expo, importConfig, prettier);\n","import { defineConfig } from 'eslint/config';\nimport importPlugin from 'eslint-plugin-import';\nimport simpleImportSort from 'eslint-plugin-simple-import-sort';\n\nexport default defineConfig(\n importPlugin.flatConfigs.recommended,\n {\n name: 'import/custom',\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n rules: {\n 'import/enforce-node-protocol-usage': ['error', 'always'],\n 'import/first': 'error',\n 'import/newline-after-import': 'error',\n },\n },\n\n {\n name: 'simple-import-sort/custom',\n plugins: {\n 'simple-import-sort': simpleImportSort,\n },\n rules: {\n 'simple-import-sort/imports': 'error',\n 'simple-import-sort/exports': 'error',\n },\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,iBAA6B;AAE7B,kBAAiB;AACjB,oCAAqB;;;ACHrB,oBAA6B;AAC7B,kCAAyB;AACzB,8CAA6B;AAE7B,IAAO,qBAAQ;AAAA,EACb,4BAAAC,QAAa,YAAY;AAAA,EACzB;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,MACR,mBAAmB;AAAA,QACjB,YAAY;AAAA,QACZ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,sCAAsC,CAAC,SAAS,QAAQ;AAAA,MACxD,gBAAgB;AAAA,MAChB,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,sBAAsB,wCAAAC;AAAA,IACxB;AAAA,IACA,OAAO;AAAA,MACL,8BAA8B;AAAA,MAC9B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;;;ADvBA,IAAO,mBAAQ,6BAAa,YAAAC,SAAM,gBAAc,8BAAAC,OAAQ;","names":["import_config","importPlugin","simpleImportSort","expo","prettier"]}
1
+ {"version":3,"sources":["../src/expo.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\n// @ts-expect-error - doesn't support typescript\nimport expo from 'eslint-config-expo/flat';\nimport prettier from 'eslint-config-prettier';\n\nimport importConfig from './configs/import.js';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\nexport default defineConfig(expo, importConfig, prettier);\n"],"mappings":";;;;;AAAA,SAAS,oBAAoB;AAE7B,OAAO,UAAU;AACjB,OAAO,cAAc;AAKrB,IAAO,eAAQ,aAAa,MAAM,gBAAc,QAAQ;","names":[]}
package/dist/index.cjs ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ defineConfig: () => import_config.defineConfig,
24
+ globalIgnores: () => import_config.globalIgnores
25
+ });
26
+ module.exports = __toCommonJS(index_exports);
27
+ var import_config = require("eslint/config");
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ defineConfig,
31
+ globalIgnores
32
+ });
33
+ //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { defineConfig, globalIgnores } from 'eslint/config';\n"],"mappings":";AAAA,SAAS,cAAc,qBAAqB;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { defineConfig, globalIgnores } from 'eslint/config';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4C;","names":[]}
package/dist/index.js CHANGED
@@ -1,33 +1,7 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
1
  // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- defineConfig: () => import_config.defineConfig,
24
- globalIgnores: () => import_config.globalIgnores
25
- });
26
- module.exports = __toCommonJS(index_exports);
27
- var import_config = require("eslint/config");
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
2
+ import { defineConfig, globalIgnores } from "eslint/config";
3
+ export {
30
4
  defineConfig,
31
5
  globalIgnores
32
- });
6
+ };
33
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { defineConfig, globalIgnores } from 'eslint/config';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA4C;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { defineConfig, globalIgnores } from 'eslint/config';\n"],"mappings":";AAAA,SAAS,cAAc,qBAAqB;","names":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/lingui.ts
31
+ var lingui_exports = {};
32
+ __export(lingui_exports, {
33
+ default: () => lingui_default
34
+ });
35
+ module.exports = __toCommonJS(lingui_exports);
36
+ var import_config = require("eslint/config");
37
+ var import_eslint_plugin_lingui = __toESM(require("eslint-plugin-lingui"), 1);
38
+ var lingui_default = (0, import_config.defineConfig)(import_eslint_plugin_lingui.default.configs["flat/recommended"]);
39
+ //# sourceMappingURL=lingui.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lingui.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport pluginLingui from 'eslint-plugin-lingui';\n\nexport default defineConfig(pluginLingui.configs['flat/recommended']);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA6B;AAC7B,kCAAyB;AAEzB,IAAO,qBAAQ,4BAAa,4BAAAA,QAAa,QAAQ,kBAAkB,CAAC;","names":["pluginLingui"]}
package/dist/lingui.js CHANGED
@@ -1,39 +1,8 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
30
1
  // src/lingui.ts
31
- var lingui_exports = {};
32
- __export(lingui_exports, {
33
- default: () => lingui_default
34
- });
35
- module.exports = __toCommonJS(lingui_exports);
36
- var import_config = require("eslint/config");
37
- var import_eslint_plugin_lingui = __toESM(require("eslint-plugin-lingui"));
38
- var lingui_default = (0, import_config.defineConfig)(import_eslint_plugin_lingui.default.configs["flat/recommended"]);
2
+ import { defineConfig } from "eslint/config";
3
+ import pluginLingui from "eslint-plugin-lingui";
4
+ var lingui_default = defineConfig(pluginLingui.configs["flat/recommended"]);
5
+ export {
6
+ lingui_default as default
7
+ };
39
8
  //# sourceMappingURL=lingui.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lingui.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport pluginLingui from 'eslint-plugin-lingui';\n\nexport default defineConfig(pluginLingui.configs['flat/recommended']);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA6B;AAC7B,kCAAyB;AAEzB,IAAO,qBAAQ,4BAAa,4BAAAA,QAAa,QAAQ,kBAAkB,CAAC;","names":["pluginLingui"]}
1
+ {"version":3,"sources":["../src/lingui.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport pluginLingui from 'eslint-plugin-lingui';\n\nexport default defineConfig(pluginLingui.configs['flat/recommended']);\n"],"mappings":";AAAA,SAAS,oBAAoB;AAC7B,OAAO,kBAAkB;AAEzB,IAAO,iBAAQ,aAAa,aAAa,QAAQ,kBAAkB,CAAC;","names":[]}
package/dist/node.cjs ADDED
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/node.ts
31
+ var node_exports = {};
32
+ __export(node_exports, {
33
+ default: () => node_default
34
+ });
35
+ module.exports = __toCommonJS(node_exports);
36
+ var import_config4 = require("eslint/config");
37
+ var import_globals2 = __toESM(require("globals"), 1);
38
+
39
+ // src/ts.ts
40
+ var import_js = __toESM(require("@eslint/js"), 1);
41
+ var import_config3 = require("eslint/config");
42
+ var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
43
+ var import_eslint_plugin_import2 = __toESM(require("eslint-plugin-import"), 1);
44
+ var import_globals = __toESM(require("globals"), 1);
45
+
46
+ // src/configs/import.ts
47
+ var import_config = require("eslint/config");
48
+ var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"), 1);
49
+ var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"), 1);
50
+ var import_default = (0, import_config.defineConfig)(
51
+ import_eslint_plugin_import.default.flatConfigs.recommended,
52
+ {
53
+ name: "import/custom",
54
+ settings: {
55
+ "import/resolver": {
56
+ typescript: true,
57
+ node: true
58
+ }
59
+ },
60
+ rules: {
61
+ "import/enforce-node-protocol-usage": ["error", "always"],
62
+ "import/first": "error",
63
+ "import/newline-after-import": "error"
64
+ }
65
+ },
66
+ {
67
+ name: "simple-import-sort/custom",
68
+ plugins: {
69
+ "simple-import-sort": import_eslint_plugin_simple_import_sort.default
70
+ },
71
+ rules: {
72
+ "simple-import-sort/imports": "error",
73
+ "simple-import-sort/exports": "error"
74
+ }
75
+ }
76
+ );
77
+
78
+ // src/configs/typescript.ts
79
+ var import_config2 = require("eslint/config");
80
+ var import_typescript_eslint = require("typescript-eslint");
81
+ var typescript_default = (0, import_config2.defineConfig)(
82
+ import_typescript_eslint.configs.strictTypeChecked,
83
+ {
84
+ name: "typescript/languageOptions",
85
+ languageOptions: {
86
+ parserOptions: {
87
+ projectService: true
88
+ }
89
+ }
90
+ },
91
+ {
92
+ name: "typescript/custom",
93
+ rules: {
94
+ "@typescript-eslint/consistent-type-definitions": "off",
95
+ "@typescript-eslint/no-misused-promises": [
96
+ "error",
97
+ {
98
+ checksVoidReturn: {
99
+ attributes: false
100
+ }
101
+ }
102
+ ],
103
+ "@typescript-eslint/no-unused-vars": [
104
+ "error",
105
+ {
106
+ args: "all",
107
+ argsIgnorePattern: "^_",
108
+ caughtErrors: "all",
109
+ caughtErrorsIgnorePattern: "^_",
110
+ destructuredArrayIgnorePattern: "^_",
111
+ varsIgnorePattern: "^_"
112
+ }
113
+ ],
114
+ "@typescript-eslint/restrict-template-expressions": [
115
+ "error",
116
+ {
117
+ allowNumber: true
118
+ }
119
+ ],
120
+ // https://tanstack.com/router/v1/docs/framework/react/api/router/redirectFunction
121
+ "@typescript-eslint/only-throw-error": [
122
+ "warn",
123
+ {
124
+ allow: [
125
+ {
126
+ from: "package",
127
+ name: "Redirect",
128
+ package: "@tanstack/router-core"
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ },
135
+ {
136
+ files: ["**/*.{cjs,js}"],
137
+ extends: [import_typescript_eslint.configs.disableTypeChecked]
138
+ }
139
+ );
140
+
141
+ // src/ts.ts
142
+ var ts_default = (0, import_config3.defineConfig)(
143
+ Object.assign({ name: "@eslint/js/recommended" }, import_js.default.configs.recommended),
144
+ import_default,
145
+ import_eslint_plugin_import2.default.flatConfigs.typescript,
146
+ {
147
+ name: "ts/config-file-globals",
148
+ files: ["*.config.{mjs,cjs,js,ts}"],
149
+ languageOptions: {
150
+ globals: import_globals.default.node
151
+ }
152
+ },
153
+ typescript_default,
154
+ import_eslint_config_prettier.default
155
+ );
156
+
157
+ // src/node.ts
158
+ var node_default = (0, import_config4.defineConfig)(ts_default, {
159
+ languageOptions: {
160
+ globals: import_globals2.default.node
161
+ }
162
+ });
163
+ //# sourceMappingURL=node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/node.ts","../src/ts.ts","../src/configs/import.ts","../src/configs/typescript.ts"],"sourcesContent":["import { defineConfig } from 'eslint/config';\nimport globals from 'globals';\n\nimport baseConfig from './ts.js';\n\nexport default defineConfig(baseConfig, {\n languageOptions: {\n globals: globals.node,\n },\n});\n","import js from '@eslint/js';\nimport { defineConfig } from 'eslint/config';\nimport prettier from 'eslint-config-prettier';\nimport importPlugin from 'eslint-plugin-import';\nimport globals from 'globals';\n\nimport importConfig from './configs/import.js';\nimport typescriptConfig from './configs/typescript.js';\n\n// the difference between this and the `configs/typescript.js` file is that this is the entire\n// config for typescript projects, while that file is the eslint typescript config itself\n\nexport default defineConfig(\n Object.assign({ name: '@eslint/js/recommended' }, js.configs.recommended),\n importConfig,\n importPlugin.flatConfigs.typescript,\n {\n name: 'ts/config-file-globals',\n files: ['*.config.{mjs,cjs,js,ts}'],\n languageOptions: {\n globals: globals.node,\n },\n },\n typescriptConfig,\n prettier,\n);\n","import { defineConfig } from 'eslint/config';\nimport importPlugin from 'eslint-plugin-import';\nimport simpleImportSort from 'eslint-plugin-simple-import-sort';\n\nexport default defineConfig(\n importPlugin.flatConfigs.recommended,\n {\n name: 'import/custom',\n settings: {\n 'import/resolver': {\n typescript: true,\n node: true,\n },\n },\n rules: {\n 'import/enforce-node-protocol-usage': ['error', 'always'],\n 'import/first': 'error',\n 'import/newline-after-import': 'error',\n },\n },\n\n {\n name: 'simple-import-sort/custom',\n plugins: {\n 'simple-import-sort': simpleImportSort,\n },\n rules: {\n 'simple-import-sort/imports': 'error',\n 'simple-import-sort/exports': 'error',\n },\n },\n);\n","import { defineConfig } from 'eslint/config';\nimport { configs as tseslintConfigs } from 'typescript-eslint';\n\nexport default defineConfig(\n tseslintConfigs.strictTypeChecked,\n {\n name: 'typescript/languageOptions',\n languageOptions: {\n parserOptions: {\n projectService: true,\n },\n },\n },\n {\n name: 'typescript/custom',\n rules: {\n '@typescript-eslint/consistent-type-definitions': 'off',\n '@typescript-eslint/no-misused-promises': [\n 'error',\n {\n checksVoidReturn: {\n attributes: false,\n },\n },\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n args: 'all',\n argsIgnorePattern: '^_',\n caughtErrors: 'all',\n caughtErrorsIgnorePattern: '^_',\n destructuredArrayIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n },\n ],\n '@typescript-eslint/restrict-template-expressions': [\n 'error',\n {\n allowNumber: true,\n },\n ],\n // https://tanstack.com/router/v1/docs/framework/react/api/router/redirectFunction\n '@typescript-eslint/only-throw-error': [\n 'warn',\n {\n allow: [\n {\n from: 'package',\n name: 'Redirect',\n package: '@tanstack/router-core',\n },\n ],\n },\n ],\n },\n },\n {\n files: ['**/*.{cjs,js}'],\n extends: [tseslintConfigs.disableTypeChecked],\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,iBAA6B;AAC7B,IAAAC,kBAAoB;;;ACDpB,gBAAe;AACf,IAAAC,iBAA6B;AAC7B,oCAAqB;AACrB,IAAAC,+BAAyB;AACzB,qBAAoB;;;ACJpB,oBAA6B;AAC7B,kCAAyB;AACzB,8CAA6B;AAE7B,IAAO,qBAAQ;AAAA,EACb,4BAAAC,QAAa,YAAY;AAAA,EACzB;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,MACR,mBAAmB;AAAA,QACjB,YAAY;AAAA,QACZ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,OAAO;AAAA,MACL,sCAAsC,CAAC,SAAS,QAAQ;AAAA,MACxD,gBAAgB;AAAA,MAChB,+BAA+B;AAAA,IACjC;AAAA,EACF;AAAA,EAEA;AAAA,IACE,MAAM;AAAA,IACN,SAAS;AAAA,MACP,sBAAsB,wCAAAC;AAAA,IACxB;AAAA,IACA,OAAO;AAAA,MACL,8BAA8B;AAAA,MAC9B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;;;AC/BA,IAAAC,iBAA6B;AAC7B,+BAA2C;AAE3C,IAAO,yBAAQ;AAAA,EACb,yBAAAC,QAAgB;AAAA,EAChB;AAAA,IACE,MAAM;AAAA,IACN,iBAAiB;AAAA,MACf,eAAe;AAAA,QACb,gBAAgB;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,MACL,kDAAkD;AAAA,MAClD,0CAA0C;AAAA,QACxC;AAAA,QACA;AAAA,UACE,kBAAkB;AAAA,YAChB,YAAY;AAAA,UACd;AAAA,QACF;AAAA,MACF;AAAA,MACA,qCAAqC;AAAA,QACnC;AAAA,QACA;AAAA,UACE,MAAM;AAAA,UACN,mBAAmB;AAAA,UACnB,cAAc;AAAA,UACd,2BAA2B;AAAA,UAC3B,gCAAgC;AAAA,UAChC,mBAAmB;AAAA,QACrB;AAAA,MACF;AAAA,MACA,oDAAoD;AAAA,QAClD;AAAA,QACA;AAAA,UACE,aAAa;AAAA,QACf;AAAA,MACF;AAAA;AAAA,MAEA,uCAAuC;AAAA,QACrC;AAAA,QACA;AAAA,UACE,OAAO;AAAA,YACL;AAAA,cACE,MAAM;AAAA,cACN,MAAM;AAAA,cACN,SAAS;AAAA,YACX;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,eAAe;AAAA,IACvB,SAAS,CAAC,yBAAAA,QAAgB,kBAAkB;AAAA,EAC9C;AACF;;;AFjDA,IAAO,iBAAQ;AAAA,EACb,OAAO,OAAO,EAAE,MAAM,yBAAyB,GAAG,UAAAC,QAAG,QAAQ,WAAW;AAAA,EACxE;AAAA,EACA,6BAAAC,QAAa,YAAY;AAAA,EACzB;AAAA,IACE,MAAM;AAAA,IACN,OAAO,CAAC,0BAA0B;AAAA,IAClC,iBAAiB;AAAA,MACf,SAAS,eAAAC,QAAQ;AAAA,IACnB;AAAA,EACF;AAAA,EACA;AAAA,EACA,8BAAAC;AACF;;;ADpBA,IAAO,mBAAQ,6BAAa,YAAY;AAAA,EACtC,iBAAiB;AAAA,IACf,SAAS,gBAAAC,QAAQ;AAAA,EACnB;AACF,CAAC;","names":["import_config","import_globals","import_config","import_eslint_plugin_import","importPlugin","simpleImportSort","import_config","tseslintConfigs","js","importPlugin","globals","prettier","globals"]}