@html-eslint/eslint-plugin 0.36.0-alpha.0 → 0.37.0

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.
@@ -4,7 +4,6 @@
4
4
  * @typedef {Object} MessageId
5
5
  * @property {"closeStyleWrong"} CLOSE_STYLE_WRONG
6
6
  * @property {"newlineMissing"} NEWLINE_MISSING
7
- * @property {"newlineUnexpected"} NEWLINE_UNEXPECTED
8
7
  *
9
8
  * @typedef {Object} Option
10
9
  * @property {"sameline" | "newline"} [option.closeStyle]
@@ -22,7 +21,6 @@ const { createVisitors } = require("./utils/visitors");
22
21
  const MESSAGE_ID = {
23
22
  CLOSE_STYLE_WRONG: "closeStyleWrong",
24
23
  NEWLINE_MISSING: "newlineMissing",
25
- NEWLINE_UNEXPECTED: "newlineUnexpected",
26
24
  };
27
25
 
28
26
  /**
@@ -56,8 +54,6 @@ module.exports = {
56
54
  [MESSAGE_ID.CLOSE_STYLE_WRONG]:
57
55
  "Closing bracket was on {{actual}}; expected {{expected}}",
58
56
  [MESSAGE_ID.NEWLINE_MISSING]: "Newline expected before {{attrName}}",
59
- [MESSAGE_ID.NEWLINE_UNEXPECTED]:
60
- "Newlines not expected between attributes, since this tag has fewer than {{attrMin}} attributes",
61
57
  },
62
58
  },
63
59
 
@@ -70,21 +66,22 @@ module.exports = {
70
66
  return createVisitors(context, {
71
67
  Tag(node) {
72
68
  const shouldBeMultiline = node.attributes.length > attrMin;
69
+ if (!shouldBeMultiline) return;
73
70
 
74
71
  /**
75
72
  * This doesn't do any indentation, so the result will look silly. Indentation should be covered by the `indent` rule
76
73
  * @param {RuleFixer} fixer
77
74
  */
78
75
  function fix(fixer) {
79
- const spacer = shouldBeMultiline ? "\n" : " ";
80
76
  let expected = node.openStart.value;
81
77
  for (const attr of node.attributes) {
82
- expected += `${spacer}${attr.key.value}`;
78
+ expected += `\n${attr.key.value}`;
83
79
  if (attr.startWrapper && attr.value && attr.endWrapper) {
84
80
  expected += `=${attr.startWrapper.value}${attr.value.value}${attr.endWrapper.value}`;
85
81
  }
86
82
  }
87
- if (shouldBeMultiline && closeStyle === "newline") {
83
+
84
+ if (closeStyle === "newline") {
88
85
  expected += "\n";
89
86
  } else if (node.selfClosing) {
90
87
  expected += " ";
@@ -97,66 +94,38 @@ module.exports = {
97
94
  );
98
95
  }
99
96
 
100
- if (shouldBeMultiline) {
101
- let index = 0;
102
- for (const attr of node.attributes) {
103
- const attrPrevious = node.attributes[index - 1];
104
- const relativeToNode = attrPrevious || node.openStart;
105
- if (attr.loc.start.line === relativeToNode.loc.end.line) {
106
- return context.report({
107
- node,
108
- data: {
109
- attrName: attr.key.value,
110
- },
111
- fix,
112
- messageId: MESSAGE_ID.NEWLINE_MISSING,
113
- });
114
- }
115
- index += 1;
116
- }
117
-
118
- const attrLast = node.attributes[node.attributes.length - 1];
119
- const closeStyleActual =
120
- node.openEnd.loc.start.line === attrLast.loc.end.line
121
- ? "sameline"
122
- : "newline";
123
- if (closeStyle !== closeStyleActual) {
97
+ let index = 0;
98
+ for (const attr of node.attributes) {
99
+ const attrPrevious = node.attributes[index - 1];
100
+ const relativeToNode = attrPrevious || node.openStart;
101
+ if (attr.loc.start.line === relativeToNode.loc.end.line) {
124
102
  return context.report({
125
103
  node,
126
104
  data: {
127
- actual: closeStyleActual,
128
- expected: closeStyle,
105
+ attrName: attr.key.value,
129
106
  },
130
107
  fix,
131
- messageId: MESSAGE_ID.CLOSE_STYLE_WRONG,
108
+ messageId: MESSAGE_ID.NEWLINE_MISSING,
132
109
  });
133
110
  }
134
- } else {
135
- let expectedLastLineNum = node.openStart.loc.start.line;
136
- for (const attr of node.attributes) {
137
- if (shouldBeMultiline) {
138
- expectedLastLineNum += 1;
139
- }
140
- if (attr.value) {
141
- const valueLineSpan =
142
- attr.value.loc.end.line - attr.value.loc.start.line;
143
- expectedLastLineNum += valueLineSpan;
144
- }
145
- }
146
- if (shouldBeMultiline && closeStyle === "newline") {
147
- expectedLastLineNum += 1;
148
- }
111
+ index += 1;
112
+ }
149
113
 
150
- if (node.openEnd.loc.end.line !== expectedLastLineNum) {
151
- return context.report({
152
- node,
153
- data: {
154
- attrMin: `${attrMin}`,
155
- },
156
- fix,
157
- messageId: MESSAGE_ID.NEWLINE_UNEXPECTED,
158
- });
159
- }
114
+ const attrLast = node.attributes[node.attributes.length - 1];
115
+ const closeStyleActual =
116
+ node.openEnd.loc.start.line === attrLast.loc.end.line
117
+ ? "sameline"
118
+ : "newline";
119
+ if (closeStyle !== closeStyleActual) {
120
+ return context.report({
121
+ node,
122
+ data: {
123
+ actual: closeStyleActual,
124
+ expected: closeStyle,
125
+ },
126
+ fix,
127
+ messageId: MESSAGE_ID.CLOSE_STYLE_WRONG,
128
+ });
160
129
  }
161
130
  },
162
131
  });
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * @typedef { import("../types").RuleModule<[]> } RuleModule
3
+ * @typedef { import("@html-eslint/types").AttributeValue } AttributeValue
4
+ * @typedef { import("../types").SuggestionReportDescriptor } SuggestionReportDescriptor
3
5
  */
4
6
 
5
7
  const { RULE_CATEGORY } = require("../constants");
@@ -9,6 +11,9 @@ const { createVisitors } = require("./utils/visitors");
9
11
  const MESSAGE_IDS = {
10
12
  MISSING: "missing",
11
13
  INVALID: "invalid",
14
+ REPLACE_TO_SUBMIT: "replaceToSubmit",
15
+ REPLACE_TO_BUTTON: "replaceToButton",
16
+ REPLACE_TO_RESET: "replaceToReset",
12
17
  };
13
18
 
14
19
  const VALID_BUTTON_TYPES_SET = new Set(["submit", "button", "reset"]);
@@ -26,16 +31,41 @@ module.exports = {
26
31
  recommended: false,
27
32
  },
28
33
 
29
- fixable: null,
34
+ fixable: true,
35
+ hasSuggestions: true,
30
36
  schema: [],
31
37
  messages: {
32
38
  [MESSAGE_IDS.MISSING]: "Missing a type attribute for button",
33
39
  [MESSAGE_IDS.INVALID]:
34
40
  '"{{type}}" is an invalid value for button type attribute.',
41
+ [MESSAGE_IDS.REPLACE_TO_BUTTON]: "Replace the type with 'button'",
42
+ [MESSAGE_IDS.REPLACE_TO_SUBMIT]: "Replace the type with 'submit'",
43
+ [MESSAGE_IDS.REPLACE_TO_RESET]: "Replace the type with 'reset'",
35
44
  },
36
45
  },
