eslint-plugin-node-dependencies 0.11.0 → 0.11.2

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.
@@ -100,7 +100,8 @@ exports.default = (0, utils_1.createRule)("absolute-version", {
100
100
  type: "suggestion",
101
101
  },
102
102
  create(context) {
103
- if (!context.parserServices.isJSON) {
103
+ const sourceCode = context.getSourceCode();
104
+ if (!sourceCode.parserServices.isJSON) {
104
105
  return {};
105
106
  }
106
107
  const getOption = parseOption(context.options[0]);
@@ -141,7 +141,8 @@ exports.default = (0, utils_1.createRule)("compat-engines", {
141
141
  },
142
142
  create(context) {
143
143
  var _a, _b, _c;
144
- if (!context.parserServices.isJSON) {
144
+ const sourceCode = context.getSourceCode();
145
+ if (!sourceCode.parserServices.isJSON) {
145
146
  return {};
146
147
  }
147
148
  const deep = ((_a = context.options[0]) === null || _a === void 0 ? void 0 : _a.deep) !== false;
@@ -25,7 +25,8 @@ exports.default = (0, utils_1.createRule)("no-deprecated", {
25
25
  },
26
26
  create(context) {
27
27
  var _a;
28
- if (!context.parserServices.isJSON) {
28
+ const sourceCode = context.getSourceCode();
29
+ if (!sourceCode.parserServices.isJSON) {
29
30
  return {};
30
31
  }
31
32
  const devDependencies = Boolean((_a = context.options[0]) === null || _a === void 0 ? void 0 : _a.devDependencies);
@@ -33,7 +33,8 @@ exports.default = (0, utils_1.createRule)("no-dupe-deps", {
33
33
  type: "problem",
34
34
  },
35
35
  create(context) {
36
- if (!context.parserServices.isJSON) {
36
+ const sourceCode = context.getSourceCode();
37
+ if (!sourceCode.parserServices.isJSON) {
37
38
  return {};
38
39
  }
39
40
  const allowDuplicates = new AllowDuplicates();
@@ -173,7 +173,8 @@ exports.default = (0, utils_1.createRule)("no-restricted-deps", {
173
173
  type: "suggestion",
174
174
  },
175
175
  create(context) {
176
- if (!context.parserServices.isJSON) {
176
+ const sourceCode = context.getSourceCode();
177
+ if (!sourceCode.parserServices.isJSON) {
177
178
  return {};
178
179
  }
179
180
  const validateForPackage = parseOptions(context.options);
@@ -17,10 +17,10 @@ exports.default = (0, utils_1.createRule)("prefer-caret-range-version", {
17
17
  type: "suggestion",
18
18
  },
19
19
  create(context) {
20
- if (!context.parserServices.isJSON) {
20
+ const sourceCode = context.getSourceCode();
21
+ if (!sourceCode.parserServices.isJSON) {
21
22
  return {};
22
23
  }
23
- const sourceCode = context.getSourceCode();
24
24
  function convertToUseCaret(range) {
25
25
  if (range.comparators.length !== 2) {
26
26
  return null;
@@ -17,10 +17,10 @@ exports.default = (0, utils_1.createRule)("prefer-tilde-range-version", {
17
17
  type: "suggestion",
18
18
  },
19
19
  create(context) {
20
- if (!context.parserServices.isJSON) {
20
+ const sourceCode = context.getSourceCode();
21
+ if (!sourceCode.parserServices.isJSON) {
21
22
  return {};
22
23
  }
23
- const sourceCode = context.getSourceCode();
24
24
  function convertToUseTilde(range) {
25
25
  if (range.comparators.length !== 2) {
26
26
  return null;
@@ -16,7 +16,8 @@ exports.default = (0, utils_1.createRule)("valid-semver", {
16
16
  type: "problem",
17
17
  },
18
18
  create(context) {
19
- if (!context.parserServices.isJSON) {
19
+ const sourceCode = context.getSourceCode();
20
+ if (!sourceCode.parserServices.isJSON) {
20
21
  return {};
21
22
  }
22
23
  return (0, utils_1.defineJsonVisitor)({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-node-dependencies",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "ESLint plugin to check Node.js dependencies.",
5
5
  "engines": {
6
6
  "node": ">=14.17.0"
@@ -54,44 +54,45 @@
54
54
  "eslint": ">=6.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@changesets/changelog-github": "^0.4.6",
57
+ "@changesets/changelog-github": "^0.5.0",
58
58
  "@changesets/cli": "^2.24.2",
59
- "@ota-meshi/eslint-plugin": "^0.13.0",
59
+ "@ota-meshi/eslint-plugin": "^0.15.0",
60
60
  "@types/chai": "^4.2.18",
61
61
  "@types/eslint": "^8.0.0",
62
62
  "@types/eslint-scope": "^3.7.0",
63
63
  "@types/eslint-visitor-keys": "^1.0.0",
64
64
  "@types/estree": "^1.0.0",
65
65
  "@types/mocha": "^10.0.0",
66
- "@types/node": "^18.0.0",
66
+ "@types/node": "^20.0.0",
67
67
  "@types/npm-package-arg": "^6.1.1",
68
68
  "@types/semver": "^7.3.8",
69
- "@typescript-eslint/eslint-plugin": "^5.0.0",
70
- "@typescript-eslint/parser": "^5.0.0",
71
- "chai": "^4.3.4",
69
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
70
+ "@typescript-eslint/parser": "^6.0.0",
71
+ "chai": "^5.0.0",
72
72
  "env-cmd": "^10.1.0",
73
73
  "eslint": "^8.0.0",
74
- "eslint-config-prettier": "^8.0.0",
74
+ "eslint-compat-utils": "^0.4.0",
75
+ "eslint-config-prettier": "^9.0.0",
75
76
  "eslint-plugin-eslint-comments": "^3.2.0",
76
77
  "eslint-plugin-eslint-plugin": "^5.0.0",
77
78
  "eslint-plugin-json-schema-validator": "^4.0.0",
78
79
  "eslint-plugin-jsonc": "^2.0.0",
79
- "eslint-plugin-node": "^11.1.0",
80
- "eslint-plugin-node-dependencies": "^0.10.0",
81
- "eslint-plugin-prettier": "^4.0.0",
82
- "eslint-plugin-regexp": "^1.0.0",
80
+ "eslint-plugin-n": "^16.0.0",
81
+ "eslint-plugin-node-dependencies": "^0.11.0",
82
+ "eslint-plugin-prettier": "^5.0.0",
83
+ "eslint-plugin-regexp": "^2.0.0",
83
84
  "eslint-plugin-vue": "^9.0.0",
84
85
  "eslint-plugin-yml": "^1.0.0",
85
86
  "eslint4b": "^7.3.1",
86
87
  "mocha": "^10.0.0",
87
88
  "mocha-chai-jest-snapshot": "^1.1.2",
88
89
  "nyc": "^15.1.0",
89
- "prettier": "^2.0.5",
90
+ "prettier": "^3.0.0",
90
91
  "raw-loader": "^4.0.1",
91
- "stylelint": "^15.0.0",
92
+ "stylelint": "^16.0.0",
92
93
  "stylelint-config-recommended-vue": "^1.0.0",
93
- "stylelint-config-standard": "^33.0.0",
94
- "stylelint-stylus": "^0.18.0",
94
+ "stylelint-config-standard": "^36.0.0",
95
+ "stylelint-stylus": "^1.0.0",
95
96
  "ts-node": "^10.0.0",
96
97
  "typescript": "^5.0.0",
97
98
  "vue-eslint-editor": "^1.1.0",