@neolution-ch/eslint-config-neolution 1.3.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +20 -28
  2. package/dist/configs/cypress.d.ts +4 -0
  3. package/dist/configs/cypress.d.ts.map +1 -0
  4. package/dist/configs/cypress.js +16 -0
  5. package/dist/configs/cypress.js.map +1 -0
  6. package/dist/configs/get-config.d.ts +10 -0
  7. package/dist/configs/get-config.d.ts.map +1 -0
  8. package/dist/configs/get-config.js +88 -0
  9. package/dist/configs/get-config.js.map +1 -0
  10. package/dist/configs/javascript.d.ts +4 -0
  11. package/dist/configs/javascript.d.ts.map +1 -0
  12. package/dist/configs/javascript.js +15 -0
  13. package/dist/configs/javascript.js.map +1 -0
  14. package/dist/configs/nextjs.d.ts +4 -0
  15. package/dist/configs/nextjs.d.ts.map +1 -0
  16. package/dist/configs/nextjs.js +16 -0
  17. package/dist/configs/nextjs.js.map +1 -0
  18. package/dist/configs/providers/default.d.ts +105 -0
  19. package/dist/configs/providers/default.d.ts.map +1 -0
  20. package/dist/configs/providers/default.js +41 -0
  21. package/dist/configs/providers/default.js.map +1 -0
  22. package/dist/configs/providers/eslint.d.ts +3 -0
  23. package/dist/configs/providers/eslint.d.ts.map +1 -0
  24. package/dist/configs/providers/eslint.js +18 -0
  25. package/dist/configs/providers/eslint.js.map +1 -0
  26. package/dist/configs/providers/importPlugin.d.ts +3 -0
  27. package/dist/configs/providers/importPlugin.d.ts.map +1 -0
  28. package/dist/configs/providers/importPlugin.js +4 -0
  29. package/dist/configs/providers/importPlugin.js.map +1 -0
  30. package/dist/configs/providers/jsdoc.d.ts +5 -0
  31. package/dist/configs/providers/jsdoc.d.ts.map +1 -0
  32. package/dist/configs/providers/jsdoc.js +49 -0
  33. package/dist/configs/providers/jsdoc.js.map +1 -0
  34. package/dist/configs/providers/next.d.ts +3 -0
  35. package/dist/configs/providers/next.d.ts.map +1 -0
  36. package/dist/configs/providers/next.js +6 -0
  37. package/dist/configs/providers/next.js.map +1 -0
  38. package/dist/configs/providers/react.d.ts +4 -0
  39. package/dist/configs/providers/react.d.ts.map +1 -0
  40. package/dist/configs/providers/react.js +28 -0
  41. package/dist/configs/providers/react.js.map +1 -0
  42. package/dist/configs/providers/reactHooks.d.ts +3 -0
  43. package/dist/configs/providers/reactHooks.d.ts.map +1 -0
  44. package/dist/configs/providers/reactHooks.js +10 -0
  45. package/dist/configs/providers/reactHooks.js.map +1 -0
  46. package/dist/configs/providers/typescript.d.ts +3 -0
  47. package/dist/configs/providers/typescript.d.ts.map +1 -0
  48. package/dist/configs/providers/typescript.js +37 -0
  49. package/dist/configs/providers/typescript.js.map +1 -0
  50. package/dist/configs/providers/unicorn.d.ts +3 -0
  51. package/dist/configs/providers/unicorn.d.ts.map +1 -0
  52. package/dist/configs/providers/unicorn.js +32 -0
  53. package/dist/configs/providers/unicorn.js.map +1 -0
  54. package/dist/configs/react-library.d.ts +4 -0
  55. package/dist/configs/react-library.d.ts.map +1 -0
  56. package/dist/configs/react-library.js +15 -0
  57. package/dist/configs/react-library.js.map +1 -0
  58. package/dist/configs/typescript.d.ts +4 -0
  59. package/dist/configs/typescript.d.ts.map +1 -0
  60. package/dist/configs/typescript.js +12 -0
  61. package/dist/configs/typescript.js.map +1 -0
  62. package/dist/index.d.ts +22 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +27 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/types/configuration-type.d.ts +74 -0
  67. package/dist/types/configuration-type.d.ts.map +1 -0
  68. package/dist/types/configuration-type.js +2 -0
  69. package/dist/types/configuration-type.js.map +1 -0
  70. package/package.json +47 -20
  71. package/.editorconfig +0 -58
  72. package/.eslintrc.js +0 -17
  73. package/.github/workflows/ci.yml +0 -46
  74. package/.github/workflows/create-release.yml +0 -51
  75. package/.github/workflows/prepare-release.yml +0 -66
  76. package/CHANGELOG.md +0 -52
  77. package/index.js +0 -11
  78. package/rules/eslint.js +0 -75
  79. package/rules/import.js +0 -36
  80. package/rules/jsdoc.js +0 -25
  81. package/rules/next.js +0 -17
  82. package/rules/react-hooks.js +0 -10
  83. package/rules/react.js +0 -32
  84. package/rules/typescript.js +0 -214
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # eslint-config-neolution
2
2
 
