Skip to content
Permalink
Browse files

fix(scope-manager): add `const` as a global type variable (#2499)

  • Loading branch information
bradzacher committed Sep 6, 2020
1 parent bb3e9d6 commit eb3f6e39391d62ac424baa305a15e61806b2fd65
Showing 320 changed files with 4,209 additions and 5,163 deletions.
@@ -199,6 +199,10 @@ function Foo() {}
},
},
},
// https://github.com/typescript-eslint/typescript-eslint/issues/2477
`
const x = 1 as const;
`,
],
invalid: [
{
@@ -10,363 +10,311 @@ export const dom_iterable = {
isTypeVariable: true,
isValueVariable: false,
name: 'AudioParam',
writeable: false,
},
AudioParamMap: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'AudioParamMap',
writeable: false,
},
BaseAudioContext: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'BaseAudioContext',
writeable: false,
},
CSSRuleList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'CSSRuleList',
writeable: false,
},
CSSStyleDeclaration: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'CSSStyleDeclaration',
writeable: false,
},
Cache: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'Cache',
writeable: false,
},
CanvasPathDrawingStyles: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'CanvasPathDrawingStyles',
writeable: false,
},
ClientRectList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'ClientRectList',
writeable: false,
},
DOMRectList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'DOMRectList',
writeable: false,
},
DOMStringList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'DOMStringList',
writeable: false,
},
DOMTokenList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'DOMTokenList',
writeable: false,
},
DataTransferItemList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'DataTransferItemList',
writeable: false,
},
FileList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'FileList',
writeable: false,
},
FormData: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'FormData',
writeable: false,
},
HTMLAllCollection: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'HTMLAllCollection',
writeable: false,
},
HTMLCollectionBase: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'HTMLCollectionBase',
writeable: false,
},
HTMLCollectionOf: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'HTMLCollectionOf',
writeable: false,
},
HTMLFormElement: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'HTMLFormElement',
writeable: false,
},
HTMLSelectElement: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'HTMLSelectElement',
writeable: false,
},
Headers: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'Headers',
writeable: false,
},
IDBObjectStore: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'IDBObjectStore',
writeable: false,
},
MediaKeyStatusMap: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'MediaKeyStatusMap',
writeable: false,
},
MediaList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'MediaList',
writeable: false,
},
MimeTypeArray: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'MimeTypeArray',
writeable: false,
},
NamedNodeMap: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'NamedNodeMap',
writeable: false,
},
Navigator: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'Navigator',
writeable: false,
},
NodeList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'NodeList',
writeable: false,
},
NodeListOf: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'NodeListOf',
writeable: false,
},
Plugin: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'Plugin',
writeable: false,
},
PluginArray: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'PluginArray',
writeable: false,
},
RTCRtpTransceiver: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'RTCRtpTransceiver',
writeable: false,
},
RTCStatsReport: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'RTCStatsReport',
writeable: false,
},
SVGLengthList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SVGLengthList',
writeable: false,
},
SVGNumberList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SVGNumberList',
writeable: false,
},
SVGPointList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SVGPointList',
writeable: false,
},
SVGStringList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SVGStringList',
writeable: false,
},
SourceBufferList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SourceBufferList',
writeable: false,
},
SpeechGrammarList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SpeechGrammarList',
writeable: false,
},
SpeechRecognitionResult: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SpeechRecognitionResult',
writeable: false,
},
SpeechRecognitionResultList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'SpeechRecognitionResultList',
writeable: false,
},
StyleSheetList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'StyleSheetList',
writeable: false,
},
TextTrackCueList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'TextTrackCueList',
writeable: false,
},
TextTrackList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'TextTrackList',
writeable: false,
},
TouchList: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'TouchList',
writeable: false,
},
URLSearchParams: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'URLSearchParams',
writeable: false,
},
VRDisplay: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'VRDisplay',
writeable: false,
},
WEBGL_draw_buffers: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WEBGL_draw_buffers',
writeable: false,
},
WebAuthentication: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WebAuthentication',
writeable: false,
},
WebGL2RenderingContextBase: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WebGL2RenderingContextBase',
writeable: false,
},
WebGL2RenderingContextOverloads: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WebGL2RenderingContextOverloads',
writeable: false,
},
WebGLRenderingContextBase: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WebGLRenderingContextBase',
writeable: false,
},
WebGLRenderingContextOverloads: {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
name: 'WebGLRenderingContextOverloads',
writeable: false,
},
} as Record<string, ImplicitLibVariableOptions>;

0 comments on commit eb3f6e3

Please sign in to comment.