Untitled
unknown
plain_text
2 years ago
5.2 kB
10
Indexable
/**
* This is a configuration file for ESLint plugin.
*
* There are 3 types of rules applied:
* - Recommended ESLint rules via "eslint:recommended"
* - Sencha`s Ext JS rules via "plugin:@sencha/extjs/recommended"
* - Custom rules via the "rules" object
*
* The custom rules are splited in multiple categories:
* - Possible error
* - Best Practices
* - Variables
* - Stylistic Issues
* - ECMAScript 6
*
* Documentation for configuration and rules can be found here:
* - Configuration : https://eslint.org/docs/user-guide/configuring
* - Rules: https://eslint.org/docs/rules/
**/
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
//"plugin:@sencha/extjs/recommended"
],
// "plugins": [
// "@sencha/extjs"
// ],
"settings": {
"extjs": {
"toolkit": "modern",
"fromVersion": 6,
"toVersion": "latest"
}
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
"App": "readonly",
"Ems": true,
"Ext": true,
"google": "readonly",
"vis": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
// Possible Errors rules
"no-await-in-loop": "error",
"no-dupe-else-if": "error",
"no-prototype-builtins": 0,
"no-setter-return": "error",
"no-template-curly-in-string": "error",
// Best Practices
"array-callback-return": "error",
"block-scoped-var": "error",
"class-methods-use-this": "error",
//"complexity": ["error", 21],
"default-case": "error",
"default-param-last": "error",
"dot-location": ["error", "property"],
"eqeqeq": ["error", "always"],
"grouped-accessor-pairs": ["warn", "getBeforeSet"],
"guard-for-in": "error",
"max-classes-per-file": "error",
"no-alert": "error",
"no-constructor-return": "error",
"no-else-return": "error",
"no-empty-function": [ "error", { "allow": ["arrowFunctions"] } ],
"no-eq-null": "error",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-unused-expressions": "error",
"no-useless-concat": "error",
"no-useless-return": "warn",
"no-void": "error",
"prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }],
"space-before-blocks": "error",
"space-unary-ops": "error",
"require-await": "error",
"wrap-iife": "error",
"yoda": "error",
// Variables
"no-undefined" : "error",
"no-use-before-define": "error",
// Stylistic Issues
"block-spacing": ["error", "always"],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"camelcase": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": "error",
"consistent-this": "error",
"func-call-spacing": ["error", "never"],
"id-length": ["error", { "min": 2, "exceptions": ["i", "j", "a", "b", "e"] }],
"implicit-arrow-linebreak": ["error", "beside"],
"indent": [ "error", 4, { "SwitchCase": 1 } ],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true, "mode": "strict" }],
"keyword-spacing": ["error", { "before": true, "after": true }],
"linebreak-style": [ "error", "unix" ],
"max-depth": ["error", 6],
"max-statements-per-line": "error",
"new-cap": "error",
"new-parens": ["error", "always"],
"no-multi-assign": "error",
"no-multiple-empty-lines": "error",
"no-nested-ternary": "error",
"no-new-object": "error",
"no-unneeded-ternary": "error",
"no-whitespace-before-property": "error",
"quotes": [ "error", "single" ],
"semi": [ "error", "always" ],
"space-infix-ops": "error",
// ECMAScript 6
"arrow-spacing": ["error", { "before": true, "after": true }],
"generator-star-spacing": ["error", "both"],
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-var": "error",
"one-var-declaration-per-line": ["error", "always"],
"prefer-const": "error",
"prefer-template": "error",
// Sencha
//"@sencha/extjs/no-removed-method-call": "error"
}
}
Editor is loading...