slim_lint 0.28.0 → 0.29.0
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 +4 -4
- data/config/default.yml +4 -0
- data/lib/slim_lint/linter/tag_attribute.rb +19 -0
- data/lib/slim_lint/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51dd9d9778d4a2208bd188fce5919413f5ff3e3aff6deb275bd58e2a783d1fb5
|
4
|
+
data.tar.gz: dafc47104aaa6aed6cf62a02f0a21eefffd28ead98c6befaa3118ed9b1dd37d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dfc4baf530ee352ef807a44d26b2864813f568ac407044cccdca3dc6f58bca4964f08442b757a2706a6e268b22b19b1c5b8011bbf71acd0fdb6c9a373711c20
|
7
|
+
data.tar.gz: f63580ff81d91620ee62cbf8f3ce1c0a6a792aa802e3f47ab481f08efa5ac9973bcc0b1ca5411b358776bf49107934fcbb75a6006da0a15db1f6aed98ce40ef1
|
data/config/default.yml
CHANGED
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SlimLint
|
4
|
+
# Checks for forbidden tag attributes.
|
5
|
+
class Linter::TagAttribute < Linter
|
6
|
+
include LinterRegistry
|
7
|
+
|
8
|
+
on [:html, :attr] do |sexp|
|
9
|
+
_, _, name = sexp
|
10
|
+
|
11
|
+
forbidden_attributes = config['forbidden_attributes']
|
12
|
+
forbidden_attributes.each do |forbidden_attribute|
|
13
|
+
next unless name[/^#{forbidden_attribute}$/i]
|
14
|
+
|
15
|
+
report_lint(sexp, "Forbidden tag attribute `#{name}` found")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/slim_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08
|
11
|
+
date: 2024-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rexml
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rubocop
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -121,6 +135,7 @@ files:
|
|
121
135
|
- lib/slim_lint/linter/strict_locals_missing.rb
|
122
136
|
- lib/slim_lint/linter/tab.rb
|
123
137
|
- lib/slim_lint/linter/tag.rb
|
138
|
+
- lib/slim_lint/linter/tag_attribute.rb
|
124
139
|
- lib/slim_lint/linter/tag_case.rb
|
125
140
|
- lib/slim_lint/linter/trailing_blank_lines.rb
|
126
141
|
- lib/slim_lint/linter/trailing_whitespace.rb
|