@o3r/eslint-plugin 10.2.0-prerelease.27 → 10.2.0-prerelease.29

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 (25) hide show
  1. package/package.json +25 -25
  2. package/src/rules/json/json-dependency-versions-harmonize/json-dependency-versions-harmonize.d.ts +6 -6
  3. package/src/rules/json/json-dependency-versions-harmonize/json-dependency-versions-harmonize.js +2 -1
  4. package/src/rules/json/utils.d.ts +3 -3
  5. package/src/rules/template/no-inner-html/no-inner-html.d.ts +1 -1
  6. package/src/rules/template/no-inner-html/no-inner-html.js +1 -1
  7. package/src/rules/template/template-async-number-limitation/template-async-number-limitation.d.ts +1 -1
  8. package/src/rules/template/template-async-number-limitation/template-async-number-limitation.js +1 -1
  9. package/src/rules/template/utils.d.ts +3 -3
  10. package/src/rules/typescript/matching-configuration-name/matching-configuration-name.d.ts +1 -4
  11. package/src/rules/typescript/matching-configuration-name/matching-configuration-name.js +9 -9
  12. package/src/rules/typescript/no-folder-import-for-module/no-folder-import-for-module.d.ts +1 -3
  13. package/src/rules/typescript/no-folder-import-for-module/no-folder-import-for-module.js +1 -1
  14. package/src/rules/typescript/no-multiple-type-configuration-property/no-multiple-type-configuration-property.d.ts +1 -1
  15. package/src/rules/typescript/no-multiple-type-configuration-property/no-multiple-type-configuration-property.js +8 -8
  16. package/src/rules/typescript/o3r-categories-tags/o3r-categories-tags.d.ts +1 -1
  17. package/src/rules/typescript/o3r-categories-tags/o3r-categories-tags.js +1 -1
  18. package/src/rules/typescript/o3r-widget-tags/o3r-widget-tags.d.ts +3 -3
  19. package/src/rules/typescript/o3r-widget-tags/o3r-widget-tags.js +2 -1
  20. package/src/rules/utils.d.ts +2 -2
  21. package/src/rules/utils.js +6 -6
  22. package/src/rules/yaml/utils.d.ts +3 -3
  23. package/src/rules/yaml/yarnrc-package-extensions-harmonize/yarnrc-package-extensions-harmonize.d.ts +1 -1
  24. package/src/rules/yaml/yarnrc-package-extensions-harmonize/yarnrc-package-extensions-harmonize.js +2 -1
  25. package/tsconfig.tsbuildinfo +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/eslint-plugin",
3
- "version": "10.2.0-prerelease.27",
3
+ "version": "10.2.0-prerelease.29",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,10 +24,10 @@
24
24
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
25
25
  },
26
26
  "dependencies": {
27
- "@typescript-eslint/experimental-utils": "^5.3.0",
27
+ "@typescript-eslint/utils": "~7.2.0",
28
28
  "globby": "^11.1.0",
29
29
  "semver": "^7.5.2",
30
- "tslib": "^2.5.3",
30
+ "tslib": "^2.6.2",
31
31
  "type-fest": "^4.10.2"
32
32
  },
33
33
  "peerDependenciesMeta": {
@@ -42,9 +42,9 @@
42
42
  }
43
43
  },
44
44
  "peerDependencies": {
45
- "@angular-eslint/template-parser": "~17.2.0",
46
- "@angular-eslint/utils": "~17.2.0",
47
- "@angular/compiler": "~17.2.0",
45
+ "@angular-eslint/template-parser": "~17.3.0",
46
+ "@angular-eslint/utils": "~17.3.0",
47
+ "@angular/compiler": "~17.3.0",
48
48
  "@stylistic/eslint-plugin-ts": "^1.5.4",
49
49
  "@typescript-eslint/eslint-plugin": "^7.0.1",
50
50
  "@typescript-eslint/parser": "^7.0.1",
@@ -53,39 +53,39 @@
53
53
  "yaml-eslint-parser": "^1.2.2"
54
54
  },
