immosquare-cleaner 0.1.94 → 0.1.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 138c2d7dec57cde37bc7a5fc4d7ec36d5acd6e1c0bae7d5be7e77fdace661e49
4
- data.tar.gz: 1a8c1a66fb65f8d0b3b82656331fa82c89f35ef1f5ccbf45c835416bea1bf395
3
+ metadata.gz: ef4743e368013a24d51795c0401fb25551318cf708de34ede70da2463732fb14
4
+ data.tar.gz: d071271dcda68ef78e8c042217d39ba13f484b8081e120384c7c01b3c8e0deaa
5
5
  SHA512:
6
- metadata.gz: 0ec73ee167772445be35f9d43c46480671a567a14d837d0fca332fe568fe3bf765fe1d153f6d3b37a7492d00cc4cf6c64419aed910fb8d682c4a59e3faba4dfe
7
- data.tar.gz: 17daa4ee022a36efff68f4288e16792ccaf379fc10e57c44690db76b0cdc1177af8f4c6d8456e9cb99f88a9116c6b018c3e5b8fded84723405d93891b2886064
6
+ metadata.gz: 11cda1db31886b571cf81a294798e080eef10e30870adeb23071d37242415d047e0b7916c3c6af0bca855f116c49808a2bd38aeba1744f7e29bd1fbd768a5385
7
+ data.tar.gz: 2451ad2ef109bf3847a554d7d557bd182e24fae97c7be882e85e8ff1392cffc0a14258f724b2197e386ca6905a51e46c302d2c54d483eea8fc3b5ecd748b5520
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.94".freeze
2
+ VERSION = "0.1.95".freeze
3
3
  end
@@ -168,7 +168,7 @@ module ImmosquareCleaner
168
168
  File.write(temp_file_path, File.read(file_path))
169
169
  cmds = []
170
170
  cmds << "bundle exec erb_lint --config #{erblint_config_with_version_path} #{file_path} #{ImmosquareCleaner.configuration.erblint_options || "--autocorrect"}" if file_path.end_with?(".erb")
171
- cmds << "bun #{gem_root}/linters/normalize-comments.mjs #{temp_file_path}"
171
+ cmds << "bun #{gem_root}/linters/normalize-comments.mjs #{temp_file_path}" if !file_path.end_with?(".erb")
172
172
  cmds << "bun eslint --config #{gem_root}/linters/eslint.config.mjs #{temp_file_path} --fix"
173
173
 
174
174
  launch_cmds(cmds)
@@ -21,8 +21,17 @@ namespace :immosquare_cleaner do
21
21
  ".lock",
22
22
  ".lockb",
23
23
  ".otf",
24
- ".ttf"
24
+ ".ttf",
25
+ ".png",
26
+ ".jpg",
27
+ ".jpeg",
28
+ ".gif",
29
+ ".svg",
30
+ ".ico",
31
+ ".webp",
32
+ ".csv"
25
33
  ]
34
+
26
35
  file_paths = Dir.glob("#{Rails.root}/**/*").reject do |file_path|
27
36
  File.directory?(file_path) || file_path.gsub("#{Rails.root}/", "").start_with?(*paths_to_exclude) || file_path.end_with?(*extensions_to_exclude)
28
37
  end
@@ -87,6 +87,18 @@ const groupConsecutiveComments = (comments, originalLines) => {
87
87
  return
88
88
  }
89
89
 
90
+ //============================================================//
91
+ // Skip Sprockets directives (//= link, //= require, etc.)
92
+ //============================================================//
93
+ if (comment.value.startsWith("=")) {
94
+ if (currentBlock.length > 0) {
95
+ blocks.push(currentBlock)
96
+ currentBlock = []
97
+ }
98
+ lastLine = -2
99
+ return
100
+ }
101
+
90
102
  //============================================================//
91
103
  // Check if this is a standalone comment (line starts with //)
92
104
  // Skip end-of-line comments (e.g., const x = 1 // comment)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.94
4
+ version: 0.1.95
5
5
  platform: ruby
6
6
  authors:
7
7
  - immosquare