Skip to content

Commit

Permalink
Breaking: Lint .mts and .cts files
Browse files Browse the repository at this point in the history
  • Loading branch information
evelynhathaway committed Aug 21, 2022
1 parent ac10db0 commit fe2f22a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
38 changes: 23 additions & 15 deletions changes/record-changes.json
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@
"!**/.*.cjs",
"!**/.*.mjs",
"!**/.*.ts",
"!**/.*.cts",
"!**/.*.mts",
"!**/.*.jsx",
"!**/.*.tsx"
],
Expand Down Expand Up @@ -678,6 +680,8 @@
".mjs",
".jsx",
".ts",
".cts",
".mts",
".tsx"
]
},
Expand All @@ -697,7 +701,7 @@
"filePath": "CLEANED",
"criteria": {
"includes": [
"**/*.{js,cjs,mjs,jsx,ts,tsx}"
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
],
"excludes": null,
"basePath": "CLEANED"
Expand Down Expand Up @@ -1468,6 +1472,8 @@
"!**/.*.cjs",
"!**/.*.mjs",
"!**/.*.ts",
"!**/.*.cts",
"!**/.*.mts",
"!**/.*.jsx",
"!**/.*.tsx"
],
Expand Down Expand Up @@ -1804,6 +1810,8 @@
".mjs",
".jsx",
".ts",
".cts",
".mts",
".tsx"
]
},
Expand Down Expand Up @@ -1831,7 +1839,7 @@
},
{
"includes": [
"**/*.{js,cjs,mjs,jsx,ts,tsx}"
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
],
"excludes": null
}
Expand Down Expand Up @@ -1903,7 +1911,7 @@
},
{
"includes": [
"**/*.cjs"
"**/*.{cjs,cts}"
],
"excludes": null
}
Expand Down Expand Up @@ -3562,7 +3570,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand All @@ -3584,7 +3592,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
},
Expand Down Expand Up @@ -3638,7 +3646,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down Expand Up @@ -3679,7 +3687,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand All @@ -3701,7 +3709,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
},
Expand Down Expand Up @@ -3755,7 +3763,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down Expand Up @@ -3806,7 +3814,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down Expand Up @@ -3847,7 +3855,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand All @@ -3869,7 +3877,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
},
Expand Down Expand Up @@ -3923,7 +3931,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down Expand Up @@ -3964,7 +3972,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down Expand Up @@ -4017,7 +4025,7 @@
},
{
"includes": [
"**/*.{ts,tsx}"
"**/*.{ts,tsx,cts,mts}"
],
"excludes": null
}
Expand Down
6 changes: 4 additions & 2 deletions lib/configs/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = {
"overrides": [
{
"files": [
"**/*.{js,cjs,mjs,jsx,ts,tsx}",
"**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}",
],
},
],
Expand All @@ -47,6 +47,8 @@ module.exports = {
"!**/.*.cjs",
"!**/.*.mjs",
"!**/.*.ts",
"!**/.*.cts",
"!**/.*.mts",
"!**/.*.jsx",
"!**/.*.tsx",
],
Expand Down Expand Up @@ -396,7 +398,7 @@ module.exports = {
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".cjs", ".mjs", ".jsx", ".ts", ".tsx"],
"extensions": [".js", ".cjs", ".mjs", ".jsx", ".ts", ".cts", ".mts", ".tsx"],
},
"typescript": {
"alwaysTryTypes": true,
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
"overrides": [
{
"files": [
"**/*.cjs",
"**/*.{cjs,cts}",
],
"rules": {
// Reason: Using `.cjs` is an explicit opt-out of the package's default module behavior
Expand Down
2 changes: 1 addition & 1 deletion lib/configs/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
{
// Apply to TypeScript files
"files": [
"**/*.{ts,tsx}",
"**/*.{ts,tsx,cts,mts}",
],

// Must parse with TS parser to not error and to understand the code
Expand Down

0 comments on commit fe2f22a

Please sign in to comment.