Unified · Split
| @@ -7,12 +7,10 @@ module Docs · 6 unmodified lines | |||
| 7 | end | 7 | end |
| 8 | 8 | ||
| 9 | def get_type | 9 | 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 | end | 14 | end |
| 17 | end | 15 | end |
| 18 | end | 16 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Eslint < UrlScraper | 2 | 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] = <<-HTML | 19 | options[:attribution] = <<-HTML |