Skip to content

Commit 35794b6

Browse files
committed
Move under config
1 parent 88d250b commit 35794b6

File tree

2 files changed

+39
-36
lines changed

2 files changed

+39
-36
lines changed

README.md

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# erblint-github
2+
23
Template style checking for GitHub's Ruby projects
34

45
## Setup
@@ -10,49 +11,19 @@ gem "erb_lint", require: false
1011
gem "erblint-github"
1112
```
1213

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:
1415

1516
```ruby
1617
require "erblint-github/linters"
1718
```
1819

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.
2221

23-
```yaml
22+
```yaml
2423
---
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
5627
```
5728
5829
## Rules

config/accessibility.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

0 commit comments

Comments
 (0)