From 97134031310932a8199753a58a85205f622c87e8 Mon Sep 17 00:00:00 2001 From: Aaron Ogata Date: Mon, 7 Nov 2022 06:58:52 -0800 Subject: [PATCH] fix eslint slowness refs DE-1446 Change-Id: Id25e72c78703177b2692f62267c8d910b0dfb8d8 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/304798 Reviewed-by: Aaron Shafovaloff QA-Review: Aaron Ogata Product-Review: Aaron Ogata Tested-by: Service Cloud Jenkins --- script/eslint | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/script/eslint b/script/eslint index 9933735ea80..ed5d49b13f4 100755 --- a/script/eslint +++ b/script/eslint @@ -4,12 +4,13 @@ require_relative "./linter" linter_options = { + file_regex: %r{^ui/.*\.(?:js|ts|tsx)$}, linter_name: "eslint", format: "eslint", - command: "node_modules/.bin/eslint ui --quiet --ext '.js,.ts,.tsx'", + command: "node_modules/.bin/eslint", campsite_mode: false, boyscout_mode: false, - append_files_to_command: false, + append_files_to_command: true, severe_anywhere: true } @@ -20,7 +21,7 @@ puts "Linting sub-packages" linter_options[:command] = "yarn lint" linter_options[:base_dir] = "../../" -linter_options[:append_files_to_command] = true +linter_options[:file_regex] = nil linter_options[:severe_anywhere] = false package_dirs = `ls -1 packages/*/package.json 2> /dev/null`.split("\n").map { |d| d.sub("/package.json", "") }