37
46
 
38
47
  create(context) {
48
+ /**
49
+ * @param {AttributeValue} node
50
+ * @returns {SuggestionReportDescriptor[]}
51
+ */
52
+ function getSuggestions(node) {
53
+ return [
54
+ {
55
+ messageId: MESSAGE_IDS.REPLACE_TO_SUBMIT,
56
+ fix: (fixer) => fixer.replaceTextRange(node.range, "submit"),
57
+ },
58
+ {
59
+ messageId: MESSAGE_IDS.REPLACE_TO_BUTTON,
60
+ fix: (fixer) => fixer.replaceTextRange(node.range, "button"),
61
+ },
62
+ {
63
+ messageId: MESSAGE_IDS.REPLACE_TO_RESET,
64
+ fix: (fixer) => fixer.replaceTextRange(node.range, "reset"),
65
+ },
66
+ ];
67
+ }
68
+
39
69
  return createVisitors(context, {
40
70
  Tag(node) {
41
71
  if (node.name !== "button") {
@@ -46,6 +76,9 @@ module.exports = {
46
76
  context.report({
47
77
  node: node.openStart,
48
78
  messageId: MESSAGE_IDS.MISSING,
79
+ fix(fixer) {
80
+ return fixer.insertTextAfter(node.openStart, ' type="submit"');
81
+ },
49
82
  });
50
83
  } else if (
51
84
  !VALID_BUTTON_TYPES_SET.has(typeAttr.value.value) &&
@@ -57,6 +90,7 @@ module.exports = {
57
90
  data: {
58
91
  type: typeAttr.value.value,
59
92
  },
93
+ suggest: getSuggestions(typeAttr.value),
60
94
  });
61
95
  }
62
96
  },
package/lib/types/rule.ts CHANGED
@@ -80,8 +80,8 @@ interface ReportDescriptorOptionsBase {
80
80
  fix?: null | ReportFixFunction;
81
81
  }
82
82
 
83
- type SuggestionDescriptorMessage = { desc: string } | { messageId: string };
84
- type SuggestionReportDescriptor = SuggestionDescriptorMessage &
83
+ type SuggestionDescriptorMessage = { messageId: string };
84
+ export type SuggestionReportDescriptor = SuggestionDescriptorMessage &
85
85
  ReportDescriptorOptionsBase;
86
86
 
87
87
  interface ReportDescriptorOptions extends ReportDescriptorOptionsBase {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@html-eslint/eslint-plugin",
3
- "version": "0.36.0-alpha.0",
3
+ "version": "0.37.0",
4
4
  "description": "ESLint plugin for html",
5
5
  "author": "yeonjuan",
6
6
  "homepage": "https://github.com/yeonjuan/html-eslint#readme",
@@ -37,12 +37,12 @@
37
37
  "accessibility"
38
38
  ],
39
39
  "dependencies": {
40
- "@html-eslint/template-parser": "^0.35.2",
41
- "@html-eslint/template-syntax-parser": "^0.35.2"
40
+ "@html-eslint/template-parser": "^0.37.0",
41
+ "@html-eslint/template-syntax-parser": "^0.37.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@html-eslint/parser": "^0.36.0-alpha.0",
45
- "@html-eslint/types": "^0.35.1",
44
+ "@html-eslint/parser": "^0.37.0",
45
+ "@html-eslint/types": "^0.37.0",
46
46
  "@types/eslint": "^9.6.1",
47
47
  "@types/estree": "^0.0.47",
48
48
  "es-html-parser": "0.1.1",
@@ -50,5 +50,5 @@
50
50
  "espree": "^10.3.0",
51
51
  "typescript": "^5.7.2"
52
52
  },
53
- "gitHead": "398595dba79470f12bf22271f86614c274dd8954"
53
+ "gitHead": "8c8b39a840ef0bc2e335200e86cb90c280169a74"
54
54
  }
@@ -7,7 +7,6 @@ type RuleFixer = import("../types").RuleFixer;
7
7
  type MessageId = {
8
8
  CLOSE_STYLE_WRONG: "closeStyleWrong";
9
9
  NEWLINE_MISSING: "newlineMissing";
10
- NEWLINE_UNEXPECTED: "newlineUnexpected";
11
10
  };
12
11
  type Option = {
13
12
  closeStyle?: "sameline" | "newline" | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"attrs-newline.d.ts","sourceRoot":"","sources":["../../lib/rules/attrs-newline.js"],"names":[],"mappings":";;;wBA4BU,UAAU;;iBA3BN,OAAO,UAAU,EAAE,SAAS;;uBAG5B,iBAAiB;qBACjB,gBAAgB;wBAChB,mBAAmB;;;;;;kBAMnB,OAAO,UAAU,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"attrs-newline.d.ts","sourceRoot":"","sources":["../../lib/rules/attrs-newline.js"],"names":[],"mappings":";;;wBA0BU,UAAU;;iBAzBN,OAAO,UAAU,EAAE,SAAS;;uBAG5B,iBAAiB;qBACjB,gBAAgB;;;;;;kBAMhB,OAAO,UAAU,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,7 +1,9 @@
1
1
  declare namespace _exports {
2
- export { RuleModule };
2
+ export { RuleModule, AttributeValue, SuggestionReportDescriptor };
3
3
  }
4
4
  declare const _exports: RuleModule;
5
5
  export = _exports;
6
6
  type RuleModule = import("../types").RuleModule<[]>;
7
+ type AttributeValue = import("@html-eslint/types").AttributeValue;
8
+ type SuggestionReportDescriptor = import("../types").SuggestionReportDescriptor;
7
9
  //# sourceMappingURL=require-button-type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"require-button-type.d.ts","sourceRoot":"","sources":["../../lib/rules/require-button-type.js"],"names":[],"mappings":";;;wBAgBU,UAAU;;kBAfN,OAAO,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"require-button-type.d.ts","sourceRoot":"","sources":["../../lib/rules/require-button-type.js"],"names":[],"mappings":";;;wBAqBU,UAAU;;kBApBN,OAAO,UAAU,EAAE,UAAU,CAAC,EAAE,CAAC;sBACjC,OAAO,oBAAoB,EAAE,cAAc;kCAC3C,OAAO,UAAU,EAAE,0BAA0B"}
@@ -64,11 +64,9 @@ interface ReportDescriptorOptionsBase {
64
64
  fix?: null | ReportFixFunction;
65
65
  }
66
66
  type SuggestionDescriptorMessage = {
67
- desc: string;
68
- } | {
69
67
  messageId: string;
70
68
  };
71
- type SuggestionReportDescriptor = SuggestionDescriptorMessage & ReportDescriptorOptionsBase;
69
+ export type SuggestionReportDescriptor = SuggestionDescriptorMessage & ReportDescriptorOptionsBase;
72
70
  interface ReportDescriptorOptions extends ReportDescriptorOptionsBase {
73
71
  suggest?: SuggestionReportDescriptor[] | null;
74
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../lib/types/rule.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,KAAK,cAAc,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;AAEzC,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI;KACjC,CAAC,IAAI,MAAM,CAAC,IAAI,GAAG,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,KAAK,IAAI,CAAC;IAChD,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,YAAY,KAAK,IAAI,CAAC;IAChD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC;IACxC,SAAS,CAAC,EAAE,CAAC,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