npx eslint --fix --ext code example Example: npx eslint fix npx eslint 'file or directory you can add --fix flag