History

Update ESLint documentation (8.56.0)

Simon Legner committed 2 years ago

Commit 2e356331 parent 7f27b8d2 files · +7 −9Browse files

Unified · Split

2 files
  1. lib/docs/filters/eslint/entries.rb +4 −6
  2. lib/docs/scrapers/eslint.rb +3 −3
lib/docs/filters/eslint/entries.rb+4−6
@@ -7,12 +7,10 @@ module Docs · 6 unmodified lines
7 end7 end
8 8
9 def get_type9 def get_type
10 if subpath.include?('developer-guide')10 if subpath.start_with?('rules')
11 'Developer Guide'11 return 'Rules'
12 elsif subpath.include?('guide')12 else
13 'Guide'13 at_css('nav.docs-index [aria-current="true"]').ancestors('li')[-1].at_css('a').content
14 elsif subpath.start_with?('rules')
15 'Rules'
16 end14 end
17 end15 end
18 end16 end
lib/docs/scrapers/eslint.rb+3−3
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
2 class Eslint < UrlScraper2 class Eslint < UrlScraper
3 self.name = 'ESLint'3 self.name = 'ESLint'
4 self.type = 'simple'4 self.type = 'simple'
5 self.release = '8.30.0'5 self.release = '8.56.0'
6 self.base_url = 'https://eslint.org/docs/latest/'6 self.base_url = 'https://eslint.org/docs/latest/'
7 self.root_path = 'user-guide/getting-started'7 self.root_path = 'user-guide/getting-started'
8 self.links = {8 self.links = {
@@ -12,8 +12,8 @@ module Docs · 3 unmodified lines
12 12
13 html_filters.push 'eslint/entries', 'eslint/clean_html'13 html_filters.push 'eslint/entries', 'eslint/clean_html'
14 14
15 options[:skip_patterns] = [/maintainer-guide/]15 options[:skip_patterns] = [/maintain/, /migrating/, /migrate/, /\Aversions/, /rule-deprecation/]
16 options[:skip] = %w(about about/ rules versions)16 options[:skip] = %w(about about/ versions)
17 options[:replace_paths] = { 'user-guide' => 'user-guide/' }17 options[:replace_paths] = { 'user-guide' => 'user-guide/' }
18 18
19 options[:attribution] = <<-HTML19 options[:attribution] = <<-HTML