no-sync
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"no-sync": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
fs.existsSync(somePath);
function foo() {
var contents = fs.readFileSync(somePath).toString();
}function foo() {
var contents = fs.readFileSync(somePath).toString();
}
var bar = baz => fs.readFileSync(qux);obj.sync();
async(function() {
// ...
});fs.readFileSync(somePath).toString();Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
no-sync
eslint
export default [
{
rules: {
"no-sync": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.