π 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
Bot releases are hidden (Show)
Published by coderaiser about 2 years ago
Published by coderaiser about 2 years ago
Published by coderaiser about 2 years ago
Published by coderaiser about 2 years ago
Published by coderaiser about 2 years ago
Published by coderaiser about 2 years ago
pathStore
!Hi folks!
Just landed more stable version of listStore
: pathStore
.
When you want additional check that path
not removed by other plugins.
debugger;
const hello = '';
Let's process it!
module.exports.traverse = ({pathStore}) => ({
'debugger'(path) {
pathStore(path);
path.remove();
},
Program: {
exit() {
console.log(pathStore());
// returns
[];
},
},
});
So use pathStore
when you need to work with path
, and use listStore
for anything else, it will save you from headaches :).
That's all for now! Have a nice day :)!
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
βMan follows Earth, Earth follows Heaven. Heaven follows the Tao. Yet the Tao follows Nature. Tao produced one. One produced two. Two produced Three. Three produced ten thousand beings. Ten thousand beings carry yin and embrace yang; By blending their energies they achieve harmony. Therefore existence and nonexistence produce each other. Difficulty and ease complement each other. Long and short contrast with each other. High and low rely on each other. Sound and voice harmonize with each other. Front and back follow each other. The Tao fulfills its purpose quietly and makes no claim. When success is achieved, withdrawing. The highest good is like water. Water benefits ten thousand beings, Yet it does not contend. Nothing under Heaven is as soft and yielding as water. Yet in attacking the firm and strong, Nothing is better than water.β
(c) I Ching
Hi folks!
The time is come for the new πPutout release. It has a couple breaking changes... to the point!
@putout/eslint
.The time is come to move out all ESLint
related stuff to separate package. So if you used it make changes:
npm i @putout/eslint
-import eslint from 'putout/eslint';
+import eslint from '@putout/eslint';
And use it as before according to ESLint API.
Next two exit codes switched and now has next numbers:
Code | Name | Description | Example |
---|---|---|---|
9 | CANNOT_LOAD_FORMATTER |
formatter has errors | π @putout/formatter-dump: Syntax error |
13 | UNHANDLED |
unhandled exception | <unhandled exception> |
logical-expressions
From now logical-expressions
includes:
remove-boolean-from-logical-expression
convert-bitwise-to-logical
simplify-logical-expressions
remove-duplicates-from-logical-expression
If you disabled for some reason some of this rules what you need to do in your .putout.json
is:
{
"rules": {
- "remove-boolean-from-logical-expressions": "off",
- "convert-bitwise-to-logical": "off",
- "simplify-logical-expressions": "off",
- "remove-duplicates-from-logical-expressions": "off",
+ "logical-expressions/remove-boolean": "off",
+ "logical-expressions/convert-bitwise-to-logical": "off",
+ "logical-expressions/simplify": "off",
+ "logical-expressions/remove-duplicates": "off",
}
}
Now we have 3 dependencies less π₯³!
eslint-plugin-node
eslint-plugin-node
wasn't updated for two years, so it was forked to eslint-plugin-n
which is well supported.
Thanks a lot @aladdin-add for maintaining this fork!
eslint-plugin-putout
now uses eslint-plugin-n
as direct dependency (to have same rules disabled, for markdown files, for example). So to avoid any confusion also πPutout has a major version bump with a new rule in @putout/plugin-eslint
called convert-node-to-n
:
{
"extends": [
"plugin:putout/safe+align",
- "plugin:node/recommended"
+ "plugin:n/recommended"
],
"plugins": [
"putout",
- "node"
+ "n"
]
}
All you need to do is to use nupdate tool:
nupdate putout -c;
nupdate eslint-plugin-putout -c;
nupdate eslint-plugin-n -aDc;
yarn;
putout --fix .
nupdate eslint-plugin-node -r;
git commit -am 'feature: now I have eslint-plugin-n β
'
Also GitHub Actions benefit from this change, since it is already has an auto fix, and if only .eslintrc.json
will be updated everything will broke down π€·ββοΈ.
Have a nice day π!
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago
Published by coderaiser over 2 years ago