File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @definitelytyped/dtslint " : patch
3+ ---
4+
5+ Revert eslintrc loading change
Original file line number Diff line number Diff line change @@ -112,35 +112,23 @@ function getEslintOptions(
112112 ] ,
113113 } ;
114114
115- // Always disable cascading .eslintrc.* discovery. Contributor-authored config files in
116- // types/<pkg>/ would otherwise be loaded by ESLint 8's legacy eslintrc engine, which
117- // resolves `extends` and `parser` (including in `overrides[]`) via
118- // createRequire(configFilePath).resolve(value) and require()s the result. Since dtslint has
119- // no file-extension allowlist, a contributor could ship a `.cjs` payload alongside
120- // `.eslintrc.json` and obtain arbitrary code execution in the lint process.
121- const baseOverrideConfig = {
122- plugins : [ "@definitelytyped" , "@typescript-eslint" , "jsdoc" ] ,
123- parser : "@typescript-eslint/parser" ,
124- parserOptions : {
125- project : true ,
126- warnOnUnsupportedTypeScriptVersion : false ,
127- } ,
128- ...overrideConfig ,
129- } ;
130-
131115 if ( expectOnly ) {
132116 return {
133117 useEslintrc : false ,
134- overrideConfig : baseOverrideConfig ,
118+ overrideConfig : {
119+ plugins : [ "@definitelytyped" , "@typescript-eslint" , "jsdoc" ] ,
120+ parser : "@typescript-eslint/parser" ,
121+ parserOptions : {
122+ project : true ,
123+ warnOnUnsupportedTypeScriptVersion : false ,
124+ } ,
125+ ...overrideConfig ,
126+ } ,
135127 } ;
136128 }
137129
138130 return {
139- useEslintrc : false ,
140- overrideConfig : {
141- ...baseOverrideConfig ,
142- extends : [ "plugin:@definitelytyped/all" ] ,
143- } ,
131+ overrideConfig,
144132 } ;
145133}
146134
You can’t perform that action at this time.
0 commit comments