55
55
  "devDependencies": {
56
- "@angular-devkit/core": "~17.2.0",
57
- "@angular-devkit/schematics": "~17.2.0",
58
- "@angular-eslint/eslint-plugin": "~17.2.0",
59
- "@angular-eslint/template-parser": "~17.2.0",
60
- "@angular-eslint/utils": "~17.2.0",
61
- "@angular/compiler": "~17.2.0",
56
+ "@angular-devkit/core": "~17.3.0",
57
+ "@angular-devkit/schematics": "~17.3.0",
58
+ "@angular-eslint/eslint-plugin": "~17.3.0",
59
+ "@angular-eslint/template-parser": "~17.3.0",
60
+ "@angular-eslint/utils": "~17.3.0",
61
+ "@angular/compiler": "~17.3.0",
62
62
  "@babel/core": "~7.24.0",
63
- "@babel/preset-typescript": "~7.23.0",
63
+ "@babel/preset-typescript": "~7.23.3",
64
64
  "@compodoc/compodoc": "^1.1.19",
65
- "@nx/eslint-plugin": "~18.0.2",
66
- "@nx/jest": "~18.0.2",
67
- "@o3r/build-helpers": "^10.2.0-prerelease.27",
68
- "@o3r/test-helpers": "^10.2.0-prerelease.27",
65
+ "@nx/eslint-plugin": "~18.1.0",
66
+ "@nx/jest": "~18.1.0",
67
+ "@o3r/build-helpers": "^10.2.0-prerelease.29",
68
+ "@o3r/test-helpers": "^10.2.0-prerelease.29",
69
69
  "@stylistic/eslint-plugin-ts": "^1.5.4",
70
70
  "@types/jest": "~29.5.2",
71
71
  "@types/node": "^20.0.0",
72
72
  "@types/semver": "^7.3.13",
73
- "@typescript-eslint/eslint-plugin": "^7.0.1",
74
- "@typescript-eslint/parser": "^7.0.1",
73
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
74
+ "@typescript-eslint/parser": "^7.2.0",
75
75
  "cpy-cli": "^5.0.0",
76
- "eslint": "^8.42.0",
76
+ "eslint": "^8.57.0",
77
77
  "eslint-plugin-jest": "~27.9.0",
78
- "eslint-plugin-jsdoc": "~48.2.0",
78
+ "eslint-plugin-jsdoc": "~48.2.1",
79
79
  "eslint-plugin-prefer-arrow": "~1.2.3",
80
- "eslint-plugin-unicorn": "^51.0.0",
80
+ "eslint-plugin-unicorn": "^51.0.1",
81
81
  "jest": "~29.7.0",
82
82
  "jest-junit": "~16.0.0",
83
83
  "jsonc-eslint-parser": "~2.4.0",
84
- "nx": "~18.0.2",
84
+ "nx": "~18.1.0",
85
85
  "rimraf": "^5.0.1",
86
- "ts-jest": "~29.1.1",
86
+ "ts-jest": "~29.1.2",
87
87
  "type-fest": "^4.10.2",
88
- "typescript": "~5.3.3",
88
+ "typescript": "~5.4.2",
89
89
  "yaml-eslint-parser": "^1.2.2"
90
90
  },
91
91
  "schematics": "./collection.json",
@@ -1,17 +1,17 @@
1
1
  interface Options {
2
2
  /** List of package name to ignore when determining the dependencies versions */
3
- ignoredPackages: string[];
3
+ ignoredPackages?: string[];
4
4
  /** List of dependencies to ignore */
5
- ignoredDependencies: string[];
5
+ ignoredDependencies?: string[];
6
6
  /** List of dependency types to update */
7
- dependencyTypes: string[];
7
+ dependencyTypes?: string[];
8
8
  /**
9
9
  * Enforce to align the version of the dependencies with the latest range.
10
10
  * If not set, the version will be aligned with the latest range if the latest range is not intersected with the current range.
11
11
  */
12
- alignPeerDependencies: boolean;
12
+ alignPeerDependencies?: boolean;
13
13
  /** Align the resolutions/overrides dependency rules with the latest determined range */
14
- alignResolutions: boolean;
14
+ alignResolutions?: boolean;
15
15
  }
