diff --git a/lib/docs/filters/eslint/entries.rb b/lib/docs/filters/eslint/entries.rb index 18c76dce..f5f0f345 100644 --- a/lib/docs/filters/eslint/entries.rb +++ b/lib/docs/filters/eslint/entries.rb @@ -7,12 +7,10 @@ module Docs end def get_type - if subpath.include?('developer-guide') - 'Developer Guide' - elsif subpath.include?('guide') - 'Guide' - elsif subpath.start_with?('rules') - 'Rules' + if subpath.start_with?('rules') + return 'Rules' + else + at_css('nav.docs-index [aria-current="true"]').ancestors('li')[-1].at_css('a').content end end end diff --git a/lib/docs/scrapers/eslint.rb b/lib/docs/scrapers/eslint.rb index 4a2d7bcb..6d069839 100644 --- a/lib/docs/scrapers/eslint.rb +++ b/lib/docs/scrapers/eslint.rb @@ -2,7 +2,7 @@ module Docs class Eslint < UrlScraper self.name = 'ESLint' self.type = 'simple' - self.release = '8.30.0' + self.release = '8.56.0' self.base_url = 'https://eslint.org/docs/latest/' self.root_path = 'user-guide/getting-started' self.links = { @@ -12,8 +12,8 @@ module Docs html_filters.push 'eslint/entries', 'eslint/clean_html' - options[:skip_patterns] = [/maintainer-guide/] - options[:skip] = %w(about about/ rules versions) + options[:skip_patterns] = [/maintain/, /migrating/, /migrate/, /\Aversions/, /rule-deprecation/] + options[:skip] = %w(about about/ versions) options[:replace_paths] = { 'user-guide' => 'user-guide/' } options[:attribution] = <<-HTML