keepassxc-browser/.eslintrc
2023-04-29 10:45:28 +03:00

174 lines
5.6 KiB
Text

{
"extends": "eslint:recommended",
"ignorePatterns": ["**/*.min.js"],
"env": {
"browser": true,
"es2022": true,
"jquery": true,
"webextensions": true
},
"parserOptions": {
"ecmaVersion": 13
},
"rules": {
"array-bracket-spacing": ["error", "always"],
"arrow-body-style": "warn",
"arrow-parens": "off",
"arrow-spacing": "warn",
"block-scoped-var": "off",
"brace-style": ["warn", "1tbs"],
"camelcase": "warn",
"class-methods-use-this": "off",
"comma-dangle": "off",
"computed-property-spacing": ["error", "never"],
"consistent-return": "off",
"dot-notation": "off",
"eqeqeq": "error",
"func-names": "off",
"function-paren-newline": "off",
"guard-for-in": "off",
"implicit-arrow-linebreak": "off",
"indent": ["error", 4],
"linebreak-style": ["error", "unix"],
"lines-around-comment": "off",
"max-len": "off",
"no-alert": "error",
"no-await-in-loop": "off",
"no-bitwise": "off",
"no-console": "off",
"no-continue": "off",
"no-control-regex": "off",
"no-else-return": "off",
"no-empty-function": ["error", { "allow": ["arrowFunctions", "methods", "asyncMethods"] }],
"no-extend-native": "off",
"no-global-assign": "off",
"no-lonely-if": "off",
"no-loop-func": "off",
"no-mixed-operators": "off",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-multi-spaces": "warn",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-prototype-builtins": "off",
"no-restricted-globals": "off",
"no-restricted-syntax": "off",
"no-return-await": "off",
"no-tabs": "warn",
"no-underscore-dangle": "off",
"no-unused-vars": ["warn", { "args": "none", "varsIgnorePattern": "[A-Z_]+|tr|[$]" }],
"no-use-before-define": "off",
"no-useless-escape": "off",
"no-useless-return": "off",
"no-var": "off",
"object-curly-spacing": ["warn", "always"],
"object-shorthand": "off",
"operator-linebreak": "off",
"prefer-arrow-callback": "off",
"prefer-destructuring": "off",
"prefer-template": "off",
"quote-props": "off",
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"space-before-blocks": "warn",
"space-before-function-paren": "off",
"space-in-parens": ["error", "never"],
"space-unary-ops": "off",
"spaced-comment": "off",
"strict": "off",
"vars-on-top": "off"
},
"globals": {
"_called": true,
"_f": true,
"acceptedOTPFields": true,
"assertInputFields": true,
"assertPasswordChangeFields": true,
"assertRegex": true,
"assertSearchField": true,
"assertSearchForm": true,
"assertTOTPField": true,
"AddCredentials": true,
"AssociatedAction": true,
"Autocomplete": true,
"bootstrap": true,
"browser": true,
"browserAction": true,
"CHECK_UPDATE_NEVER": true,
"CHECK_UPDATE_ONE_MONTH": true,
"CHECK_UPDATE_ONE_WEEK": true,
"CHECK_UPDATE_THREE_DAYS": true,
"createResult": true,
"createStylesheet": true,
"DatabaseState": true,
"debugLogMessage": true,
"EXTENSION_NAME": true,
"getCurrentTab": true,
"getTopLevelDomainFromUrl": true,
"httpAuth": true,
"Icon": true,
"IGNORE_AUTOSUBMIT": true,
"IGNORE_FULL": true,
"IGNORE_NORMAL": true,
"IGNORE_NOTHING": true,
"initColorTheme": true,
"isEdge": true,
"isFirefox": true,
"jQuery": true,
"keepass": true,
"keepassClient": true,
"keepassProtocol": true,
"kpActions": true,
"kpErrors": true,
"kpxc": true,
"kpxcAssert": true,
"kpxcBanner": true,
"kpxcCustomLoginFieldsBanner": true,
"kpxcEvent": true,
"kpxcFields": true,
"kpxcFill": true,
"kpxcForm": true,
"kpxcIcons": true,
"kpxcObserverHelper": true,
"kpxcPasswordDialog": true,
"kpxcPasswordIcons": true,
"kpxcSites": true,
"kpxcTOTPAutocomplete": true,
"kpxcTOTPIcons": true,
"kpxcUI": true,
"kpxcUserAutocomplete": true,
"kpxcUsernameField": true,
"kpxcUsernameIcons": true,
"logDebug": true,
"logError": true,
"ManualFill": true,
"MAX_AUTOCOMPLETE_NAME_LEN": true,
"MAX_OPACITY": true,
"MAX_TOTP_INPUT_LENGTH": true,
"menuContexts": true,
"MIN_INPUT_FIELD_OFFSET_WIDTH": true,
"MIN_INPUT_FIELD_WIDTH_PX": true,
"MIN_OPACITY": true,
"MIN_TOTP_INPUT_LENGTH": true,
"nacl": true,
"page": true,
"protocol": true,
"protocolClient": true,
"Pixels": true,
"PREDEFINED_SITELIST": true,
"resizePopup": true,
"sendMessage": true,
"showNotification": true,
"siteMatch": true,
"slashNeededForUrl": true,
"SORT_BY_GROUP_AND_TITLE": true,
"SORT_BY_GROUP_AND_USERNAME": true,
"SORT_BY_MATCHING_CREDENTIALS_SETTING": true,
"SORT_BY_RELEVANT_ENTRY": true,
"SORT_BY_TITLE": true,
"SORT_BY_USERNAME": true,
"statusResponse": true,
"Tests": true,
"tr": true,
"trimURL": true
}
}