@o3r/eslint-plugin 11.2.0-prerelease.9 → 11.3.0-prerelease.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/eslint-plugin",
3
- "version": "11.2.0-prerelease.9",
3
+ "version": "11.3.0-prerelease.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,9 +42,9 @@
42
42
  }
43
43
  },
44
44
  "peerDependencies": {
45
- "@angular-eslint/template-parser": "~18.1.0",
46
- "@angular-eslint/test-utils": "~18.1.0",
47
- "@angular/compiler": "~18.1.0",
45
+ "@angular-eslint/template-parser": "~18.3.0",
46
+ "@angular-eslint/test-utils": "~18.3.0",
47
+ "@angular/compiler": "~18.2.0",
48
48
  "@stylistic/eslint-plugin-ts": "~2.4.0",
49
49
  "@typescript-eslint/eslint-plugin": "^7.0.1",
50
50
  "@typescript-eslint/parser": "^7.14.1",
@@ -54,21 +54,22 @@
54
54
  "yaml-eslint-parser": "^1.2.2"
55
55
  },
56
56
  "devDependencies": {
57
- "@angular-devkit/core": "~18.1.0",
58
- "@angular-devkit/schematics": "~18.1.0",
59
- "@angular-eslint/eslint-plugin": "~18.1.0",
60
- "@angular-eslint/template-parser": "~18.1.0",
61
- "@angular-eslint/test-utils": "~18.1.0",
62
- "@angular/compiler": "~18.1.0",
57
+ "@angular-devkit/core": "~18.2.0",
58
+ "@angular-devkit/schematics": "~18.2.0",
59
+ "@angular-eslint/eslint-plugin": "~18.3.0",
60
+ "@angular-eslint/template-parser": "~18.3.0",
61
+ "@angular-eslint/test-utils": "~18.3.0",
62
+ "@angular/compiler": "~18.2.0",
63
63
  "@babel/core": "~7.25.0",
64
64
  "@babel/preset-typescript": "~7.24.0",
65
65
  "@compodoc/compodoc": "^1.1.19",
66
66
  "@eslint/eslintrc": "^3.0.0",
67
67
  "@nx/eslint-plugin": "~19.5.0",
68
68
  "@nx/jest": "~19.5.0",
69
- "@o3r/build-helpers": "^11.2.0-prerelease.9",
70
- "@o3r/test-helpers": "^11.2.0-prerelease.9",
69
+ "@o3r/build-helpers": "^11.3.0-prerelease.0",
70
+ "@o3r/test-helpers": "^11.3.0-prerelease.0",
71
71
  "@stylistic/eslint-plugin-ts": "~2.4.0",
72
+ "@types/eslint": "~9.6.0",
72
73
  "@types/jest": "~29.5.2",
73
74
  "@types/node": "^20.0.0",
74
75
  "@types/semver": "^7.3.13",
@@ -77,7 +78,7 @@
77
78
  "@typescript-eslint/rule-tester": "^7.14.1",
78
79
  "cpy-cli": "^5.0.0",
79
80
  "eslint": "^8.57.0",
80
- "eslint-plugin-jest": "~28.7.0",
81
+ "eslint-plugin-jest": "~28.8.0",
81
82
  "eslint-plugin-jsdoc": "~48.11.0",
82
83
  "eslint-plugin-prefer-arrow": "~1.2.3",
83
84
  "eslint-plugin-unicorn": "^54.0.0",
@@ -21,8 +21,7 @@ exports.default = (0, utils_1.createRule)({
21
21
  hasSuggestions: true,
22
22
  type: 'problem',
23
23
  docs: {
24
- description: 'Ensure that the package dependency versions are aligned with the other package of the workspace.',
25
- recommended: 'strict'
24
+ description: 'Ensure that the package dependency versions are aligned with the other packages of the workspace.'
26
25
  },
27
26
  schema: [
28
27
  {
@@ -18,7 +18,7 @@ const findWorkspacePackageJsons = (directory, rootDir) => {
18
18
  return undefined;
19
19
  }
20
20
  const packageJsonPath = (0, node_path_1.resolve)(directory, 'package.json');
21
- const content = (0, node_fs_1.existsSync)(packageJsonPath) && JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, { encoding: 'utf-8' }));
21
+ const content = (0, node_fs_1.existsSync)(packageJsonPath) && JSON.parse((0, node_fs_1.readFileSync)(packageJsonPath, { encoding: 'utf8' }));
22
22
  if (!content || !content.workspaces) {
23
23
  return (0, exports.findWorkspacePackageJsons)(parentFolder, rootDir);
24
24
  }
@@ -26,7 +26,7 @@ const findWorkspacePackageJsons = (directory, rootDir) => {
26
26
  const isPackageWorkspace = packagePaths.some((workspacePath) => (0, node_path_1.normalize)(workspacePath) === rootDir);
27
27
  const getPackages = () => ([
28
28
  { content, path: packageJsonPath, isWorkspace: true },
29
- ...packagePaths.map((subPackageJsonPath) => ({ content: JSON.parse((0, node_fs_1.readFileSync)(subPackageJsonPath, { encoding: 'utf-8' })), path: subPackageJsonPath }))
29
+ ...packagePaths.map((subPackageJsonPath) => ({ content: JSON.parse((0, node_fs_1.readFileSync)(subPackageJsonPath, { encoding: 'utf8' })), path: subPackageJsonPath }))
30
30
  ]);
31
31
  if (isPackageWorkspace) {
32
32
  return {
@@ -14,8 +14,7 @@ exports.default = (0, utils_2.createRule)({
14
14
  type: 'problem',
15
15
  hasSuggestions: true,
16
16
  docs: {
17
- description: 'Ensures that your template does not use too many Async pipes that can slow down your application.',
18
- recommended: 'strict'
17
+ description: 'Ensures that your template does not use too many Async pipes that can slow down your application.'
19
18
  },
20
19
  schema: [
21
20
  {
@@ -11,8 +11,7 @@ exports.default = (0, utils_2.createRule)({
11
11
  type: 'problem',
12
12
  docs: {
13
13
  // eslint-disable-next-line max-len
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: 'strict'
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).'
16
15
  },
17
16
  schema: [],
18
17
  messages: {
@@ -9,8 +9,7 @@ exports.default = (0, utils_1.createRule)({
9
9
  hasSuggestions: true,
10
10
  type: 'problem',
11
11
  docs: {
12
- description: 'Ensures that imports of modules are pointing to the module file or an index.',
13
- recommended: 'strict'
12
+ description: 'Ensures that imports of modules are pointing to the module file or an index.'
14
13
  },
15
14
  schema: [],
16
15
  messages: {
@@ -9,8 +9,7 @@ exports.default = (0, utils_2.createRule)({
9
9
  hasSuggestions: true,
10
10
  type: 'problem',
11
11
  docs: {
12
- description: 'Ensures that the configuration property does not accept multiple types.',
13
- recommended: 'strict'
12
+ description: 'Ensures that the configuration property does not accept multiple types.'
14
13
  },
15
14
  schema: [
16
15
  {
@@ -8,8 +8,7 @@ exports.default = (0, utils_1.createRule)({
8
8
  fixable: 'code',
9
9
  type: 'problem',
10
10
  docs: {
11
- description: 'Ensures that @o3rCategories and @o3rCategory are used with correct value',
12
- recommended: 'strict'
11
+ description: 'Ensures that @o3rCategories and @o3rCategory are used with a correct value'
13
12
  },
14
13
  schema: [
15
14
  {
@@ -14,8 +14,7 @@ exports.default = (0, utils_1.createRule)({
14
14
  fixable: 'code',
15
15
  type: 'problem',
16
16
  docs: {
17
- description: 'Ensures that @o3rWidget and @o3rWidgetParam are used with correct value',
18
- recommended: 'strict'
17
+ description: 'Ensures that @o3rWidget and @o3rWidgetParam are used with a correct value'
19
18
  },
20
19
  schema: [
21
20
  {
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCommentString = exports.getNodeComment = exports.isExtendingConfiguration = exports.defaultSupportedInterfaceNames = exports.createRule = void 0;
4
4
  const utils_1 = require("@typescript-eslint/utils");
5
+ const node_fs_1 = require("node:fs");
5
6
  const path = require("node:path");
6
7
  /** Current package version (format: <major>.<minor>)*/
7
- const version = require(path.resolve(__dirname, '..', '..', 'package.json')).version.split('.').slice(0, 2).join('.');
8
+ const version = JSON.parse((0, node_fs_1.readFileSync)(path.resolve(__dirname, '..', '..', 'package.json'), { encoding: 'utf-8' })).version?.split('.').slice(0, 2).join('.') || '0.0';
8
9
  /** ESLint rule generator */
9
10
  // eslint-disable-next-line new-cap
10
11
  exports.createRule = utils_1.ESLintUtils.RuleCreator((name) => {
@@ -18,8 +18,7 @@ exports.default = (0, utils_1.createRule)({
18
18
  hasSuggestions: true,
19
19
  type: 'problem',
20
20
  docs: {
21
- description: 'Ensure that the package extension versions are aligned with range defined in packages.',
22
- recommended: 'strict'
21
+ description: 'Ensure that the package extension versions are aligned with the range defined in the packages.'
23
22
  },
24
23
  schema: [
25
24
  {