{ "overrides": [ { "excludedFiles": [ "src/sap/ui/model/base/**/*.js", "src/sap/ui/model/odata/v4/**/*.js" ], "files": [ "src/sap/ui/model/**/*.js" ], "rules": { "max-len": ["error", {"code": 120, "ignoreUrls": true}] } }, { "files": [ "src/sap/ui/model/odata/v4/**/*.js", "test/sap/ui/core/qunit/odata/v4/**/*.js", "test/sap/ui/core/demokit/sample/common/**/*.js", "test/sap/ui/core/demokit/sample/odata/v4/**/*.js", "test/sap/ui/core/demokit/sample/ViewTemplate/types/**/*.js", "test/sap/ui/core/demokit/tutorial/odatav4/**/*.js" ], "rules": { "consistent-return": "off", // override "warn" "max-len": ["error", { "code": 100, "ignorePattern": "@param|@returns|<", "ignoreUrls": true }], "no-inner-declarations": ["error", "both"], "no-mixed-spaces-and-tabs": "error", // override "smart-tabs" "no-unused-vars": ["error", {"argsIgnorePattern": "^_", "args": "all"}], // stylistic (JIRA: CPOUI5ODATAV4-1325) // {"multiline": true} doesn't match our style "array-bracket-newline": ["error", "consistent"], "array-bracket-spacing": "error", "block-spacing": "error", "comma-spacing": "error", "comma-style": ["error", "last"], "computed-property-spacing": "error", "eol-last": "error", "implicit-arrow-linebreak": "error", // let's see... "jsx-quotes": "error", // let's see... "key-spacing": ["error", {"beforeColon": true}], "lines-between-class-members": "error", "no-else-return" : "error", "no-lonely-if": "error", // override "warn" "no-multiple-empty-lines": ["error", {"max": 1}], "no-multi-spaces": "error", "no-tabs": ["error", {"allowIndentationTabs": true}], "no-unneeded-ternary": ["error", {"defaultAssignment": false}], "no-whitespace-before-property": "error", "nonblock-statement-body-position": "error", // @see "curly": ["error", "all"] // "multiline" doesn't match our style "object-curly-newline": ["error", {"consistent": true}], "object-curly-spacing": "error", "one-var": ["error", {"const" : "never", "let": "never", "var": "always"}], "one-var-declaration-per-line": ["error", "initializations"], "operator-assignment": "error", "operator-linebreak": ["error", "before"], "padded-blocks": ["error", "never"], "padding-line-between-statements": ["error", {"blankLine": "always", "prev": "var", "next": "*"} // {"blankLine": "always", "prev": "*", "next": "return"} // still in discussion ], "quote-props": ["error", "as-needed", {"numbers": true}], "quotes": ["error", "double", {"avoidEscape": true}], "space-before-blocks": "error", "space-before-function-paren": ["error", {"named": "never"}], "space-in-parens": "error", "switch-colon-spacing": "error" // "array-element-newline": "off", // "consistent" doesn't match our style // "capitalized-comments": "off", // cannot treat line & block comments differently // "function-call-argument-newline": "off", // "consistent" doesn't match our style // "function-paren-newline": "off", // "consistent" doesn't match our style // "multiline-comment-style": "off", // we use both, line & block comments... // "multiline-ternary": "off", // "always-multiline" doesn't match our style // "newline-per-chained-call": "off", // doesn't match our style // "prefer-exponentiation-operator": "off", // requires ES2016 // "prefer-object-spread": "off", // requires ES2018 // "sort-vars": "off", // cannot deal with Hungarian prefix :-( // "wrap-regex": "off", // not useful } }, { "files": [ "src/sap/ui/model/odata/v4/**/*.js" ], "rules": { "max-statements-per-line": "error" } }, { "files": [ "test/sap/ui/core/qunit/odata/v4/**/*.js", "test/sap/ui/core/demokit/sample/common/**/*.js", "test/sap/ui/core/demokit/sample/odata/v4/**/*.js", "test/sap/ui/core/demokit/sample/ViewTemplate/types/**/*.js", "test/sap/ui/core/demokit/tutorial/odatav4/??/webapp/test/**/*.js" ], "globals": { "QUnit": "readonly", "sap": "readonly", "sinon": "readonly" }, "rules": { "camelcase" : "off", "max-nested-callbacks": "off", "no-warning-comments": "off" } }, { "files": [ "test/sap/ui/core/demokit/sample/odata/v4/**/Opa*.qunit.js", "test/sap/ui/core/demokit/sample/ViewTemplate/types/Opa.qunit.js" ], "rules": { // Opa does not work without these imports "no-unused-vars": ["error", {"argsIgnorePattern": "Any|Main", "args": "all"}] } }, { "files": [ "test/sap/ui/core/demokit/sample/odata/v4/**/SandboxModel.js" ], "rules": { "max-len": "off" } }, { "files": [ "test/sap/ui/core/demokit/tutorial/odatav4/**" ], "rules": { "no-inner-declarations": ["error", "functions"] } } ] }