
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
eslint-plugin-putout
Advanced tools
ESLint plugin for πPutout with built-in rules from @putout/eslint-config.
npm i putout eslint eslint-plugin-putout -D
βοΈIf you installed eslint
globally (using the -g
flag) then you must also install putout
and eslint-plugin-putout
globally.
To use putout
as ESLint plugin you can use in eslint.config.js
import putout from 'eslint-plugin-putout';
export default [
rules: {
'putout/putout': 'error',
},
plugins: {
putout,
},
];
Also you can import one of predefined preset:
Here is how it can look like:
import {recommended} from 'eslint-plugin-putout';
export default recommended;
Or with defineConfig
:
import {defineConfig} from 'eslint/config';
import putout from 'eslint-plugin-putout';
export default defineConfig({
plugins: {
putout,
},
extends: [
"putout/recommended",
]
});
Then configure the rules you want to use under the rules section.
{
"rules": {
"putout/add-newlines-between-types-in-union": "error",
"putout/add-newlines-between-specifiers": "error",
"putout/add-newline-before-return": "error",
"putout/add-newline-before-function-call": "error",
"putout/add-newline-after-function-call": "error",
"putout/putout": "error",
"putout/array-element-newline": "error",
"putout/single-property-destructuring": "error",
"putout/multiple-properties-destructuring": "error",
"putout/long-properties-destructuring": "error",
"putout/destructuring-as-function-argument": "error",
"putout/align-spaces": "error",
"putout/keyword-spacing": "error",
"putout/newline-function-call-arguments": "error",
"putout/function-declaration-paren-newline": "error",
"putout/remove-newline-after-default-import": "error",
"putout/remove-newline-between-declarations": "error",
"putout/remove-newline-from-empty-object": "error",
"putout/remove-empty-newline-before-first-specifier": "error",
"putout/remove-empty-newline-after-last-specifier": "error",
"putout/remove-empty-newline-after-last-element": "error",
"putout/remove-empty-newline-after-import": "error",
"putout/remove-empty-specifiers": "error",
"putout/objects-braces-inside-array": "error",
"putout/object-property-newline": "error",
"putout/tape-add-newline-between-tests": "error",
"putout/tape-add-newline-before-assertion": "error",
"putout/tape-remove-newline-before-t-end": "error"
}
}
When using πPutout in IDE with --fix
on save, or when you want to disable the most dangerous rules, use:
import {safe} from 'eslint-plugin-putout';
export default safe;
Disabled ESLint rules:
Disabled πPutout rules:
apply-template-literals
;remove-empty
;merge-duplicate-functions
;nodejs/remove-process-exit
;remove-unused-variables
;typescript/remove-unused-types
;remove-unused-expressions
;remove-unreferenced-variables
;remove-useless-arguments
;return/remove-useless
;remove-useless-spread
;remove-useless-variables
;tape/remove-skip
;tape/remove-only
;remove-console
;remove-debugger
;remove-unreachable-code
;for-of/for
;for-of/remove-useless
;for-of/remove-unused-variables
;maybe/noop
;remove-useless-push
;When you want to enable ability to align spaces on empty lines, while have all benefits of safe
preset: use safeAlign
.
When you need to support jsx
in files using js
extension, use:
import {jsx} from 'eslint-plugin-putout;
export default jsx;
If you want to use ESM plugins of πPutout you need to use esm
preset:
import {esm} from 'eslint-plugin-putout;
export default esm;
MIT
FAQs
ESLint plugin for πPutout
The npm package eslint-plugin-putout receives a total of 4,765 weekly downloads. As such, eslint-plugin-putout popularity was classified as popular.
We found that eslint-plugin-putout demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.