I have implemented a new set of ESLint rules to an existing Javasript-React project and need to fix around 7000 lint errors. Is there any solution available to auto fix or autocorrect Linting rules like below
✖ 18:47 A space is required before '}' object-curly-spacing
✖ 19:10 A space is required after '{' object-curly-spacing
✖ 21:14 Missing trailing ma ma-dangle
✖ 129:9 Expected newline before return statement newline-before-return
✖ 133:2 Missing semicolon semi
I have implemented a new set of ESLint rules to an existing Javasript-React project and need to fix around 7000 lint errors. Is there any solution available to auto fix or autocorrect Linting rules like below
✖ 18:47 A space is required before '}' object-curly-spacing
✖ 19:10 A space is required after '{' object-curly-spacing
✖ 21:14 Missing trailing ma ma-dangle
✖ 129:9 Expected newline before return statement newline-before-return
✖ 133:2 Missing semicolon semi
Share
Improve this question
edited Nov 9, 2016 at 1:51
user2864740
62.1k15 gold badges158 silver badges228 bronze badges
asked Nov 9, 2016 at 1:43
mshameermshameer
4,1512 gold badges17 silver badges15 bronze badges
1 Answer
Reset to default 6If you run eslint
with the --fix
flag it will try to fix any linting changes that it can, and let you know which ones it cannot. See the documentation here: http://eslint/blog/2015/09/eslint-v1.5.0-released