@jsse/eslint-config 0.4.5 → 0.4.7

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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, __export, __toESM } from "./chunk-CkHaCily.js";
2
- import { VERSION } from "./version-B0HyilUh.js";
2
+ import { VERSION } from "./version-BhJxNYo2.js";
3
3
  import { builtinModules, createRequire } from "node:module";
4
4
  import fs, { promises, realpathSync, statSync } from "node:fs";
5
5
  import process$1 from "node:process";
@@ -51,7 +51,7 @@ const SLOW_RULES = [
51
51
  ];
52
52
 
53
53
  //#endregion
54
- //#region node_modules/.pnpm/acorn@8.14.1/node_modules/acorn/dist/acorn.mjs
54
+ //#region node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
55
55
  var astralIdentifierCodes = [
56
56
  509,
57
57
  0,
@@ -1672,6 +1672,44 @@ pp$8.isAsyncFunction = function() {
1672
1672
  var next = this.pos + skip[0].length, after;
1673
1673
  return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320));
1674
1674
  };
1675
+ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
1676
+ if (this.options.ecmaVersion < 17 || !this.isContextual(isAwaitUsing ? "await" : "using")) {
1677
+ return false;
1678
+ }
1679
+ skipWhiteSpace.lastIndex = this.pos;
1680
+ var skip = skipWhiteSpace.exec(this.input);
1681
+ var next = this.pos + skip[0].length;
1682
+ if (lineBreak.test(this.input.slice(this.pos, next))) {
1683
+ return false;
1684
+ }
1685
+ if (isAwaitUsing) {
1686
+ var awaitEndPos = next + 5, after;
1687
+ if (this.input.slice(next, awaitEndPos) !== "using" || awaitEndPos === this.input.length || isIdentifierChar(after = this.input.charCodeAt(awaitEndPos)) || after > 55295 && after < 56320) {
1688
+ return false;
1689
+ }
1690
+ skipWhiteSpace.lastIndex = awaitEndPos;
1691
+ var skipAfterUsing = skipWhiteSpace.exec(this.input);
1692
+ if (skipAfterUsing && lineBreak.test(this.input.slice(awaitEndPos, awaitEndPos + skipAfterUsing[0].length))) {
1693
+ return false;
1694
+ }
1695
+ }
1696
+ if (isFor) {
1697
+ var ofEndPos = next + 2, after$1;
1698
+ if (this.input.slice(next, ofEndPos) === "of") {
1699
+ if (ofEndPos === this.input.length || !isIdentifierChar(after$1 = this.input.charCodeAt(ofEndPos)) && !(after$1 > 55295 && after$1 < 56320)) {
1700
+ return false;
1701
+ }
1702
+ }
1703
+ }
1704
+ var ch = this.input.charCodeAt(next);
1705
+ return isIdentifierStart(ch, true) || ch === 92;
1706
+ };
1707
+ pp$8.isAwaitUsing = function(isFor) {
1708
+ return this.isUsingKeyword(true, isFor);
1709
+ };
1710
+ pp$8.isUsing = function(isFor) {
1711
+ return this.isUsingKeyword(false, isFor);
1712
+ };
1675
1713
  pp$8.parseStatement = function(context, topLevel, exports) {
1676
1714
  var starttype = this.type, node = this.startNode(), kind;
1677
1715
  if (this.isLet(context)) {
@@ -1737,6 +1775,22 @@ pp$8.parseStatement = function(context, topLevel, exports) {
1737
1775
  this.next();
1738
1776
  return this.parseFunctionStatement(node, true, !context);
1739
1777
  }
1778
+ var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
1779
+ if (usingKind) {
1780
+ if (topLevel && this.options.sourceType === "script") {
1781
+ this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script`");
1782
+ }
1783
+ if (usingKind === "await using") {
1784
+ if (!this.canAwait) {
1785
+ this.raise(this.start, "Await using cannot appear outside of async function");
1786
+ }
1787
+ this.next();
1788
+ }
1789
+ this.next();
1790
+ this.parseVar(node, false, usingKind);
1791
+ this.semicolon();
1792
+ return this.finishNode(node, "VariableDeclaration");
1793
+ }
1740
1794
  var maybeName = this.value, expr = this.parseExpression();
1741
1795
  if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
1742
1796
  return this.parseLabeledStatement(node, maybeName, expr, context);
@@ -1810,24 +1864,20 @@ pp$8.parseForStatement = function(node) {
1810
1864
  this.next();
1811
1865
  this.parseVar(init$1, true, kind);
1812
1866
  this.finishNode(init$1, "VariableDeclaration");
1813
- if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) {
1814
- if (this.options.ecmaVersion >= 9) {
1815
- if (this.type === types$1._in) {
1816
- if (awaitAt > -1) {
1817
- this.unexpected(awaitAt);
1818
- }
1819
- } else {
1820
- node.await = awaitAt > -1;
1821
- }
1822
- }
1823
- return this.parseForIn(node, init$1);
1824
- }
1825
- if (awaitAt > -1) {
1826
- this.unexpected(awaitAt);
1827
- }
1828
- return this.parseFor(node, init$1);
1867
+ return this.parseForAfterInit(node, init$1, awaitAt);
1829
1868
  }
1830
1869
  var startsWithLet = this.isContextual("let"), isForOf = false;
1870
+ var usingKind = this.isUsing(true) ? "using" : this.isAwaitUsing(true) ? "await using" : null;
1871
+ if (usingKind) {
1872
+ var init$2 = this.startNode();
1873
+ this.next();
1874
+ if (usingKind === "await using") {
1875
+ this.next();
1876
+ }
1877
+ this.parseVar(init$2, true, usingKind);
1878
+ this.finishNode(init$2, "VariableDeclaration");
1879
+ return this.parseForAfterInit(node, init$2, awaitAt);
1880
+ }
1831
1881
  var containsEsc = this.containsEsc;
1832
1882
  var refDestructuringErrors = new DestructuringErrors();
1833
1883
  var initPos = this.start;
@@ -1859,6 +1909,24 @@ pp$8.parseForStatement = function(node) {
1859
1909
  }
1860
1910
  return this.parseFor(node, init);
1861
1911
  };
1912
+ pp$8.parseForAfterInit = function(node, init, awaitAt) {
1913
+ if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
1914
+ if (this.options.ecmaVersion >= 9) {
1915
+ if (this.type === types$1._in) {
1916
+ if (awaitAt > -1) {
1917
+ this.unexpected(awaitAt);
1918
+ }
1919
+ } else {
1920
+ node.await = awaitAt > -1;
1921
+ }
1922
+ }
1923
+ return this.parseForIn(node, init);
1924
+ }
1925
+ if (awaitAt > -1) {
1926
+ this.unexpected(awaitAt);
1927
+ }
1928
+ return this.parseFor(node, init);
1929
+ };
1862
1930
  pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) {
1863
1931
  this.next();
1864
1932
  return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync);
@@ -2085,6 +2153,8 @@ pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
2085
2153
  decl.init = this.parseMaybeAssign(isFor);
2086
2154
  } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
2087
2155
  this.unexpected();
2156
+ } else if (!allowMissingInitializer && (kind === "using" || kind === "await using") && this.options.ecmaVersion >= 17 && this.type !== types$1._in && !this.isContextual("of")) {
2157
+ this.raise(this.lastTokEnd, "Missing initializer in " + kind + " declaration");
2088
2158
  } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) {
2089
2159
  this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
2090
2160
  } else {
@@ -2098,7 +2168,7 @@ pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) {
2098
2168
  return node;
2099
2169
  };
2100
2170
  pp$8.parseVarId = function(decl, kind) {
2101
- decl.id = this.parseBindingAtom();
2171
+ decl.id = kind === "using" || kind === "await using" ? this.parseIdent() : this.parseBindingAtom();
2102
2172
  this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false);
2103
2173
  };
2104
2174
  var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4;
@@ -3552,7 +3622,7 @@ pp$5.parseLiteral = function(value) {
3552
3622
  node.value = value;
3553
3623
  node.raw = this.input.slice(this.start, this.end);
3554
3624
  if (node.raw.charCodeAt(node.raw.length - 1) === 110) {
3555
- node.bigint = node.raw.slice(0, -1).replace(/_/g, "");
3625
+ node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, "");
3556
3626
  }
3557
3627
  this.next();
3558
3628
  return this.finishNode(node, "Literal");
@@ -6145,7 +6215,7 @@ pp.readWord = function() {
6145
6215
  }
6146
6216
  return this.finishToken(type, word);
6147
6217
  };
6148
- var version = "8.14.1";
6218
+ var version = "8.15.0";
6149
6219
  Parser.acorn = {
6150
6220
  Parser,
6151
6221
  version,
@@ -1,5 +1,5 @@
1
1
  //#region src/generated/version.ts
2
- const VERSION = "0.4.5";
2
+ const VERSION = "0.4.7";
3
3
 
4
4
  //#endregion
5
5
  export { VERSION };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.4.5",
4
+ "version": "0.4.7",
5
5
  "description": "@jsse/eslint-config ~ WYSIWYG",
6
6
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
7
7
  "license": "MIT",
@@ -59,11 +59,11 @@
59
59
  "dependencies": {
60
60
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
61
61
  "@eslint/compat": "^1.3.1",
62
- "@eslint/js": "~9.31.0",
63
- "@eslint/markdown": "^7.0.0",
64
- "@stylistic/eslint-plugin": "5.2.0",
65
- "@typescript-eslint/eslint-plugin": "^8.37.0",
66
- "@typescript-eslint/parser": "^8.37.0",
62
+ "@eslint/js": "~9.32.0",
63
+ "@eslint/markdown": "^7.1.0",
64
+ "@stylistic/eslint-plugin": "5.2.2",
65
+ "@typescript-eslint/eslint-plugin": "^8.38.0",
66
+ "@typescript-eslint/parser": "^8.38.0",
67
67
  "@vitest/eslint-plugin": "^1.3.4",
68
68
  "debug": "^4.4.1",
69
69
  "eslint-config-flat-gitignore": "^2.1.0",
@@ -72,37 +72,37 @@
72
72
  "eslint-plugin-command": "^3.3.1",
73
73
  "eslint-plugin-de-morgan": "^1.3.0",
74
74
  "eslint-plugin-import-lite": "^0.3.0",
75
- "eslint-plugin-jsdoc": "^51.4.1",
75
+ "eslint-plugin-jsdoc": "^52.0.0",
76
76
  "eslint-plugin-jsonc": "^2.20.1",
77
- "eslint-plugin-n": "^17.21.0",
77
+ "eslint-plugin-n": "^17.21.3",
78
78
  "eslint-plugin-no-only-tests": "^3.3.0",
79
79
  "eslint-plugin-perfectionist": "^4.15.0",
80
- "eslint-plugin-pnpm": "^1.0.0",
80
+ "eslint-plugin-pnpm": "^1.1.0",
81
81
  "eslint-plugin-react": "~7.37.5",
82
82
  "eslint-plugin-react-hooks": "~5.2.0",
83
83
  "eslint-plugin-react-refresh": "~0.4.20",
84
84
  "eslint-plugin-toml": "^0.12.0",
85
85
  "eslint-plugin-tsdoc": "^0.4.0",
86
- "eslint-plugin-unicorn": "^59.0.1",
86
+ "eslint-plugin-unicorn": "^60.0.0",
87
87
  "eslint-plugin-unused-imports": "^4.1.4",
88
88
  "eslint-plugin-yml": "^1.18.0",
89
89
  "jsonc-eslint-parser": "^2.4.0",
90
90
  "toml-eslint-parser": "^0.10.0",
91
- "typescript-eslint": "^8.37.0",
91
+ "typescript-eslint": "^8.38.0",
92
92
  "yaml-eslint-parser": "^1.3.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@biomejs/biome": "2.1.1",
95
+ "@biomejs/biome": "2.1.2",
96
96
  "@changesets/cli": "^2.29.5",
97
97
  "@jsse/prettier-config": "^1.0.0",
98
98
  "@jsse/tsconfig": "^0.3.0",
99
99
  "@types/debug": "^4.1.12",
100
100
  "@types/fs-extra": "^11.0.4",
101
- "@types/node": "^22.15.30",
101
+ "@types/node": "^22.17.0",
102
102
  "cac": "^6.7.14",
103
- "eslint": "^9.30.1",
104
- "eslint-flat-config-utils": "^2.1.0",
105
- "eslint-typegen": "^2.2.1",
103
+ "eslint": "^9.32.0",
104
+ "eslint-flat-config-utils": "^2.1.1",
105
+ "eslint-typegen": "^2.3.0",
106
106
  "execa": "~9.6.0",
107
107
  "fast-glob": "^3.3.3",
108
108
  "fs-extra": "^11.3.0",
@@ -110,9 +110,9 @@
110
110
  "local-pkg": "^1.1.1",
111
111
  "picocolors": "^1.1.1",
112
112
  "prettier": "^3.6.2",
113
- "react": "~19.1.0",
113
+ "react": "~19.1.1",
114
114
  "rimraf": "^6.0.1",
115
- "tsdown": "^0.12.9",
115
+ "tsdown": "^0.13.0",
116
116
  "tsx": "^4.20.3",
117
117
  "typescript": "5.8.3",
118
118
  "vitest": "^3.2.4"