| 12345678910111213141516171819202122232425262728 |
- // NOTICE: This file is generated by Rollup. To modify it,
- // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
- 'use strict';
- const constants = require('../constants.cjs');
- /** @import { FixMode } from 'stylelint' */
- /**
- * Normalize the fix mode based on options and configuration.
- * If the input is unknown, this returns `undefined`.
- *
- * @param {unknown} fix
- * @returns {FixMode | undefined}
- */
- function normalizeFixMode(fix) {
- if (fix === true || fix === 'true' || fix === '' || fix === constants.DEFAULT_FIX_MODE) {
- return constants.DEFAULT_FIX_MODE;
- }
- if (fix === 'strict') {
- return 'strict';
- }
- return undefined;
- }
- module.exports = normalizeFixMode;
|