16
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"error" | "versionUpdate", [Options, ...any[]], any>;
16
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"error" | "versionUpdate", [Options, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
17
17
  export default _default;
@@ -19,7 +19,7 @@ exports.default = (0, utils_1.createRule)({
19
19
  type: 'problem',
20
20
  docs: {
21
21
  description: 'Ensure that the package dependency versions are aligned with the other package of the workspace.',
22
- recommended: 'error'
22
+ recommended: 'strict'
23
23
  },
24
24
  schema: [
25
25
  {
@@ -141,5 +141,6 @@ exports.default = (0, utils_1.createRule)({
141
141
  }
142
142
  };
143
143
  }
144
+ return {};
144
145
  }
145
146
  });
@@ -1,9 +1,9 @@
1
- import { ParserServices, TSESLint } from '@typescript-eslint/experimental-utils';
1
+ import { type ParserServices, TSESLint } from '@typescript-eslint/utils';
2
2
  import type { AST } from 'jsonc-eslint-parser';
3
3
  /** Basic interface for the Parser Services object provided by jsonc-eslint-parser */
4
- interface JsoncParserServices extends ParserServices {
4
+ type JsoncParserServices = ParserServices & {
5
5
  isJSON: boolean;
6
- }
6
+ };
7
7
  /**
8
8
  * Determine if jsonc-eslint-parser is used
9
9
  * @param parserServices Parser services object
@@ -1,5 +1,5 @@
1
1
  /** Rule Name */
2
2
  export declare const name = "no-inner-html";
3
3
  type Messages = 'error' | 'fix';
4
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<Messages, [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
4
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<Messages, [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
5
5
  export default _default;
@@ -13,7 +13,7 @@ exports.default = (0, utils_2.createRule)({
13
13
  hasSuggestions: true,
14
14
  docs: {
15
15
  description: 'Ensures that your template does not use innerHTML',
16
- recommended: 'warn'
16
+ recommended: 'recommended'
17
17
  },
18
18
  schema: [],
19
19
  messages: {
@@ -3,5 +3,5 @@ interface Options {
3
3
  }
4
4
  /** Rule Name */
5
5
  export declare const name = "template-async-number-limitation";
6
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"tooManyAsyncOnTag", [Options, ...any[]], any>;
6
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"tooManyAsyncOnTag", [Options, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
7
7
  export default _default;
@@ -15,7 +15,7 @@ exports.default = (0, utils_2.createRule)({
15
15
  hasSuggestions: true,
16
16
  docs: {
17
17
  description: 'Ensures that your template does not use too many Async pipes that can slow down your application.',
18
- recommended: 'error'
18
+ recommended: 'strict'
19
19
  },
20
20
  schema: [
21
21
  {
@@ -1,4 +1,4 @@
1
- import { ParserServices, TSESLint } from '@typescript-eslint/experimental-utils';
1
+ import { type ParserServices, TSESLint } from '@typescript-eslint/utils';
2
2
  /** Position in source code */
3
3
  interface SourceSpan {
4
4
  /** starting position */
@@ -13,12 +13,12 @@ interface SourceSpan {
13
13
  };
14
14
  }
15
15
  /** Basic interface for the Parser Services object provided by @angular-eslint/template-parser */
16
- interface TemplateParserServices extends ParserServices {
16
+ type TemplateParserServices = ParserServices & {
17
17
  /** Set body visitor rule runner */
18
18
  convertElementSourceSpanToLoc: (listenerObj: any) => any;
19
19
  /** Determine the linter notification position based on the node */
20
20
  convertNodeSourceSpanToLoc: (sourceSpan: SourceSpan) => any;
21
- }
21
+ };
22
22
  /**
23
23
  * Determine if @angular-eslint/template-parser is used
24
24
  * @param parserServices Parser services object
@@ -1,5 +1,2 @@
1
- import { TSESTree } from '@typescript-eslint/experimental-utils';
2
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"suggestion" | "error", never[], {
3
- CallExpression: (node: TSESTree.CallExpression) => void;
4
- }>;
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"suggestion" | "error", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
5
2
  export default _default;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
4
- const utils_1 = require("../../utils");
3
+ const utils_1 = require("@typescript-eslint/utils");
4
+ const utils_2 = require("../../utils");
5
5
  const nameDeterminingFunctionNames = ['computeItemIdentifier', 'computeConfigurationName'];
6
- exports.default = (0, utils_1.createRule)({
6
+ exports.default = (0, utils_2.createRule)({
7
7
  name: 'matching-configuration-name',
8
8
  meta: {
9
9
  hasSuggestions: true,
@@ -12,7 +12,7 @@ exports.default = (0, utils_1.createRule)({
12
12
  docs: {
13
13
  // eslint-disable-next-line max-len
14
14
  description: 'Ensures that the configuration interface name matches the first parameter of `computeItemIdentifier` (or `computeConfigurationName`) used beside the configuration interface to expose its ID (as generated by the configuration module).',
15
- recommended: 'error'
15
+ recommended: 'strict'
16
16
  },
17
17
  schema: [],
18
18
  messages: {
@@ -25,18 +25,18 @@ exports.default = (0, utils_1.createRule)({
25
25
  return {
26
26
  // eslint-disable-next-line @typescript-eslint/naming-convention
27
27
  CallExpression: (node) => {
28
- if (node.callee.type !== experimental_utils_1.TSESTree.AST_NODE_TYPES.Identifier
28
+ if (node.callee.type !== utils_1.TSESTree.AST_NODE_TYPES.Identifier
29
29
  || !nameDeterminingFunctionNames.includes(node.callee.name)
30
30
  || !node.arguments.length
31
- || node.arguments[0].type !== experimental_utils_1.TSESTree.AST_NODE_TYPES.Literal
31
+ || node.arguments[0].type !== utils_1.TSESTree.AST_NODE_TYPES.Literal
32
32
  || typeof node.arguments[0].value !== 'string') {
33
33
  return;
34
34
  }
35
35
  const sourceCode = context.getSourceCode();
36
36
  const interfaceNames = sourceCode.ast.body
37
- .filter((statement) => statement.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.ExportNamedDeclaration
38
- && statement.declaration?.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceDeclaration
39
- && (statement.declaration.extends || []).some((heritageClause) => heritageClause.expression.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.Identifier
37
+ .filter((statement) => statement.type === utils_1.TSESTree.AST_NODE_TYPES.ExportNamedDeclaration
38
+ && statement.declaration?.type === utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceDeclaration
39
+ && (statement.declaration.extends || []).some((heritageClause) => heritageClause.expression.type === utils_1.TSESTree.AST_NODE_TYPES.Identifier
40
40
  && heritageClause.expression.name === 'Configuration'))
41
41
  .map((statement) => statement.declaration.id.name);
42
42
  const fnArgInterfaceName = node.arguments[0].value;
@@ -1,4 +1,2 @@
1
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"error" | "indexFile", never[], {
2
- ImportDeclaration: (node: import("@typescript-eslint/types/dist/generated/ast-spec").ImportDeclaration) => void;
3
- }>;
1
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"error" | "indexFile", [], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
4
2
  export default _default;
@@ -10,7 +10,7 @@ exports.default = (0, utils_1.createRule)({
10
10
  type: 'problem',
11
11
  docs: {
12
12
  description: 'Ensures that imports of modules are pointing to the module file or an index.',
13
- recommended: 'error'
13
+ recommended: 'strict'
14
14
  },
15
15
  schema: [],
16
16
  messages: {
@@ -1,5 +1,5 @@
1
1
  export interface NoMultipleTypeConfigurationPropertyOption {
2
2
  supportedInterfaceNames?: string[];
3
3
  }
4
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"suggestion" | "error", [Required<NoMultipleTypeConfigurationPropertyOption>, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
4
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"suggestion" | "error", [Required<NoMultipleTypeConfigurationPropertyOption>, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
5
5
  export default _default;
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
4
- const utils_1 = require("../../utils");
3
+ const utils_1 = require("@typescript-eslint/utils");
4
+ const utils_2 = require("../../utils");
5
5
  const separatorRegExp = /\s*[|&]\s*/;
6
- exports.default = (0, utils_1.createRule)({
6
+ exports.default = (0, utils_2.createRule)({
7
7
  name: 'no-multiple-type-configuration-property',
8
8
  meta: {
9
9
  hasSuggestions: true,
10
10
  type: 'problem',
11
11
  docs: {
12
12
  description: 'Ensures that the configuration property does not accept multiple types.',
13
- recommended: 'error'
13
+ recommended: 'strict'
14
14
  },
15
15
  schema: [
16
16
  {
@@ -21,7 +21,7 @@ exports.default = (0, utils_1.createRule)({
21
21
  items: {
22
22
  type: 'string'
23
23
  },
24
- default: utils_1.defaultSupportedInterfaceNames
24
+ default: utils_2.defaultSupportedInterfaceNames
25
25
  }
26
26
  }
27
27
  }
@@ -32,17 +32,17 @@ exports.default = (0, utils_1.createRule)({
32
32
  }
33
33
  },
34
34
  defaultOptions: [{
35
- supportedInterfaceNames: utils_1.defaultSupportedInterfaceNames
35
+ supportedInterfaceNames: utils_2.defaultSupportedInterfaceNames
36
36
  }],
37
37
  create: (context, [options]) => {
38
38
  const supportedInterfaceNames = options.supportedInterfaceNames;
39
39
  const sourceCode = context.getSourceCode();
40
40
  const rule = (node) => {
41
41
  const interfaceDeclNode = node.parent?.parent?.parent?.parent;
42
- if (!(0, utils_1.isExtendingConfiguration)(interfaceDeclNode, supportedInterfaceNames)) {
42
+ if (!(0, utils_2.isExtendingConfiguration)(interfaceDeclNode, supportedInterfaceNames)) {
43
43
  return; // Not in a configuration interface
44
44
  }
45
- if (node.types.every((type) => type.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.TSLiteralType && type.literal.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.Literal)
45
+ if (node.types.every((type) => type.type === utils_1.TSESTree.AST_NODE_TYPES.TSLiteralType && type.literal.type === utils_1.TSESTree.AST_NODE_TYPES.Literal)
46
46
  && [...(new Set(node.types.map((literalType) => typeof literalType.literal.value)))].length === 1) {
47
47
  return; // Only the same literal type
48
48
  }
@@ -3,5 +3,5 @@ export interface O3rCategoriesTagsRuleOption {
3
3
  globalConfigCategories?: string[];
4
4
  }
5
5
  type Messages = 'alreadyDefined' | 'undefinedCategory' | 'onlyOneCategoryAllowed' | 'notInConfigurationInterface' | 'suggestReplaceO3rCategory';
6
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<Messages, [O3rCategoriesTagsRuleOption, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
6
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<Messages, readonly [O3rCategoriesTagsRuleOption, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
7
7
  export default _default;
@@ -9,7 +9,7 @@ exports.default = (0, utils_1.createRule)({
9
9
  type: 'problem',
10
10
  docs: {
11
11
  description: 'Ensures that @o3rCategories and @o3rCategory are used with correct value',
12
- recommended: 'error'
12
+ recommended: 'strict'
13
13
  },
14
14
  schema: [
15
15
  {
@@ -1,8 +1,8 @@
1
- import { TSESLint } from '@typescript-eslint/experimental-utils';
1
+ import { TSESLint } from '@typescript-eslint/utils';
2
2
  type O3rWidgetParamType = 'string' | 'number' | 'boolean' | 'string[]' | 'number[]' | 'boolean[]';
3
3
  export interface O3rWidgetTagsRuleOption {
4
4
  supportedInterfaceNames?: string[];
5
- widgets: {
5
+ widgets?: {
6
6
  [widgetName: string]: {
7
7
  [paramName: string]: {
8
8
  type: O3rWidgetParamType;
@@ -12,5 +12,5 @@ export interface O3rWidgetTagsRuleOption {
12
12
  };
13
13
  }
14
14
  type O3rWidgetRuleErrorId = 'notInConfigurationInterface' | 'notSupportedType' | 'notSupportedParamForType' | 'invalidParamValueType' | 'noParamWithoutWidget' | 'onlyOneWidgetAllowed' | 'duplicatedParam' | 'requiredParamMissing' | 'suggestParamMissing' | 'suggestRemoveDuplicatedO3rWidget' | 'suggestRemoveDuplicatedO3rWidgetParam' | 'suggestAddO3rWidgetTag' | 'suggestReplaceO3rWidgetType';
15
- declare const _default: TSESLint.RuleModule<O3rWidgetRuleErrorId, [Required<O3rWidgetTagsRuleOption>, ...any[]], TSESLint.RuleListener>;
15
+ declare const _default: TSESLint.RuleModule<O3rWidgetRuleErrorId, [Readonly<O3rWidgetTagsRuleOption>, ...any[]], TSESLint.RuleListener>;
16
16
  export default _default;
@@ -15,7 +15,7 @@ exports.default = (0, utils_1.createRule)({
15
15
  type: 'problem',
16
16
  docs: {
17
17
  description: 'Ensures that @o3rWidget and @o3rWidgetParam are used with correct value',
18
- recommended: 'error'
18
+ recommended: 'strict'
19
19
  },
20
20
  schema: [
21
21
  {
@@ -30,6 +30,7 @@ exports.default = (0, utils_1.createRule)({
30
30
  default: utils_1.defaultSupportedInterfaceNames
31
31
  },
32
32
  widgets: {
33
+ type: 'object',
33
34
  additionalProperties: {
34
35
  type: 'object',
35
36
  additionalProperties: false,
@@ -1,6 +1,6 @@
1
- import { ESLintUtils, TSESLint, TSESTree } from '@typescript-eslint/experimental-utils';
1
+ import { ESLintUtils, TSESLint, TSESTree } from '@typescript-eslint/utils';
2
2
  /** ESLint rule generator */
3
- export declare const createRule: <TOptions extends readonly unknown[], TMessageIds extends string, TRuleListener extends TSESLint.RuleListener = TSESLint.RuleListener>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<TOptions, TMessageIds, TRuleListener>>) => TSESLint.RuleModule<TMessageIds, TOptions, TRuleListener>;
3
+ export declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ name, meta, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds>>) => ESLintUtils.RuleModule<MessageIds, Options, ESLintUtils.RuleListener>;
4
4
  /** Default supported interface names */
5
5
  export declare const defaultSupportedInterfaceNames: string[];
6
6
  /**
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCommentString = exports.getNodeComment = exports.isExtendingConfiguration = exports.defaultSupportedInterfaceNames = exports.createRule = void 0;
4
- const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
4
+ const utils_1 = require("@typescript-eslint/utils");
5
5
  const path = require("node:path");
6
6
  /** Current package version (format: <major>.<minor>)*/
7
7
  const version = require(path.resolve(__dirname, '..', '..', 'package.json')).version.split('.').slice(0, 2).join('.');
8
8
  /** ESLint rule generator */
9
9
  // eslint-disable-next-line new-cap
10
- exports.createRule = experimental_utils_1.ESLintUtils.RuleCreator((name) => {
10
+ exports.createRule = utils_1.ESLintUtils.RuleCreator((name) => {
11
11
  if (version === '0.0') {
12
12
  return 'file:' + path.resolve(__dirname, '..', '..', '..', '..', '..', 'docs', 'linter', 'eslint-plugin', 'rules', `${name}.md`);
13
13
  }
@@ -22,9 +22,9 @@ exports.defaultSupportedInterfaceNames = ['Configuration', 'NestedConfiguration'
22
22
  */
23
23
  const isExtendingConfiguration = (interfaceDeclNode, supportedInterfaceNames = []) => {
24
24
  const supportedInterfaceNamesSet = new Set(supportedInterfaceNames.length > 0 ? supportedInterfaceNames : exports.defaultSupportedInterfaceNames);
25
- return interfaceDeclNode?.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceDeclaration
26
- && !!interfaceDeclNode.extends?.some((ext) => ext.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceHeritage
27
- && ext.expression.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.Identifier
25
+ return interfaceDeclNode?.type === utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceDeclaration
26
+ && !!interfaceDeclNode.extends?.some((ext) => ext.type === utils_1.TSESTree.AST_NODE_TYPES.TSInterfaceHeritage
27
+ && ext.expression.type === utils_1.TSESTree.AST_NODE_TYPES.Identifier
28
28
  && supportedInterfaceNamesSet.has(ext.expression.name));
29
29
  };
30
30
  exports.isExtendingConfiguration = isExtendingConfiguration;
@@ -34,7 +34,7 @@ exports.isExtendingConfiguration = isExtendingConfiguration;
34
34
  * @param sourceCode
35
35
  */
36
36
  const getNodeComment = (node, sourceCode) => {
37
- const [comment] = node.parent?.type === experimental_utils_1.TSESTree.AST_NODE_TYPES.ExportNamedDeclaration
37
+ const [comment] = node.parent?.type === utils_1.TSESTree.AST_NODE_TYPES.ExportNamedDeclaration
38
38
  ? sourceCode.getCommentsBefore(node.parent)
39
39
  : sourceCode.getCommentsBefore(node);
40
40
  return comment;
@@ -1,8 +1,8 @@
1
- import { ParserServices, TSESLint } from '@typescript-eslint/experimental-utils';
1
+ import { type ParserServices, TSESLint } from '@typescript-eslint/utils';
2
2
  /** Basic interface for the Parser Services object provided by yaml-eslint-parser */
3
- interface YamlParserServices extends ParserServices {
3
+ type YamlParserServices = ParserServices & {
4
4
  isYAML: boolean;
5
- }
5
+ };
6
6
  /**
7
7
  * Determine if yaml-eslint-parser is used
8
8
  * @param parserServices Parser services object
@@ -8,5 +8,5 @@ interface Options {
8
8
  /** List of dependency types to validate in .yarnrc.yml */
9
9
  yarnrcDependencyTypes: string[];
10
10
  }
11
- declare const _default: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"error" | "versionUpdate", [Options, ...any[]], any>;
11
+ declare const _default: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"error" | "versionUpdate", [Options, ...any[]], import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
12
12
  export default _default;
@@ -19,7 +19,7 @@ exports.default = (0, utils_1.createRule)({
19
19
  type: 'problem',
20
20
  docs: {
21
21
  description: 'Ensure that the package extension versions are aligned with range defined in packages.',
22
- recommended: 'error'
22
+ recommended: 'strict'
23
23
  },
24
24
  schema: [
25
25
  {
@@ -118,5 +118,6 @@ exports.default = (0, utils_1.createRule)({
118
118
  }
119
119
  };
120
120
  }
121
+ return {};
121
122
  }
122
123
  });
@@ -1 +1 @@
1
- {"version":"5.3.3"}
1
+ {"version":"5.4.2"}