3
- This package provides Neolution's .eslintrc as an extensible shared config.
3
+ This package provides Neolution's eslint.config.js as an extensible shared config.
4
4
 
5
5
  ## Installation
6
6
 
@@ -11,38 +11,30 @@ yarn add -D @neolution-ch/eslint-config-neolution
11
11
 
12
12
  ## Usage
13
13
 
14
- Edit the `.eslintrc.js` of your project:
14
+ Edit the `eslint.config.mjs` of your project:
15
15
 
16
16
  ```js
17
- module.exports = {
18
- ...
19
- extends: ["@neolution-ch/eslint-config-neolution"],
20
- ...
21
- }
22
- ```
23
-
24
- ### React
25
-
26
- For React project you might need to adjust the "@typescript-eslint/naming-convention" rule to allow PascalCase for component names.
17
+ import neolutionEslintConfig from "@neolution-ch/eslint-config-neolution";
27
18
 
28
- ```js
29
- module.exports = {
30
- ...
31
- rules: {
32
- "@typescript-eslint/naming-convention": ["error", {
33
- selector: "default",
34
- format: ["camelCase", "PascalCase"],
35
- leadingUnderscore: "allow",
36
- },
37
- {
38
- selector: ["typeLike", "accessor", "enumMember"],
39
- format: ["PascalCase"],
40
- }],
41
- }
42
- ...
43
- }
19
+ export default [...neolutionEslintConfig.configs.flat.nextjs];
44
20
  ```
45
21
 
22
+ ### Configs
23
+
24
+ | ruleset | nextjs | cypress | react-library | typescript | javascript |
25
+ |------------------------------------------------ |:-------: |:-------: |:-------------: |:----------: |:----------: |
26
+ | eslint.configs.recommended | ✓ | ✓ | ✓ | ✓ | ✓ |
27
+ | unicorn/recommended | ✓ | ✓ | ✓ | ✓ | ✓ |
28
+ | typeScriptEslint.configs.recommended | ✓ | ✓ | ✓ | ✓ | ✗ |
29
+ | eslintPluginReact.configs.flat.recommended | ✓ | ✓ | ✓ | ✗ | ✓ |
30
+ | eslintPluginReact.configs.flat["jsx-runtime"] | ✓ | ✓ | ✓ | ✗ | ✓ |
31
+ | eslintPluginPrettierRecommended | ✓ | ✓ | ✓ | ✓ | ✓ |
32
+ | next/next/recommended | ✓ | ✗ | ✗ | ✗ | ✓ |
33
+ | import/typescript | ✓ | ✓ | ✓ | ✓ | ✓ |
34
+ | react-hooks | ✓ | ✗ | ✓ | ✗ | ✓ |
35
+ | cypress/recommended | ✗ | ✓ | ✗ | ✗ | ✗ |
36
+ | eslint-plugin-no-only-tests | ✗ | ✓ | ✗ | ✗ | ✗ |
37
+
46
38
  ## License
