File tree Expand file tree Collapse file tree 3 files changed +40
-37
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +40
-37
lines changed
Original file line number Diff line number Diff line change 1
1
# erblint-github
2
+
2
3
Template style checking for GitHub's Ruby projects
3
4
4
5
## Setup
@@ -10,49 +11,19 @@ gem "erb_lint", require: false
10
11
gem " erblint-github"
11
12
```
12
13
13
- 2 . Require the linters within the ` .erb-linters ` folder. This could be done by adding a file ` .erb-linters/erblint-github.rb ` with the following line.
14
+ 2 . Require the lint rules from this library. Currently, the only supported way is to add a new file in ` .erb-linters/erblint-github.rb ` with the line:
14
15
15
16
``` ruby
16
17
require " erblint-github/linters"
17
18
```
18
19
19
- 3 . Update the ` erb-lint.yml ` to configure the rule.
20
-
21
- ### .erb-lint.yml
20
+ 3 . Update your ` erb-lint.yml ` to pull in our recommended configs. This will ensure you are up-to-date with our recommendations.
22
21
23
- ``` yaml
22
+ ``` yaml
24
23
---
25
- linters :
26
- GitHub::Accessibility::AriaLabelIsWellFormatted :
27
- enabled : true
28
- GitHub::Accessibility::AvoidBothDisabledAndAriaDisabled :
29
- enabled : true
30
- GitHub::Accessibility::AvoidGenericLinkText :
31
- enabled : true
32
- GitHub::Accessibility::DisabledAttribute :
33
- enabled : true
34
- GitHub::Accessibility::IframeHasTitle :
35
- enabled : true
36
- GitHub::Accessibility::ImageHasAlt :
37
- enabled : true
38
- GitHub::Accessibility::NavigationHasLabel :
39
- enabled : true
40
- GitHub::Accessibility::LinkHasHref :
41
- enabled : true
42
- GitHub::Accessibility::NestedInteractiveElements :
43
- enabled : true
44
- GitHub::Accessibility::NoAriaHiddenOnFocusable :
45
- enabled : true
46
- GitHub::Accessibility::NoAriaLabelMisuse :
47
- enabled : true
48
- GitHub::Accessibility::NoPositiveTabIndex :
49
- enabled : true
50
- GitHub::Accessibility::NoRedundantImageAlt :
51
- enabled : true
52
- GitHub::Accessibility::NoTitleAttribute :
53
- enabled : true
54
- GitHub::Accessibility::SvgHasAccessibleText :
55
- enabled : true
24
+ inherit_gem :
25
+ erblint-github :
26
+ - config/accessibility.yml
56
27
` ` `
57
28
58
29
## Rules
Original file line number Diff line number Diff line change
1
+ ---
2
+ linters :
3
+ GitHub::Accessibility::AriaLabelIsWellFormatted :
4
+ enabled : true
5
+ GitHub::Accessibility::AvoidBothDisabledAndAriaDisabled :
6
+ enabled : true
7
+ GitHub::Accessibility::AvoidGenericLinkText :
8
+ enabled : true
9
+ GitHub::Accessibility::DisabledAttribute :
10
+ enabled : true
11
+ GitHub::Accessibility::IframeHasTitle :
12
+ enabled : true
13
+ GitHub::Accessibility::ImageHasAlt :
14
+ enabled : true
15
+ GitHub::Accessibility::NavigationHasLabel :
16
+ enabled : true
17
+ GitHub::Accessibility::LinkHasHref :
18
+ enabled : true
19
+ GitHub::Accessibility::NestedInteractiveElements :
20
+ enabled : true
21
+ GitHub::Accessibility::NoAriaHiddenOnFocusable :
22
+ enabled : true
23
+ GitHub::Accessibility::NoAriaLabelMisuse :
24
+ enabled : true
25
+ GitHub::Accessibility::NoPositiveTabIndex :
26
+ enabled : true
27
+ GitHub::Accessibility::NoRedundantImageAlt :
28
+ enabled : true
29
+ GitHub::Accessibility::NoTitleAttribute :
30
+ enabled : true
31
+ GitHub::Accessibility::SvgHasAccessibleText :
32
+ enabled : true
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
s . homepage = "https://github.com/github/erblint-github"
9
9
s . license = "MIT"
10
10
11
- s . files = Dir [ "README.md" , "LICENSE" , "lib/**/*" ]
11
+ s . files = Dir [ "README.md" , "LICENSE" , "lib/**/*" , "config/**/*" ]
12
12
s . require_paths = [ "lib" ]
13
13
14
14
s . required_ruby_version = ">= 2.7.0"
You can’t perform that action at this time.
0 commit comments