|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "commonjs": true, |
| 4 | + "es2020": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "eslint:recommended", |
| 9 | + "plugin:jsonc/recommended-with-jsonc", |
| 10 | + "plugin:jest/recommended" |
| 11 | + ], |
| 12 | + "ignorePatterns": ["scripts", "components/**/test-event.mjs"], |
| 13 | + "overrides": [ |
| 14 | + { |
| 15 | + "files": [ |
| 16 | + ".eslintrc", |
| 17 | + "*.json" |
| 18 | + ], |
| 19 | + "parser": "jsonc-eslint-parser" |
| 20 | + }, |
| 21 | + { |
| 22 | + "files": [ |
| 23 | + "**/actions/**/*.*js", |
| 24 | + "**/sources/**/*.*js" |
| 25 | + ], |
| 26 | + "rules": { |
| 27 | + "pipedream/required-properties-key": "error", |
| 28 | + "pipedream/required-properties-name": "error", |
| 29 | + "pipedream/required-properties-version": "error", |
| 30 | + "pipedream/required-properties-description": "error", |
| 31 | + "pipedream/required-properties-type": "error", |
| 32 | + "pipedream/props-label": "warn", |
| 33 | + "pipedream/props-description": "warn", |
| 34 | + "pipedream/source-name": "warn", |
| 35 | + "pipedream/source-description": "warn", |
| 36 | + "pipedream/no-ts-version": "warn" |
| 37 | + } |
| 38 | + }, |
| 39 | + { |
| 40 | + "files": [ |
| 41 | + "**/actions/**/common*.*js", |
| 42 | + "**/actions/common/*", |
| 43 | + "**/sources/common/*", |
| 44 | + "**/sources/**/common*.*js", |
| 45 | + "**/sources/**/constant*.*js", |
| 46 | + "**/actions/**/constant*.*js" |
| 47 | + ], |
| 48 | + "rules": { |
| 49 | + "pipedream/required-properties-key": "off", |
| 50 | + "pipedream/required-properties-name": "off", |
| 51 | + "pipedream/required-properties-version": "off", |
| 52 | + "pipedream/required-properties-description": "off", |
| 53 | + "pipedream/required-properties-type": "off", |
| 54 | + "pipedream/source-name": "off", |
| 55 | + "pipedream/source-description": "off" |
| 56 | + } |
| 57 | + }, |
| 58 | + { |
| 59 | + "files": [ |
| 60 | + "**/*.app.*js" |
| 61 | + ], |
| 62 | + "rules": { |
| 63 | + "pipedream/props-label": "warn", |
| 64 | + "pipedream/props-description": "warn" |
| 65 | + } |
| 66 | + }, |
| 67 | + { |
| 68 | + "files": [ |
| 69 | + "**/components/bash/**/*.*js", |
| 70 | + "**/components/go/**/*.*js", |
| 71 | + "**/components/node/**/*.*js", |
| 72 | + "**/components/python/**/*.*js" |
| 73 | + ], |
| 74 | + "rules": { |
| 75 | + "no-unused-vars": "off" |
| 76 | + } |
| 77 | + }, |
| 78 | + { |
| 79 | + "files": [ |
| 80 | + "*.ts", |
| 81 | + "*.mts" |
| 82 | + ], |
| 83 | + "extends": [ |
| 84 | + "plugin:@typescript-eslint/recommended" |
| 85 | + ], |
| 86 | + "parser": "@typescript-eslint/parser", |
| 87 | + "rules": { |
| 88 | + "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], |
| 89 | + "max-len": "off", |
| 90 | + // note you must disable the base rule as it can report incorrect errors |
| 91 | + "semi": "off", |
| 92 | + "@typescript-eslint/semi": ["error"], |
| 93 | + "@typescript-eslint/member-delimiter-style": ["error", { |
| 94 | + "multiline": { |
| 95 | + "delimiter": "semi", |
| 96 | + "requireLast": true |
| 97 | + }, |
| 98 | + "singleline": { |
| 99 | + "delimiter": "semi", |
| 100 | + "requireLast": true |
| 101 | + }, |
| 102 | + "multilineDetection": "brackets", |
| 103 | + "overrides": { |
| 104 | + "interface": { |
| 105 | + "multiline": { |
| 106 | + "delimiter": "semi", |
| 107 | + "requireLast": true |
| 108 | + } |
| 109 | + } |
| 110 | + } |
| 111 | + }] |
| 112 | + } |
| 113 | + } |
| 114 | + ], |
| 115 | + "parserOptions": { |
| 116 | + "ecmaVersion": 12, |
| 117 | + "sourceType": "module" |
| 118 | + }, |
| 119 | + "plugins": [ |
| 120 | + "jsonc", |
| 121 | + "putout", |
| 122 | + "pipedream", |
| 123 | + "@typescript-eslint", |
| 124 | + "jest" |
| 125 | + ], |
| 126 | + "root": true, |
| 127 | + "rules": { |
| 128 | + "arrow-parens": "error", |
| 129 | + "arrow-spacing": "error", |
| 130 | + "array-bracket-newline": [ |
| 131 | + "error", |
| 132 | + { |
| 133 | + "minItems": 1 |
| 134 | + } |
| 135 | + ], |
| 136 | + "array-element-newline": [ |
| 137 | + "error", |
| 138 | + "always" |
| 139 | + ], |
| 140 | + "comma-dangle": [ |
| 141 | + "error", |
| 142 | + "always-multiline" |
| 143 | + ], |
| 144 | + "comma-spacing": "error", |
| 145 | + "eol-last": "error", |
| 146 | + "function-call-argument-newline": [ |
| 147 | + "error", |
| 148 | + "consistent" |
| 149 | + ], |
| 150 | + "function-paren-newline": [ |
| 151 | + "error", |
| 152 | + "consistent" |
| 153 | + ], |
| 154 | + "indent": [ |
| 155 | + "error", |
| 156 | + 2 |
| 157 | + ], |
| 158 | + "key-spacing": "error", |
| 159 | + "keyword-spacing": "error", |
| 160 | + "max-len": [ |
| 161 | + "error", |
| 162 | + { |
| 163 | + "code": 100, |
| 164 | + "tabWidth": 2, |
| 165 | + "ignoreTrailingComments": true, |
| 166 | + "ignoreUrls": true, |
| 167 | + "ignoreStrings": true, |
| 168 | + "ignoreTemplateLiterals": true, |
| 169 | + "ignoreRegExpLiterals": true |
| 170 | + } |
| 171 | + ], |
| 172 | + "multiline-ternary": [ |
| 173 | + "error", |
| 174 | + "always" |
| 175 | + ], |
| 176 | + "newline-per-chained-call": "error", |
| 177 | + "no-constant-condition": [ |
| 178 | + "error", |
| 179 | + { |
| 180 | + "checkLoops": false |
| 181 | + } |
| 182 | + ], |
| 183 | + "no-multiple-empty-lines": [ |
| 184 | + "error", |
| 185 | + { |
| 186 | + "max": 1, |
| 187 | + "maxBOF": 0, |
| 188 | + "maxEOF": 1 |
| 189 | + } |
| 190 | + ], |
| 191 | + "no-trailing-spaces": "error", |
| 192 | + "no-unused-vars": "error", |
| 193 | + "object-curly-newline": [ |
| 194 | + "error", |
| 195 | + { |
| 196 | + "ExportDeclaration": "always", |
| 197 | + "ImportDeclaration": { |
| 198 | + "minProperties": 2, |
| 199 | + "multiline": true |
| 200 | + }, |
| 201 | + "ObjectExpression": { |
| 202 | + "minProperties": 1, |
| 203 | + "multiline": true |
| 204 | + }, |
| 205 | + "ObjectPattern": { |
| 206 | + "minProperties": 2, |
| 207 | + "multiline": true |
| 208 | + } |
| 209 | + } |
| 210 | + ], |
| 211 | + "object-curly-spacing": [ |
| 212 | + "error", |
| 213 | + "always" |
| 214 | + ], |
| 215 | + "object-property-newline": [ |
| 216 | + "error", |
| 217 | + { |
| 218 | + "allowAllPropertiesOnSameLine": false |
| 219 | + } |
| 220 | + ], |
| 221 | + "quote-props": [ |
| 222 | + "error", |
| 223 | + "consistent" |
| 224 | + ], |
| 225 | + "quotes": "error", |
| 226 | + "semi": "error", |
| 227 | + "space-before-blocks": [ |
| 228 | + "error", |
| 229 | + "always" |
| 230 | + ], |
| 231 | + "space-infix-ops": "error" |
| 232 | + } |
| 233 | +} |
0 commit comments