File tree Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Expand file tree Collapse file tree 5 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ function getJavascriptConfig() {
139
139
const minVersion = semver . minVersion ( packageJson . engines . node ) . major ;
140
140
141
141
// https://node.green/
142
+ // https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping
142
143
switch ( minVersion ) {
143
144
case 6 : {
144
145
const config = { ...configs [ "javascript/es2016" ] } ;
@@ -229,6 +230,17 @@ function getTypescriptConfig() {
229
230
}
230
231
231
232
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
+
232
244
const isStrict =
233
245
( tsconfigJson &&
234
246
tsconfigJson . compilerOptions &&
Original file line number Diff line number Diff line change @@ -1164,6 +1164,7 @@ function getConfig(esVersion) {
1164
1164
...javascriptConfig . configs . recommended ,
1165
1165
name : `javascript/es${ esVersion } ` ,
1166
1166
files : [ `**/*.{${ allExtensions . map ( ( item ) => item . slice ( 1 ) ) . join ( "," ) } }` ] ,
1167
+ ignores : [ "**/*.d.ts" ] ,
1167
1168
settings : {
1168
1169
"import/extensions" : allExtensions ,
1169
1170
"import/ignore" : [
Original file line number Diff line number Diff line change @@ -117,6 +117,8 @@ const commonRules = {
117
117
118
118
let nodePlugin ;
119
119
120
+ const ignores = [ "**/*.d.ts" ] ;
121
+
120
122
/**
121
123
* @returns {Promise<Record<string, string>> } config
122
124
*/
@@ -136,6 +138,7 @@ async function getCommonJSConfig() {
136
138
return {
137
139
...nodeConfig ,
138
140
name : "node/commonjs" ,
141
+ ignores,
139
142
plugins : {
140
143
...nodeConfig . plugins ,
141
144
import : importPlugin ,
@@ -182,6 +185,7 @@ async function getModuleConfig() {
182
185
return {
183
186
...nodeConfig ,
184
187
name : "node/module" ,
188
+ ignores,
185
189
plugins : {
186
190
...nodeConfig . plugins ,
187
191
import : importPlugin ,
@@ -221,6 +225,7 @@ async function getDirtyConfig() {
221
225
n : nodePlugin ,
222
226
import : importPlugin ,
223
227
} ,
228
+ ignores : [ ...new Set ( [ ...commonjsConfig . ignores , ...moduleConfig . ignores ] ) ] ,
224
229
languageOptions : {
225
230
sourceType : "module" ,
226
231
parserOptions : {
Original file line number Diff line number Diff line change @@ -310,6 +310,7 @@ async function getTypescriptRecommendedConfig() {
310
310
files : [
311
311
`**/*.{${ typescriptExtensions . map ( ( item ) => item . slice ( 1 ) ) . join ( "," ) } }` ,
312
312
] ,
313
+ ignores : [ "**/*.d.ts" ] ,
313
314
languageOptions : {
314
315
parser : baseConfig . languageOptions . parser ,
315
316
} ,
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