7 lines
262 B
JavaScript
7 lines
262 B
JavaScript
import { lintWarning } from "./utils";
|
|
const linter = (key, value, info) => {
|
|
if (typeof value === 'string' && /NaN/g.test(value) || Number.isNaN(value)) {
|
|
lintWarning(`Unexpected 'NaN' in property '${key}: ${value}'.`, info);
|
|
}
|
|
};
|
|
export default linter; |