47
39
 
48
40
  [MIT](LICENSE.md)
@@ -0,0 +1,4 @@
1
+ import { ConfigurationType } from "../types/configuration-type.js";
2
+ declare const cypressConfig: ConfigurationType;
3
+ export default cypressConfig;
4
+ //# sourceMappingURL=cypress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cypress.d.ts","sourceRoot":"","sources":["../../src/configs/cypress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAA,MAAM,aAAa,EAAE,iBAapB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,16 @@
1
+ const cypressConfig = {
2
+ defaults: true,
3
+ esLintRecommended: true,
4
+ typescript: true,
5
+ unicorn: true,
6
+ reactRecommended: true,
7
+ reactJsxRuntime: true,
8
+ import: true,
9
+ prettierRecommended: true,
10
+ cypressRecommended: true,
11
+ jsdoc: true,
12
+ onlyError: true,
13
+ noOnlyTests: true,
14
+ };
15
+ export default cypressConfig;
16
+ //# sourceMappingURL=cypress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cypress.js","sourceRoot":"","sources":["../../src/configs/cypress.ts"],"names":[],"mappings":"AAEA,MAAM,aAAa,GAAsB;IACvC,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,MAAM,EAAE,IAAI;IACZ,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,IAAI;IACxB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;CAClB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { FixupConfigArray } from "@eslint/compat";
2
+ import { ConfigurationType } from "../types/configuration-type.js";
3
+ /**
4
+ * The function `getConfig` takes a configuration object and returns a merged ESLint configuration.
5
+ * @param ruleConfig The configuration object that specifies which ESLint rules and plugins to include.
6
+ * @returns A merged ESLint configuration object.
7
+ */
8
+ declare const getConfig: (ruleConfig: ConfigurationType) => FixupConfigArray;
9
+ export default getConfig;
10
+ //# sourceMappingURL=get-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-config.d.ts","sourceRoot":"","sources":["../../src/configs/get-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAC;AAepE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnE;;;;GAIG;AAEH,QAAA,MAAM,SAAS,eAAgB,iBAAiB,qBAmG/C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,88 @@
1
+ import { config } from "typescript-eslint";
2
+ import { fixupConfigRules } from "@eslint/compat";
3
+ import { FlatCompat } from "@eslint/eslintrc";
4
+ import defaults from "./providers/default.js";
5
+ import esLintRules from "./providers/eslint.js";
6
+ import typescriptRules from "./providers/typescript.js";
7
+ import unicornRules from "./providers/unicorn.js";
8
+ import importRules from "./providers/importPlugin.js";
9
+ import nextRules from "./providers/next.js";
10
+ import reactHooksRules from "./providers/reactHooks.js";
11
+ import { reactRulesJsx, reactRulesRecommended } from "./providers/react.js";
12
+ import pluginCypress from "eslint-plugin-cypress/flat";
13
+ import { jsdocRules, jsdocRequireRules } from "./providers/jsdoc.js";
14
+ import onlyError from "eslint-plugin-only-error";
15
+ import noOnlyTests from "eslint-plugin-no-only-tests";
16
+ import jestPlugin from "eslint-plugin-jest";
17
+ /**
18
+ * The function `getConfig` takes a configuration object and returns a merged ESLint configuration.
19
+ * @param ruleConfig The configuration object that specifies which ESLint rules and plugins to include.
20
+ * @returns A merged ESLint configuration object.
21
+ */
22
+ // eslint-disable-next-line complexity
23
+ const getConfig = (ruleConfig) => {
24
+ const compat = new FlatCompat();
25
+ const { defaults: includeDefaults, esLintRecommended, typescript, unicorn, reactRecommended, reactJsxRuntime, import: includeImport, prettierRecommended, next: includeNext, reactHooks, cypressRecommended, jsdoc, jsdocRequireJsdoc, onlyError: includeonlyError, noOnlyTests: includeonlyNoOnlyTests, jest, overrides, } = ruleConfig;
26
+ const configs = new Array();
27
+ if (includeDefaults) {
28
+ configs.push(defaults);
29
+ }
30
+ if (esLintRecommended) {
31
+ configs.push(esLintRules);
32
+ }
33
+ if (typescript) {
34
+ configs.push(typescriptRules);
35
+ }
36
+ if (unicorn) {
37
+ configs.push(unicornRules);
38
+ }
39
+ if (reactRecommended) {
40
+ configs.push(reactRulesRecommended);
41
+ }
42
+ if (reactJsxRuntime) {
43
+ configs.push(reactRulesJsx);
44
+ }
45
+ if (includeImport) {
46
+ configs.push(importRules);
47
+ }
48
+ if (prettierRecommended) {
49
+ configs.push(...compat.extends("plugin:prettier/recommended"));
50
+ }
51
+ if (includeNext) {
52
+ configs.push(nextRules);
53
+ }
54
+ if (reactHooks) {
55
+ configs.push(reactHooksRules);
56
+ }
57
+ if (cypressRecommended) {
58
+ configs.push(pluginCypress.configs.recommended);
59
+ }
60
+ if (jsdoc) {
61
+ configs.push(jsdocRules);
62
+ }
63
+ if (jsdocRequireJsdoc) {
64
+ configs.push(jsdocRequireRules);
65
+ }
66
+ if (includeonlyError) {
67
+ configs.push({ plugins: { "only-error": onlyError } });
68
+ }
69
+ if (includeonlyNoOnlyTests) {
70
+ configs.push({
71
+ plugins: {
72
+ "no-only-tests": noOnlyTests,
73
+ },
74
+ rules: {
75
+ "no-only-tests/no-only-tests": "error",
76
+ },
77
+ });
78
+ }
79
+ if (jest) {
80
+ configs.push(jestPlugin.configs["flat/recommended"]);
81
+ }
82
+ if (overrides) {
83
+ configs.push(overrides);
84
+ }
85
+ return fixupConfigRules(config(configs));
86
+ };
87
+ export default getConfig;
88
+ //# sourceMappingURL=get-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/configs/get-config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import { ConfigurationType } from "../types/configuration-type.js";
2
+ declare const javascriptConfig: ConfigurationType;
3
+ export default javascriptConfig;
4
+ //# sourceMappingURL=javascript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/configs/javascript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAA,MAAM,gBAAgB,EAAE,iBAYvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ const javascriptConfig = {
2
+ defaults: true,
3
+ esLintRecommended: true,
4
+ unicorn: true,
5
+ reactRecommended: true,
6
+ reactJsxRuntime: true,
7
+ prettierRecommended: true,
8
+ next: true,
9
+ import: true,
10
+ reactHooks: true,
11
+ onlyError: true,
12
+ jsdoc: true,
13
+ };
14
+ export default javascriptConfig;
15
+ //# sourceMappingURL=javascript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"javascript.js","sourceRoot":"","sources":["../../src/configs/javascript.ts"],"names":[],"mappings":"AAEA,MAAM,gBAAgB,GAAsB;IAC1C,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,IAAI;IACzB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ConfigurationType } from "../types/configuration-type.js";
2
+ declare const nextJsConfig: ConfigurationType;
3
+ export default nextJsConfig;
4
+ //# sourceMappingURL=nextjs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/configs/nextjs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAA,MAAM,YAAY,EAAE,iBAanB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,16 @@
1
+ const nextJsConfig = {
2
+ defaults: true,
3
+ esLintRecommended: true,
4
+ typescript: true,
5
+ unicorn: true,
6
+ reactRecommended: true,
7
+ reactJsxRuntime: true,
8
+ next: true,
9
+ import: true,
10
+ reactHooks: true,
11
+ prettierRecommended: true,
12
+ jsdoc: true,
13
+ onlyError: true,
14
+ };
15
+ export default nextJsConfig;
16
+ //# sourceMappingURL=nextjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../src/configs/nextjs.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAsB;IACtC,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;IACzB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,105 @@
1
+ declare const defaults: ({
2
+ ignores: string[];
3
+ settings?: undefined;
4
+ languageOptions?: undefined;
5
+ } | {
6
+ settings: {
7
+ react: {
8
+ version: string;
9
+ };
10
+ "import/parsers": {
11
+ "@typescript-eslint/parser": string[];
12
+ };
13
+ "import/resolver": {
14
+ typescript: {
15
+ alwaysTryTypes: boolean;
16
+ project: string[];
17
+ };
18
+ node: {
19
+ extensions: string[];
20
+ };
21
+ };
22
+ "import/ignore": string[];
23
+ };
24
+ languageOptions: {
25
+ globals: {
26
+ __dirname: false;
27
+ __filename: false;
28
+ AbortController: false;
29
+ AbortSignal: false;
30
+ atob: false;
31
+ Blob: false;
32
+ BroadcastChannel: false;
33
+ btoa: false;
34
+ Buffer: false;
35
+ ByteLengthQueuingStrategy: false;
36
+ clearImmediate: false;
37
+ clearInterval: false;
38
+ clearTimeout: false;
39
+ CloseEvent: false;
40
+ CompressionStream: false;
41
+ console: false;
42
+ CountQueuingStrategy: false;
43
+ crypto: false;
44
+ Crypto: false;
45
+ CryptoKey: false;
46
+ CustomEvent: false;
47
+ DecompressionStream: false;
48
+ DOMException: false;
49
+ Event: false;
50
+ EventTarget: false;
51
+ exports: true;
52
+ fetch: false;
53
+ File: false;
54
+ FormData: false;
55
+ global: false;
56
+ Headers: false;
57
+ MessageChannel: false;
58
+ MessageEvent: false;
59
+ MessagePort: false;
60
+ module: false;
61
+ navigator: false;
62
+ Navigator: false;
63
+ performance: false;
64
+ Performance: false;
65
+ PerformanceEntry: false;
66
+ PerformanceMark: false;
67
+ PerformanceMeasure: false;
68
+ PerformanceObserver: false;
69
+ PerformanceObserverEntryList: false;
70
+ PerformanceResourceTiming: false;
71
+ process: false;
72
+ queueMicrotask: false;
73
+ ReadableByteStreamController: false;
74
+ ReadableStream: false;
75
+ ReadableStreamBYOBReader: false;
76
+ ReadableStreamBYOBRequest: false;
77
+ ReadableStreamDefaultController: false;
78
+ ReadableStreamDefaultReader: false;
79
+ Request: false;
80
+ require: false;
81
+ Response: false;
82
+ setImmediate: false;
83
+ setInterval: false;
84
+ setTimeout: false;
85
+ structuredClone: false;
86
+ SubtleCrypto: false;
87
+ TextDecoder: false;
88
+ TextDecoderStream: false;
89
+ TextEncoder: false;
90
+ TextEncoderStream: false;
91
+ TransformStream: false;
92
+ TransformStreamDefaultController: false;
93
+ URL: false;
94
+ URLSearchParams: false;
95
+ WebAssembly: false;
96
+ WebSocket: false;
97
+ WritableStream: false;
98
+ WritableStreamDefaultController: false;
99
+ WritableStreamDefaultWriter: false;
100
+ };
101
+ };
102
+ ignores?: undefined;
103
+ })[];
104
+ export default defaults;
105
+ //# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/default.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqCb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,41 @@
1
+ import globals from "globals";
2
+ const defaults = [
3
+ {
4
+ ignores: [
5
+ "**/orval/",
6
+ "**/.next/",
7
+ "**/nextjs-routes.d.ts",
8
+ "**/dist/",
9
+ "**/coverage/",
10
+ ],
11
+ },
12
+ {
13
+ settings: {
14
+ react: {
15
+ version: "17",
16
+ },
17
+ "import/parsers": {
18
+ "@typescript-eslint/parser": [".ts", ".tsx"],
19
+ },
20
+ "import/resolver": {
21
+ typescript: {
22
+ alwaysTryTypes: true,
23
+ project: ["tsconfig.json"],
24
+ },
25
+ node: {
26
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
27
+ },
28
+ },
29
+ "import/ignore": [
30
+ String.raw `\.(scss|less|css)$`, // can't parse unprocessed CSS modules
31
+ ],
32
+ },
33
+ languageOptions: {
34
+ globals: {
35
+ ...globals.node,
36
+ },
37
+ },
38
+ },
39
+ ];
40
+ export default defaults;
41
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/configs/providers/default.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,MAAM,QAAQ,GAAG;IACf;QACE,OAAO,EAAE;YACP,WAAW;YACX,WAAW;YACX,uBAAuB;YACvB,UAAU;YACV,cAAc;SACf;KACF;IACD;QACE,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;aACd;YACD,gBAAgB,EAAE;gBAChB,2BAA2B,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;aAC7C;YACD,iBAAiB,EAAE;gBACjB,UAAU,EAAE;oBACV,cAAc,EAAE,IAAI;oBACpB,OAAO,EAAE,CAAC,eAAe,CAAC;iBAC3B;gBACD,IAAI,EAAE;oBACJ,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;iBAC3C;aACF;YACD,eAAe,EAAE;gBACf,MAAM,CAAC,GAAG,CAAA,oBAAoB,EAAE,sCAAsC;aACvE;SACF;QACD,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,GAAG,OAAO,CAAC,IAAI;aAChB;SACF;KACF;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const esLintRules: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ export default esLintRules;
3
+ //# sourceMappingURL=eslint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/eslint.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,qEAef,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { config } from "typescript-eslint";
2
+ import esLint from "@eslint/js";
3
+ const esLintRules = config(esLint.configs.recommended, {
4
+ rules: {
5
+ // Enforce double quotes
6
+ quotes: ["error", "double", { avoidEscape: true }],
7
+ // Prefer string interpolation
8
+ "prefer-template": "error",
9
+ "max-lines": ["error", { max: 200 }],
10
+ complexity: ["error", { max: 12 }],
11
+ "prefer-destructuring": "error",
12
+ "no-empty-function": "error",
13
+ "arrow-body-style": ["error", "as-needed"],
14
+ eqeqeq: ["error", "always"],
15
+ },
16
+ });
17
+ export default esLintRules;
18
+ //# sourceMappingURL=eslint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eslint.js","sourceRoot":"","sources":["../../../src/configs/providers/eslint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE;IACrD,KAAK,EAAE;QACL,wBAAwB;QACxB,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAElD,8BAA8B;QAC9B,iBAAiB,EAAE,OAAO;QAE1B,WAAW,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;QACpC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;QAClC,sBAAsB,EAAE,OAAO;QAC/B,mBAAmB,EAAE,OAAO;QAC5B,kBAAkB,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QAC1C,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;KAC5B;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const importRules: import("typescript-eslint").InfiniteDepthConfigWithExtends[];
2
+ export default importRules;
3
+ //# sourceMappingURL=importPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importPlugin.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/importPlugin.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW,8DAAyC,CAAC;AAE3D,eAAe,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ import importPlugin from "eslint-plugin-import";
2
+ const importRules = [importPlugin.flatConfigs.recommended];
3
+ export default importRules;
4
+ //# sourceMappingURL=importPlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importPlugin.js","sourceRoot":"","sources":["../../../src/configs/providers/importPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAEhD,MAAM,WAAW,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;AAE3D,eAAe,WAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { InfiniteDepthConfigWithExtends } from "typescript-eslint";
2
+ declare const jsdocRules: InfiniteDepthConfigWithExtends;
3
+ declare const jsdocRequireRules: InfiniteDepthConfigWithExtends;
4
+ export { jsdocRules, jsdocRequireRules };
5
+ //# sourceMappingURL=jsdoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsdoc.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/jsdoc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE,QAAA,MAAM,UAAU,EAUX,8BAA8B,CAAC;AAEpC,QAAA,MAAM,iBAAiB,EAkClB,8BAA8B,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,49 @@
1
+ import jsdoc from "eslint-plugin-jsdoc";
2
+ const jsdocRules = [
3
+ jsdoc.configs["flat/recommended"],
4
+ {
5
+ rules: {
6
+ "jsdoc/require-param-type": "off",
7
+ "jsdoc/require-returns-type": "off",
8
+ "jsdoc/require-jsdoc": "off",
9
+ "jsdoc/no-types": "error",
10
+ },
11
+ },
12
+ ];
13
+ const jsdocRequireRules = [
14
+ {
15
+ ignores: ["**/*.spec.ts"],
16
+ rules: {
17
+ "jsdoc/require-jsdoc": [
18
+ "error",
19
+ {
20
+ publicOnly: false,
21
+ require: {
22
+ ArrowFunctionExpression: true,
23
+ ClassDeclaration: true,
24
+ ClassExpression: true,
25
+ FunctionDeclaration: true,
26
+ FunctionExpression: true,
27
+ MethodDefinition: true,
28
+ },
29
+ contexts: [
30
+ "ArrowFunctionExpression",
31
+ "FunctionDeclaration",
32
+ "FunctionExpression",
33
+ "MethodDefinition",
34
+ "PropertyDefinition",
35
+ "TSDeclareFunction",
36
+ "TSEnumDeclaration",
37
+ "TSInterfaceDeclaration",
38
+ "TSMethodSignature",
39
+ "TSPropertySignature",
40
+ "TSTypeAliasDeclaration",
41
+ ],
42
+ checkGetters: true,
43
+ },
44
+ ],
45
+ },
46
+ },
47
+ ];
48
+ export { jsdocRules, jsdocRequireRules };
49
+ //# sourceMappingURL=jsdoc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsdoc.js","sourceRoot":"","sources":["../../../src/configs/providers/jsdoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,qBAAqB,CAAC;AAGxC,MAAM,UAAU,GAAG;IACjB,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACjC;QACE,KAAK,EAAE;YACL,0BAA0B,EAAE,KAAK;YACjC,4BAA4B,EAAE,KAAK;YACnC,qBAAqB,EAAE,KAAK;YAC5B,gBAAgB,EAAE,OAAO;SAC1B;KACF;CACgC,CAAC;AAEpC,MAAM,iBAAiB,GAAG;IACxB;QACE,OAAO,EAAE,CAAC,cAAc,CAAC;QACzB,KAAK,EAAE;YACL,qBAAqB,EAAE;gBACrB,OAAO;gBACP;oBACE,UAAU,EAAE,KAAK;oBACjB,OAAO,EAAE;wBACP,uBAAuB,EAAE,IAAI;wBAC7B,gBAAgB,EAAE,IAAI;wBACtB,eAAe,EAAE,IAAI;wBACrB,mBAAmB,EAAE,IAAI;wBACzB,kBAAkB,EAAE,IAAI;wBACxB,gBAAgB,EAAE,IAAI;qBACvB;oBACD,QAAQ,EAAE;wBACR,yBAAyB;wBACzB,qBAAqB;wBACrB,oBAAoB;wBACpB,kBAAkB;wBAClB,oBAAoB;wBACpB,mBAAmB;wBACnB,mBAAmB;wBACnB,wBAAwB;wBACxB,mBAAmB;wBACnB,qBAAqB;wBACrB,wBAAwB;qBACzB;oBACD,YAAY,EAAE,IAAI;iBACnB;aACF;SACF;KACF;CACgC,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const nextRules: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ export default nextRules;
3
+ //# sourceMappingURL=next.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/next.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,SAAS,qEAA0D,CAAC;AAE1E,eAAe,SAAS,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { FlatCompat } from "@eslint/eslintrc";
2
+ import { config } from "typescript-eslint";
3
+ const compat = new FlatCompat();
4
+ const nextRules = config(compat.extends("plugin:@next/next/recommended"));
5
+ export default nextRules;
6
+ //# sourceMappingURL=next.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next.js","sourceRoot":"","sources":["../../../src/configs/providers/next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AAChC,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC,CAAC;AAE1E,eAAe,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ declare const reactRulesRecommended: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ declare const reactRulesJsx: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
3
+ export { reactRulesJsx, reactRulesRecommended };
4
+ //# sourceMappingURL=react.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/react.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,qBAAqB,qEAoB1B,CAAC;AAEF,QAAA,MAAM,aAAa,qEAKjB,CAAC;AAEH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { config } from "typescript-eslint";
2
+ import eslintPluginReact from "eslint-plugin-react";
3
+ const reactRulesRecommended = config(eslintPluginReact.configs.flat.recommended, {
4
+ rules: {
5
+ // Prefer arrow functions for components
6
+ "react/function-component-definition": [
7
+ "error",
8
+ {
9
+ namedComponents: "arrow-function",
10
+ unnamedComponents: "arrow-function",
11
+ },
12
+ ],
13
+ "react/no-unstable-nested-components": [
14
+ "error",
15
+ {
16
+ allowAsProps: false,
17
+ },
18
+ ],
19
+ },
20
+ });
21
+ const reactRulesJsx = config(eslintPluginReact.configs.flat["jsx-runtime"], {
22
+ rules: {
23
+ "react/jsx-filename-extension": ["error", { extensions: [".tsx", ".jsx"] }],
24
+ "react/jsx-no-useless-fragment": ["error"],
25
+ },
26
+ });
27
+ export { reactRulesJsx, reactRulesRecommended };
28
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/configs/providers/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAEpD,MAAM,qBAAqB,GAAG,MAAM,CAClC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAC1C;IACE,KAAK,EAAE;QACL,wCAAwC;QACxC,qCAAqC,EAAE;YACrC,OAAO;YACP;gBACE,eAAe,EAAE,gBAAgB;gBACjC,iBAAiB,EAAE,gBAAgB;aACpC;SACF;QACD,qCAAqC,EAAE;YACrC,OAAO;YACP;gBACE,YAAY,EAAE,KAAK;aACpB;SACF;KACF;CACF,CACF,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE;IAC1E,KAAK,EAAE;QACL,8BAA8B,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;QAC3E,+BAA+B,EAAE,CAAC,OAAO,CAAC;KAC3C;CACF,CAAC,CAAC;AAEH,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const reactHooksRules: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ export default reactHooksRules;
3
+ //# sourceMappingURL=reactHooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactHooks.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/reactHooks.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,eAAe,qEAOpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { config } from "typescript-eslint";
2
+ import { FlatCompat } from "@eslint/eslintrc";
3
+ const compat = new FlatCompat();
4
+ const reactHooksRules = config(compat.extends("plugin:react-hooks/recommended"), {
5
+ rules: {
6
+ "react-hooks/rules-of-hooks": "error",
7
+ },
8
+ });
9
+ export default reactHooksRules;
10
+ //# sourceMappingURL=reactHooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactHooks.js","sourceRoot":"","sources":["../../../src/configs/providers/reactHooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;AAEhC,MAAM,eAAe,GAAG,MAAM,CAC5B,MAAM,CAAC,OAAO,CAAC,gCAAgC,CAAC,EAChD;IACE,KAAK,EAAE;QACL,4BAA4B,EAAE,OAAO;KACtC;CACF,CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const typescriptRules: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
2
+ export default typescriptRules;
3
+ //# sourceMappingURL=typescript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/typescript.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,eAAe,qEA0CpB,CAAC;AAEF,eAAe,eAAe,CAAC"}