|
| 1 | +module.exports = { |
| 2 | + plugins: [ |
| 3 | + "@typescript-eslint", |
| 4 | + "header" |
| 5 | + ], |
| 6 | + extends: [ |
| 7 | + "./node_modules/gts", |
| 8 | + ], |
| 9 | + parser: "@typescript-eslint/parser", |
| 10 | + parserOptions: { |
| 11 | + "project": "./tsconfig.json" |
| 12 | + }, |
| 13 | + rules: { |
| 14 | + "@typescript-eslint/no-this-alias": "off", |
| 15 | + "eqeqeq": "off", |
| 16 | + "prefer-rest-params": "off", |
| 17 | + "@typescript-eslint/naming-convention": [ |
| 18 | + "error", |
| 19 | + { |
| 20 | + "selector": "memberLike", |
| 21 | + "modifiers": ["private", "protected"], |
| 22 | + "format": ["camelCase"], |
| 23 | + "leadingUnderscore": "require" |
| 24 | + } |
| 25 | + ], |
| 26 | + "@typescript-eslint/no-inferrable-types": ["error", { ignoreProperties: true }], |
| 27 | + "arrow-parens": ["error", "as-needed"], |
| 28 | + "prettier/prettier": ["error", { "singleQuote": true, "arrowParens": "avoid" }], |
| 29 | + "node/no-deprecated-api": ["warn"], |
| 30 | + "header/header": [2, "block", [{ |
| 31 | + pattern: / \* Copyright \d{4}, OpenTelemetry Authors[\r\n]+ \*[\r\n]+ \* Licensed under the Apache License, Version 2\.0 \(the \"License\"\);[\r\n]+ \* you may not use this file except in compliance with the License\.[\r\n]+ \* You may obtain a copy of the License at[\r\n]+ \*[\r\n]+ \* https:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0[\r\n]+ \*[\r\n]+ \* Unless required by applicable law or agreed to in writing, software[\r\n]+ \* distributed under the License is distributed on an \"AS IS\" BASIS,[\r\n]+ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.[\r\n]+ \* See the License for the specific language governing permissions and[\r\n]+ \* limitations under the License\./gm, |
| 32 | + template: |
| 33 | + `\n * Copyright ${new Date().getFullYear()}, OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n ` |
| 34 | + }]] |
| 35 | + }, |
| 36 | + overrides: [ |
| 37 | + { |
| 38 | + "files": ["test/**/*.ts"], |
| 39 | + "rules": { |
| 40 | + "no-empty": "off", |
| 41 | + "@typescript-eslint/ban-ts-ignore": "off", |
| 42 | + "@typescript-eslint/no-empty-function": "off", |
| 43 | + "@typescript-eslint/no-explicit-any": "off", |
| 44 | + "@typescript-eslint/no-unused-vars": "off", |
| 45 | + "@typescript-eslint/no-var-requires": "off" |
| 46 | + } |
| 47 | + } |
| 48 | + ] |
| 49 | +}; |
0 commit comments