slim_lint 0.27.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/default.yml +4 -0
- data/lib/slim_lint/linter/tag.rb +19 -0
- data/lib/slim_lint/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7be0fb0eb28f9ecd303cae98461185de3e6778c8ac50230adf67cb5b741d432
|
4
|
+
data.tar.gz: 584e97fc7dd83fa5e71aeec357e365cc5c5fd23f16d2504a7e7b62fbacb64b0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7922b5927ef482197e73669568b8dbe3c676a590f98164a52a085b5312853be43439a3fe36641301c68e5621ea6f40cefb566c523b9d6327a349a5fd5989e9cb
|
7
|
+
data.tar.gz: 110fb1466b24a89d8e2868afbb8e1bb1540a575bd406a075a63a29f8d5aae28f06ec1e62512d3cb0ccd252f2e04cbabc97a8793ea9cd7ee917bb2673f4ab704a
|
data/config/default.yml
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SlimLint
|
4
|
+
# Checks for forbidden tags.
|
5
|
+
class Linter::Tag < Linter
|
6
|
+
include LinterRegistry
|
7
|
+
|
8
|
+
on [:html, :tag] do |sexp|
|
9
|
+
_, _, name = sexp
|
10
|
+
|
11
|
+
forbidden_tags = config['forbidden_tags']
|
12
|
+
forbidden_tags.each do |forbidden_tag|
|
13
|
+
next unless name[/^#{forbidden_tag}$/i]
|
14
|
+
|
15
|
+
report_lint(sexp, "Forbidden tag `#{name}` found")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/slim_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/slim_lint/linter/rubocop.rb
|
121
121
|
- lib/slim_lint/linter/strict_locals_missing.rb
|
122
122
|
- lib/slim_lint/linter/tab.rb
|
123
|
+
- lib/slim_lint/linter/tag.rb
|
123
124
|
- lib/slim_lint/linter/tag_case.rb
|
124
125
|
- lib/slim_lint/linter/trailing_blank_lines.rb
|
125
126
|
- lib/slim_lint/linter/trailing_whitespace.rb
|
@@ -151,7 +152,7 @@ homepage: https://github.com/sds/slim-lint
|
|
151
152
|
licenses:
|
152
153
|
- MIT
|
153
154
|
metadata: {}
|
154
|
-
post_install_message:
|
155
|
+
post_install_message:
|
155
156
|
rdoc_options: []
|
156
157
|
require_paths:
|
157
158
|
- lib
|
@@ -166,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
167
|
- !ruby/object:Gem::Version
|
167
168
|
version: '0'
|
168
169
|
requirements: []
|
169
|
-
rubygems_version: 3.
|
170
|
-
signing_key:
|
170
|
+
rubygems_version: 3.5.9
|
171
|
+
signing_key:
|
171
172
|
specification_version: 4
|
172
173
|
summary: Slim template linting tool
|
173
174
|
test_files: []
|