eslint-plugin-th-rules 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -35
- package/dist/configs/bundles/recommended-react.d.ts +3 -1
- package/dist/configs/bundles/recommended-react.d.ts.map +1 -0
- package/dist/configs/bundles/recommended-react.js +1 -0
- package/dist/configs/bundles/recommended-typescript-react.d.ts +3 -1
- package/dist/configs/bundles/recommended-typescript-react.d.ts.map +1 -0
- package/dist/configs/bundles/recommended-typescript-react.js +1 -0
- package/dist/configs/bundles/recommended-typescript.d.ts +3 -1
- package/dist/configs/bundles/recommended-typescript.d.ts.map +1 -0
- package/dist/configs/bundles/recommended-typescript.js +1 -0
- package/dist/configs/bundles/recommended.d.ts +3 -1
- package/dist/configs/bundles/recommended.d.ts.map +1 -0
- package/dist/configs/bundles/recommended.js +1 -0
- package/dist/configs/core/base.d.ts +2 -0
- package/dist/configs/core/base.d.ts.map +1 -0
- package/dist/configs/core/base.js +8 -4
- package/dist/configs/core/react.d.ts +2 -0
- package/dist/configs/core/react.d.ts.map +1 -0
- package/dist/configs/core/react.js +1 -0
- package/dist/configs/core/typescript.d.ts +2 -0
- package/dist/configs/core/typescript.d.ts.map +1 -0
- package/dist/configs/core/typescript.js +1 -0
- package/dist/configs/externals/base.d.ts +2 -0
- package/dist/configs/externals/base.d.ts.map +1 -0
- package/dist/configs/externals/base.js +1 -0
- package/dist/configs/externals/opinionated.d.ts +3 -1
- package/dist/configs/externals/opinionated.d.ts.map +1 -0
- package/dist/configs/externals/opinionated.js +1 -0
- package/dist/index.d.ts +12 -15
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -9
- package/dist/plugin.d.ts +80 -3
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +19 -13
- package/dist/rules/no-boolean-coercion.d.ts +3 -2
- package/dist/rules/no-boolean-coercion.d.ts.map +1 -0
- package/dist/rules/no-boolean-coercion.js +2 -7
- package/dist/rules/no-comments.d.ts +1 -0
- package/dist/rules/no-comments.d.ts.map +1 -0
- package/dist/rules/no-default-export.d.ts +1 -0
- package/dist/rules/no-default-export.d.ts.map +1 -0
- package/dist/rules/no-destructuring.d.ts +1 -0
- package/dist/rules/no-destructuring.d.ts.map +1 -0
- package/dist/rules/prefer-is-empty.d.ts +1 -0
- package/dist/rules/prefer-is-empty.d.ts.map +1 -0
- package/dist/rules/prefer-is-empty.js +25 -28
- package/dist/rules/schemas-in-schemas-file.d.ts +1 -0
- package/dist/rules/schemas-in-schemas-file.d.ts.map +1 -0
- package/dist/rules/schemas-in-schemas-file.js +21 -25
- package/dist/rules/top-level-functions.d.ts +1 -0
- package/dist/rules/top-level-functions.d.ts.map +1 -0
- package/dist/rules/types-in-dts.d.ts +1 -0
- package/dist/rules/types-in-dts.d.ts.map +1 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Recommended plus full strict/stylistic TypeScript configurations.
|
|
|
56
56
|
import thRules from "eslint-plugin-th-rules";
|
|
57
57
|
|
|
58
58
|
export default [
|
|
59
|
-
...thRules.configs["
|
|
59
|
+
...thRules.configs["recommendedTypescript"]
|
|
60
60
|
];
|
|
61
61
|
```
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ Recommended plus:
|
|
|
72
72
|
import thRules from "eslint-plugin-th-rules";
|
|
73
73
|
|
|
74
74
|
export default [
|
|
75
|
-
...thRules.configs["
|
|
75
|
+
...thRules.configs["recommendedReact"]
|
|
76
76
|
];
|
|
77
77
|
```
|
|
78
78
|
|
|
@@ -146,47 +146,27 @@ Do not edit below this line.
|
|
|
146
146
|
|
|
147
147
|
💼 Configurations enabled in.\
|
|
148
148
|
✅ Set in the `recommended` configuration.\
|
|
149
|
-
⚛️ Set in the `
|
|
150
|
-
🟦 Set in the `
|
|
149
|
+
⚛️ Set in the `recommendedReact` configuration.\
|
|
150
|
+
🟦 Set in the `recommendedTypescript` configuration.\
|
|
151
|
+
🎲 Set in the `recommendedTypescriptReact` configuration.\
|
|
151
152
|
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\
|
|
152
153
|
💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).
|
|
153
154
|
|
|
154
|
-
| Name
|
|
155
|
-
|
|
|
156
|
-
| [
|
|
157
|
-
| [
|
|
158
|
-
| [
|
|
159
|
-
| [
|
|
160
|
-
| [
|
|
161
|
-
| [
|
|
162
|
-
| [
|
|
163
|
-
| [
|
|
155
|
+
| Name | Description | 💼 | 🔧 | 💡 |
|
|
156
|
+
| :--------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | :--------- | :- | :- |
|
|
157
|
+
| [noBooleanCoercion](docs/rules/noBooleanCoercion.md) | Disallow Boolean(value) or !!value. Enforce explicit checks: !_.isNil(value) for scalars and !_.isEmpty(value) for strings, arrays, and objects. | ✅ ⚛️ 🟦 🎲 | | 💡 |
|
|
158
|
+
| [noComments](docs/rules/noComments.md) | Disallow comments except for specified allowed patterns. | ✅ ⚛️ 🟦 🎲 | 🔧 | |
|
|
159
|
+
| [noDefaultExport](docs/rules/noDefaultExport.md) | Convert unnamed default exports to named default exports based on the file name. | ✅ ⚛️ 🟦 🎲 | 🔧 | |
|
|
160
|
+
| [noDestructuring](docs/rules/noDestructuring.md) | Disallow destructuring that does not meet certain conditions. | ✅ ⚛️ 🟦 🎲 | | |
|
|
161
|
+
| [preferIsEmpty](docs/rules/preferIsEmpty.md) | Require _.isEmpty instead of length comparisons. | ✅ ⚛️ 🟦 🎲 | | 💡 |
|
|
162
|
+
| [schemasInSchemasFile](docs/rules/schemasInSchemasFile.md) | Require Zod schema declarations to be placed in a .schemas.ts file. | ✅ ⚛️ 🟦 🎲 | | |
|
|
163
|
+
| [topLevelFunctions](docs/rules/topLevelFunctions.md) | Require all top-level functions to be named regular functions. | ✅ ⚛️ 🟦 🎲 | 🔧 | |
|
|
164
|
+
| [typesInDts](docs/rules/typesInDts.md) | Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files. | ✅ ⚛️ 🟦 🎲 | | |
|
|
164
165
|
|
|
165
166
|
<!-- end auto-generated rules list -->
|
|
166
167
|
|
|
167
168
|
---
|
|
168
169
|
|
|
169
|
-
# Updating Documentation
|
|
170
|
-
|
|
171
|
-
Auto-generate rule docs:
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
npm run update:eslint-docs
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
Recommended command:
|
|
178
|
-
|
|
179
|
-
```json
|
|
180
|
-
"update:eslint-docs": "eslint-doc-generator \
|
|
181
|
-
--config-emoji \"recommended,✅\" \
|
|
182
|
-
--config-emoji \"recommended-react,⚛️\" \
|
|
183
|
-
--config-emoji \"recommended-typescript,🟦\""
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Internal layers (`core-*`, `externals-*`) are not included because they are not presets.
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
170
|
# License
|
|
191
171
|
|
|
192
172
|
MIT
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type Linter } from 'eslint';
|
|
2
|
-
export declare const recommendedReact: Linter.Config
|
|
2
|
+
export declare const recommendedReact: Linter.Config[];
|
|
3
|
+
export default recommendedReact;
|
|
4
|
+
//# sourceMappingURL=recommended-react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended-react.d.ts","sourceRoot":"","sources":["../../../src/configs/bundles/recommended-react.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,QAAQ,CAAC;AAKnC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAMvB,CAAC;AAEtB,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type Linter } from 'eslint';
|
|
2
|
-
export declare const recommendedTypescriptReact: Linter.Config
|
|
2
|
+
export declare const recommendedTypescriptReact: Linter.Config[];
|
|
3
|
+
export default recommendedTypescriptReact;
|
|
4
|
+
//# sourceMappingURL=recommended-typescript-react.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended-typescript-react.d.ts","sourceRoot":"","sources":["../../../src/configs/bundles/recommended-typescript-react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,QAAQ,CAAC;AAMnC,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,MAAM,EAIjC,CAAC;AAEtB,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type Linter } from 'eslint';
|
|
2
|
-
export declare const recommendedTypescript: Linter.Config
|
|
2
|
+
export declare const recommendedTypescript: Linter.Config[];
|
|
3
|
+
export default recommendedTypescript;
|
|
4
|
+
//# sourceMappingURL=recommended-typescript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended-typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/bundles/recommended-typescript.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,QAAQ,CAAC;AAInC,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAG5B,CAAC;AAEtB,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type Linter } from 'eslint';
|
|
2
|
-
export declare const recommended: Linter.Config
|
|
2
|
+
export declare const recommended: Linter.Config[];
|
|
3
|
+
export default recommended;
|
|
4
|
+
//# sourceMappingURL=recommended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/bundles/recommended.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,QAAQ,CAAC;AAKnC,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAIlB,CAAC;AAEtB,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs/core/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAGzD,eAAO,MAAM,QAAQ,EAAE,iBAAiB,EAwBvC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -15,9 +15,13 @@ export const coreBase = [
|
|
|
15
15
|
...globals.jest,
|
|
16
16
|
},
|
|
17
17
|
},
|
|
18
|
-
rules:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
rules: (() => {
|
|
19
|
+
const rules = {};
|
|
20
|
+
for (const ruleName of Object.keys(plugin.rules)) {
|
|
21
|
+
rules[`th-rules/${ruleName}`] = 'error';
|
|
22
|
+
}
|
|
23
|
+
return rules;
|
|
24
|
+
})(),
|
|
22
25
|
},
|
|
23
26
|
];
|
|
27
|
+
export default coreBase;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/configs/core/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,SAAS,EAAE,iBAAiB,EAOxC,CAAC;AACF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../src/configs/core/typescript.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAExE,eAAO,MAAM,cAAc,EAAE,iBAAiB,EAiB7C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/configs/externals/base.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAW5C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opinionated.d.ts","sourceRoot":"","sources":["../../../src/configs/externals/opinionated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEzD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAWnD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
+
import { type Linter, type Rule } from 'eslint';
|
|
1
2
|
export { rules } from './plugin.js';
|
|
3
|
+
export declare const configs: {
|
|
4
|
+
recommended: Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
5
|
+
recommendedReact: Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
6
|
+
recommendedTypescript: Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
7
|
+
recommendedTypescriptReact: Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
8
|
+
};
|
|
2
9
|
export { coreBase } from './configs/core/base.js';
|
|
3
10
|
export { coreTypescript } from './configs/core/typescript.js';
|
|
4
11
|
export { coreReact } from './configs/core/react.js';
|
|
5
12
|
export { externalsBase } from './configs/externals/base.js';
|
|
6
13
|
export { externalsOpinionated } from './configs/externals/opinionated.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
recommendedTypescript: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
11
|
-
recommendedTypescriptReact: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
12
|
-
};
|
|
13
|
-
declare const _default: {
|
|
14
|
-
rules: any;
|
|
15
|
-
configs: {
|
|
16
|
-
recommended: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
17
|
-
recommendedReact: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
18
|
-
recommendedTypescript: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
19
|
-
recommendedTypescriptReact: import("eslint").Linter.Config<import("@eslint/core", { with: { "resolution-mode": "require" } }).RulesConfig>[];
|
|
20
|
-
};
|
|
14
|
+
declare const index: {
|
|
15
|
+
rules: Record<string, Rule.RuleModule>;
|
|
16
|
+
configs: Record<string, Linter.Config[]>;
|
|
21
17
|
};
|
|
22
|
-
export default
|
|
18
|
+
export default index;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,IAAI,EAAC,MAAM,QAAQ,CAAC;AAQ9C,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAElC,eAAO,MAAM,OAAO;;;;;CAKnB,CAAC;AAEF,OAAO,EAAC,QAAQ,EAAC,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAC,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAC,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,oCAAoC,CAAC;AAExE,QAAA,MAAM,KAAK,EAAkC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;CAAC,CAAC;AAChI,eAAe,KAAK,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
// Public bundles
|
|
1
|
+
/* eslint-disable import-x/order */
|
|
3
2
|
import { recommended } from './configs/bundles/recommended.js';
|
|
4
3
|
import { recommendedReact } from './configs/bundles/recommended-react.js';
|
|
5
4
|
import { recommendedTypescript } from './configs/bundles/recommended-typescript.js';
|
|
6
5
|
import { recommendedTypescriptReact } from './configs/bundles/recommended-typescript-react.js';
|
|
7
|
-
|
|
6
|
+
import { rules } from './plugin.js';
|
|
8
7
|
export { rules } from './plugin.js';
|
|
9
|
-
export { coreBase } from './configs/core/base.js';
|
|
10
|
-
export { coreTypescript } from './configs/core/typescript.js';
|
|
11
|
-
export { coreReact } from './configs/core/react.js';
|
|
12
|
-
export { externalsBase } from './configs/externals/base.js';
|
|
13
|
-
export { externalsOpinionated } from './configs/externals/opinionated.js';
|
|
14
8
|
export const configs = {
|
|
15
9
|
recommended,
|
|
16
10
|
recommendedReact,
|
|
17
11
|
recommendedTypescript,
|
|
18
12
|
recommendedTypescriptReact,
|
|
19
13
|
};
|
|
20
|
-
export
|
|
14
|
+
export { coreBase } from './configs/core/base.js';
|
|
15
|
+
export { coreTypescript } from './configs/core/typescript.js';
|
|
16
|
+
export { coreReact } from './configs/core/react.js';
|
|
17
|
+
export { externalsBase } from './configs/externals/base.js';
|
|
18
|
+
export { externalsOpinionated } from './configs/externals/opinionated.js';
|
|
19
|
+
const index = { rules, configs };
|
|
20
|
+
export default index;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,5 +1,82 @@
|
|
|
1
|
-
export declare const rules:
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare const rules: {
|
|
2
|
+
noBooleanCoercion: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useIsEmpty" | "useIsNil", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
3
|
+
name: string;
|
|
4
|
+
};
|
|
5
|
+
noComments: import("@typescript-eslint/utils/ts-eslint").RuleModule<"commentNotAllowed", [({
|
|
6
|
+
allow?: string[];
|
|
7
|
+
disallow?: string[];
|
|
8
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
noDefaultExport: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnamed", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
noDestructuring: import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooDeep" | "tooMany" | "tooLong", [{
|
|
15
|
+
maximumDestructuredVariables: number;
|
|
16
|
+
maximumLineLength: number;
|
|
17
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
preferIsEmpty: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useIsEmpty", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
21
|
+
name: string;
|
|
22
|
+
};
|
|
23
|
+
schemasInSchemasFile: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moveSchema", [{
|
|
24
|
+
allowedSuffixes: string[];
|
|
25
|
+
onlyWhenAssigned: boolean;
|
|
26
|
+
allowInTests: boolean;
|
|
27
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
topLevelFunctions: import("@typescript-eslint/utils/ts-eslint").RuleModule<"arrow" | "funcExpr" | "anonDecl", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
31
|
+
name: string;
|
|
32
|
+
};
|
|
33
|
+
typesInDts: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moveToDts", [{
|
|
34
|
+
allowEnums: boolean;
|
|
35
|
+
allowDeclare: boolean;
|
|
36
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
declare const plugin: {
|
|
41
|
+
rules: {
|
|
42
|
+
noBooleanCoercion: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useIsEmpty" | "useIsNil", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
43
|
+
name: string;
|
|
44
|
+
};
|
|
45
|
+
noComments: import("@typescript-eslint/utils/ts-eslint").RuleModule<"commentNotAllowed", [({
|
|
46
|
+
allow?: string[];
|
|
47
|
+
disallow?: string[];
|
|
48
|
+
} | undefined)?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
49
|
+
name: string;
|
|
50
|
+
};
|
|
51
|
+
noDefaultExport: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnamed", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
52
|
+
name: string;
|
|
53
|
+
};
|
|
54
|
+
noDestructuring: import("@typescript-eslint/utils/ts-eslint").RuleModule<"tooDeep" | "tooMany" | "tooLong", [{
|
|
55
|
+
maximumDestructuredVariables: number;
|
|
56
|
+
maximumLineLength: number;
|
|
57
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
58
|
+
name: string;
|
|
59
|
+
};
|
|
60
|
+
preferIsEmpty: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useIsEmpty", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
61
|
+
name: string;
|
|
62
|
+
};
|
|
63
|
+
schemasInSchemasFile: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moveSchema", [{
|
|
64
|
+
allowedSuffixes: string[];
|
|
65
|
+
onlyWhenAssigned: boolean;
|
|
66
|
+
allowInTests: boolean;
|
|
67
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
68
|
+
name: string;
|
|
69
|
+
};
|
|
70
|
+
topLevelFunctions: import("@typescript-eslint/utils/ts-eslint").RuleModule<"arrow" | "funcExpr" | "anonDecl", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
typesInDts: import("@typescript-eslint/utils/ts-eslint").RuleModule<"moveToDts", [{
|
|
74
|
+
allowEnums: boolean;
|
|
75
|
+
allowDeclare: boolean;
|
|
76
|
+
}], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
4
80
|
};
|
|
5
81
|
export default plugin;
|
|
82
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CASjB,CAAC;AAEF,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAU,CAAC;AACvB,eAAe,MAAM,CAAC"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import noBooleanCoercion from './rules/no-boolean-coercion.js';
|
|
2
|
+
import noComments from './rules/no-comments.js';
|
|
3
|
+
import noDefaultExport from './rules/no-default-export.js';
|
|
4
|
+
import noDestructuring from './rules/no-destructuring.js';
|
|
5
|
+
import preferIsEmpty from './rules/prefer-is-empty.js';
|
|
6
|
+
import schemasInSchemasFile from './rules/schemas-in-schemas-file.js';
|
|
7
|
+
import topLevelFunctions from './rules/top-level-functions.js';
|
|
8
|
+
import typesInDts from './rules/types-in-dts.js';
|
|
9
|
+
export const rules = {
|
|
10
|
+
noBooleanCoercion,
|
|
11
|
+
noComments,
|
|
12
|
+
noDefaultExport,
|
|
13
|
+
noDestructuring,
|
|
14
|
+
preferIsEmpty,
|
|
15
|
+
schemasInSchemasFile,
|
|
16
|
+
topLevelFunctions,
|
|
17
|
+
typesInDts,
|
|
18
|
+
};
|
|
19
|
+
const plugin = { rules };
|
|
14
20
|
export default plugin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
|
-
declare const
|
|
2
|
+
declare const noBooleanCoercion: ESLintUtils.RuleModule<"useIsEmpty" | "useIsNil", [], unknown, ESLintUtils.RuleListener> & {
|
|
3
3
|
name: string;
|
|
4
4
|
};
|
|
5
|
-
export default
|
|
5
|
+
export default noBooleanCoercion;
|
|
6
|
+
//# sourceMappingURL=no-boolean-coercion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-boolean-coercion.d.ts","sourceRoot":"","sources":["../../src/rules/no-boolean-coercion.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EAEX,MAAM,0BAA0B,CAAC;AAIlC,QAAA,MAAM,iBAAiB;;CAiHrB,CAAC;AACH,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ESLintUtils, } from '@typescript-eslint/utils';
|
|
2
2
|
const createRule = ESLintUtils.RuleCreator(() => 'https://github.com/tomerh2001/eslint-plugin-th-rules/blob/main/docs/rules/no-boolean-coercion.md');
|
|
3
|
-
|
|
3
|
+
const noBooleanCoercion = createRule({
|
|
4
4
|
name: 'no-boolean-coercion',
|
|
5
5
|
meta: {
|
|
6
6
|
type: 'problem',
|
|
@@ -19,9 +19,6 @@ export default createRule({
|
|
|
19
19
|
const { sourceCode } = context;
|
|
20
20
|
const services = ESLintUtils.getParserServices(context);
|
|
21
21
|
const checker = services?.program?.getTypeChecker?.();
|
|
22
|
-
// --------------------------------------------------------------------
|
|
23
|
-
// Helpers
|
|
24
|
-
// --------------------------------------------------------------------
|
|
25
22
|
function isBooleanCall(node) {
|
|
26
23
|
return (node.type === 'CallExpression'
|
|
27
24
|
&& node.callee.type === 'Identifier'
|
|
@@ -73,9 +70,6 @@ export default createRule({
|
|
|
73
70
|
],
|
|
74
71
|
});
|
|
75
72
|
}
|
|
76
|
-
// --------------------------------------------------------------------
|
|
77
|
-
// Visitors
|
|
78
|
-
// --------------------------------------------------------------------
|
|
79
73
|
return {
|
|
80
74
|
CallExpression(node) {
|
|
81
75
|
if (isBooleanCall(node)) {
|
|
@@ -96,3 +90,4 @@ export default createRule({
|
|
|
96
90
|
};
|
|
97
91
|
},
|
|
98
92
|
});
|
|
93
|
+
export default noBooleanCoercion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-comments.d.ts","sourceRoot":"","sources":["../../src/rules/no-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAEpE,KAAK,OAAO,GAAG;IACb;QACC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH,CAAC;AAYF,QAAA,MAAM,UAAU;;CAoFd,CAAC;AACH,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-default-export.d.ts","sourceRoot":"","sources":["../../src/rules/no-default-export.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAEpE,QAAA,MAAM,eAAe;;CAmEnB,CAAC;AACH,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"no-destructuring.d.ts","sourceRoot":"","sources":["../../src/rules/no-destructuring.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAIpE,QAAA,MAAM,eAAe;;;;;CAwJnB,CAAC;AACH,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prefer-is-empty.d.ts","sourceRoot":"","sources":["../../src/rules/prefer-is-empty.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAEpF,QAAA,MAAM,aAAa;;CAiHjB,CAAC;AACH,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable new-cap */
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
4
|
+
import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils';
|
|
2
5
|
const preferIsEmpty = ESLintUtils.RuleCreator(() => 'https://github.com/tomerh2001/eslint-plugin-th-rules/blob/main/docs/rules/prefer-is-empty.md')({
|
|
3
6
|
name: 'prefer-is-empty',
|
|
4
7
|
meta: {
|
|
@@ -14,21 +17,18 @@ const preferIsEmpty = ESLintUtils.RuleCreator(() => 'https://github.com/tomerh20
|
|
|
14
17
|
},
|
|
15
18
|
defaultOptions: [],
|
|
16
19
|
create(context) {
|
|
17
|
-
const sourceCode = context.getSourceCode();
|
|
18
20
|
function isLengthAccess(node) {
|
|
19
|
-
return (
|
|
20
|
-
&& node.type ===
|
|
21
|
-
&& node.property.type === 'Identifier'
|
|
21
|
+
return (node?.type === AST_NODE_TYPES.MemberExpression
|
|
22
|
+
&& node.property.type === AST_NODE_TYPES.Identifier
|
|
22
23
|
&& node.property.name === 'length'
|
|
23
24
|
&& !node.computed);
|
|
24
25
|
}
|
|
25
26
|
function isNumericLiteral(node) {
|
|
26
|
-
return (
|
|
27
|
-
&& node.type === 'Literal'
|
|
27
|
+
return (node?.type === AST_NODE_TYPES.Literal
|
|
28
28
|
&& typeof node.value === 'number');
|
|
29
29
|
}
|
|
30
30
|
function report(node, collectionNode, operator, value, isEmptyCheck) {
|
|
31
|
-
const collectionText = sourceCode.getText(collectionNode.object);
|
|
31
|
+
const collectionText = context.sourceCode.getText(collectionNode.object);
|
|
32
32
|
const replacement = isEmptyCheck
|
|
33
33
|
? `_.isEmpty(${collectionText})`
|
|
34
34
|
: `!_.isEmpty(${collectionText})`;
|
|
@@ -57,32 +57,29 @@ const preferIsEmpty = ESLintUtils.RuleCreator(() => 'https://github.com/tomerh20
|
|
|
57
57
|
}
|
|
58
58
|
return {
|
|
59
59
|
BinaryExpression(node) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|| (operator === '<' && value === 1)) {
|
|
66
|
-
report(node, left, operator, value, true);
|
|
60
|
+
if (isLengthAccess(node.left) && isNumericLiteral(node.right)) {
|
|
61
|
+
if ((node.operator === '===' && node.right.value === 0)
|
|
62
|
+
|| (node.operator === '<=' && node.right.value === 0)
|
|
63
|
+
|| (node.operator === '<' && node.right.value === 1)) {
|
|
64
|
+
report(node, node.left, node.operator, node.right.value, true);
|
|
67
65
|
return;
|
|
68
66
|
}
|
|
69
|
-
if ((operator === '>' && value === 0)
|
|
70
|
-
|| (operator === '>=' && value === 1)
|
|
71
|
-
|| ((operator === '!=' || operator === '!==') && value === 0)) {
|
|
72
|
-
report(node, left, operator, value, false);
|
|
67
|
+
if ((node.operator === '>' && node.right.value === 0)
|
|
68
|
+
|| (node.operator === '>=' && node.right.value === 1)
|
|
69
|
+
|| ((node.operator === '!=' || node.operator === '!==') && node.right.value === 0)) {
|
|
70
|
+
report(node, node.left, node.operator, node.right.value, false);
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
|
-
if (isNumericLiteral(left) && isLengthAccess(right)) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|| (operator === '
|
|
79
|
-
|
|
80
|
-
report(node, right, operator, value, true);
|
|
73
|
+
if (isNumericLiteral(node.left) && isLengthAccess(node.right)) {
|
|
74
|
+
if ((node.operator === '===' && node.left.value === 0)
|
|
75
|
+
|| (node.operator === '>=' && node.left.value === 0)
|
|
76
|
+
|| (node.operator === '>' && node.left.value === 0)) {
|
|
77
|
+
report(node, node.right, node.operator, node.left.value, true);
|
|
81
78
|
return;
|
|
82
79
|
}
|
|
83
|
-
if ((operator === '<' && value === 1)
|
|
84
|
-
|| (operator === '<=' && value === 0)) {
|
|
85
|
-
report(node, right, operator, value, false);
|
|
80
|
+
if ((node.operator === '<' && node.left.value === 1)
|
|
81
|
+
|| (node.operator === '<=' && node.left.value === 0)) {
|
|
82
|
+
report(node, node.right, node.operator, node.left.value, false);
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas-in-schemas-file.d.ts","sourceRoot":"","sources":["../../src/rules/schemas-in-schemas-file.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAEpF,QAAA,MAAM,oBAAoB;;;;;;CA+LxB,CAAC;AACH,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
|
+
import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils';
|
|
2
3
|
const schemasInSchemasFile = ESLintUtils.RuleCreator(() => 'https://github.com/tomerh2001/eslint-plugin-th-rules/blob/main/docs/rules/schemas-in-schemas-file.md')({
|
|
3
4
|
name: 'schemas-in-schemas-file',
|
|
4
5
|
meta: {
|
|
@@ -33,9 +34,9 @@ const schemasInSchemasFile = ESLintUtils.RuleCreator(() => 'https://github.com/t
|
|
|
33
34
|
},
|
|
34
35
|
],
|
|
35
36
|
create(context, [options]) {
|
|
36
|
-
const allowedSuffixes = options.allowedSuffixes
|
|
37
|
-
const onlyWhenAssigned =
|
|
38
|
-
const allowInTests =
|
|
37
|
+
const allowedSuffixes = options.allowedSuffixes && options.allowedSuffixes.length > 0 ? options.allowedSuffixes : ['.schemas.ts'];
|
|
38
|
+
const onlyWhenAssigned = options.onlyWhenAssigned ?? false;
|
|
39
|
+
const allowInTests = options.allowInTests ?? false;
|
|
39
40
|
const zodIdentifiers = new Set();
|
|
40
41
|
function filenameAllowed(filename) {
|
|
41
42
|
if (!filename || filename === '<input>') {
|
|
@@ -48,67 +49,62 @@ const schemasInSchemasFile = ESLintUtils.RuleCreator(() => 'https://github.com/t
|
|
|
48
49
|
return allowedSuffixes.some(suffix => filename.endsWith(suffix));
|
|
49
50
|
}
|
|
50
51
|
function isZodModuleImport(node) {
|
|
51
|
-
return (node.source.
|
|
52
|
-
&& node.source.value === 'zod');
|
|
52
|
+
return (node.source.value === 'zod');
|
|
53
53
|
}
|
|
54
54
|
function collectZodIdentifiersFromImport(node) {
|
|
55
55
|
if (!isZodModuleImport(node)) {
|
|
56
56
|
return;
|
|
57
57
|
}
|
|
58
58
|
for (const spec of node.specifiers) {
|
|
59
|
-
if (spec.type ===
|
|
60
|
-
&& spec.imported.type ===
|
|
61
|
-
&& spec.imported.name === 'z'
|
|
62
|
-
&& spec.local.type === 'Identifier') {
|
|
59
|
+
if (spec.type === AST_NODE_TYPES.ImportSpecifier
|
|
60
|
+
&& spec.imported.type === AST_NODE_TYPES.Identifier
|
|
61
|
+
&& spec.imported.name === 'z') {
|
|
63
62
|
zodIdentifiers.add(spec.local.name);
|
|
64
63
|
}
|
|
65
|
-
if (spec.type ===
|
|
66
|
-
&& spec.local.type === 'Identifier') {
|
|
64
|
+
if (spec.type === AST_NODE_TYPES.ImportNamespaceSpecifier) {
|
|
67
65
|
zodIdentifiers.add(spec.local.name);
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
}
|
|
71
69
|
function isZodBuilderCall(node) {
|
|
72
70
|
const { callee } = node;
|
|
73
|
-
if (callee.type !==
|
|
71
|
+
if (callee.type !== AST_NODE_TYPES.MemberExpression
|
|
74
72
|
|| callee.computed) {
|
|
75
73
|
return false;
|
|
76
74
|
}
|
|
77
75
|
const { object } = callee;
|
|
78
76
|
const { property } = callee;
|
|
79
|
-
return (object.type ===
|
|
77
|
+
return (object.type === AST_NODE_TYPES.Identifier
|
|
80
78
|
&& zodIdentifiers.has(object.name)
|
|
81
|
-
&& property.type ===
|
|
79
|
+
&& property.type === AST_NODE_TYPES.Identifier);
|
|
82
80
|
}
|
|
83
81
|
function isZodChainedBuilderCall(node) {
|
|
84
82
|
const { callee } = node;
|
|
85
|
-
if (callee.type !==
|
|
83
|
+
if (callee.type !== AST_NODE_TYPES.MemberExpression
|
|
86
84
|
|| callee.computed) {
|
|
87
85
|
return false;
|
|
88
86
|
}
|
|
89
87
|
let current = callee.object;
|
|
90
|
-
while (current.type ===
|
|
88
|
+
while (current.type === AST_NODE_TYPES.MemberExpression
|
|
91
89
|
&& !current.computed) {
|
|
92
90
|
current = current.object;
|
|
93
91
|
}
|
|
94
|
-
return (current.type ===
|
|
92
|
+
return (current.type === AST_NODE_TYPES.Identifier
|
|
95
93
|
&& zodIdentifiers.has(current.name));
|
|
96
94
|
}
|
|
97
95
|
function getAssignmentTargetName(callNode) {
|
|
98
96
|
const { parent } = callNode;
|
|
99
|
-
if (parent
|
|
100
|
-
&& parent.id.type ===
|
|
97
|
+
if (parent.type === AST_NODE_TYPES.VariableDeclarator
|
|
98
|
+
&& parent.id.type === AST_NODE_TYPES.Identifier) {
|
|
101
99
|
return parent.id.name;
|
|
102
100
|
}
|
|
103
|
-
if (parent
|
|
104
|
-
&& parent.left.type ===
|
|
101
|
+
if (parent.type === AST_NODE_TYPES.AssignmentExpression
|
|
102
|
+
&& parent.left.type === AST_NODE_TYPES.Identifier) {
|
|
105
103
|
return parent.left.name;
|
|
106
104
|
}
|
|
107
|
-
return null;
|
|
108
105
|
}
|
|
109
106
|
function report(node) {
|
|
110
|
-
|
|
111
|
-
if (filenameAllowed(filename)) {
|
|
107
|
+
if (filenameAllowed(context.filename)) {
|
|
112
108
|
return;
|
|
113
109
|
}
|
|
114
110
|
const targetName = getAssignmentTargetName(node);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-level-functions.d.ts","sourceRoot":"","sources":["../../src/rules/top-level-functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AAEpE,QAAA,MAAM,iBAAiB;;CA8NrB,CAAC;AACH,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-in-dts.d.ts","sourceRoot":"","sources":["../../src/rules/types-in-dts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAgB,MAAM,0BAA0B,CAAC;AASpE,QAAA,MAAM,UAAU;;;;;CAmGd,CAAC;AACH,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-th-rules",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.3",
|
|
4
4
|
"description": "A List of custom ESLint rules created by Tomer Horowitz",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc",
|
|
22
|
-
"update:eslint-docs": "eslint-doc-generator --config-emoji \"recommended,✅\" --config-emoji \"
|
|
22
|
+
"update:eslint-docs": "eslint-doc-generator --config-emoji \"recommended,✅\" --config-emoji \"recommendedReact,⚛️\" --config-emoji \"recommendedTypescript,🟦\" --config-emoji \"recommendedTypescriptReact,🎲\""
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/eslint-parser": "^7.28.6",
|
|
26
26
|
"@eslint/eslintrc": "^3.3.3",
|
|
27
|
+
"@leancodepl/resolve-eslint-flat-config": "^9.7.0",
|
|
27
28
|
"eslint-config-jsdoc": "^15.4.0",
|
|
28
29
|
"eslint-config-xo": "^0.49.0",
|
|
29
30
|
"eslint-config-xo-react": "^0.29.0",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@codedependant/semantic-release-docker": "^5.1.1",
|
|
46
47
|
"@eslint/js": "^9.39.2",
|
|
47
|
-
"@leancodepl/resolve-eslint-flat-config": "^9.7.0",
|
|
48
48
|
"@semantic-release/changelog": "^6.0.3",
|
|
49
49
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
50
50
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
62
62
|
"@typescript-eslint/parser": "^8.53.0",
|
|
63
63
|
"@typescript-eslint/rule-tester": "^8.53.0",
|
|
64
|
+
"@typescript-eslint/utils": "^8.53.0",
|
|
64
65
|
"bun-types": "latest",
|
|
65
66
|
"eslint": "^9.39.2",
|
|
66
67
|
"eslint-doc-generator": "^3.0.2",
|