2016-02-24 10:44:14 +00:00
|
|
|
|
{
|
2021-03-05 16:54:11 +00:00
|
|
|
|
"parser": "@typescript-eslint/parser",
|
|
|
|
|
"plugins": [
|
|
|
|
|
"@typescript-eslint"
|
|
|
|
|
],
|
|
|
|
|
"extends": [
|
|
|
|
|
"wagtail",
|
|
|
|
|
"plugin:@typescript-eslint/recommended"
|
|
|
|
|
],
|
2016-06-17 13:48:33 +00:00
|
|
|
|
|
|
|
|
|
"env": {
|
|
|
|
|
"jest": true
|
2017-02-12 15:29:56 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"settings": {
|
|
|
|
|
"import/resolver": {
|
|
|
|
|
"webpack": {
|
2020-05-28 22:59:37 +00:00
|
|
|
|
"config": "client/webpack.config.js"
|
2017-02-12 15:29:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2019-04-23 14:02:53 +00:00
|
|
|
|
},
|
|
|
|
|
"rules": {
|
2021-03-05 16:54:11 +00:00
|
|
|
|
"no-underscore-dangle": ["error", { "allow": ["__REDUX_DEVTOOLS_EXTENSION__"] }],
|
|
|
|
|
// note you must disable the base rule as it can report incorrect errors
|
|
|
|
|
"no-use-before-define": "off",
|
|
|
|
|
"@typescript-eslint/no-use-before-define": ["error"],
|
|
|
|
|
|
|
|
|
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
|
|
|
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
|
|
|
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
|
|
|
"@typescript-eslint/no-explicit-any": "off"
|
2020-10-20 23:51:09 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"overrides": [
|
|
|
|
|
{
|
2021-03-05 16:54:11 +00:00
|
|
|
|
// Rules we don’t want to enforce for test and tooling code.
|
|
|
|
|
"files": ["*.test.ts", "*.test.tsx", "*.test.js", "webpack.config.js"],
|
|
|
|
|
"rules": {
|
|
|
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
|
|
|
"@typescript-eslint/no-var-requires": "off"
|
|
|
|
|
}
|
2021-09-23 12:39:38 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"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"
|
|
|
|
|
}
|
2020-10-20 23:51:09 +00:00
|
|
|
|
}
|
|
|
|
|
]
|
2016-02-24 10:44:14 +00:00
|
|
|
|
}
|