style: Fix linting errors

This commit is contained in:
Faris Ansari 2020-04-25 00:15:31 +05:30
parent aeabcfdb02
commit ebf0e04e5e
5 changed files with 8 additions and 10 deletions

View file

@ -18,7 +18,6 @@ from frappe.website.router import resolve_route
from frappe.website.utils import (extract_title, find_first_image, get_comment_list,
get_html_content_based_on_type)
from frappe.website.website_generator import WebsiteGenerator
from frappe.website.doctype.web_template.web_template import get_rendered_template
class WebPage(WebsiteGenerator):

View file

@ -33,11 +33,8 @@ class TestWebTemplate(unittest.TestCase):
self.assertTrue("/test" == button.attrs["href"])
def test_web_page_with_page_builder(self):
if frappe.db.exists("Web Page", "test-page"):
frappe.delete_doc("Web Page", "test-page")
if not frappe.db.exists("Web Page", "test-page"):
webpage = frappe.get_doc(
frappe.get_doc(
{
"doctype": "Web Page",
"title": "test-page",
@ -90,6 +87,8 @@ class TestWebTemplate(unittest.TestCase):
self.assertEqual(sections[0].find("p").text, "test lorem ipsum")
self.assertEqual(len(sections[1].find_all("a")), 3)
frappe.db.delete_doc("Web Page", "test-page")
def test_tailwind_styles_in_developer_mode(self):
self.create_tailwind_theme()

View file

@ -3,7 +3,7 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
# import frappe
from frappe.model.document import Document
class WebTemplateField(Document):

View file

@ -15,9 +15,9 @@ new PurgeCSS()
extension: 'html'
}
],
css: css_file_paths,
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
css: css_file_paths,
defaultExtractor: content => content.match(/[\w-/:]+(?<!:)/g) || []
})
.then(result => {
console.log(result[0].css);
console.log(result[0].css); // eslint-disable-line
});

View file

@ -147,7 +147,7 @@ function get_rollup_options_for_css(output_file, input_files) {
inputOptions: {
input: input_files,
plugins: plugins,
onwarn(warning, warn) {
onwarn(warning) {
// skip warnings
if (['EMPTY_BUNDLE'].includes(warning.code)) return;