eslint-plugin-yml 3.1.0 → 3.1.1

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 (2) hide show
  1. package/lib/index.mjs +5 -3
  2. package/package.json +3 -7
package/lib/index.mjs CHANGED
@@ -1925,7 +1925,7 @@ var indent_default = createRule("indent", {
1925
1925
  "Program:exit"(node) {
1926
1926
  const lineIndentsWk = [];
1927
1927
  let tokensOnSameLine = [];
1928
- for (const token of sourceCode.getTokens(node, ITERATION_OPTS)) if (tokensOnSameLine.length === 0 || tokensOnSameLine[0].loc.start.line === token.loc.start.line) tokensOnSameLine.push(token);
1928
+ for (const token of [...node.comments, ...node.tokens].sort((a, b) => a.range[0] - b.range[0])) if (tokensOnSameLine.length === 0 || tokensOnSameLine[0].loc.start.line === token.loc.start.line) tokensOnSameLine.push(token);
1929
1929
  else {
1930
1930
  const lineIndent = processExpectedIndent(tokensOnSameLine);
1931
1931
  lineIndentsWk[lineIndent.line] = lineIndent;
@@ -5254,7 +5254,7 @@ var prettier_default = [...base_default, { rules: {
5254
5254
  //#endregion
5255
5255
  //#region package.json
5256
5256
  var name$1 = "eslint-plugin-yml";
5257
- var version$1 = "3.1.0";
5257
+ var version$1 = "3.1.1";
5258
5258
 
5259
5259
  //#endregion
5260
5260
  //#region src/meta.ts
@@ -5875,9 +5875,11 @@ var YAMLLanguage = class {
5875
5875
  */
5876
5876
  validateLanguageOptions(_languageOptions) {}
5877
5877
  normalizeLanguageOptions(languageOptions) {
5878
+ const fakeProperties = { ecmaVersion: "latest" };
5878
5879
  return {
5879
5880
  ...languageOptions,
5880
- parserOptions: { ...languageOptions.parserOptions }
5881
+ parserOptions: { ...languageOptions.parserOptions },
5882
+ ...fakeProperties
5881
5883
  };
5882
5884
  }
5883
5885
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-yml",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "This ESLint plugin provides linting rules for YAML.",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -80,16 +80,12 @@
80
80
  "@changesets/cli": "^2.24.2",
81
81
  "@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
82
82
  "@eslint/eslintrc": "^3.1.0",
83
- "@eslint/js": "^9.5.0",
83
+ "@eslint/js": "^10.0.0",
84
84
  "@eslint/json": "^1.0.0",
85
85
  "@ota-meshi/eslint-plugin": "^0.20.0",
86
86
  "@ota-meshi/site-kit-eslint-editor-vue": "^0.2.0",
87
87
  "@stylistic/eslint-plugin": "^5.7.0",
88
88
  "@types/debug": "^4.1.5",
89
- "@types/eslint": "^9.0.0",
90
- "@types/eslint-scope": "^8.0.0",
91
- "@types/eslint-visitor-keys": "^3.0.0",
92
- "@types/estree": "^1.0.0",
93
89
  "@types/mocha": "^10.0.0",
94
90
  "@types/natural-compare": "^1.4.0",
95
91
  "@types/node": "^24.0.0",
@@ -98,7 +94,7 @@
98
94
  "@typescript-eslint/parser": "~8.54.0",
99
95
  "cross-env": "^10.0.0",
100
96
  "env-cmd": "^11.0.0",
101
- "eslint": "^9.16.0",
97
+ "eslint": "^10.0.0",
102
98
  "eslint-config-prettier": "^10.0.0",
103
99
  "eslint-plugin-eslint-plugin": "^7.0.0",
104
100
  "eslint-plugin-eslint-rule-tester": "^0.6.0",