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 v15.1.0

Published by coderaiser over 3 years ago

fix

  • (@putout/process-html) no content inside script tag

feature

  • (putout) add ability to handle crash of processor
  • (@putout/engine-loader) loadProcessors: add support of passing function, similar to loadPlugins
putout - putout v15.0.2

Published by coderaiser over 3 years ago

fix

  • (putout) parse-options: read rules from dir: never called after reading codemods
putout - putout v15.0.1

Published by coderaiser over 3 years ago

feature

  • feature(putout) parse-options: speed up: 0m37.367s -> 0m36.347s
putout - putout v15.0.0

Published by coderaiser over 3 years ago

feature

  • feature(putout) remove-duplicate-interface-keys: removed from dependency after being disabled for a long time
  • feature(putout) apply-nullish-coalescing: remove from default install after a long time being disabled
  • feature(putout) madrun/convert-nyc-to-c8: enable by default
putout - putout v14.5.0

Published by coderaiser over 3 years ago

fix

  • (help) .putoutcache -> cache

feature

  • (package) @putout/plugin-gitignore v3.0.0
  • (@putout/plugin-gitignore) rm .putoutcache
putout - putout v14.4.0

Published by coderaiser over 3 years ago

feature

  • feature(package) @putout/processor-html v1.0.0
  • feature(@putout/processor-html) add
putout - putout v14.3.0

Published by coderaiser over 3 years ago

fix

  • feature(putout) cli: --## fix speed up: look at cache first, and if there is no places - can read from cache

feature

  • feature(putout) cli: --## fix speed up: look at cache first, and if there is no places - can read from cache
  • feature(putout) cli: cache-files: mv to node_modules/.cache
  • feature(@putout/plugin-declare-undefined-variables) simplify: getAllBindings -> hasBinding
  • feature(@putout/plugin-convert-commonjs-to-esm) require: simplify: getAllBingins -> hasBinding
putout - putout v14.2.1

Published by coderaiser over 3 years ago

fix

  • fix(putout) cli: cache-files: cold cache after first run

feature

putout - putout v14.2.0

Published by coderaiser over 3 years ago

feature

  • feature(package) @putout/plugin-tape v2.0.0
  • feature(@putout/plugin-tape) drop support of node < 14
  • feature(@putout/plugin-tape) add declare-stub
  • feature(package) tenko v2.0.0
putout - putout v14.1.3

Published by coderaiser over 3 years ago

fix

  • (putout) cli: --disable-all: exit before write file
putout - putout v14.1.2

Published by coderaiser over 3 years ago

fix

  • (putout) default option: madrun: disable convert-nyc-to-c8 rule
putout - putout v14.1.1

Published by coderaiser over 3 years ago

fix

  • (@putout/plugin-madrun) npmignore: add coverage

feature

  • (package) @putout/plugin-npmignore v2.0.0
  • (@putout/plugin-npmignore) drop support of node < 14
  • (@putout/plugin-npmignore) add coverage
  • (@putout/plugin-madrun) convert-nyc-to-c8: add report support
  • (putout) madrun: convert-nyc-to-c8: disable
putout - putout v14.1.0

Published by coderaiser over 3 years ago

fix

  • fix(@putout/test) false positive on noReport

feature

  • feature(putout) madrun: convert-nyc-to-c8: disable
  • feature(@putout/plugin-madrun) add convert-nyc-to-c8
  • feature(putout) bin: Commonjs -> ESM: prevent hang on errors
  • feature(@putout/plugin-gitignore) add coverage
  • feature(@putout/engine-loader) loadPlugins: rm useless memo
putout - putout v14.0.4

Published by coderaiser over 3 years ago

fix

  • chore(putout) update codeframe fixtures
  • (@putout/engine-processor) postProcess: rawSource -> processedSource
  • (putout) uncomment v8-compile cache
  • (@putout/traverse) dependencies
  • (eslint-plugin-putout) multiple-properties-destructuring: ImportDeclaration: loc
  • chore(nodejs) lint -> :lint
  • (eslint-plugin-putout) objects-braces-inside-array: multiple objects

