putout

🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter with built-in ESLint and Babel support for js, jsx typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏

MIT License

Downloads
3.6M
Stars
646
Committers
23
putout - putout v18.9.0

Published by coderaiser about 3 years ago

🐞 fix

🔥 feature

  • (putout) bundle @putout/plugin-apply-array-at (https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V16.md#2021-07-29-version-1660-current-bethgriggs)
  • (@putout/plugin-putout) check-replace-code: improve support of ArrowFunctionExpression
  • (package) unist-util-visit v4.0.0
  • (@putout/plugin-putout) check-replace-code: move out generateCode
  • (@putout/plugin-putout) check-replace-code: add varStore
  • (@putout/plugin-apply-try-catch) add
  • (@putout/plugin-putout) check-replace-code: add support of addition semicolon
  • (@putout/plugin-merge-duplicate-imports) add support of ImportDeclaration importKind (#71)
  • (@putout/plugin-remove-unused-variables) add support of TSFunctionType
  • (@putout/plugin-putout) check-replace-code: improve error handling
  • (@putout/compare) @putout/operate v6.4.0: parseName -> extract
  • (@putout/operate) extract: add support of TemplateElement and RegExpLiteral
  • (@putout/plugin-putout) check-replace-code: exclude cases with no path.parentPath
  • (@putout/plugin-remove-duplicate-interface-keys) exclude TSMethodSignature
  • (@putout/plugin-eslint) move putout to end of extends: exclude not ArrayExpression
  • (@putout/plugin-remove-unused-variables) add support of JSXMemberExpression
  • (@putout/plugin-remove-unused-variables) add support of TSTypeAliasDeclaration
  • (@putout/plugin-remove-unused-variables) add support of JSXFragment
  • (@putout/plugin-putout) add check-replace-code
  • (@putout/engine-runner) replace: add validation of linked template values
  • (@putout/operate) replaceWith: add support of nodes with no parentPath
  • (@putout/operate) add extract
  • (@putout/plugin-convert-map-to-for-of) exclude try-catch
  • (@putout/eslint-config) no-else-return: add allowElseIf
putout - putout v18.8.0

Published by coderaiser over 3 years ago

🔥 feature

  • (@putout/plugin-convert-map-to-for-of) add
putout - putout v18.7.0

Published by coderaiser over 3 years ago

🐞 fix

  • (@putout/plugin-remove-empty) rm dead code

🔥 feature

  • (@putout/plugin-apply-early-return) add (not bundled)
  • (@putout/plugin-remove-nested-blocks) add support of variables declared in nested block
  • (@putout/plugin-remove-empty-block) add support of Program
  • (@putout/plugin-remove-useless-map) add
  • (@putout/plugin-jest) add
putout - putout v18.6.0

Published by coderaiser over 3 years ago

putout - putout v18.5.0

Published by coderaiser over 3 years ago

Logo

image

That's right, now Putout has logo :).

🐞 fix

  • (@putout/compare) exclude: range, parent (#67)
  • (@putout/plugin-regexp) remove-useless-group: exlude named capturing groups (#67)

🔥 feature

  • (ruler) exclude rules not related to putout
  • (package) unified v10.0.0
  • (@putout/plugin-simplify-logical-expressions) add support of wrong ternary (eslint/eslint#14802)
  • (putout) add logo
  • (@putout/test) transform, transformWithOptions: add support of UPDATE env variable
  • (eslint-plugin-putout) avoid duplicate parsing (#66)
  • (package) espree v8.0.0
putout - putout v18.4.0

Published by coderaiser over 3 years ago

🐞 fix

🔥 feature

putout - putout v18.3.0

Published by coderaiser over 3 years ago

🔥 feature

putout - putout v18.2.0

Published by coderaiser over 3 years ago

🔥 feature

  • (@putout/plugin-simplify-assignment) add
  • (@putout/plugin-remove-useless-escape) @putout/plugin-madrun v10.2.0
  • (package) mocha v9.0.1
  • (package) eslint-plugin-eslint-plugin v3.2.0
  • (package) @putout/plugin-remove-unused-expressions v4.2.0
  • (package) @babel/eslint-plugin-development v7.14.5
  • (package) mocha v9.0.1
  • (package) @putout/plugin-remove-useless-return v2.0.0
  • (@putout/plugin-remove-useless-return) drop support of node < 14
  • (@putout/plugin-putout) add support of convert-method-to-property
putout - putout v18.1.1

Published by coderaiser over 3 years ago

🔥 feature

  • (package) @putout/plugin-remove-useless-return v2.0.0
  • (@putout/plugin-remove-useless-return) drop support of node < 14
  • (@putout/plugin-putout) add support of convert-method-to-property
  • (@putout/plugin-appy-if-condition) add
putout - putout v18.1.0

Published by coderaiser over 3 years ago

🔥 feature

  • (@putout/plugin-appy-if-condition) add
putout - putout v18.0.2

Published by coderaiser over 3 years ago

🔥 feature

  • (package) @putout/plugin-promises v5.0.0
  • (@putout/plugin-promises) drop support of node < 14
  • (@putout/plugin-promises) add-return-await: merged into add-missing-await
putout - putout v18.0.1

Published by coderaiser over 3 years ago

Typos

Just added new action, source code spell checker typos. Expect to see less of those in future 😅 .

🐞 fix

  • (@putout/plugin-regexp) description: whith -> with
  • (@putout/plugin-gitignore) description: whith -> with
  • (@putout/plugin-npmignore) description: whith -> with
  • (@putout/plugin-github) description: whith -> with
  • (@putout/plugin-travis) description: whith -> with
  • (@putout/plugin-browserilist) description: whith -> with
  • (@putout/engine-processor) call merge once

🔥 feature

  • (@putout/plugin-remove-useless-type-conversion) renamed from @putout/plugin-remove-useless-type-convertion
  • (@putout/processor-yaml) merge: simplify
  • (@putout/processor-json) add toJS/fromJS
  • (package) ts-morph v11.0.0
putout - putout v18.0.0

Published by coderaiser over 3 years ago

New API for Processors

Processors had simple but not intuitive API, for example process(rawSource, {fix}) -> [places, processedSource] took two arguments: rawSource and fix from options. It require implementor to take decision about handling boolean option fix, and added conditions in all Processors. Now it's split into two methods:

  • find - returns places that can be shown by putout
  • fix - returns modified source

Also there is new names for preProcess and postProcess:

  • branch(source) -> list - gets javascript array from source
  • merge(source, list) -> source - join list into source

If you wandering:

🤷‍♂️ Why not split and join?
☝️ split is string method and join is array method, so using them in something other with different set of arguments and doing technically different task - makes code unclear and breaks Principle of least astonishment.

🤷‍♂️ Why it looks like a git commands?
☝️ Yes it looks, and there is an idea behind it. Git commands has same names:

  • branch to list branches;
  • merge to merge one branch into another;

So in a similar manner Processor branch splits source into a list of JavaScript sources, and merge do vice versa: join it back.

🤷‍♂️ How to convert processors I already written for putout < v18 to a new format?
☝️ New rule convert-process-to-find was added in @putout/[email protected]. It will help you to migrate to new API with less possible pain.

🤷‍♂️ How can I test my processors so they was as stable and easily maintainable as putout?
☝️ You can use @putout/test/processor for this purpose, it will help you to write simplest possible tests with help of supertape.

Here is updated working diagram:
image

🐞 fix

  • (@putout/processsor-markdown) rm unused dependencies

🔥 feature

  • (package) @putout/processor-css v3.0.0
  • (package) @putout/processor-json v3.0.0
  • (package) @putout/processor-markdown v5.0.0
  • (package) @putout/processor-javascript v3.0.0
  • (package) @putout/processor-ignore v2.0.0
  • (package) @putout/processor-yaml v2.0.0
  • (package) @putout/engine-processor v4.0.0
  • (@putout/remove-useless-functions) add support of async
  • (@putout/engine-processor) convert process to find
  • (@putout/engine-processor) runProcessors: speed up: 1m13.010s -> 1m11.628s (mac os)
putout - putout v17.5.1

Published by coderaiser over 3 years ago

🐞 fix

  • (putout) bin: useless process.send.bind

🔥 feature

  • (@putout/engine-processor) speed up: unroll loop: 1m32.712s -> 1m20.898s (mac os)
  • (package) @putout/eslint-config v5.0.0
  • (@putout/eslint-config) drop support of node < 14
  • (@putout/eslint-config)
  • (@putout/plugin-simplify-ternary) add support of same assigny and ternary operand
  • (@putout/plugin-remove-unused-expressions) add support of not unary expression
  • (putout) eslint-plugin-putout v8.0.0
  • (eslint-plugin-putout) drop support of putout < 17
  • (eslint-plugin-putout) variable-init-with-object -> object-init
  • (eslint-plugin-putout) variable-init-with-object: add support of AssignmentExpression
putout - putout v17.5.0

Published by coderaiser over 3 years ago

🐞 fix

  • (@putout/plugin-simplify-ternary) || -> &&
  • (@putout/plugin-simplify-ternary) rm broken cases, where condition was removed

🔥 feature

  • (@putout/plugin-remove-useless-return) add
  • (@putout/plugin-putout) add convert-traverse-to-include: apply-as-type-assertions, putout-config
putout - putout v17.4.0

Published by coderaiser over 3 years ago

🔥 feature

  • (@putout/plugin-simplify-logical-expressions) add
  • (@putout/plugin-simplify-ternary) add support of converting ternary into unary
putout - putout v17.3.0

Published by coderaiser over 3 years ago

🐞 fix

  • (@putout/engine-parser) rm useless defaults
  • (@putout/plugin-simplify-ternary) report message

🔥 feature

  • (@putout/plugin-apply-as-type-assertions) add
  • (putout) add ability to disable jsx
  • (@putout/engine-parser) custom-parser: improve support of ambiguity syntax related to jsx and typescript in Putout Editor
  • (@putout/engine-parser) add support of parsing ambiguity syntax that overlap with jsx and typescript
  • (@putout/plugin-remove-duplicate-interface-keys) add support of TSConstructSignatureDeclaration
  • (@putout/plugin-simplify-ternary) add ability to shrink nested ternary
  • (@putout/plugin-simplify-ternary) add support of MemberExpression as test in ConditionalExpression
putout - putout v17.2.0

Published by coderaiser over 3 years ago

🐞 fix

  • (@putout/plugin-remove-useless-template-expressions) exclude inner TemplateLiterals

🔥 feature

  • (@putout/plugin-remove-boolean-from-assertions) add
  • (package) @putout/plugin-remove-boolean-from-logical-expressions v4.0.0
  • (@putout/plugin-remove-boolean-from-logical-expressions) mv assertions to @putout/plugin-remove-boolean-from-assertions
  • (@putout/plugin-remove-boolean-from-logical-expressions) drop support of putout < 17
  • (@putout/plugin-remove-useless-operand) add support of inc and dec
putout - putout v17.1.0

Published by coderaiser over 3 years ago

🐞 fix

  • (@putout/processor-markdown) rm useless remark
  • (remark-putout) visit: destructuring
  • (@putout/processor-markdown) loadDependencies: visit: destructuring
  • (@putout/plugin-extract-object-properties) duplicate declaration after putout/convert-replace-with, remove-unused-variables

🔥 feature

  • (@putout/plugin-remove-useless-operand) add
  • (@putout/plugin-convert-equal-to-ok) add
  • (@putout/plugin) convert-equal-to-not-ok: add support of boolean
  • (remark-putout) move out to https://github.com/putoutjs/remark-putout
  • (remark-putout) convert to ESM
  • (package) unist-util-visit v3.0.1
  • (@putout/plugin-webpack) add convert-node-to-resolve-fallback
putout - putout v17.0.1

Published by coderaiser over 3 years ago

🐞 fix

  • (putout) exports: add package.json to show version in putout editor
  • (@putout/engine-loader) rm unused @babel/preset-env

🔥 feature

  • (@putout/plugin-madrun) add-function: add support of export default
  • (package) husky v6.0.0
Package Rankings
Top 1.65% on Npmjs.org
Badges
Extracted from project README
NPM version Build Status Coverage Status DeepScan putout npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm npm