linting setting.js again and abstracting out saveField