eslint.rb 774 B

12345678910111213141516171819202122232425262728
  1. module Docs
  2. class Eslint < UrlScraper
  3. self.name = 'ESLint'
  4. self.type = 'simple'
  5. self.release = '8.3.0'
  6. self.base_url = 'https://eslint.org/docs/'
  7. self.root_path = 'user-guide/getting-started'
  8. self.links = {
  9. home: 'https://eslint.org/',
  10. code: 'https://github.com/eslint/eslint'
  11. }
  12. html_filters.push 'eslint/entries', 'eslint/clean_html'
  13. options[:skip_patterns] = [/maintainer-guide/]
  14. options[:skip] = %w(about about/ rules)
  15. options[:replace_paths] = { 'user-guide' => 'user-guide/' }
  16. options[:attribution] = <<-HTML
  17. &copy; OpenJS Foundation and other contributors<br>
  18. Licensed under the MIT License.
  19. HTML
  20. def get_latest_version(opts)
  21. get_npm_version('eslint', opts)
  22. end
  23. end
  24. end