linting and formatting for sort()