-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support importOrderImportAttributesKeyword
- Loading branch information
1 parent
f545d2d
commit b83e56a
Showing
10 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,5 +76,8 @@ | |
"svelte": { | ||
"optional": true | ||
} | ||
}, | ||
"resolutions": { | ||
"@types/babel__generator": "7.6.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
tests/ImportsWithAttributesKeyword/__snapshots__/ppsi.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`imports-with-attributes-keyword.ts - typescript-verify: imports-with-attributes-keyword.ts 1`] = ` | ||
// I am top level comment in this file. | ||
import thirdParty0 from "third-party0"; | ||
import something3 from "@core/something3"; | ||
import thirdDisco0 from "third-disco0"; | ||
import otherthing3 from "@core/otherthing3"; | ||
import { a } from "b" with { type: "json" }; | ||
import anotherSameLevelRelativePath3 from "./anotherSameLevelRelativePath3"; | ||
import something0 from "@core/something0"; | ||
import { b } from "r" with { type: "json" }; | ||
function add(a,b) { | ||
return a + b; | ||
}~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
// I am top level comment in this file. | ||
import { a } from "b" with { type: "json" }; | ||
import { b } from "r" with { type: "json" }; | ||
import thirdDisco0 from "third-disco0"; | ||
import thirdParty0 from "third-party0"; | ||
import otherthing3 from "@core/otherthing3"; | ||
import something0 from "@core/something0"; | ||
import something3 from "@core/something3"; | ||
import anotherSameLevelRelativePath3 from "./anotherSameLevelRelativePath3"; | ||
function add(a, b) { | ||
return a + b; | ||
} | ||
`; |
16 changes: 16 additions & 0 deletions
16
tests/ImportsWithAttributesKeyword/imports-with-attributes-keyword.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// I am top level comment in this file. | ||
import thirdParty0 from "third-party0"; | ||
import something3 from "@core/something3"; | ||
import thirdDisco0 from "third-disco0"; | ||
import otherthing3 from "@core/otherthing3"; | ||
import { a } from "b" with { type: "json" }; | ||
|
||
import anotherSameLevelRelativePath3 from "./anotherSameLevelRelativePath3"; | ||
import something0 from "@core/something0"; | ||
|
||
import { b } from "r" with { type: "json" }; | ||
|
||
|
||
function add(a,b) { | ||
return a + b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
run_spec(__dirname, ["typescript"], { | ||
importOrder: ['^@core/(.*)$', '^@server/(.*)', '^@ui/(.*)$', '^[./]'], | ||
importOrderSeparation: false, | ||
importOrderSideEffects: false, | ||
importOrderParserPlugins: ['typescript'], | ||
importOrderImportAttributesKeyword: 'with', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,12 @@ | |
"@babel/helper-validator-identifier" "^7.25.9" | ||
"@babel/traverse" "^7.25.9" | ||
|
||
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.9", "@babel/helper-plugin-utils@^7.8.0": | ||
"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0": | ||
version "7.16.7" | ||
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz" | ||
integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== | ||
|
||
"@babel/helper-plugin-utils@^7.25.9": | ||
version "7.25.9" | ||
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz#9cbdd63a9443a2c92a725cca7ebca12cc8dd9f46" | ||
integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== | ||
|
@@ -570,7 +575,7 @@ | |
"@types/babel__template" "*" | ||
"@types/babel__traverse" "*" | ||
|
||
"@types/babel__generator@*": | ||
"@types/babel__generator@*", "@types/[email protected]": | ||
version "7.6.8" | ||
resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.8.tgz#f836c61f48b1346e7d2b0d93c6dacc5b9535d3ab" | ||
integrity sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw== | ||
|