DEV: Run prettier on staged files before commit using lefthook (#9064)

* DEV: Run prettier on staged files before commit using lefthook

* excluded some js files
This commit is contained in:
Mark VanLandingham 2020-03-02 13:30:23 -06:00 committed by GitHub
parent c62d5b139b
commit c11e5eb042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,10 @@ pre-commit:
rubocop: rubocop:
glob: "*.rb" glob: "*.rb"
run: bundle exec rubocop {staged_files} run: bundle exec rubocop {staged_files}
prettier:
glob: "*.{js,es6}"
exclude: "vendor/*|fixtures|public/javascripts|shims.js|ember-addons|template-lintrc|locale/*|test_helper|run-qunit"
run: yarn prettier --list-different {staged_files}
eslint: eslint:
glob: "*.{js,es6}" glob: "*.{js,es6}"
exclude: "vendor/*|fixtures|public/javascripts|shims.js|ember-addons|template-lintrc|locale/*|test_helper|run-qunit" exclude: "vendor/*|fixtures|public/javascripts|shims.js|ember-addons|template-lintrc|locale/*|test_helper|run-qunit"