@ivanmaxlogiudice/eslint-config 1.0.0-beta.9 → 1.0.6
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.
- package/LICENSE +20 -20
- package/README.md +282 -25
- package/bin/index.js +3 -0
- package/dist/cli.cjs +283 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +254 -0
- package/dist/index.cjs +1944 -0
- package/dist/index.d.cts +267 -0
- package/dist/index.d.ts +267 -0
- package/dist/index.js +1840 -0
- package/package.json +75 -33
- package/index.cjs +0 -1
- package/index.js +0 -9
- package/src/eslint-comments.js +0 -17
- package/src/js.js +0 -539
- package/src/jsonc.js +0 -116
- package/src/markdown.js +0 -43
- package/src/presets.js +0 -69
- package/src/shared.js +0 -67
- package/src/typescript.js +0 -155
- package/src/unocss.js +0 -13
- package/src/vue.js +0 -198
- package/src/yml.js +0 -26
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ivanmaxlogiudice/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"packageManager": "pnpm@8.10.5",
|
|
5
5
|
"description": "Personal ESLint config",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"eslint-config"
|
|
9
|
+
],
|
|
7
10
|
"license": "MIT",
|
|
8
11
|
"homepage": "https://github.com/ivanmaxlogiudice/eslint-config#readme",
|
|
9
12
|
"bugs": {
|
|
@@ -14,59 +17,98 @@
|
|
|
14
17
|
"url": "git+https://github.com/ivanmaxlogiudice/eslint-config.git"
|
|
15
18
|
},
|
|
16
19
|
"files": [
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"src"
|
|
20
|
+
"bin",
|
|
21
|
+
"dist"
|
|
20
22
|
],
|
|
21
|
-
"main": "./index.js",
|
|
22
|
-
"
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
23
25
|
"exports": {
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
}
|
|
26
30
|
},
|
|
31
|
+
"bin": "./bin/index.js",
|
|
27
32
|
"publishConfig": {
|
|
28
33
|
"access": "public"
|
|
29
34
|
},
|
|
30
35
|
"peerDependencies": {
|
|
31
|
-
"eslint": "
|
|
36
|
+
"eslint": ">=8.0.0"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
|
-
"@eslint
|
|
35
|
-
"@
|
|
36
|
-
"@typescript-eslint
|
|
37
|
-
"@
|
|
38
|
-
"eslint
|
|
39
|
-
"eslint-plugin
|
|
39
|
+
"@antfu/eslint-define-config": "1.23.0-2",
|
|
40
|
+
"@eslint-types/jsdoc": "46.8.2-1",
|
|
41
|
+
"@eslint-types/typescript-eslint": "^6.9.1",
|
|
42
|
+
"@eslint-types/unicorn": "^49.0.0",
|
|
43
|
+
"@eslint/js": "^8.53.0",
|
|
44
|
+
"@stylistic/eslint-plugin": "^1.2.0",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
|
46
|
+
"@typescript-eslint/parser": "^6.11.0",
|
|
47
|
+
"@unocss/eslint-plugin": "^0.57.4",
|
|
48
|
+
"cac": "^6.7.14",
|
|
49
|
+
"detect-indent": "^7.0.1",
|
|
50
|
+
"eslint-config-flat-gitignore": "^0.1.1",
|
|
51
|
+
"eslint-plugin-antfu": "^1.0.3",
|
|
40
52
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
41
|
-
"eslint-plugin-
|
|
42
|
-
"eslint-plugin-
|
|
53
|
+
"eslint-plugin-i": "^2.29.0",
|
|
54
|
+
"eslint-plugin-jsdoc": "^46.9.0",
|
|
55
|
+
"eslint-plugin-jsonc": "^2.10.0",
|
|
43
56
|
"eslint-plugin-markdown": "^3.0.1",
|
|
44
|
-
"eslint-plugin-n": "^16.
|
|
57
|
+
"eslint-plugin-n": "^16.3.1",
|
|
45
58
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
59
|
+
"eslint-plugin-perfectionist": "^2.3.0",
|
|
46
60
|
"eslint-plugin-promise": "^6.1.1",
|
|
47
|
-
"eslint-plugin-unicorn": "^
|
|
61
|
+
"eslint-plugin-unicorn": "^49.0.0",
|
|
48
62
|
"eslint-plugin-unused-imports": "^3.0.0",
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
63
|
+
"eslint-plugin-vitest": "^0.3.9",
|
|
64
|
+
"eslint-plugin-vue": "^9.18.1",
|
|
65
|
+
"eslint-plugin-yml": "^1.10.0",
|
|
66
|
+
"globals": "^13.23.0",
|
|
67
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
68
|
+
"local-pkg": "^0.5.0",
|
|
69
|
+
"parse-gitignore": "^2.0.0",
|
|
70
|
+
"picocolors": "^1.0.0",
|
|
71
|
+
"prompts": "^2.4.2",
|
|
72
|
+
"vue-eslint-parser": "^9.3.2",
|
|
55
73
|
"yaml-eslint-parser": "^1.2.2"
|
|
56
74
|
},
|
|
57
75
|
"devDependencies": {
|
|
58
|
-
"@
|
|
76
|
+
"@stylistic/eslint-plugin-migrate": "^1.2.0",
|
|
77
|
+
"@types/eslint": "^8.44.7",
|
|
78
|
+
"@types/fs-extra": "^11.0.4",
|
|
79
|
+
"@types/node": "^20.9.0",
|
|
80
|
+
"@types/prompts": "^2.4.8",
|
|
59
81
|
"bumpp": "^9.2.0",
|
|
60
|
-
"eslint": "^8.
|
|
82
|
+
"eslint": "^8.53.0",
|
|
83
|
+
"eslint-flat-config-viewer": "^0.1.1",
|
|
84
|
+
"execa": "^8.0.1",
|
|
85
|
+
"fast-glob": "^3.3.2",
|
|
86
|
+
"fs-extra": "^11.1.1",
|
|
87
|
+
"lint-staged": "^15.1.0",
|
|
88
|
+
"simple-git-hooks": "^2.9.0",
|
|
61
89
|
"tsup": "^7.2.0",
|
|
62
|
-
"typescript": "^5.2.2"
|
|
90
|
+
"typescript": "^5.2.2",
|
|
91
|
+
"vitest": "^0.34.6"
|
|
63
92
|
},
|
|
93
|
+
"workspaces": [
|
|
94
|
+
"fixtures/*"
|
|
95
|
+
],
|
|
64
96
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
97
|
+
"node": ">=18.12.0"
|
|
98
|
+
},
|
|
99
|
+
"simple-git-hooks": {
|
|
100
|
+
"pre-commit": "pnpm lint-staged"
|
|
101
|
+
},
|
|
102
|
+
"lint-staged": {
|
|
103
|
+
"*": "eslint --fix"
|
|
66
104
|
},
|
|
67
105
|
"scripts": {
|
|
68
|
-
"build": "tsup",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
106
|
+
"build": "tsup --format esm,cjs --clean --dts",
|
|
107
|
+
"stub": "tsup --format esm",
|
|
108
|
+
"dev": "tsup --format esm,cjs --watch & eslint-flat-config-viewer",
|
|
109
|
+
"lint": "pnpm run stub && eslint .",
|
|
110
|
+
"release": "bumpp && pnpm publish",
|
|
111
|
+
"test": "vitest",
|
|
112
|
+
"typecheck": "tsc --noEmit"
|
|
71
113
|
}
|
|
72
114
|
}
|
package/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var pr=Object.create;var f=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var ur=Object.getPrototypeOf,fr=Object.prototype.hasOwnProperty;var mr=(r,n)=>{for(var t in n)f(r,t,{get:n[t],enumerable:!0})},V=(r,n,t,u)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of cr(n))!fr.call(r,s)&&s!==t&&f(r,s,{get:()=>n[s],enumerable:!(u=lr(n,s))||u.enumerable});return r};var e=(r,n,t)=>(t=r!=null?pr(ur(r)):{},V(n||!r||!r.__esModule?f(t,"default",{value:r,enumerable:!0}):t,r)),dr=r=>V(f({},"__esModule",{value:!0}),r);var Sr={};mr(Sr,{GLOB_ALL_SRC:()=>xr,GLOB_CSS:()=>br,GLOB_DIST:()=>K,GLOB_EXCLUDE:()=>S,GLOB_HTML:()=>W,GLOB_JS:()=>yr,GLOB_JSON:()=>m,GLOB_JSON5:()=>d,GLOB_JSONC:()=>L,GLOB_JSX:()=>gr,GLOB_LESS:()=>vr,GLOB_LOCKFILE:()=>z,GLOB_MARKDOWN:()=>a,GLOB_NODE_MODULES:()=>X,GLOB_SCSS:()=>wr,GLOB_SRC:()=>i,GLOB_SRC_EXT:()=>k,GLOB_STYLE:()=>J,GLOB_TS:()=>j,GLOB_TSX:()=>_,GLOB_VUE:()=>p,GLOB_YAML:()=>y,all:()=>_r,antfuPlugin:()=>G.default,basic:()=>U,config:()=>Lr,eslintComments:()=>O,getVueVersion:()=>ir,importPlugin:()=>b.default,imports:()=>E,js:()=>C,jsonc:()=>$,jsx:()=>B,markdown:()=>A,pkgOrder:()=>T,reactivityTransform:()=>ar,tsParser:()=>N.default,tsPlugin:()=>l.default,typescript:()=>c,unicorn:()=>q,unicornPlugin:()=>P.default,vue:()=>x,vueParser:()=>M.default,vuePlugin:()=>o.default,yml:()=>I});module.exports=dr(Sr);var h=e(require("eslint-plugin-eslint-comments"),1),O=[{plugins:{"eslint-comments":h.default},rules:{...h.default.configs.recommended.rules,"eslint-comments/disable-enable-pair":["error",{allowWholeFile:!0}]}}];var g=e(require("globals"),1),Y=e(require("@eslint/js"),1),H=e(require("eslint-plugin-n"),1),b=e(require("eslint-plugin-import"),1),Q=e(require("eslint-plugin-promise"),1),Z=e(require("eslint-plugin-unused-imports"),1),P=e(require("eslint-plugin-unicorn"),1),G=e(require("eslint-plugin-antfu"),1),rr=e(require("eslint-plugin-no-only-tests"),1);var k="?([cm])[jt]s?(x)",i="**/*.?([cm])[jt]s?(x)",yr="**/*.?([cm])js",gr="**/*.?([cm])jsx",j="**/*.?([cm])ts",_="**/*.?([cm])tsx",J="**/*.{c,le,sc}ss",br="**/*.css",vr="**/*.less",wr="**/*.scss",m="**/*.json",d="**/*.json5",L="**/*.jsonc",a="**/*.md",p="**/*.vue",y="**/*.y?(a)ml",W="**/*.htm?(l)",xr=[i,J,m,d,a,p,y,W],X="**/node_modules",K="**/dist",z=["**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml"],S=[X,K,...z,"**/output","**/coverage","**/temp","**/fixtures","**/.vitepress/cache","**/.nuxt","**/.vercel","**/.changeset","**/.idea","**/.output","**/.vite-inspect","**/CHANGELOG*.md","**/*.min.*","**/LICENSE*","**/__snapshots__","**/auto-import?(s).d.ts","**/components.d.ts"];var C=[Y.default.configs.recommended,{languageOptions:{globals:{...g.default.browser,...g.default.es2021,...g.default.node},sourceType:"module"},plugins:{n:H.default,promise:Q.default},rules:{"accessor-pairs":["error",{setWithoutGet:!0,enforceForClassMembers:!0}],"array-bracket-spacing":["error","never"],"array-callback-return":"error","arrow-parens":["error","as-needed",{requireForBlockBody:!0}],"arrow-spacing":["error",{before:!0,after:!0}],"block-scoped-var":"error","block-spacing":["error","always"],"brace-style":["error","stroustrup",{allowSingleLine:!0}],"comma-dangle":["error","always-multiline"],"comma-spacing":["error",{after:!0,before:!1}],"comma-style":["error","last"],"computed-property-spacing":["error","never",{enforceForClassMembers:!0}],"consistent-return":"error",curly:["error","multi-or-nest","consistent"],"default-case-last":"error","dot-location":["error","property"],"dot-notation":"warn",eqeqeq:["error","smart"],"func-call-spacing":["error","never"],indent:["error",4,{SwitchCase:1,outerIIFEBody:1,VariableDeclarator:1}],"key-spacing":["error",{afterColon:!0,beforeColon:!1}],"keyword-spacing":["error",{before:!0,after:!0}],"lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"max-statements-per-line":["error",{max:1}],"multiline-ternary":["error","always-multiline"],"new-cap":["error",{newIsCap:!0,capIsNew:!1,properties:!0}],"new-parens":"error","object-curly-newline":["error",{multiline:!0,consistent:!0}],"object-curly-spacing":["error","always"],"object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"one-var":["error",{initialized:"never"}],"object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"operator-linebreak":["error","before"],"padded-blocks":["error",{blocks:"never",switches:"never",classes:"never"}],"prefer-arrow-callback":["error",{allowNamedFunctions:!1,allowUnboundThis:!0}],"prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","quote-props":["error","consistent-as-needed"],quotes:["error","single",{avoidEscape:!0}],"rest-spread-spacing":["error","never"],semi:["error","never"],"semi-spacing":["error",{before:!1,after:!0}],"sort-imports":["error",{allowSeparatedGroups:!1,ignoreCase:!1,ignoreDeclarationSort:!0,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"space-before-blocks":["error","always"],"space-before-function-paren":["error",{anonymous:"always",asyncArrow:"always",named:"never"}],"space-in-parens":["error","never"],"space-infix-ops":"error","space-unary-ops":["error",{words:!0,nonwords:!1}],"spaced-comment":["error","always",{block:{balanced:!0,exceptions:["*"],markers:["!"]},line:{exceptions:["/","#"],markers:["/"]}}],"symbol-description":"error","template-curly-spacing":"error","template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"use-isnan":["error",{enforceForSwitchCase:!0,enforceForIndexOf:!0}],"valid-typeof":["error",{requireStringLiterals:!0}],"wrap-iife":["error","any",{functionPrototypeMethods:!0}],"yield-star-spacing":["error","both"],yoda:["error","never"],"require-await":"error","vars-on-top":"error","no-alert":"warn","no-array-constructor":"error","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-const-assign":"error","no-console":["error",{allow:["warn","error"]}],"no-constant-condition":"warn","no-control-regex":"error","no-debugger":"warn","no-delete-var":"error","no-dupe-args":"error","no-dupe-class-members":"error","no-dupe-keys":"error","no-duplicate-case":"error","no-duplicate-imports":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-pattern":"error","no-eval":"error","no-ex-assign":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-extra-parens":["error","functions"],"no-fallthrough":"error","no-floating-decimal":"error","no-func-assign":"error","no-global-assign":"error","no-implied-eval":"error","no-import-assign":"error","no-invalid-regexp":"error","no-invalid-this":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loss-of-precision":"error","no-misleading-character-class":"error","no-mixed-operators":["error",{groups:[["==","!=","===","!==",">",">=","<","<="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!0}],"no-mixed-spaces-and-tabs":"error","no-multi-spaces":"error","no-multi-str":"error","no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-new":"error","no-new-func":"error","no-new-object":"error","no-new-symbol":"error","no-new-wrappers":"error","no-obj-calls":"error","no-octal":"error","no-octal-escape":"error","no-param-reassign":"error","no-proto":"error","no-redeclare":["error",{builtinGlobals:!1}],"no-regex-spaces":"error","no-restricted-globals":["error",{name:"global",message:"Use `globalThis` instead."},{name:"self",message:"Use `globalThis` instead."}],"no-restricted-properties":["error",{property:"__proto__",message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead."},{property:"__defineGetter__",message:"Use `Object.defineProperty` instead."},{property:"__defineSetter__",message:"Use `Object.defineProperty` instead."},{property:"__lookupGetter__",message:"Use `Object.getOwnPropertyDescriptor` instead."},{property:"__lookupSetter__",message:"Use `Object.getOwnPropertyDescriptor` instead."}],"no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement"],"no-return-assign":["error","except-parens"],"no-self-assign":["error",{props:!0}],"no-self-compare":"error","no-sequences":"error","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-tabs":"error","no-template-curly-in-string":"error","no-this-before-super":"error","no-throw-literal":"error","no-trailing-spaces":"error","no-undef":"error","no-undef-init":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable":"error","no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-negation":"error","no-unused-expressions":["error",{allowShortCircuit:!0,allowTernary:!0,allowTaggedTemplates:!0}],"no-use-before-define":["error",{classes:!1,functions:!1,variables:!0}],"no-useless-backreference":"error","no-useless-call":"error","no-useless-computed-key":"error","no-useless-constructor":"error","no-useless-escape":"error","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-void":"error","no-whitespace-before-property":"error","no-with":"error","n/handle-callback-err":["error","^(err|error)$"],"n/no-callback-literal":"off","n/no-deprecated-api":"error","n/no-exports-assign":"error","n/no-new-require":"error","n/no-path-concat":"error","n/prefer-global/buffer":["error","never"],"n/process-exit-as-throw":"error","promise/param-names":"error",camelcase:"off",complexity:"off","generator-star-spacing":"off","no-unused-vars":"off"}},{files:["**/scripts/*","**/cli.*"],rules:{"no-console":"off"}},{plugins:{noOnlyTest:rr.default},files:["**/*.{test,spec}.{js?(x),ts}"],rules:{"no-unused-expressions":"off","no-only-tests/no-only-tests":"error"}}],B=[{files:["**/*.jsx"],languageOptions:{parserOptions:{ecmaFeatures:{jsx:!0}}}}],E=[{plugins:{import:b.default,"unused-imports":Z.default,antfu:G.default},settings:{"import/resolver":{node:{extensions:[".js",".mjs",".ts",".mts",".d.ts"]}}},rules:{"import/first":"error","import/newline-after-import":["error",{considerComments:!0,count:1}],"import/no-default-export":"error","import/no-duplicates":"error","import/no-mutable-exports":"error","import/no-named-default":"error","import/no-self-import":"error","import/no-webpack-loader-syntax":"error","import/order":["error",{groups:["builtin","external","internal","parent","sibling","index","object","type"],pathGroups:[{group:"internal",pattern:"@/**"}],pathGroupsExcludedImportTypes:["type"]}],"import/namespace":"off","import/no-absolute-path":"off","import/no-named-as-default":"off","import/no-named-as-default-member":"off","import/no-unresolved":"off","unused-imports/no-unused-imports":"error","unused-imports/no-unused-vars":["warn",{vars:"all",varsIgnorePattern:"^_",args:"after-used",argsIgnorePattern:"^_"}],"antfu/no-import-node-modules-by-path":"error","antfu/if-newline":"error","antfu/import-dedupe":"error","antfu/prefer-inline-type-import":"error"}},{files:[`**/*config*.${k}`,`**/views/${i}`,`**/pages/${i}`,`**/server/${i}`,"**/{index,vite,esbuild,rollup,webpack,rspack}.ts","**/*.d.ts",`${a}/**`],plugins:{import:b.default},rules:{"import/no-default-export":"off"}}],q=[{plugins:{unicorn:P.default},rules:{"unicorn/better-regex":"error","unicorn/catch-error-name":"error","unicorn/custom-error-definition":"error","unicorn/error-message":"error","unicorn/escape-case":"error","unicorn/explicit-length-check":"error","unicorn/filename-case":["error",{cases:{kebabCase:!0,pascalCase:!0},ignore:[/^[A-Z]+\..*$/]}],"unicorn/import-index":"error","unicorn/new-for-builtins":"error","unicorn/no-array-callback-reference":"error","unicorn/no-array-method-this-argument":"error","unicorn/no-array-push-push":"error","unicorn/no-console-spaces":"error","unicorn/no-for-loop":"error","unicorn/no-hex-escape":"error","unicorn/no-instanceof-array":"error","unicorn/no-invalid-remove-event-listener":"error","unicorn/no-lonely-if":"error","unicorn/no-new-array":"error","unicorn/no-new-buffer":"error","unicorn/no-static-only-class":"error","unicorn/no-unnecessary-await":"error","unicorn/no-zero-fractions":"error","unicorn/number-literal-case":"error","unicorn/prefer-add-event-listener":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-index-of":"error","unicorn/prefer-array-some":"error","unicorn/prefer-at":"error","unicorn/prefer-blob-reading-methods":"error","unicorn/prefer-date-now":"error","unicorn/prefer-dom-node-append":"error","unicorn/prefer-dom-node-dataset":"error","unicorn/prefer-dom-node-remove":"error","unicorn/prefer-dom-node-text-content":"error","unicorn/prefer-includes":"error","unicorn/prefer-keyboard-event-key":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/prefer-math-trunc":"error","unicorn/prefer-modern-dom-apis":"error","unicorn/prefer-modern-math-apis":"error","unicorn/prefer-negative-index":"error","unicorn/prefer-node-protocol":"error","unicorn/prefer-number-properties":"error","unicorn/prefer-optional-catch-binding":"error","unicorn/prefer-prototype-methods":"error","unicorn/prefer-query-selector":"error","unicorn/prefer-reflect-apply":"error","unicorn/prefer-regexp-test":"error","unicorn/prefer-string-replace-all":"error","unicorn/prefer-string-slice":"error","unicorn/prefer-string-starts-ends-with":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-top-level-await":"error","unicorn/prefer-text-content":"error","unicorn/prefer-type-error":"error","unicorn/switch-case-braces":"error","unicorn/throw-new-error":"error"}}];var v=e(require("eslint-plugin-jsonc"),1),er=e(require("jsonc-eslint-parser"),1);var $=[{files:[m,d,L],plugins:{jsonc:v.default},languageOptions:{parser:er.default},rules:{...v.configs["recommended-with-jsonc"].rules,"jsonc/array-bracket-spacing":["error","never"],"jsonc/comma-dangle":"error","jsonc/comma-style":["error","last"],"jsonc/indent":["error",4],"jsonc/key-spacing":["error",{beforeColon:!1,afterColon:!0}],"jsonc/no-octal-escape":"error","jsonc/object-curly-newline":["error",{multiline:!0,consistent:!0}],"jsonc/object-curly-spacing":["error","always"],"jsonc/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}]}}],T=[{files:["**/package.json"],rules:{"jsonc/sort-keys":["error",{pathPattern:"^$",order:["name","version","private","packageManager","description","type","keywords","license","homepage","bugs","repository","author","contributors","funding","sideEffects","files","main","module","types","exports","typesVersions","unpkg","jsdelivr","browser","bin","man","directories","publishConfig","scripts","peerDependencies","peerDependenciesMeta","optionalDependencies","dependencies","devDependencies","engines","config","overrides","pnpm","husky","simple-git-hooks","lint-staged","eslintConfig"]},{pathPattern:"^(?:dev|peer|optional|bundled)?[Dd]ependencies$",order:{type:"asc"}},{pathPattern:"^resolutions$",order:{type:"asc"}},{pathPattern:"^pnpm.overrides$",order:{type:"asc"}},{pathPattern:"^exports.*$",order:["types","import","require","default"]}],"jsonc/sort-array-values":["error",{pathPattern:"^files$",order:{type:"asc"}}]}}];var D=e(require("eslint-plugin-markdown"),1),or=e(require("@typescript-eslint/eslint-plugin"),1);var A=[{files:[a],plugins:{markdown:D.default},processor:"markdown/markdown"},{files:[`${a}/${i}`,`${a}/${p}`],languageOptions:{parserOptions:{ecmaFeatures:{impliedStrict:!0}}},plugins:{"@typescript-eslint":or.default},rules:{...D.default.configs.recommended.overrides[1].rules,"@typescript-eslint/no-redeclare":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-use-before-define":"off","@typescript-eslint/no-var-requires":"off","no-alert":"off","no-console":"off","no-restricted-imports":"off","no-undef":"off","no-unused-expressions":"off","no-unused-vars":"off"}}];var N=e(require("@typescript-eslint/parser"),1),l=e(require("@typescript-eslint/eslint-plugin"),1);var c=[{files:[j,_],languageOptions:{parser:N.default,parserOptions:{sourceType:"module"}},plugins:{"@typescript-eslint":l.default},rules:{...l.default.configs["eslint-recommended"].overrides[0].rules,...l.default.configs.strict.rules,"@typescript-eslint/ban-ts-comment":["error",{"ts-ignore":"allow-with-description"}],"@typescript-eslint/consistent-type-imports":["error",{disallowTypeAnnotations:!1,fixStyle:"inline-type-imports"}],"@typescript-eslint/prefer-as-const":"warn","@typescript-eslint/member-delimiter-style":["error",{multiline:{delimiter:"none"}}],"@typescript-eslint/type-annotation-spacing":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-redeclare":"error","@typescript-eslint/no-dupe-class-members":"error",indent:"off","@typescript-eslint/indent":["error",4,{SwitchCase:1,outerIIFEBody:1,VariableDeclarator:1}],"no-invalid-this":"off","@typescript-eslint/no-invalid-this":"error","no-use-before-define":"off","@typescript-eslint/no-use-before-define":["error",{classes:!1,functions:!1,variables:!0}],"brace-style":"off","@typescript-eslint/brace-style":["error","stroustrup",{allowSingleLine:!0}],"comma-dangle":"off","@typescript-eslint/comma-dangle":["error","always-multiline"],"object-curly-spacing":"off","@typescript-eslint/object-curly-spacing":["error","always"],semi:"off","@typescript-eslint/semi":["error","never"],quotes:"off","@typescript-eslint/quotes":["error","single",{avoidEscape:!0}],"space-before-blocks":"off","@typescript-eslint/space-before-blocks":["error","always"],"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":["error",{anonymous:"always",asyncArrow:"always",named:"never"}],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":"error","keyword-spacing":"off","@typescript-eslint/keyword-spacing":["error",{before:!0,after:!0}],"comma-spacing":"off","@typescript-eslint/comma-spacing":["error",{before:!1,after:!0}],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":["error","functions"],"no-loss-of-precision":"off","@typescript-eslint/no-loss-of-precision":"error","lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":["error","always",{exceptAfterSingleLine:!0}],"antfu/generic-spacing":"error","antfu/no-cjs-exports":"error","antfu/no-ts-export-equal":"error","antfu/no-const-enum":"error","antfu/named-tuple-spacing":"error","import/named":"off","@typescript-eslint/no-unused-vars":"off","@typescript-eslint/no-explicit-any":"off","@typescript-eslint/no-non-null-assertion":"off","@typescript-eslint/explicit-module-boundary-types":"off","@typescript-eslint/consistent-indexed-object-style":"off","@typescript-eslint/naming-convention":"off","@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/explicit-member-accessibility":"off","@typescript-eslint/ban-ts-ignore":"off","@typescript-eslint/no-empty-function":"off","@typescript-eslint/triple-slash-reference":"off"}},{files:["**/*.d.ts"],rules:{"import/no-duplicates":"off"}},{files:["**/*.{test,spec}.ts?(x)"],rules:{"no-unused-expressions":"off"}},{files:["**/*.js","**/*.cjs"],rules:{"@typescript-eslint/no-var-requires":"off","@typescript-eslint/no-require-imports":"off"}}];var R=e(require("@unocss/eslint-plugin"),1),F=[{plugins:{"@unocss":R.default},rules:{...R.default.configs.recommended.rules}}];var w=e(require("eslint-plugin-yml"),1),nr=e(require("yaml-eslint-parser"),1);var I=[{files:[y],plugins:{yml:w.default},languageOptions:{parser:nr.default},rules:{...w.configs.standard.rules,"yml/no-empty-document":"off","yml/no-empty-mapping-value":"off","yml/quotes":["error",{avoidEscape:!1,prefer:"single"}]}}];var sr=require("local-pkg"),M=e(require("vue-eslint-parser"),1),o=e(require("eslint-plugin-vue"),1),tr=e(require("@typescript-eslint/eslint-plugin"),1);function ir(){let r=(0,sr.getPackageInfoSync)("vue",{paths:[process.cwd()]});return r&&typeof r.version=="string"&&!Number.isNaN(+r.version[0])?+r.version[0]:3}var hr=ir()===3,ar=[{languageOptions:{globals:{$:"readonly",$$:"readonly",$ref:"readonly",$computed:"readonly",$shallowRef:"readonly",$toRef:"readonly",$customRef:"readonly"}},plugins:{vue:o.default},rules:{"vue/no-setup-props-reactivity-loss":"off"}}],Or={"vue/max-attributes-per-line":"off","vue/no-v-html":"off","vue/multi-word-component-names":"off","vue/array-bracket-newline":["error",{minItems:3,multiline:!0}],"vue/array-bracket-spacing":["error","never"],"vue/arrow-spacing":["error",{after:!0,before:!0}],"vue/block-spacing":["error","always"],"vue/block-tag-newline":["error",{multiline:"always",singleline:"always"}],"vue/brace-style":["error","stroustrup",{allowSingleLine:!0}],"vue/comma-dangle":["error","always-multiline"],"vue/comma-spacing":["error",{after:!0,before:!1}],"vue/comma-style":["error","last"],"vue/component-name-in-template-casing":["error","PascalCase"],"vue/component-options-name-casing":["error","PascalCase"],"vue/block-order":["error",{order:["template","script","style"]}],"vue/custom-event-name-casing":["error","camelCase"],"vue/define-macros-order":["error",{order:["defineOptions","defineProps","defineEmits","defineSlots"]}],"vue/dot-location":["error","property"],"vue/dot-notation":["error",{allowKeywords:!0}],"vue/eqeqeq":["error","smart"],"vue/html-comment-content-spacing":["error","always",{exceptions:["-"]}],"vue/html-indent":["error",4],"vue/key-spacing":["error",{afterColon:!0,beforeColon:!1}],"vue/keyword-spacing":["error",{after:!0,before:!0}],"vue/no-constant-condition":"warn","vue/no-empty-pattern":"error","vue/no-extra-parens":["error","functions"],"vue/no-irregular-whitespace":"error","vue/no-loss-of-precision":"error","vue/no-restricted-syntax":["error","DebuggerStatement","LabeledStatement","WithStatement"],"vue/no-restricted-v-bind":["error","/^v-/"],"vue/no-sparse-arrays":"error","vue/no-unused-refs":"error","vue/no-useless-v-bind":"error","vue/object-curly-newline":["error",{consistent:!0,multiline:!0}],"vue/object-curly-spacing":["error","always"],"vue/object-property-newline":["error",{allowMultiplePropertiesPerLine:!0}],"vue/object-shorthand":["error","always",{avoidQuotes:!0,ignoreConstructors:!1}],"vue/operator-linebreak":["error","before"],"vue/padding-line-between-blocks":["error","always"],"vue/prefer-separate-static-class":"error","vue/prefer-template":"error","vue/quote-props":["error","consistent-as-needed"],"vue/require-typed-object-prop":["error"],"vue/space-in-parens":["error","never"],"vue/space-infix-ops":"error","vue/space-unary-ops":["error",{nonwords:!1,words:!0}],"vue/template-curly-spacing":"error"},kr={...o.default.configs.base.rules,...o.default.configs["vue3-essential"].rules,...o.default.configs["vue3-strongly-recommended"].rules,...o.default.configs["vue3-recommended"].rules},jr={...o.default.configs.base.rules,...o.default.configs.essential.rules,...o.default.configs["strongly-recommended"].rules,...o.default.configs.recommended.rules},x=[{files:[p],plugins:{vue:o.default,"@typescript-eslint":tr.default},languageOptions:{parser:M.default,parserOptions:{parser:"@typescript-eslint/parser",sourceType:"module",extraFileExtensions:[".vue"],ecmaFeatures:{jsx:!0}}},processor:o.default.processors[".vue"],rules:{...c[0].rules}},{plugins:{vue:o.default},rules:{...hr?kr:jr,...Or}},...ar];var U=[{ignores:S},...C,...B,...c,...E,...q,...$,...T,...I,...O],_r=[...U,...x,...F];function Lr(r=[],{vue:n=!0,markdown:t=!0,unocss:u=!1}={}){let s=[...U];return n!==!1&&s.push(...x),t!==!1&&s.push(...A),u!==!1&&s.push(...F),Object.keys(r).length>0&&s.push(...Array.isArray(r)?r:[r]),s}0&&(module.exports={GLOB_ALL_SRC,GLOB_CSS,GLOB_DIST,GLOB_EXCLUDE,GLOB_HTML,GLOB_JS,GLOB_JSON,GLOB_JSON5,GLOB_JSONC,GLOB_JSX,GLOB_LESS,GLOB_LOCKFILE,GLOB_MARKDOWN,GLOB_NODE_MODULES,GLOB_SCSS,GLOB_SRC,GLOB_SRC_EXT,GLOB_STYLE,GLOB_TS,GLOB_TSX,GLOB_VUE,GLOB_YAML,all,antfuPlugin,basic,config,eslintComments,getVueVersion,importPlugin,imports,js,jsonc,jsx,markdown,pkgOrder,reactivityTransform,tsParser,tsPlugin,typescript,unicorn,unicornPlugin,vue,vueParser,vuePlugin,yml});
|
package/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './src/eslint-comments.js'
|
|
2
|
-
export * from './src/js.js'
|
|
3
|
-
export * from './src/jsonc.js'
|
|
4
|
-
export * from './src/markdown.js'
|
|
5
|
-
export * from './src/presets.js'
|
|
6
|
-
export * from './src/shared.js'
|
|
7
|
-
export * from './src/typescript.js'
|
|
8
|
-
export * from './src/vue.js'
|
|
9
|
-
export * from './src/yml.js'
|
package/src/eslint-comments.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import commentsPlugin from 'eslint-plugin-eslint-comments'
|
|
2
|
-
|
|
3
|
-
/** @type {import('eslint-define-config').FlatESLintConfigItem[]} */
|
|
4
|
-
export const eslintComments = [
|
|
5
|
-
{
|
|
6
|
-
plugins: {
|
|
7
|
-
'eslint-comments': commentsPlugin,
|
|
8
|
-
},
|
|
9
|
-
rules: {
|
|
10
|
-
...commentsPlugin.configs.recommended.rules,
|
|
11
|
-
|
|
12
|
-
'eslint-comments/disable-enable-pair': ['error', {
|
|
13
|
-
allowWholeFile: true,
|
|
14
|
-
}],
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
]
|