Skip to content

putout v24.6.0

Choose a tag to compare

@coderaiser coderaiser released this 07 Feb 11:22
· 12073 commits to master since this release

Decreased dependencies count

image

These three attributes, Sat, Chit, and Ananda
(Existence, Consciousness, and Bliss),
Do not actually define Brahman.
A poison is poison to others,
But not to itself.

Shininess, hardness, and yellowness,
Together signify gold.
Stickiness, sweetness, and viscosity,
Together signify honey.

(c) Jnaneshwara "Amṛit’ānubhava"
(c) Cipactli

Hi folks!
Today we talk about changes that will make installing 🐊Putout faster.

Merged rules into promises

@putout/plugin-promises merged rules:

  • apply-top-level-await
  • remove-useless-async
  • remove-useless-await

Merged rules into remove-empty

@putout/plugin-remove-empty merged remove-empty-pattern.

New rule destruct in remove-useless-variables

remove-useless-variables can do a lit bit more 😏.

-function hello(args) {
-    const {a, b} = args;
-}
+function hello({a, b}) {
+}

Take a look at draft if you want to see how it works.

remove-unused-variables got more powerful

Now it supports ClassProperties (#96), and code:

import thing from ./thing.js’;
const pi = Math.PI;

export default class {
    static t = thing;
    static mathPi = pi;
    t = thing;
}

will be linted with no false positives:

 1:7  error   "thing" is defined but never used  remove-unused-variables 
 3:6  error   "pi" is defined but never used     remove-unused-variables */

Thanks for reporting to @adamdicarlo!

Good first issue

If you want help, and don't know how, take a look at good first issue label :).

That's all for today, cheers 🎈!

🐞 fix

  • (eslint-plugin-putout) remove parent: after parse -> before print
  • (eslint-plugin-putout) npmignore: add lib/**/*.md
  • chore(madrun) add fresh:fix

🔥 feature

  • (package) @putout/plugin-remove-empty v7.0.0
  • (package) @putout/plugin-promises v7.0.0
  • (@putout/plugin-remove-empty) drop support of 🐊Putout < 24
  • (@putout/plugin-remove-empty) merge remove-empty-pattern
  • (@putout/plugin-promises) merge remove-useless-await
  • (@putout/plugin-promises) merged remove-useless-async
  • (@putout/plugin-promises) drop support of 🐊Putout < 24
  • (@putout/plugin-promises) merged apply-top-level-await
  • (@putout/plugin-remove-useless-variables) destruct: add support of AssignmentPattern
  • (@putout/plugin-remove-useless-variables) destr: add support of RestElement
  • (eslint-plugin-putout) function-declaration-parent-newline: improve support of destructuring
  • (@putout/engine-parser) add support of wasm-based hermes-parser (5 times slower then babel 🤔)
  • (@putout/plugin-remove-unused-variables) add support of ClassProperty (#96)
  • (@putout/plugin-apply-try-catch) await: add support of async
  • (@putout/plugin-putout) check-replace-code: exclude plugins containing match
  • (@putout/plugin-apply-try-catch) add await
  • (eslint-plugin-putout) function-declaration-paren-newline: add FunctionExpression support
  • (@putout/plugin-remove-useless-variables) add destruct
  • (eslint-plugin-putout) safe: disable remove-useless-spread
  • (@putout/eslint-config) operator-linebreak: add ":", "?"
  • (@putout/eslint-config) operand-linebreak: |, || - before, others - after