File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ function getJavascriptConfig() {
139139 const minVersion = semver . minVersion ( packageJson . engines . node ) . major ;
140140
141141 // https://node.green/
142+ // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
142143 switch ( minVersion ) {
143144 case 6 : {
144145 const config = { ...configs [ "javascript/es2016" ] } ;
@@ -229,6 +230,17 @@ function getTypescriptConfig() {
229230 }
230231
231232 const tsconfigJson = getJsonFile ( "tsconfig.json" ) ;
233+
234+ const isNoEmitEnabled =
235+ ( tsconfigJson &&
236+ tsconfigJson . compilerOptions &&
237+ tsconfigJson . compilerOptions . noEmit ) ||
238+ false ;
239+
240+ if ( isNoEmitEnabled ) {
241+ return { } ;
242+ }
243+
232244 const isStrict =
233245 ( tsconfigJson &&
234246 tsconfigJson . compilerOptions &&
Original file line number Diff line number Diff line change @@ -1164,6 +1164,7 @@ function getConfig(esVersion) {
11641164 ...javascriptConfig . configs . recommended ,
11651165 name : `javascript/es${ esVersion } ` ,
11661166 files : [ `**/*.{${ allExtensions . map ( ( item ) => item . slice ( 1 ) ) . join ( "," ) } }` ] ,
1167+ ignores : [ "**/*.d.ts" ] ,
11671168 settings : {
11681169 "import/extensions" : allExtensions ,
11691170 "import/ignore" : [
Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ const commonRules = {
117117
118118let nodePlugin ;
119119
120+ const ignores = [ "**/*.d.ts" ] ;
121+
120122/**
121123 * @returns {Promise<Record<string, string>> } config
122124 */
@@ -136,6 +138,7 @@ async function getCommonJSConfig() {
136138 return {
137139 ...nodeConfig ,
138140 name : "node/commonjs" ,
141+ ignores,
139142 plugins : {
140143 ...nodeConfig . plugins ,
141144 import : importPlugin ,
@@ -182,6 +185,7 @@ async function getModuleConfig() {
182185 return {
183186 ...nodeConfig ,
184187 name : "node/module" ,
188+ ignores,
185189 plugins : {
186190 ...nodeConfig . plugins ,
187191 import : importPlugin ,
@@ -221,6 +225,7 @@ async function getDirtyConfig() {
221225 n : nodePlugin ,
222226 import : importPlugin ,
223227 } ,
228+ ignores : [ ...new Set ( [ ...commonjsConfig . ignores , ...moduleConfig . ignores ] ) ] ,
224229 languageOptions : {
225230 sourceType : "module" ,
226231 parserOptions : {
Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ async function getTypescriptRecommendedConfig() {
310310 files : [
311311 `**/*.{${ typescriptExtensions . map ( ( item ) => item . slice ( 1 ) ) . join ( "," ) } }` ,
312312 ] ,
313+ ignores : [ "**/*.d.ts" ] ,
313314 languageOptions : {
314315 parser : baseConfig . languageOptions . parser ,
315316 } ,
Original file line number Diff line number Diff line change 1+ export function getArrayLength ( arr : any [ ] ) : number ;
2+ export const maxInterval : 12 ;
You can’t perform that action at this time.
0 commit comments