From: Tom Hughes Date: Sat, 6 Apr 2019 16:13:12 +0000 (+0100) Subject: Exclude generated i18n files from eslint checks X-Git-Tag: live~3152 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/9256397e46250352d02d0b7bd814b217b96df45a Exclude generated i18n files from eslint checks --- diff --git a/config/initializers/eslint.rb b/config/initializers/eslint.rb new file mode 100644 index 000000000..9d805eafb --- /dev/null +++ b/config/initializers/eslint.rb @@ -0,0 +1,13 @@ +if defined?(ESLintRails::Runner) + module OpenStreetMap + module ESLintRails + module ExcludeI18n + def assets + super.reject { |a| a.to_s =~ %r{/i18n/} } + end + end + end + end + + ESLintRails::Runner.prepend(OpenStreetMap::ESLintRails::ExcludeI18n) +end