Last active
April 10, 2018 14:17
-
-
Save zacharyabresch/a4ddf4e2d6278f5c273c88d7f8a416b7 to your computer and use it in GitHub Desktop.
`eslint` rules for code quality, CLI style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ln -s ./.gitignore ./.eslintignore && eslint --rule 'array-callback-return: 2' --rule 'complexity: [2, 5]' --rule 'max-statements: [2, 10]' --rule 'max-statements-per-line: [2, {max: 1}]' --rule 'max-nested-callbacks: [2, 2]' --rule 'max-depth: [2, {max: 2}]' --rule 'max-lines: [2, 100]' --rule 'no-return-assign: 2' --rule 'no-param-reassign: 2' --rule 'no-var: 2' --rule 'no-else-return: 2' ./ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some tips:
./
at the end with what ever paths or files you want to run this on (i.e../src ./lib
)eslint
installed globally (yarn global add eslint
ornpm i -g eslint
).gitignore
in your projecteslint
with a config file and, hopefully, extendingeslint:recommended
and/orairbnb