@plugjs/eslint-plugin 0.2.9 → 0.2.10

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.
@@ -4184,7 +4184,12 @@ var require_indent = __commonJS({
4184
4184
  },
4185
4185
  "FunctionDeclaration, FunctionExpression": function(node) {
4186
4186
  const closingParen = sourceCode.getTokenBefore(node.body);
4187
- const openingParen = sourceCode.getTokenBefore(node.params.length ? node.params[0] : closingParen);
4187
+ const openingParen = sourceCode.getTokenBefore(
4188
+ node.params.length ? node.params[0].decorators?.length ? node.params[0].decorators[0] : node.params[0] : closingParen,
4189
+ {
4190
+ filter: utils.isOpeningParenToken
4191
+ }
4192
+ );
4188
4193
  parameterParens.add(openingParen);
4189
4194
  parameterParens.add(closingParen);
4190
4195
  addElementListIndent(node.params, openingParen, closingParen, options[node.type].parameters);
@@ -4297,7 +4302,7 @@ var require_indent = __commonJS({
4297
4302
  offsets.setDesiredOffset(bracketTokenR, bracketTokenL, 0);
4298
4303
  } else {
4299
4304
  const idToken = keyLastToken = sourceCode.getFirstToken(node.key);
4300
- if (idToken !== firstToken)
4305
+ if (!node.decorators?.length && idToken !== firstToken)
4301
4306
  offsets.setDesiredOffset(idToken, firstToken, 1);
4302
4307
  }
4303
4308
  if (node.value) {
@@ -17220,39 +17225,6 @@ var require_indent2 = __commonJS({
17220
17225
  if (!KNOWN_NODES.has(node.type))
17221
17226
  rules["*:exit"](node);
17222
17227
  },
17223
- PropertyDefinition(node) {
17224
- if (node.parent.type !== utils$1.AST_NODE_TYPES.ClassBody || !node.decorators?.length || node.loc.start.line === node.loc.end.line)
17225
- return rules.PropertyDefinition(node);
17226
- let startDecorator = node.decorators[0];
17227
- let endDecorator = startDecorator;
17228
- for (let i = 1; i <= node.decorators.length; i++) {
17229
- const decorator = node.decorators[i];
17230
- if (i === node.decorators.length || startDecorator.loc.start.line !== decorator.loc.start.line) {
17231
- rules.PropertyDefinition({
17232
- type: utils$1.AST_NODE_TYPES.PropertyDefinition,
17233
- key: node.key,
17234
- parent: node.parent,
17235
- range: [startDecorator.range[0], endDecorator.range[1]],
17236
- loc: {
17237
- start: startDecorator.loc.start,
17238
- end: endDecorator.loc.end
17239
- }
17240
- });
17241
- if (decorator)
17242
- startDecorator = endDecorator = decorator;
17243
- } else {
17244
- endDecorator = decorator;
17245
- }
17246
- }
17247
- return rules.PropertyDefinition({
17248
- ...node,
17249
- range: [endDecorator.range[1] + 1, node.range[1]],
17250
- loc: {
17251
- start: node.key.loc.start,
17252
- end: node.loc.end
17253
- }
17254
- });
17255
- },
17256
17228
  VariableDeclaration(node) {
17257
17229
  if (node.declarations.length === 0)
17258
17230
  return;
@@ -19568,6 +19540,8 @@ var require_quotes2 = __commonJS({
19568
19540
  case utils$1.AST_NODE_TYPES.TSAbstractPropertyDefinition:
19569
19541
  case utils$1.AST_NODE_TYPES.PropertyDefinition:
19570
19542
  return node === parent.key;
19543
+ case utils$1.AST_NODE_TYPES.TSLiteralType:
19544
+ return parent.parent?.type === utils$1.AST_NODE_TYPES.TSImportType;
19571
19545
  default:
19572
19546
  return false;
19573
19547
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugjs/eslint-plugin",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Shared ESLint configurations and extras",
5
5
  "main": "./index.mjs",
6
6
  "type": "module",
@@ -36,7 +36,7 @@
36
36
  "homepage": "https://github.com/plugjs/eslint-plugin#readme",
37
37
  "dependencies": {
38
38
  "@eslint/js": "10.0.0",
39
- "@typescript-eslint/utils": "8.0.0",
39
+ "@typescript-eslint/utils": "8.0.1",
40
40
  "debug": "4.3.6",
41
41
  "doctrine": "2.1.0",
42
42
  "enhanced-resolve": "5.17.1",
@@ -58,6 +58,6 @@
58
58
  "stable-hash": "0.0.4",
59
59
  "tslib": "2.6.3",
60
60
  "typescript": "5.5.4",
61
- "typescript-eslint": "8.0.0"
61
+ "typescript-eslint": "8.0.1"
62
62
  }
63
63
  }