You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constsourceCode=context.sourceCode??context.getSourceCode();// `context.sourceCode` was added in ESLint v8.40.0. By checking both the property and the method, breaking change is avoided. TODO: Only use property when requiring a minimum version of v8.40.0 or higher of ESLint.
59
-
returnsourceCode.getLocFromIndex(index);
60
-
});
57
+
// `context.getSourceCode()` was deprecated in ESLint v8.40.0 and replaced
58
+
// with the `sourceCode` property.
59
+
// TODO: Only use property when our eslint peerDependency is >=8.40.0.
constsourceCode=context.sourceCode??context.getSourceCode();// `context.sourceCode` was added in ESLint v8.40.0. By checking both the property and the method, breaking change is avoided. TODO: Only use property when requiring a minimum version of v8.40.0 or higher of ESLint.
135
-
constfilepath=context.filename??context.getFilename();// `context.filename` was added in ESLint v8.40.0. By checking both the property and the method, breaking change is avoided. TODO: Only use property when requiring a minimum version of v8.40.0 or higher of ESLint.
136
+
137
+
// `context.getSourceCode()` was deprecated in ESLint v8.40.0 and replaced
138
+
// with the `sourceCode` property.
139
+
// TODO: Only use property when our eslint peerDependency is >=8.40.0.
// Processors that extract content from a file, such as the markdown
137
147
// plugin extracting fenced code blocks may choose to specify virtual
138
148
// file paths. If this is the case then we need to resolve prettier
139
149
// config and file info using the on-disk path instead of the virtual
140
150
// path.
151
+
// `context.getPhysicalFilename()` was deprecated in ESLint v8.40.0 and replaced
152
+
// with the `physicalFilename` property.
153
+
// TODO: Only use property when our eslint peerDependency is >=8.40.0.
141
154
constonDiskFilepath=
142
-
context.physicalFilename??context.getPhysicalFilename();// `context.physicalFilename` was added in ESLint v8.40.0. By checking both the property and the method, breaking change is avoided. TODO: Only use property when requiring a minimum version of v8.40.0 or higher of ESLint.
0 commit comments