eslint-plugin-zhlint
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -27,3 +27,2 @@ const zhlint = require("zhlint"); | ||
data: { | ||
zhlintRuleName: validation.name, | ||
zhlintMsg: validation.message, | ||
@@ -69,3 +68,3 @@ }, | ||
messages: { | ||
zhlint: "[zhlint/{{ zhlintRuleName }}] {{ zhlintMsg }}", | ||
zhlint: "[zhlint] {{ zhlintMsg }}", | ||
}, | ||
@@ -75,6 +74,14 @@ }, | ||
const sourceCode = context.getSourceCode(); | ||
const { zhlint: zhlintOptions, ...ruleOptions } = { | ||
let { zhlint: zhlintOptions, ...ruleOptions } = { | ||
lintComments: true, | ||
lintStringLiterals: true, | ||
...context.options[0], | ||
zhlint: { | ||
rules: { | ||
preset: "default", | ||
trimSpace: false, // disabled by default because of false positives | ||
...context.options[0]?.zhlint?.rules, | ||
}, | ||
...context.options[0]?.zhlint, | ||
}, | ||
}; | ||
@@ -81,0 +88,0 @@ return { |
{ | ||
"name": "eslint-plugin-zhlint", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "ESLint plugin for Chinese typographies (中文排版) with zhlint", | ||
@@ -16,17 +16,18 @@ "keywords": [ | ||
], | ||
"scripts": { | ||
"test": "mocha tests --recursive" | ||
}, | ||
"dependencies": { | ||
"requireindex": "~1.1.0", | ||
"zhlint": "^0.3.0" | ||
"requireindex": "^1.2.0", | ||
"zhlint": "^0.7.1" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^7.1.0", | ||
"mocha": "^7.2.0" | ||
"eslint": "^8.36.0", | ||
"mocha": "^10.2.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.10.0" | ||
"node": "^14.17.0 || >=16.0.0" | ||
}, | ||
"license": "MIT" | ||
} | ||
"packageManager": "pnpm@7.29.3", | ||
"license": "MIT", | ||
"scripts": { | ||
"test": "mocha tests --recursive" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# <img src="https://raw.githubusercontent.com/Jinjiang/zhlint/master/logo.svg" style="vertical-align: middle;"> eslint-plugin-zhlint | ||
# <img src="https://raw.githubusercontent.com/Jinjiang/zhlint/master/docs/logo.svg" style="vertical-align: middle;"> eslint-plugin-zhlint | ||
@@ -52,3 +52,6 @@ Linting Chinese typographies in JavaScript/TypeScript with [zhlint](https://github.com/Jinjiang/zhlint). | ||
"zhlint": { | ||
"rules": ["space-full-width-content", "space-punctuation"] | ||
"rules": { | ||
"fullWidthPunctuation": ",。:;?!“”‘’()", | ||
"unifiedPunctuation": "traditional" | ||
} | ||
} | ||
@@ -55,0 +58,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6608
130
72
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Added@esbuild/aix-ppc64@0.21.5(transitive)
+ Added@esbuild/android-arm@0.21.5(transitive)
+ Added@esbuild/android-arm64@0.21.5(transitive)
+ Added@esbuild/android-x64@0.21.5(transitive)
+ Added@esbuild/darwin-arm64@0.21.5(transitive)
+ Added@esbuild/darwin-x64@0.21.5(transitive)
+ Added@esbuild/freebsd-arm64@0.21.5(transitive)
+ Added@esbuild/freebsd-x64@0.21.5(transitive)
+ Added@esbuild/linux-arm@0.21.5(transitive)
+ Added@esbuild/linux-arm64@0.21.5(transitive)
+ Added@esbuild/linux-ia32@0.21.5(transitive)
+ Added@esbuild/linux-loong64@0.21.5(transitive)
+ Added@esbuild/linux-mips64el@0.21.5(transitive)
+ Added@esbuild/linux-ppc64@0.21.5(transitive)
+ Added@esbuild/linux-riscv64@0.21.5(transitive)
+ Added@esbuild/linux-s390x@0.21.5(transitive)
+ Added@esbuild/linux-x64@0.21.5(transitive)
+ Added@esbuild/netbsd-x64@0.21.5(transitive)
+ Added@esbuild/openbsd-x64@0.21.5(transitive)
+ Added@esbuild/sunos-x64@0.21.5(transitive)
+ Added@esbuild/win32-arm64@0.21.5(transitive)
+ Added@esbuild/win32-ia32@0.21.5(transitive)
+ Added@esbuild/win32-x64@0.21.5(transitive)
+ Added@isaacs/cliui@8.0.2(transitive)
+ Added@jest/schemas@29.6.3(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@pkgjs/parseargs@0.11.0(transitive)
+ Added@rollup/rollup-android-arm-eabi@4.29.1(transitive)
+ Added@rollup/rollup-android-arm64@4.29.1(transitive)
+ Added@rollup/rollup-darwin-arm64@4.29.1(transitive)
+ Added@rollup/rollup-darwin-x64@4.29.1(transitive)
+ Added@rollup/rollup-freebsd-arm64@4.29.1(transitive)
+ Added@rollup/rollup-freebsd-x64@4.29.1(transitive)
+ Added@rollup/rollup-linux-arm-gnueabihf@4.29.1(transitive)
+ Added@rollup/rollup-linux-arm-musleabihf@4.29.1(transitive)
+ Added@rollup/rollup-linux-arm64-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-arm64-musl@4.29.1(transitive)
+ Added@rollup/rollup-linux-loongarch64-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-powerpc64le-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-riscv64-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-s390x-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-x64-gnu@4.29.1(transitive)
+ Added@rollup/rollup-linux-x64-musl@4.29.1(transitive)
+ Added@rollup/rollup-win32-arm64-msvc@4.29.1(transitive)
+ Added@rollup/rollup-win32-ia32-msvc@4.29.1(transitive)
+ Added@rollup/rollup-win32-x64-msvc@4.29.1(transitive)
+ Added@sinclair/typebox@0.27.8(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Added@vitest/expect@1.6.0(transitive)
+ Added@vitest/runner@1.6.0(transitive)
+ Added@vitest/snapshot@1.6.0(transitive)
+ Added@vitest/spy@1.6.0(transitive)
+ Added@vitest/utils@1.6.0(transitive)
+ Added@vue/compiler-core@3.5.13(transitive)
+ Added@vue/compiler-dom@3.5.13(transitive)
+ Added@vue/compiler-sfc@3.5.13(transitive)
+ Added@vue/compiler-ssr@3.5.13(transitive)
+ Added@vue/reactivity@3.5.13(transitive)
+ Added@vue/runtime-core@3.5.13(transitive)
+ Added@vue/runtime-dom@3.5.13(transitive)
+ Added@vue/server-renderer@3.5.13(transitive)
+ Added@vue/shared@3.5.13(transitive)
+ Addedacorn@8.14.0(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedansi-regex@5.0.16.1.0(transitive)
+ Addedansi-styles@5.2.06.2.1(transitive)
+ Addedassertion-error@1.1.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedcac@6.7.14(transitive)
+ Addedchai@4.5.0(transitive)
+ Addedcheck-error@1.0.3(transitive)
+ Addedconfbox@0.1.8(transitive)
+ Addedcross-spawn@7.0.6(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addeddebug@4.4.0(transitive)
+ Addeddeep-eql@4.1.4(transitive)
+ Addeddiff-sequences@29.6.3(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@8.0.09.2.2(transitive)
+ Addedentities@4.5.0(transitive)
+ Addedesbuild@0.21.5(transitive)
+ Addedestree-walker@2.0.23.0.3(transitive)
+ Addedexeca@8.0.1(transitive)
+ Addedforeground-child@3.3.0(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedget-func-name@2.0.2(transitive)
+ Addedget-stream@8.0.1(transitive)
+ Addedglob@10.4.5(transitive)
+ Addedhuman-signals@5.0.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-stream@3.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjackspeak@3.4.3(transitive)
+ Addedjs-tokens@9.0.1(transitive)
+ Addedlocal-pkg@0.5.1(transitive)
+ Addedloupe@2.3.7(transitive)
+ Addedlru-cache@10.4.3(transitive)
+ Addedmagic-string@0.30.17(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@4.0.0(transitive)
+ Addedminimatch@9.0.5(transitive)
+ Addedminipass@7.1.2(transitive)
+ Addedmlly@1.7.3(transitive)
+ Addedms@2.1.3(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addednpm-run-path@5.3.0(transitive)
+ Addedonetime@6.0.0(transitive)
+ Addedp-limit@5.0.0(transitive)
+ Addedpackage-json-from-dist@1.0.1(transitive)
+ Addedpath-key@3.1.14.0.0(transitive)
+ Addedpath-scurry@1.11.1(transitive)
+ Addedpathe@1.1.2(transitive)
+ Addedpathval@1.1.1(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpkg-types@1.2.1(transitive)
+ Addedpostcss@8.4.49(transitive)
+ Addedpretty-format@29.7.0(transitive)
+ Addedreact-is@18.3.1(transitive)
+ Addedrequireindex@1.2.0(transitive)
+ Addedrollup@4.29.1(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedsiginfo@2.0.0(transitive)
+ Addedsignal-exit@4.1.0(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedstackback@0.0.2(transitive)
+ Addedstd-env@3.8.0(transitive)
+ Addedstring-width@4.2.35.1.2(transitive)
+ Addedstrip-ansi@6.0.17.1.0(transitive)
+ Addedstrip-final-newline@3.0.0(transitive)
+ Addedstrip-literal@2.1.1(transitive)
+ Addedtinybench@2.9.0(transitive)
+ Addedtinypool@0.8.4(transitive)
+ Addedtinyspy@2.2.1(transitive)
+ Addedtype-detect@4.1.0(transitive)
+ Addedufo@1.5.4(transitive)
+ Addedvite@5.4.11(transitive)
+ Addedvite-node@1.6.0(transitive)
+ Addedvitest@1.6.0(transitive)
+ Addedvue@3.5.13(transitive)
+ Addedwhich@2.0.2(transitive)
+ Addedwhy-is-node-running@2.3.0(transitive)
+ Addedwrap-ansi@7.0.08.1.0(transitive)
+ Addedyocto-queue@1.1.1(transitive)
+ Addedzhlint@0.7.4(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrequireindex@1.1.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedzhlint@0.3.0(transitive)
Updatedrequireindex@^1.2.0
Updatedzhlint@^0.7.1