@neolution-ch/eslint-config-neolution 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -13
- package/dist/configs/cypress.d.ts +1 -0
- package/dist/configs/cypress.d.ts.map +1 -1
- package/dist/configs/cypress.js.map +1 -1
- package/dist/configs/get-config.d.ts +6 -0
- package/dist/configs/get-config.d.ts.map +1 -1
- package/dist/configs/get-config.js +17 -5
- package/dist/configs/get-config.js.map +1 -1
- package/dist/configs/javascript.d.ts +1 -0
- package/dist/configs/javascript.d.ts.map +1 -1
- package/dist/configs/javascript.js +2 -6
- package/dist/configs/javascript.js.map +1 -1
- package/dist/configs/nextjs.d.ts +1 -0
- package/dist/configs/nextjs.d.ts.map +1 -1
- package/dist/configs/nextjs.js.map +1 -1
- package/dist/configs/providers/default.d.ts.map +1 -1
- package/dist/configs/providers/default.js +7 -1
- package/dist/configs/providers/default.js.map +1 -1
- package/dist/configs/providers/jsdoc.d.ts +2 -1
- package/dist/configs/providers/jsdoc.d.ts.map +1 -1
- package/dist/configs/providers/jsdoc.js +37 -1
- package/dist/configs/providers/jsdoc.js.map +1 -1
- package/dist/configs/providers/react.d.ts +1 -2
- package/dist/configs/providers/react.d.ts.map +1 -1
- package/dist/configs/providers/react.js +7 -2
- package/dist/configs/providers/react.js.map +1 -1
- package/dist/configs/providers/typescript.d.ts.map +1 -1
- package/dist/configs/providers/typescript.js +45 -1
- package/dist/configs/providers/typescript.js.map +1 -1
- package/dist/configs/providers/unicorn.d.ts.map +1 -1
- package/dist/configs/providers/unicorn.js +4 -0
- package/dist/configs/providers/unicorn.js.map +1 -1
- package/dist/configs/react-library.d.ts +1 -0
- package/dist/configs/react-library.d.ts.map +1 -1
- package/dist/configs/react-library.js.map +1 -1
- package/dist/configs/typescript.d.ts +1 -0
- package/dist/configs/typescript.d.ts.map +1 -1
- package/dist/configs/typescript.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/configuration-type.d.ts +74 -0
- package/dist/types/configuration-type.d.ts.map +1 -0
- package/dist/types/configuration-type.js +2 -0
- package/dist/types/configuration-type.js.map +1 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -21,19 +21,19 @@ export default [...neolutionEslintConfig.configs.flat.nextjs];
|
|
|
21
21
|
|
|
22
22
|
### Configs
|
|
23
23
|
|
|
24
|
-
| ruleset
|
|
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
|
|
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
37
|
|
|
38
38
|
## License
|
|
39
39
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cypress.d.ts","sourceRoot":"","sources":["../../src/configs/cypress.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,EAAE,iBAapB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cypress.js","sourceRoot":"","sources":["../../src/configs/cypress.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
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
|
+
*/
|
|
2
8
|
declare const getConfig: (ruleConfig: ConfigurationType) => FixupConfigArray;
|
|
3
9
|
export default getConfig;
|
|
4
10
|
//# sourceMappingURL=get-config.d.ts.map
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -5,18 +5,24 @@ import defaults from "./providers/default.js";
|
|
|
5
5
|
import esLintRules from "./providers/eslint.js";
|
|
6
6
|
import typescriptRules from "./providers/typescript.js";
|
|
7
7
|
import unicornRules from "./providers/unicorn.js";
|
|
8
|
-
import eslintPluginReact from "eslint-plugin-react";
|
|
9
8
|
import importRules from "./providers/importPlugin.js";
|
|
10
9
|
import nextRules from "./providers/next.js";
|
|
11
10
|
import reactHooksRules from "./providers/reactHooks.js";
|
|
11
|
+
import { reactRulesJsx, reactRulesRecommended } from "./providers/react.js";
|
|
12
12
|
import pluginCypress from "eslint-plugin-cypress/flat";
|
|
13
|
-
import jsdocRules from "./providers/jsdoc.js";
|
|
13
|
+
import { jsdocRules, jsdocRequireRules } from "./providers/jsdoc.js";
|
|
14
14
|
import onlyError from "eslint-plugin-only-error";
|
|
15
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
|
+
*/
|
|
16
22
|
// eslint-disable-next-line complexity
|
|
17
23
|
const getConfig = (ruleConfig) => {
|
|
18
24
|
const compat = new FlatCompat();
|
|
19
|
-
const { defaults: includeDefaults, esLintRecommended, typescript, unicorn, reactRecommended, reactJsxRuntime, import: includeImport, prettierRecommended, next: includeNext, reactHooks, cypressRecommended, jsdoc, onlyError: includeonlyError, noOnlyTests: includeonlyNoOnlyTests, overrides, } = ruleConfig;
|
|
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;
|
|
20
26
|
const configs = new Array();
|
|
21
27
|
if (includeDefaults) {
|
|
22
28
|
configs.push(defaults);
|
|
@@ -31,10 +37,10 @@ const getConfig = (ruleConfig) => {
|
|
|
31
37
|
configs.push(unicornRules);
|
|
32
38
|
}
|
|
33
39
|
if (reactRecommended) {
|
|
34
|
-
configs.push(
|
|
40
|
+
configs.push(reactRulesRecommended);
|
|
35
41
|
}
|
|
36
42
|
if (reactJsxRuntime) {
|
|
37
|
-
configs.push(
|
|
43
|
+
configs.push(reactRulesJsx);
|
|
38
44
|
}
|
|
39
45
|
if (includeImport) {
|
|
40
46
|
configs.push(importRules);
|
|
@@ -54,6 +60,9 @@ const getConfig = (ruleConfig) => {
|
|
|
54
60
|
if (jsdoc) {
|
|
55
61
|
configs.push(jsdocRules);
|
|
56
62
|
}
|
|
63
|
+
if (jsdocRequireJsdoc) {
|
|
64
|
+
configs.push(jsdocRequireRules);
|
|
65
|
+
}
|
|
57
66
|
if (includeonlyError) {
|
|
58
67
|
configs.push({ plugins: { "only-error": onlyError } });
|
|
59
68
|
}
|
|
@@ -67,6 +76,9 @@ const getConfig = (ruleConfig) => {
|
|
|
67
76
|
},
|
|
68
77
|
});
|
|
69
78
|
}
|
|
79
|
+
if (jest) {
|
|
80
|
+
configs.push(jestPlugin.configs["flat/recommended"]);
|
|
81
|
+
}
|
|
70
82
|
if (overrides) {
|
|
71
83
|
configs.push(overrides);
|
|
72
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/configs/get-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAoB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"get-config.js","sourceRoot":"","sources":["../../src/configs/get-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAoB,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,eAAe,MAAM,2BAA2B,CAAC;AACxD,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAClD,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,SAA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C,UAAU,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAqB,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../src/configs/javascript.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,EAAE,
|
|
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,iBAQvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -2,14 +2,10 @@ const javascriptConfig = {
|
|
|
2
2
|
defaults: true,
|
|
3
3
|
esLintRecommended: true,
|
|
4
4
|
unicorn: true,
|
|
5
|
-
reactRecommended: true,
|
|
6
|
-
reactJsxRuntime: true,
|
|
7
|
-
prettierRecommended: true,
|
|
8
|
-
next: true,
|
|
9
5
|
import: true,
|
|
10
|
-
|
|
11
|
-
onlyError: true,
|
|
6
|
+
prettierRecommended: true,
|
|
12
7
|
jsdoc: true,
|
|
8
|
+
onlyError: true,
|
|
13
9
|
};
|
|
14
10
|
export default javascriptConfig;
|
|
15
11
|
//# sourceMappingURL=javascript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript.js","sourceRoot":"","sources":["../../src/configs/javascript.ts"],"names":[],"mappings":"
|
|
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,MAAM,EAAE,IAAI;IACZ,mBAAmB,EAAE,IAAI;IACzB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
package/dist/configs/nextjs.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.d.ts","sourceRoot":"","sources":["../../src/configs/nextjs.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,EAAE,iBAanB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs.js","sourceRoot":"","sources":["../../src/configs/nextjs.ts"],"names":[],"mappings":"
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/default.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import globals from "globals";
|
|
2
2
|
const defaults = [
|
|
3
3
|
{
|
|
4
|
-
ignores: [
|
|
4
|
+
ignores: [
|
|
5
|
+
"**/orval/",
|
|
6
|
+
"**/.next/",
|
|
7
|
+
"**/nextjs-routes.d.ts",
|
|
8
|
+
"**/dist/",
|
|
9
|
+
"**/coverage/",
|
|
10
|
+
],
|
|
5
11
|
},
|
|
6
12
|
{
|
|
7
13
|
settings: {
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InfiniteDepthConfigWithExtends } from "typescript-eslint";
|
|
2
2
|
declare const jsdocRules: InfiniteDepthConfigWithExtends;
|
|
3
|
-
|
|
3
|
+
declare const jsdocRequireRules: InfiniteDepthConfigWithExtends;
|
|
4
|
+
export { jsdocRules, jsdocRequireRules };
|
|
4
5
|
//# sourceMappingURL=jsdoc.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -6,8 +6,44 @@ const jsdocRules = [
|
|
|
6
6
|
"jsdoc/require-param-type": "off",
|
|
7
7
|
"jsdoc/require-returns-type": "off",
|
|
8
8
|
"jsdoc/require-jsdoc": "off",
|
|
9
|
+
"jsdoc/no-types": "error",
|
|
9
10
|
},
|
|
10
11
|
},
|
|
11
12
|
];
|
|
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 };
|
|
13
49
|
//# sourceMappingURL=jsdoc.js.map
|
|
@@ -1 +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;
|
|
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"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const reactRulesRecommended: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
2
2
|
declare const reactRulesJsx: import("@typescript-eslint/utils/ts-eslint").FlatConfig.ConfigArray;
|
|
3
|
-
export
|
|
4
|
-
export { reactRulesJsx };
|
|
3
|
+
export { reactRulesJsx, reactRulesRecommended };
|
|
5
4
|
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/react.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,qBAAqB,
|
|
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"}
|
|
@@ -10,6 +10,12 @@ const reactRulesRecommended = config(eslintPluginReact.configs.flat.recommended,
|
|
|
10
10
|
unnamedComponents: "arrow-function",
|
|
11
11
|
},
|
|
12
12
|
],
|
|
13
|
+
"react/no-unstable-nested-components": [
|
|
14
|
+
"error",
|
|
15
|
+
{
|
|
16
|
+
allowAsProps: false,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
13
19
|
},
|
|
14
20
|
});
|
|
15
21
|
const reactRulesJsx = config(eslintPluginReact.configs.flat["jsx-runtime"], {
|
|
@@ -18,6 +24,5 @@ const reactRulesJsx = config(eslintPluginReact.configs.flat["jsx-runtime"], {
|
|
|
18
24
|
"react/jsx-no-useless-fragment": ["error"],
|
|
19
25
|
},
|
|
20
26
|
});
|
|
21
|
-
export
|
|
22
|
-
export { reactRulesJsx };
|
|
27
|
+
export { reactRulesJsx, reactRulesRecommended };
|
|
23
28
|
//# sourceMappingURL=react.js.map
|
|
@@ -1 +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;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,
|
|
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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/typescript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/typescript.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAM,eAAe,qEA0DpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
import { config, configs } from "typescript-eslint";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
const findTsConfigRootDir = () => {
|
|
5
|
+
try {
|
|
6
|
+
const findTsConfigRootDirInternal = (directory, filename) => {
|
|
7
|
+
let fileStats;
|
|
8
|
+
try {
|
|
9
|
+
fileStats = fs.statSync(path.join(directory, filename));
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
// Do nothing
|
|
13
|
+
}
|
|
14
|
+
// If the file exists and is a file, return the directory
|
|
15
|
+
if (fileStats?.isFile()) {
|
|
16
|
+
return directory;
|
|
17
|
+
}
|
|
18
|
+
// Don't continue when already at the fs root
|
|
19
|
+
if (directory === path.resolve("/")) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
// Recursively check the parent directory
|
|
23
|
+
return findTsConfigRootDirInternal(path.dirname(directory), filename);
|
|
24
|
+
};
|
|
25
|
+
return findTsConfigRootDirInternal(process.cwd(), "tsconfig.json");
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
2
31
|
const typescriptRules = config(configs.eslintRecommended, configs.recommended, configs.recommendedTypeChecked.map((rule) => ({
|
|
3
32
|
...rule,
|
|
4
33
|
files: ["**/*.ts", "**/*.tsx", "**/*.mts"], // We use TS config only for TS files
|
|
@@ -9,6 +38,10 @@ const typescriptRules = config(configs.eslintRecommended, configs.recommended, c
|
|
|
9
38
|
parserOptions: {
|
|
10
39
|
project: true,
|
|
11
40
|
parser: "@typescript-eslint/parser",
|
|
41
|
+
// typescript-eslint defaults to process.cwd() but this is not always correct,
|
|
42
|
+
// for example Visual Studio runs eslint from the folder of the file open in
|
|
43
|
+
// the editor and not the root of the project
|
|
44
|
+
tsconfigRootDir: findTsConfigRootDir() ?? process.cwd(),
|
|
12
45
|
},
|
|
13
46
|
},
|
|
14
47
|
}, {
|
|
@@ -30,7 +63,18 @@ const typescriptRules = config(configs.eslintRecommended, configs.recommended, c
|
|
|
30
63
|
"@typescript-eslint/unbound-method": "off",
|
|
31
64
|
// https://github.com/typescript-eslint/typescript-eslint/issues/2621
|
|
32
65
|
"no-unused-vars": "off",
|
|
33
|
-
"@typescript-eslint/no-unused-vars":
|
|
66
|
+
"@typescript-eslint/no-unused-vars": [
|
|
67
|
+
"error",
|
|
68
|
+
{
|
|
69
|
+
args: "all",
|
|
70
|
+
argsIgnorePattern: "^_",
|
|
71
|
+
caughtErrors: "all",
|
|
72
|
+
caughtErrorsIgnorePattern: "^_",
|
|
73
|
+
destructuredArrayIgnorePattern: "^_",
|
|
74
|
+
varsIgnorePattern: "^_",
|
|
75
|
+
ignoreRestSiblings: true,
|
|
76
|
+
},
|
|
77
|
+
],
|
|
34
78
|
},
|
|
35
79
|
});
|
|
36
80
|
export default typescriptRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../src/configs/providers/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,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,UAAU,EAAE,UAAU,CAAC,EAAE,qCAAqC;CAClF,CAAC,CAAC,EACH;IACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC;IAE1C,iCAAiC;IACjC,eAAe,EAAE;QACf,aAAa,EAAE;YACb,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,2BAA2B;YAEnC,8EAA8E;YAC9E,4EAA4E;YAC5E,6CAA6C;YAC7C,eAAe,EAAE,mBAAmB,EAAE,IAAI,OAAO,CAAC,GAAG,EAAE;SACxD;KACF;CACF,EACD;IACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9B,KAAK,EAAE;QACL,uCAAuC,EAAE,KAAK;KAC/C;CACF,EACD;IACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,qCAAqC;IACjF,KAAK,EAAE;QACL,wCAAwC,EAAE;YACxC,OAAO;YACP;gBACE,gBAAgB,EAAE;oBAChB,UAAU,EAAE,KAAK;iBAClB;aACF;SACF;QACD,mCAAmC,EAAE,KAAK;QAE1C,qEAAqE;QACrE,gBAAgB,EAAE,KAAK;QACvB,mCAAmC,EAAE;YACnC,OAAO;YACP;gBACE,IAAI,EAAE,KAAK;gBACX,iBAAiB,EAAE,IAAI;gBACvB,YAAY,EAAE,KAAK;gBACnB,yBAAyB,EAAE,IAAI;gBAC/B,8BAA8B,EAAE,IAAI;gBACpC,iBAAiB,EAAE,IAAI;gBACvB,kBAAkB,EAAE,IAAI;aACzB;SACF;KACF;CACF,CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/unicorn.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"unicorn.d.ts","sourceRoot":"","sources":["../../../src/configs/providers/unicorn.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,qEAqCjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -11,6 +11,10 @@ const unicornRules = config(eslintPluginUnicorn.configs["flat/recommended"], {
|
|
|
11
11
|
"unicorn/prefer-query-selector": "off",
|
|
12
12
|
"unicorn/switch-case-braces": "off",
|
|
13
13
|
"unicorn/no-null": "off",
|
|
14
|
+
"unicorn/no-useless-undefined": [
|
|
15
|
+
"error",
|
|
16
|
+
{ checkArrowFunctionBody: false },
|
|
17
|
+
],
|
|
14
18
|
},
|
|
15
19
|
}, {
|
|
16
20
|
files: ["**/pages/**/*.page.tsx"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unicorn.js","sourceRoot":"","sources":["../../../src/configs/providers/unicorn.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,YAAY,GAAG,MAAM,CACzB,mBAAmB,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAC/C;IACE,KAAK,EAAE;QACL,+BAA+B,EAAE,KAAK;QACtC,uBAAuB,EAAE,KAAK;QAC9B,oCAAoC,EAAE,KAAK;QAC3C,8BAA8B,EAAE,KAAK;QACrC,4BAA4B,EAAE,KAAK;QACnC,qCAAqC,EAAE,KAAK;QAC5C,+BAA+B,EAAE,KAAK;QACtC,4BAA4B,EAAE,KAAK;QACnC,iBAAiB,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"unicorn.js","sourceRoot":"","sources":["../../../src/configs/providers/unicorn.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,MAAM,YAAY,GAAG,MAAM,CACzB,mBAAmB,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAC/C;IACE,KAAK,EAAE;QACL,+BAA+B,EAAE,KAAK;QACtC,uBAAuB,EAAE,KAAK;QAC9B,oCAAoC,EAAE,KAAK;QAC3C,8BAA8B,EAAE,KAAK;QACrC,4BAA4B,EAAE,KAAK;QACnC,qCAAqC,EAAE,KAAK;QAC5C,+BAA+B,EAAE,KAAK;QACtC,4BAA4B,EAAE,KAAK;QACnC,iBAAiB,EAAE,KAAK;QACxB,8BAA8B,EAAE;YAC9B,OAAO;YACP,EAAE,sBAAsB,EAAE,KAAK,EAAE;SAClC;KACF;CACF,EACD;IACE,KAAK,EAAE,CAAC,wBAAwB,CAAC;IACjC,KAAK,EAAE;QACL,uBAAuB,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;KAC1D;CACF,EACD;IACE,KAAK,EAAE,CAAC,wBAAwB,CAAC;IACjC,KAAK,EAAE;QACL,uBAAuB,EAAE,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;KAC3D;CACF,EACD;IACE,KAAK,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9B,KAAK,EAAE;QACL,uBAAuB,EAAE,KAAK;KAC/B;CACF,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-library.d.ts","sourceRoot":"","sources":["../../src/configs/react-library.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,kBAAkB,EAAE,iBAYzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"react-library.d.ts","sourceRoot":"","sources":["../../src/configs/react-library.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAA,MAAM,kBAAkB,EAAE,iBAYzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-library.js","sourceRoot":"","sources":["../../src/configs/react-library.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-library.js","sourceRoot":"","sources":["../../src/configs/react-library.ts"],"names":[],"mappings":"AAEA,MAAM,kBAAkB,GAAsB;IAC5C,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,UAAU,EAAE,IAAI;IAChB,mBAAmB,EAAE,IAAI;IACzB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/configs/typescript.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,YAAY,EAAE,iBASnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../src/configs/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAA,MAAM,YAAY,EAAE,iBASnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/configs/typescript.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../src/configs/typescript.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAsB;IACtC,QAAQ,EAAE,IAAI;IACd,iBAAiB,EAAE,IAAI;IACvB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;IACZ,mBAAmB,EAAE,IAAI;IACzB,KAAK,EAAE,IAAI;IACX,SAAS,EAAE,IAAI;CAChB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { ConfigurationType } from "./types/configuration-type.js";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
configs: {
|
|
3
4
|
flat: {
|
|
@@ -6,13 +7,13 @@ declare const _default: {
|
|
|
6
7
|
cypress: import("@eslint/compat").FixupConfigArray;
|
|
7
8
|
"react-library": import("@eslint/compat").FixupConfigArray;
|
|
8
9
|
typescript: import("@eslint/compat").FixupConfigArray;
|
|
9
|
-
getConfig: (ruleConfig: ConfigurationType) => import("@eslint/compat").FixupConfigArray;
|
|
10
|
+
getConfig: (ruleConfig: import("./types/configuration-type.js").ConfigurationType) => import("@eslint/compat").FixupConfigArray;
|
|
10
11
|
defaults: {
|
|
11
|
-
nextjs: ConfigurationType;
|
|
12
|
-
javascript: ConfigurationType;
|
|
13
|
-
cypress: ConfigurationType;
|
|
14
|
-
"react-library": ConfigurationType;
|
|
15
|
-
typescript: ConfigurationType;
|
|
12
|
+
nextjs: import("./types/configuration-type.js").ConfigurationType;
|
|
13
|
+
javascript: import("./types/configuration-type.js").ConfigurationType;
|
|
14
|
+
cypress: import("./types/configuration-type.js").ConfigurationType;
|
|
15
|
+
"react-library": import("./types/configuration-type.js").ConfigurationType;
|
|
16
|
+
typescript: import("./types/configuration-type.js").ConfigurationType;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
19
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAyBA,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;;;;;;;;;;;;AACvE,wBAEE"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC;QACzB,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC;QACjC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;QAC3B,eAAe,EAAE,SAAS,CAAC,YAAY,CAAC;QACxC,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC;QACjC,SAAS;QACT,QAAQ,EAAE;YACR,MAAM;YACN,UAAU;YACV,OAAO;YACP,eAAe,EAAE,YAAY;YAC7B,UAAU;SACX;KACF;CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AACzC,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAC3C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAEhD,MAAM,OAAO,GAAG;IACd,IAAI,EAAE;QACJ,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC;QACzB,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC;QACjC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;QAC3B,eAAe,EAAE,SAAS,CAAC,YAAY,CAAC;QACxC,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC;QACjC,SAAS;QACT,QAAQ,EAAE;YACR,MAAM;YACN,UAAU;YACV,OAAO;YACP,eAAe,EAAE,YAAY;YAC7B,UAAU;SACX;KACF;CACF,CAAC;AAGF,eAAe;IACb,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ConfigurationType interface defines the structure of a configuration object.
|
|
3
|
+
*/
|
|
4
|
+
export type ConfigurationType = {
|
|
5
|
+
/**
|
|
6
|
+
* The default configuration for the linter. If set to true, it will use the default configuration.
|
|
7
|
+
*/
|
|
8
|
+
defaults?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* The recommended ESLint configuration. If set to true, it will use the recommended configuration.
|
|
11
|
+
*/
|
|
12
|
+
esLintRecommended?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The recommended configuration for TypeScript. If set to true, it will use the recommended configuration.
|
|
15
|
+
*/
|
|
16
|
+
typescript?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The recommended configuration for unicorn. If set to true, it will use the recommended configuration.
|
|
19
|
+
*/
|
|
20
|
+
unicorn?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The recommended configuration for React. If set to true, it will use the recommended configuration.
|
|
23
|
+
*/
|
|
24
|
+
reactRecommended?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The recommended configuration for React with JSX runtime. If set to true, it will use the recommended configuration.
|
|
27
|
+
*/
|
|
28
|
+
reactJsxRuntime?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The recommended configuration for import rules. If set to true, it will use the recommended configuration.
|
|
31
|
+
*/
|
|
32
|
+
import?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The recommended configuration for Prettier. If set to true, it will use the recommended configuration.
|
|
35
|
+
*/
|
|
36
|
+
prettierRecommended?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The recommended configuration for Next.js. If set to true, it will use the recommended configuration.
|
|
39
|
+
*/
|
|
40
|
+
next?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* The recommended configuration for React hooks. If set to true, it will use the recommended configuration.
|
|
43
|
+
*/
|
|
44
|
+
reactHooks?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The recommended configuration for Cypress. If set to true, it will use the recommended configuration.
|
|
47
|
+
*/
|
|
48
|
+
cypressRecommended?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The recommended configuration for Jsdoc. If set to true, it will use the recommended configuration.
|
|
51
|
+
*/
|
|
52
|
+
jsdoc?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Enables the recommended configuration for Jsdoc with RequireJsdoc. If set to true, it will use the recommended configuration.
|
|
55
|
+
*/
|
|
56
|
+
jsdocRequireJsdoc?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* If set to true, it will only show errors in the linter output. This is useful for CI/CD pipelines where you only want to see errors and not warnings.
|
|
59
|
+
*/
|
|
60
|
+
onlyError?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* If set to true, it will prevent the use of "only"-tests.
|
|
63
|
+
*/
|
|
64
|
+
noOnlyTests?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The recommended configuration for Jest. If set to true, it will use the recommended configuration.
|
|
67
|
+
*/
|
|
68
|
+
jest?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The overrides for the configuration. This is useful for customizing the configuration for specific files or directories or rules.
|
|
71
|
+
*/
|
|
72
|
+
overrides?: import("typescript-eslint").InfiniteDepthConfigWithExtends;
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=configuration-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-type.d.ts","sourceRoot":"","sources":["../../src/types/configuration-type.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,mBAAmB,EAAE,8BAA8B,CAAC;CACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-type.js","sourceRoot":"","sources":["../../src/types/configuration-type.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neolution-ch/eslint-config-neolution",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "This package provides Neolution's .eslintrc as an extensible shared config.",
|
|
5
5
|
"homepage": "https://github.com/neolution-ch/eslint-config-neolution",
|
|
6
6
|
"type": "module",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"eslint-import-resolver-typescript": "^3.7.0",
|
|
37
37
|
"eslint-plugin-cypress": "^4.1.0",
|
|
38
38
|
"eslint-plugin-import": "^2.31.0",
|
|
39
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
39
40
|
"eslint-plugin-jsdoc": "^50.6.3",
|
|
40
41
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
41
42
|
"eslint-plugin-only-error": "^1.0.2",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"@release-it/keep-a-changelog": "^6.0.0",
|
|
54
55
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
55
56
|
"@types/eslint__eslintrc": "^2.1.2",
|
|
57
|
+
"@types/node": "^22.15.32",
|
|
56
58
|
"eslint": "^9.18.0",
|
|
57
59
|
"npm-check-updates": "^16.3.8",
|
|
58
60
|
"prettier": "^3.4.2",
|