feature

  • (eslint-plugin-putout) multiple-properties-destructuring: add support of ImportDeclaration
putout - putout v14.0.3

Published by coderaiser over 3 years ago

fix

  • (putout) prevent unhandled exeptions
  • (@putout/processor-ignore) windows line endings

feature

  • (@putout/plugin-gitignore) add yarn-error.log
putout - putout v14.0.2

Published by coderaiser over 3 years ago

fix

  • (putout) VS Code support (#48)
  • (@putout/plugin-putout) shorten-putout-exports -> shorten-imports

feature

  • (@putout/engine-processor) drop memo: speed up
putout - putout v14.0.1

Published by coderaiser over 3 years ago

fix

  • (putout) cache-files: rm useless logical operation: "" always possitive after condition

feature

  • (package) eslint-plugin-putout v7.0.0
putout - putout v14.0.0

Published by coderaiser over 3 years ago

Putout v14

Hi folks! I want to highlight some news about putout. The time is came for a new major release 🎉 .
Let's talk about changes and abilities you will have with this.

No more apply-shortand-properties in default install

Plugin apply-shorthand-properties has a lot fixes that not everywhere is applicable, for example:

-const socket1 = io.listen(server, {
+const socket = io.listen(server, {
    path: `${prefix1}/socket.io`,
});

const socket2 = io.listen(server, {
    path: `${prefix2}/socket.io`,
});

app.use(prefix1, cloudcmd({
+    socket
-    socket: socket1,
}));

app.use(prefix2, cloudcmd({
    socket: socket2,
}));

Such changes doesn't make code better, it deprives symmetry. Another example:

-const ONE_MINUTE = 60 * 1000;
+const reconnectionDeley = 60 * 1000;

const socket = io.connect(href + prefixSocket + '/config', {
    reconnectionAttempts: Infinity,
-    reconnectionDelay: ONE_MINUTE,
+    reconnectionDelay
    path: prefix + '/socket.io',
});

Which was disabled for a long time in Cloud Commander with help of:

{
    "match": {
        "client/modules/config/index.js": {
             "apply-shorthand-properties": [{
                 "ignore": [
                     "ONE_MINUTE"
                  ]
            }]
    }
}

So apply-shorthand-properties is removed from default installation after been disabled for some time,
Anyways it can be installed with:

npm i @putout/apply-shorthand-properties -D

It will be supported in the future, it's not deprecated, just decrease dependencies count a bit 📦 .

Universal Linter

Did you know that putout has built-int linters for:

  • css
  • markdown
  • json
  • yaml
    ... and more 🔥

You can configure a json linter for code lintings inside markdown file with:

{
    "match": {
        "*.md{json}": {
            "putout-config": "on"
         }
    }
}

Here is how it works.

Putout Usages

I want to mention that putout is used in such projects as:

  • mock-import - similar to mock-require, but for imports. Putout changes real imports to using mocked values.
  • Cloud Commander has User Menus and before running it's converted to CommonJS, and transformed with @putout/plugin-cloudcmd to new APIs so users have ability to avoid modification of their code :).

feature

  • (package) @putout/plugin-putout v6.0.0
  • (@putout/plugin-putout) drop support of putout < 14
  • (babel-plugin-putout) drop support of node < 14
  • (eslint-plugin-putout) drop support of node < 14
  • (putout) plugin-apply-shorthand-properties: remove from default install
  • (@putout/formatter-progress-bar) add ability to hide cursor
  • (@putout/formatter-memory) add ability to hide cursor
  • (putout) putout/lib/cli/process-file -> putout/process-file
putout - putout v13.10.0

Published by coderaiser over 3 years ago

fix

  • (putout) parse-options: recursive read: throw when cannot parse config

feature

  • (putout) process-file: add ability to set match on inner formats
putout - putout v13.9.1

Published by coderaiser over 3 years ago

fix

  • (putout) cli: get-files: windows
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