Skip to content

Commit

Permalink
test: update test case for un-ts#123
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Aug 26, 2024
1 parent 05f36a8 commit 98fa962
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"@typescript-eslint/parser": "^8.1.0",
"@typescript-eslint/rule-tester": "^8.1.0",
"@unts/patch-package": "^8.0.0",
"classnames": "^2.5.1",
"cross-env": "^7.0.3",
"enhanced-resolve": "^5.16.0",
"escope": "^4.0.0",
Expand All @@ -114,13 +115,15 @@
"eslint9": "npm:eslint@^9.8.0",
"hermes-eslint": "^0.23.1",
"jest": "^29.7.0",
"klaw-sync": "^6.0.0",
"npm-run-all2": "^6.1.2",
"prettier": "^3.2.5",
"redux": "^5.0.1",
"rimraf": "^5.0.10",
"svelte": "^4.2.12",
"ts-node": "^10.9.2",
"type-fest": "^4.14.0",
"typescript": "^5.5.4"
"typescript": "^5.5.4",
"zod": "^3.23.8"
}
}
12 changes: 11 additions & 1 deletion test/rules/no-named-as-default.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ruleTester.run('no-named-as-default', rule, {
'import klawSync from "klaw-sync";',
'import ts from "typescript";',
`import React from 'react';`,
`import z from 'zod';`,
`import classNames from 'classnames';`,

test({
Expand Down Expand Up @@ -138,5 +137,16 @@ ruleTester.run('no-named-as-default', rule, {
parserOptions: { ecmaVersion: 2022 },
},
}),

test({
code: `import z from 'zod';`,
errors: [
{
message:
"Using exported name 'z' as identifier for default export.",
type: 'ImportDefaultSpecifier',
},
],
})
],
})
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2968,6 +2968,11 @@ cjs-module-lexer@^1.0.0:
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107"
integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==

classnames@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b"
integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==

clean-regexp@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clean-regexp/-/clean-regexp-1.0.0.tgz#8df7c7aae51fd36874e8f8d05b9180bc11a3fed7"
Expand Down Expand Up @@ -7121,3 +7126,8 @@ yocto-queue@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==

zod@^3.23.8:
version "3.23.8"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d"
integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==

0 comments on commit 98fa962

Please sign in to comment.