kopia lustrzana https://github.com/wagtail/wagtail
update eslint config & add fix script to package.json
rodzic
f8d76b4bd1
commit
5e321ac065
|
@ -6,6 +6,7 @@ coverage/
|
|||
gulp/
|
||||
**/vendor/
|
||||
gulpfile.js
|
||||
docs/_build
|
||||
wagtail/admin/static
|
||||
wagtail/documents/static
|
||||
wagtail/images/static
|
||||
|
@ -13,6 +14,7 @@ wagtail/embeds/static
|
|||
wagtail/search/static
|
||||
wagtail/snippets/static
|
||||
wagtail/users/static
|
||||
wagtail/contrib/*/static
|
||||
wagtail/admin/templates/wagtailadmin/edit_handlers/inline_panel.js
|
||||
wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotions_formset.js
|
||||
wagtail/users/templates/wagtailusers/groups/includes/page_permissions_formset.js
|
||||
|
|
52
.eslintrc
52
.eslintrc
|
@ -39,6 +39,58 @@
|
|||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-var-requires": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["docs/_static/**"],
|
||||
"globals": { "$": "readonly" }
|
||||
},
|
||||
{
|
||||
"globals": {
|
||||
"$": "readonly",
|
||||
"addMessage": "readonly",
|
||||
"buildExpandingFormset": "readonly",
|
||||
"cancelSpinner": "readonly",
|
||||
"escapeHtml": "readonly",
|
||||
"insertRichTextDeleteControl": "readonly",
|
||||
"jQuery": "readonly",
|
||||
"jsonData": "readonly",
|
||||
"ModalWorkflow": "readonly",
|
||||
"DOCUMENT_CHOOSER_MODAL_ONLOAD_HANDLERS": "writable",
|
||||
"EMBED_CHOOSER_MODAL_ONLOAD_HANDLERS": "writable",
|
||||
"IMAGE_CHOOSER_MODAL_ONLOAD_HANDLERS": "writable",
|
||||
"QUERY_CHOOSER_MODAL_ONLOAD_HANDLERS": "writable",
|
||||
"SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS": "writable"
|
||||
},
|
||||
"files": ["wagtail/**/**"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"camelcase": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"__unused_webpack_module",
|
||||
"__webpack_modules__",
|
||||
"__webpack_require__"
|
||||
],
|
||||
"properties": "never"
|
||||
}
|
||||
],
|
||||
"consistent-return": "off",
|
||||
"func-names": "off",
|
||||
"id-length": "off",
|
||||
"indent": "off",
|
||||
"key-spacing": "off",
|
||||
"new-cap": "off",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-param-reassign": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"object-shorthand": "off",
|
||||
"prefer-arrow-callback": "off",
|
||||
"quote-props": "off",
|
||||
"space-before-function-paren": "off",
|
||||
"vars-on-top": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -130,7 +130,8 @@
|
|||
"gulp:prod:build": "gulp build",
|
||||
"webpack:dev:watch": "webpack --config ./client/webpack.config.js --mode development --progress --watch",
|
||||
"webpack:prod:build": "webpack --config ./client/webpack.config.js --mode production",
|
||||
"lint:js": "eslint --report-unused-disable-directives --max-warnings 16 ./client",
|
||||
"fix:js": "eslint --fix ./",
|
||||
"lint:js": "eslint --report-unused-disable-directives ./",
|
||||
"lint:css": "stylelint **/*.scss",
|
||||
"lint": "npm run lint:js && npm run lint:css",
|
||||
"test": "npm run test:unit",
|
||||
|
|
Ładowanie…
Reference in New Issue