Skip to content

Releases: mysticatea/eslint-utils

v3.0.0

14 May 07:27
v3.0.0
c3b1d38
Compare
Choose a tag to compare

💥 Breaking Changes

  • 9a5c4fb, 5361c33 dropped old Node.js support. The new range is ^10.0.0 || ^12.0.0 || >= 14.0.0.
  • 5361c33 added the exports field to package.json. Now direct accesses to internal files are disallowed.
  • c5574ce, 46771e1 changed the result of getFunctionNameWithKind(node) function in some cases.
    • Functions at method places prefer the method name than function's id. E.g., { foo: function bar() {} } is method 'foo'.
    • Arrow functions at method places are now methods. E.g., { foo: () => {} } is method 'foo'.
    • Function expressions at variable initializers or the RHS of assignments are named. E.g. foo = function() {} is function 'foo'.

✨ Enhancements

  • 05b8390 supports the new class features of ES2022: public class fields, private class members, and static of them.
  • 46771e1 added the optional second parameter to getFunctionNameWithKind(node). If you give context.getSourceCode() to that, the getFunctionNameWithKind(node, sourceCode) function handles the name of computed properties. E.g., { [foo]() {} } is method [foo].

🐛 Bug fixes

  • 994ee18 fixed misleading result from getStaticValue() on expressions that re-use Symbol()s (#12)
  • b8820bc fixed isParenthesized() on CatchClause.param should be false (#15)

v2.1.0

15 Jun 12:23
v2.1.0
23709f8
Compare
Choose a tag to compare

✨ Enhancements

  • f811251 improved the getFunctionNameWithKind() function to get better names of arrow functions.
  • 9b2885a added Optional chaining & Nullish coalescing support to some functions.

v2.0.0

26 Dec 09:05
v2.0.0
fd094d7
Compare
Choose a tag to compare

💥 Breaking Changes

  • d2c2c18 updated ReferenceTracker#iterateGlobalReferences() method to recognize the member of globalThis by default.

v1.4.3

26 Dec 08:57
v1.4.3
23f4ddc
Compare
Choose a tag to compare

🐛 Bug fixes

  • 8f9e481 fixed false positive of ReferenceTracker.

v1.4.2

26 Dec 08:56
4e1bc07
Compare
Choose a tag to compare

🐛 Bug fixes

  • e4cb014 fixed a regression of the previous release.

v1.4.1

26 Dec 08:55
230a4e2
Compare
Choose a tag to compare

🐛 Bug fixes

  • c119e83 fixed getStaticValue() function to handle null literal correctly even if runtimes don't support BigInt natively.
  • 587cca2 fixed getStringIfConstant() function to handle regular expression literals and BigInt literals even if runtimes don't support those.
  • 08158db fixed GHSA-3gx7-xhv7-5mx3.

v1.4.0

26 Dec 08:50
v1.4.0
531b16f
Compare
Choose a tag to compare

✨ Enhancements

  • 66456c5 (and ebf5a83, aac472e) added isParenthesized() function that checks if a given node is parenthesized or not.
  • 4f8407d (and cb518c7) added hasSideEffect() function that checks if a given node may have side-effects or not.

v1.3.1

28 Jun 10:02
6123e16
Compare
Choose a tag to compare

Bug fixes

  • 9c8e1bd fixed the problem that ReferenceTracker#iterateGlobalReferences iterates modified globals.

v1.3.0

27 May 08:46
v1.3.0
2fc445d
Compare
Choose a tag to compare

Enhancements

  • It added new PatternMatcher class which finds a regular expression pattern in given strings, with handling escape sequences. It will ignore the found pattern if it's escaped by \.

v1.2.0

08 May 13:45
v1.2.0
6965b2e
Compare
Choose a tag to compare

It added new getStaticValue function 🎉

The getStaticValue evaluates AST node statically then get the static value.
For a complex example, this function can evaluate the following case on AST:

const eventName = "click"
const aMap = Object.freeze({
    click: 777
})

;`on${eventName} : ${aMap[eventName]}` // evaluated to "onclick : 777"

Enhancements

  • 904e48f added the 2nd parameter to getPropertyName function.
  • 32fd9fa added the new getStaticValue function.