| 135 | } |
| 136 | |
| 137 | function getRestrictedSyntaxOverrideForCodeEditor(eslintConfig) { |
| 138 | const [errorLevel, ...existingRules] = |
| 139 | eslintConfig.rules["no-restricted-syntax"]; |
| 140 | |
| 141 | const newRules = existingRules.filter( |
| 142 | (i) => |
| 143 | i.selector !== |
| 144 | "ImportDeclaration[source.value=/editorComponents\\u002FCodeEditor(\\u002Findex)?$/]", |
| 145 | ); |
| 146 | |
| 147 | if (newRules.length === 0) { |
| 148 | return ["off"]; |
| 149 | } |
| 150 | |
| 151 | return [errorLevel, ...newRules]; |
| 152 | } |
| 153 | |
| 154 | function getRestrictedImportsOverrideForEE(eslintConfig) { |
| 155 | const [errorLevel, existingRules] = |