unicorn/prefer-media-feature-range-syntax
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/prefer-media-feature-range-syntax": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Moved to eslint-cssicorn as cssicorn/prefer-media-feature-range-syntax.
No code example for this rule
The linters' documentation does not include one we could extract.
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.
unicorn/prefer-media-feature-range-syntax
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/prefer-media-feature-range-syntax": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Prefer RegExp.escape() for escaping strings to use in regular expressions.
Prefer JSON imports over reading and parsing JSON files.
Prefer arrow function properties over methods with a single return.
Prefer Iterator.concat(…) over temporary spread arrays.
Prefer Uint8Array#toBase64() and Uint8Array.fromBase64() over legacy base64 conversions and manual postprocessing.