MCPcopy
hub / github.com/appsmithorg/appsmith / getRestrictedSyntaxOverrideForCodeEditor

Function getRestrictedSyntaxOverrideForCodeEditor

app/client/.eslintrc.js:137–152  ·  view source on GitHub ↗
(eslintConfig)

Source from the content-addressed store, hash-verified

135}
136
137function 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
154function getRestrictedImportsOverrideForEE(eslintConfig) {
155 const [errorLevel, existingRules] =

Callers 1

.eslintrc.jsFile · 0.85

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected