Revert revert unwanted in dev branch

This reverts commit b05a8f7b54.

The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.
This commit is contained in:
ulferts
2019-09-20 08:34:51 +02:00
parent 1d4ca2d02a
commit c83ba63640
91 changed files with 727 additions and 648 deletions
+19
View File
@@ -1,3 +1,22 @@
# Fail if jasmine specs contain fdescribe or fit
fail("jasmine fdescribe left in tests") if `grep --include '*.spec.ts' -rP 'fdescribe|fit' frontend/src/`.length > 1
# Search for modified components not being made OnPush
git.modified_files
.select { |path| path.include?('frontend') && path.end_with?('.ts') }
.each do |path|
lines = File.readlines(path)
# Ignore non component files
component_line = lines.grep(/@Component/)[0]
next unless component_line
# Check for missing onPush
unless lines.grep(/changeDetection:\s+ChangeDetectionStrategy.OnPush/).length > 0
warn(
"Please use `ChangeDetectionStrategy.OnPush` for this component",
file: path,
line: lines.index(component_line) || 0
)
end
end