@tb-dev/eslint-config 1.0.0 → 1.1.0
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 +21 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +42 -2
- package/dist/index.mjs +1 -1
- package/package.json +13 -9
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Andrew Ferreira
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Andrew Ferreira
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const globals=require("globals"),process=require("node:process");var Glob,GlobIgnore;function javascript(r){const{overrides:e}=r,o=[Glob.TYPESCRIPT];return r.vue&&o.push(Glob.VUE),{files:o,languageOptions:{ecmaVersion:"latest",sourceType:"module",globals:{...globals.browser,...globals.es2021,...globals.node,document:"readonly",window:"readonly"}},rules:{"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":["error",{checkForEach:!0,allowVoid:!0}],"block-scoped-var":"error","class-methods-use-this":"off","consistent-this":["error","self"],"default-case-last":"error","dot-notation":"off",eqeqeq:["error","always"],"for-direction":"error","func-style":["error","declaration",{allowArrowFunctions:!0}],"grouped-accessor-pairs":["error","getBeforeSet"],"guard-for-in":"error","init-declarations":"off","logical-assignment-operators":["error","always",{enforceForIfStatements:!0}],"max-params":"off","new-cap":["error",{newIsCap:!0,capIsNew:!1,properties:!0}],"no-alert":"error","no-array-constructor":"off","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-else-if":"error","no-duplicate-case":"error","no-duplicate-imports":["error",{includeExports:!0}],"no-else-return":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-function":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":["error",{allowEmptyCase:!0}],"no-global-assign":"error","no-implicit-coercion":["error",{disallowTemplateShorthand:!0}],"no-implied-eval":"off","no-import-assign":"error","no-inner-declarations":["error","both"],"no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"off","no-loss-of-precision":"off","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-promise-executor-return":["error",{allowVoid:!0}],"no-proto":"error","no-prototype-builtins":"error","no-regex-spaces":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-shadow":"off","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-throw-literal":"off","no-undef-init":"error","no-undefined":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"off","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-with":"error","object-shorthand":["error","always"],"operator-assignment":["error","always"],"prefer-arrow-callback":"error","prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-atomic-updates":"error","require-await":"off","sort-imports":["error",{allowSeparatedGroups:!1,ignoreCase:!1,ignoreDeclarationSort:!0,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","use-isnan":"error","valid-typeof":"error",yoda:["error","never"],...e?.javascript??{}}}}async function interopDefault(r){const e=await r;return e.default??e}function getIgnores(){return Object.values(GlobIgnore)}async function typescript(r){const{project:e,overrides:o}=r,[t,s]=await Promise.all([await interopDefault(import("@typescript-eslint/parser")),await interopDefault(import("@typescript-eslint/eslint-plugin"))]),n=[Glob.TYPESCRIPT];r.vue&&n.push(Glob.VUE);const i={"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/array-type":["error",{default:"array"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:3}],"@typescript-eslint/class-literal-property-style":["error","fields"],"@typescript-eslint/class-methods-use-this":["error",{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:"public-fields"}],"@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/consistent-indexed-object-style":["error","record"],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/explicit-member-accessibility":["error",{accessibility:"explicit",overrides:{accessors:"no-public",constructors:"no-public",methods:"explicit",properties:"explicit",parameterProperties:"explicit"}}],"@typescript-eslint/explicit-module-boundary-types":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-base-to-string":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-floating-promises":["error",{ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/no-invalid-void-type":["error",{allowInGenericTypeArguments:!0,allowAsThisParameter:!1}],"@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-loss-of-precision":"error","@typescript-eslint/no-meaningless-void-operator":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksSpreads:!0,checksVoidReturn:{arguments:!0,attributes:!0,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-mixed-enums":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-throw-literal":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":["error",{allowComparingNullableBooleansToTrue:!1,allowComparingNullableBooleansToFalse:!0}],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-unsafe-unary-minus":"error","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":["error",{functions:!1,enums:!0,typedefs:!1}],"@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreTernaryTests:!1,ignoreConditionalTests:!1,ignoreMixedLogicalExpressions:!1,ignorePrimitives:{bigint:!1,boolean:!1,number:!1,string:!1}}],"@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":"error","@typescript-eslint/require-await":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/restrict-template-expressions":"error","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/switch-exhaustiveness-check":["error",{requireDefaultForNonUnion:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],...o?.typescript??{}};return{files:n,languageOptions:{ecmaVersion:"latest",sourceType:"module",parser:t,parserOptions:{project:e,tsconfigRootDir:process.cwd()}},plugins:{"@typescript-eslint":s},rules:i}}async function config(r){return[javascript(r),await typescript(r),{ignores:[...getIgnores(),...r.ignores??[]]}]}!function(r){r.TYPESCRIPT="**/*.?([cm])[jt]s?(x)",r.VUE="**/*.vue"}(Glob||(Glob={})),function(r){r.DIST="**/dist",r.NODE_MODULES="**/node_modules",r.OUT="**/out",r.TEMP="**/.temp"}(GlobIgnore||(GlobIgnore={})),module.exports=config;
|
|
1
|
+
"use strict";const eslintConfigPrettier=require("eslint-config-prettier"),globals=require("globals"),process=require("node:process");var Glob,GlobIgnore;function javascript(r){const{overrides:e}=r,o=[Glob.TYPESCRIPT];return r.vue&&o.push(Glob.VUE),{files:o,languageOptions:{ecmaVersion:"latest",sourceType:"module",globals:{...globals.browser,...globals.es2021,...globals.node,document:"readonly",window:"readonly"}},rules:{"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":["error",{checkForEach:!0,allowVoid:!0}],"block-scoped-var":"error","class-methods-use-this":"off","consistent-this":["error","self"],"default-case-last":"error","dot-notation":"off",eqeqeq:["error","always"],"for-direction":"error","func-style":["error","declaration",{allowArrowFunctions:!0}],"grouped-accessor-pairs":["error","getBeforeSet"],"guard-for-in":"error","init-declarations":"off","logical-assignment-operators":["error","always",{enforceForIfStatements:!0}],"max-params":"off","new-cap":["error",{newIsCap:!0,capIsNew:!1,properties:!0}],"no-alert":"error","no-array-constructor":"off","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-else-if":"error","no-duplicate-case":"error","no-duplicate-imports":["error",{includeExports:!0}],"no-else-return":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-function":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":["error",{allowEmptyCase:!0}],"no-global-assign":"error","no-implicit-coercion":["error",{disallowTemplateShorthand:!0}],"no-implied-eval":"off","no-import-assign":"error","no-inner-declarations":["error","both"],"no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"off","no-loss-of-precision":"off","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-promise-executor-return":["error",{allowVoid:!0}],"no-proto":"error","no-prototype-builtins":"error","no-regex-spaces":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-shadow":"off","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-throw-literal":"off","no-undef-init":"error","no-undefined":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"off","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-with":"error","object-shorthand":["error","always"],"operator-assignment":["error","always"],"prefer-arrow-callback":"error","prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-atomic-updates":"error","require-await":"off","sort-imports":["error",{allowSeparatedGroups:!1,ignoreCase:!1,ignoreDeclarationSort:!0,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","use-isnan":"error","valid-typeof":"error",yoda:["error","never"],...e?.javascript??{}}}}async function interopDefault(r){const e=await r;return e.default??e}function getIgnores(){return Object.values(GlobIgnore)}async function typescript(r){const{project:e,overrides:o}=r,[t,n]=await Promise.all([await interopDefault(import("@typescript-eslint/parser")),await interopDefault(import("@typescript-eslint/eslint-plugin"))]),s=[Glob.TYPESCRIPT];r.vue&&s.push(Glob.VUE);const i={"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/array-type":["error",{default:"array"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:3}],"@typescript-eslint/class-literal-property-style":["error","fields"],"@typescript-eslint/class-methods-use-this":["error",{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:"public-fields"}],"@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/consistent-indexed-object-style":["error","record"],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/explicit-member-accessibility":["error",{accessibility:"explicit",overrides:{accessors:"no-public",constructors:"no-public",methods:"explicit",properties:"explicit",parameterProperties:"explicit"}}],"@typescript-eslint/explicit-module-boundary-types":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-base-to-string":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-floating-promises":["error",{ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/no-invalid-void-type":["error",{allowInGenericTypeArguments:!0,allowAsThisParameter:!1}],"@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-loss-of-precision":"error","@typescript-eslint/no-meaningless-void-operator":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksSpreads:!0,checksVoidReturn:{arguments:!0,attributes:!0,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-mixed-enums":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-throw-literal":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":["error",{allowComparingNullableBooleansToTrue:!1,allowComparingNullableBooleansToFalse:!0}],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-unsafe-unary-minus":"error","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":["error",{functions:!1,enums:!0,typedefs:!1}],"@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreTernaryTests:!1,ignoreConditionalTests:!1,ignoreMixedLogicalExpressions:!1,ignorePrimitives:{bigint:!1,boolean:!1,number:!1,string:!1}}],"@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":"error","@typescript-eslint/require-await":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/restrict-template-expressions":"error","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/switch-exhaustiveness-check":["error",{requireDefaultForNonUnion:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],...o?.typescript??{}};return{files:s,languageOptions:{ecmaVersion:"latest",sourceType:"module",parser:t,parserOptions:{project:e,tsconfigRootDir:process.cwd()}},plugins:{"@typescript-eslint":n},rules:i}}async function vue(r){const{overrides:e,vue:o}=r;if(!o)return[];const[t,n,s]=await Promise.all([await interopDefault(import("vue-eslint-parser")),await interopDefault(import("eslint-plugin-vue")),await interopDefault(import("@typescript-eslint/parser"))]),i={...n.configs.base.rules,"vue/attribute-hyphenation":["error","always"],"vue/attributes-order":"error","vue/block-lang":["error",{script:{lang:"ts"},style:{lang:"scss",allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style:not([scoped])","style[scoped]"]}],"vue/block-tag-newline":["error",{singleline:"always",multiline:"always",maxEmptyLines:0}],"vue/component-api-style":["error",["script-setup"]],"vue/component-definition-name-casing":["error","PascalCase"],"vue/component-name-in-template-casing":["error","PascalCase"],"vue/custom-event-name-casing":["error","camelCase"],"vue/define-emits-declaration":["error","type-based"],"vue/define-macros-order":["error",{order:["defineProps","defineEmits"]}],"vue/define-props-declaration":["error","type-based"],"vue/first-attribute-linebreak":"off","vue/html-button-has-type":["error",{button:!0,submit:!0,reset:!0}],"vue/html-closing-bracket-newline":["error",{singleline:"never",multiline:"always"}],"vue/html-closing-bracket-spacing":["error",{startTag:"never",endTag:"never",selfClosingTag:"always"}],"vue/html-self-closing":["error",{html:{void:"never",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/match-component-file-name":["error",{extensions:["tsx","vue"],shouldMatchCase:!1}],"vue/match-component-import-name":"error","vue/multi-word-component-names":"off","vue/mustache-interpolation-spacing":["error","always"],"vue/no-arrow-functions-in-watch":"off","vue/no-async-in-computed-properties":"error","vue/no-boolean-default":["error","no-default"],"vue/no-computed-properties-in-data":"error","vue/no-dupe-keys":"error","vue/no-dupe-v-else-if":"error","vue/no-duplicate-attributes":["error",{allowCoexistClass:!0,allowCoexistStyle:!0}],"vue/no-export-in-script-setup":"error","vue/no-expose-after-await":"error","vue/no-lifecycle-after-await":"error","vue/no-lone-template":"error","vue/no-multi-spaces":"error","vue/no-multiple-objects-in-class":"error","vue/no-mutating-props":"error","vue/no-parsing-error":"error","vue/no-ref-as-operand":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-reserved-component-names":"error","vue/no-reserved-keys":"error","vue/no-reserved-props":"error","vue/no-required-prop-with-default":["error",{autofix:!0}],"vue/no-root-v-if":"error","vue/no-setup-props-reactivity-loss":"error","vue/no-shared-component-data":"error","vue/no-side-effects-in-computed-properties":"error","vue/no-spaces-around-equal-signs-in-attribute":"error","vue/no-static-inline-styles":["error",{allowBinding:!1}],"vue/no-template-key":"error","vue/no-template-shadow":"error","vue/no-template-target-blank":"error","vue/no-textarea-mustache":"error","vue/no-unused-components":"error","vue/no-unused-properties":"error","vue/no-unused-refs":"error","vue/no-unused-vars":["error",{ignorePattern:"^_"}],"vue/no-use-computed-property-like-method":"error","vue/no-use-v-else-with-v-for":"error","vue/no-use-v-if-with-v-for":"error","vue/no-useless-mustaches":["error",{ignoreIncludesComment:!1,ignoreStringEscape:!1}],"vue/no-useless-template-attributes":"error","vue/no-useless-v-bind":"error","vue/no-v-for-template-key-on-child":"error","vue/no-v-text-v-html-on-component":"error","vue/no-v-html":"off","vue/no-watch-after-await":"error","vue/order-in-components":"error","vue/padding-line-between-blocks":["error","always"],"vue/prefer-define-options":"error","vue/prefer-import-from-vue":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/prop-name-casing":["error","camelCase"],"vue/require-component-is":"error","vue/require-default-prop":"error","vue/require-explicit-emits":["error",{allowProps:!1}],"vue/require-macro-variable-name":["error",{defineProps:"props",defineEmits:"emit",defineSlots:"slots",useSlots:"slots",useAttrs:"attrs"}],"vue/require-prop-types":"error","vue/require-render-return":"error","vue/require-slots-as-functions":"error","vue/require-toggle-inside-transition":"error","vue/require-typed-ref":"error","vue/require-v-for-key":"error","vue/require-valid-default-prop":"error","vue/return-in-computed-property":"error","vue/return-in-emits-validator":"error","vue/this-in-template":["error","always"],"vue/use-v-on-exact":"error","vue/v-bind-style":["error","shorthand"],"vue/v-for-delimiter-style":["error","of"],"vue/v-on-handler-style":["error",["method","inline-function"],{ignoreIncludesComment:!1}],"vue/v-on-style":["error","shorthand"],"vue/v-slot-style":["error",{atComponent:"shorthand",default:"shorthand",named:"shorthand"}],"vue/v-on-event-hyphenation":["error","always"],"vue/valid-attribute-name":"error","vue/valid-define-emits":"error","vue/valid-define-options":"error","vue/valid-define-props":"error","vue/valid-next-tick":"error","vue/valid-template-root":"error","vue/valid-v-bind":"error","vue/valid-v-cloak":"error","vue/valid-v-else-if":"error","vue/valid-v-else":"error","vue/valid-v-for":"error","vue/valid-v-html":"error","vue/valid-v-if":"error","vue/valid-v-memo":"error","vue/valid-v-model":"error","vue/valid-v-on":"error","vue/valid-v-once":"error","vue/valid-v-pre":"error","vue/valid-v-show":"error","vue/valid-v-slot":"error","vue/valid-v-text":"error",...e?.vue??{}};return[{plugins:{vue:n}},{files:[Glob.TYPESCRIPT,Glob.VUE],languageOptions:{parser:t,parserOptions:{parser:s,extraFileExtensions:[".vue"],sourceType:"module",ecmaVersion:"latest",ecmaFeatures:{jsx:Boolean(r.jsx)}}}},{processor:n.processors[".vue"],rules:i}]}async function config(r){const{prettier:e=!0}=r;return await Promise.all([javascript(r),typescript(r),...await vue(r),e?eslintConfigPrettier:{},{ignores:[...getIgnores(),...r.ignores??[]]}])}!function(r){r.TYPESCRIPT="**/*.?([cm])[jt]s?(x)",r.VUE="**/*.vue"}(Glob||(Glob={})),function(r){r.DIST="**/dist",r.NODE_MODULES="**/node_modules",r.OUT="**/out",r.TEMP="**/.temp"}(GlobIgnore||(GlobIgnore={})),module.exports=config;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
declare
|
|
2
|
-
export default
|
|
1
|
+
declare function config(options: ConfigOptions): Promise<Partial<ConfigObject>[]>;
|
|
2
|
+
export default config;
|
|
3
|
+
|
|
4
|
+
/** @see https://eslint.org/docs/latest/use/configure/configuration-files-new#configuration-objects */
|
|
5
|
+
declare interface ConfigObject {
|
|
6
|
+
files: string[];
|
|
7
|
+
ignores?: Ignores['ignores'];
|
|
8
|
+
languageOptions: {
|
|
9
|
+
ecmaVersion?: 'latest';
|
|
10
|
+
sourceType?: 'module';
|
|
11
|
+
parser?: unknown;
|
|
12
|
+
parserOptions?: Record<string, unknown>;
|
|
13
|
+
globals?: Record<string, boolean | 'readonly' | 'writeable'>;
|
|
14
|
+
};
|
|
15
|
+
plugins?: Record<string, unknown>;
|
|
16
|
+
processor?: unknown;
|
|
17
|
+
rules: Rules;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
declare interface ConfigOptions {
|
|
21
|
+
prettier?: boolean;
|
|
22
|
+
vue?: boolean;
|
|
23
|
+
jsx?: boolean;
|
|
24
|
+
/** `tsconfig.json` files for Typescript. */
|
|
25
|
+
project: string[];
|
|
26
|
+
ignores?: Ignores['ignores'];
|
|
27
|
+
overrides?: {
|
|
28
|
+
javascript?: Rules;
|
|
29
|
+
typescript?: Rules;
|
|
30
|
+
vue?: Rules;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare interface Ignores {
|
|
35
|
+
ignores: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare type RuleOption = [Severity, string | Record<string, unknown>] | [Severity, string, Record<string, unknown>];
|
|
39
|
+
|
|
40
|
+
declare type Rules = Record<string, Severity | RuleOption>;
|
|
41
|
+
|
|
42
|
+
declare type Severity = 'error' | 'warn' | 'off' | 0 | 1;
|
|
3
43
|
|
|
4
44
|
export { }
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"globals";import e from"node:process";var o,t;function s(e){const{overrides:t}=e,s=[o.TYPESCRIPT];return e.vue&&s.push(o.VUE),{files:s,languageOptions:{ecmaVersion:"latest",sourceType:"module",globals:{...r.browser,...r.es2021,...r.node,document:"readonly",window:"readonly"}},rules:{"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":["error",{checkForEach:!0,allowVoid:!0}],"block-scoped-var":"error","class-methods-use-this":"off","consistent-this":["error","self"],"default-case-last":"error","dot-notation":"off",eqeqeq:["error","always"],"for-direction":"error","func-style":["error","declaration",{allowArrowFunctions:!0}],"grouped-accessor-pairs":["error","getBeforeSet"],"guard-for-in":"error","init-declarations":"off","logical-assignment-operators":["error","always",{enforceForIfStatements:!0}],"max-params":"off","new-cap":["error",{newIsCap:!0,capIsNew:!1,properties:!0}],"no-alert":"error","no-array-constructor":"off","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-else-if":"error","no-duplicate-case":"error","no-duplicate-imports":["error",{includeExports:!0}],"no-else-return":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-function":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":["error",{allowEmptyCase:!0}],"no-global-assign":"error","no-implicit-coercion":["error",{disallowTemplateShorthand:!0}],"no-implied-eval":"off","no-import-assign":"error","no-inner-declarations":["error","both"],"no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"off","no-loss-of-precision":"off","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-promise-executor-return":["error",{allowVoid:!0}],"no-proto":"error","no-prototype-builtins":"error","no-regex-spaces":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-shadow":"off","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-throw-literal":"off","no-undef-init":"error","no-undefined":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"off","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-with":"error","object-shorthand":["error","always"],"operator-assignment":["error","always"],"prefer-arrow-callback":"error","prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-atomic-updates":"error","require-await":"off","sort-imports":["error",{allowSeparatedGroups:!1,ignoreCase:!1,ignoreDeclarationSort:!0,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","use-isnan":"error","valid-typeof":"error",yoda:["error","never"],...t?.javascript??{}}}}async function n(r){const e=await r;return e.default??e}async function i(r){const{project:t,overrides:s}=r,[i,p]=await Promise.all([await n(import("@typescript-eslint/parser")),await n(import("@typescript-eslint/eslint-plugin"))]),a=[o.TYPESCRIPT];r.vue&&a.push(o.VUE);const l={"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/array-type":["error",{default:"array"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:3}],"@typescript-eslint/class-literal-property-style":["error","fields"],"@typescript-eslint/class-methods-use-this":["error",{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:"public-fields"}],"@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/consistent-indexed-object-style":["error","record"],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/explicit-member-accessibility":["error",{accessibility:"explicit",overrides:{accessors:"no-public",constructors:"no-public",methods:"explicit",properties:"explicit",parameterProperties:"explicit"}}],"@typescript-eslint/explicit-module-boundary-types":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-base-to-string":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-floating-promises":["error",{ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/no-invalid-void-type":["error",{allowInGenericTypeArguments:!0,allowAsThisParameter:!1}],"@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-loss-of-precision":"error","@typescript-eslint/no-meaningless-void-operator":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksSpreads:!0,checksVoidReturn:{arguments:!0,attributes:!0,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-mixed-enums":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-throw-literal":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":["error",{allowComparingNullableBooleansToTrue:!1,allowComparingNullableBooleansToFalse:!0}],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-unsafe-unary-minus":"error","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":["error",{functions:!1,enums:!0,typedefs:!1}],"@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreTernaryTests:!1,ignoreConditionalTests:!1,ignoreMixedLogicalExpressions:!1,ignorePrimitives:{bigint:!1,boolean:!1,number:!1,string:!1}}],"@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":"error","@typescript-eslint/require-await":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/restrict-template-expressions":"error","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/switch-exhaustiveness-check":["error",{requireDefaultForNonUnion:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],...s?.typescript??{}};return{files:a,languageOptions:{ecmaVersion:"latest",sourceType:"module",parser:i,parserOptions:{project:t,tsconfigRootDir:e.cwd()}},plugins:{"@typescript-eslint":p},rules:l}}async function p(r){return[s(r),await i(r),{ignores:[...Object.values(t),...r.ignores??[]]}]}!function(r){r.TYPESCRIPT="**/*.?([cm])[jt]s?(x)",r.VUE="**/*.vue"}(o||(o={})),function(r){r.DIST="**/dist",r.NODE_MODULES="**/node_modules",r.OUT="**/out",r.TEMP="**/.temp"}(t||(t={}));export{p as default};
|
|
1
|
+
import r from"eslint-config-prettier";import e from"globals";import o from"node:process";var t,n;function s(r){const{overrides:o}=r,n=[t.TYPESCRIPT];return r.vue&&n.push(t.VUE),{files:n,languageOptions:{ecmaVersion:"latest",sourceType:"module",globals:{...e.browser,...e.es2021,...e.node,document:"readonly",window:"readonly"}},rules:{"accessor-pairs":["error",{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":["error",{checkForEach:!0,allowVoid:!0}],"block-scoped-var":"error","class-methods-use-this":"off","consistent-this":["error","self"],"default-case-last":"error","dot-notation":"off",eqeqeq:["error","always"],"for-direction":"error","func-style":["error","declaration",{allowArrowFunctions:!0}],"grouped-accessor-pairs":["error","getBeforeSet"],"guard-for-in":"error","init-declarations":"off","logical-assignment-operators":["error","always",{enforceForIfStatements:!0}],"max-params":"off","new-cap":["error",{newIsCap:!0,capIsNew:!1,properties:!0}],"no-alert":"error","no-array-constructor":"off","no-async-promise-executor":"error","no-caller":"error","no-case-declarations":"error","no-class-assign":"error","no-compare-neg-zero":"error","no-cond-assign":["error","always"],"no-constant-binary-expression":"error","no-constant-condition":"error","no-constructor-return":"error","no-control-regex":"error","no-debugger":"error","no-delete-var":"error","no-dupe-else-if":"error","no-duplicate-case":"error","no-duplicate-imports":["error",{includeExports:!0}],"no-else-return":"error","no-empty":["error",{allowEmptyCatch:!0}],"no-empty-character-class":"error","no-empty-function":"off","no-empty-pattern":"error","no-empty-static-block":"error","no-eval":"error","no-ex-assign":"error","no-extend-native":"error","no-extra-bind":"error","no-extra-boolean-cast":"error","no-fallthrough":["error",{allowEmptyCase:!0}],"no-global-assign":"error","no-implicit-coercion":["error",{disallowTemplateShorthand:!0}],"no-implied-eval":"off","no-import-assign":"error","no-inner-declarations":["error","both"],"no-invalid-regexp":"error","no-irregular-whitespace":"error","no-iterator":"error","no-labels":["error",{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":"error","no-lonely-if":"error","no-loop-func":"off","no-loss-of-precision":"off","no-misleading-character-class":"error","no-multi-assign":"error","no-multi-str":"error","no-new":"error","no-new-func":"error","no-new-native-nonconstructor":"error","no-new-wrappers":"error","no-nonoctal-decimal-escape":"error","no-object-constructor":"error","no-octal":"error","no-octal-escape":"error","no-promise-executor-return":["error",{allowVoid:!0}],"no-proto":"error","no-prototype-builtins":"error","no-regex-spaces":"error","no-script-url":"error","no-self-assign":"error","no-self-compare":"error","no-sequences":"error","no-shadow":"off","no-shadow-restricted-names":"error","no-sparse-arrays":"error","no-template-curly-in-string":"error","no-throw-literal":"off","no-undef-init":"error","no-undefined":"error","no-unexpected-multiline":"error","no-unmodified-loop-condition":"error","no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-unreachable-loop":"error","no-unsafe-finally":"error","no-unsafe-optional-chaining":["error",{disallowArithmeticOperators:!0}],"no-unused-expressions":"off","no-unused-vars":"off","no-use-before-define":"off","no-useless-backreference":"error","no-useless-call":"error","no-useless-catch":"error","no-useless-computed-key":"error","no-useless-concat":"error","no-useless-constructor":"off","no-useless-rename":"error","no-useless-return":"error","no-var":"error","no-with":"error","object-shorthand":["error","always"],"operator-assignment":["error","always"],"prefer-arrow-callback":"error","prefer-const":["error",{destructuring:"all",ignoreReadBeforeAssign:!0}],"prefer-destructuring":"off","prefer-exponentiation-operator":"error","prefer-object-has-own":"error","prefer-object-spread":"error","prefer-promise-reject-errors":"error","prefer-regex-literals":["error",{disallowRedundantWrapping:!0}],"prefer-rest-params":"error","prefer-spread":"error","prefer-template":"error","require-atomic-updates":"error","require-await":"off","sort-imports":["error",{allowSeparatedGroups:!1,ignoreCase:!1,ignoreDeclarationSort:!0,ignoreMemberSort:!1,memberSyntaxSortOrder:["none","all","multiple","single"]}],"symbol-description":"error","use-isnan":"error","valid-typeof":"error",yoda:["error","never"],...o?.javascript??{}}}}async function i(r){const e=await r;return e.default??e}async function a(r){const{project:e,overrides:n}=r,[s,a]=await Promise.all([await i(import("@typescript-eslint/parser")),await i(import("@typescript-eslint/eslint-plugin"))]),l=[t.TYPESCRIPT];r.vue&&l.push(t.VUE);const p={"@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/no-array-constructor":"error","@typescript-eslint/array-type":["error",{default:"array"}],"@typescript-eslint/ban-ts-comment":["error",{"ts-expect-error":"allow-with-description","ts-ignore":!0,"ts-nocheck":!0,"ts-check":!1,minimumDescriptionLength:3}],"@typescript-eslint/class-literal-property-style":["error","fields"],"@typescript-eslint/class-methods-use-this":["error",{ignoreOverrideMethods:!0,ignoreClassesThatImplementAnInterface:"public-fields"}],"@typescript-eslint/consistent-generic-constructors":["error","constructor"],"@typescript-eslint/consistent-indexed-object-style":["error","record"],"@typescript-eslint/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow-as-parameter"}],"@typescript-eslint/consistent-type-definitions":["error","interface"],"@typescript-eslint/dot-notation":["error",{allowKeywords:!0}],"@typescript-eslint/explicit-function-return-type":"off","@typescript-eslint/explicit-member-accessibility":["error",{accessibility:"explicit",overrides:{accessors:"no-public",constructors:"no-public",methods:"explicit",properties:"explicit",parameterProperties:"explicit"}}],"@typescript-eslint/explicit-module-boundary-types":"off","@typescript-eslint/method-signature-style":["error","property"],"@typescript-eslint/no-base-to-string":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-confusing-void-expression":["error",{ignoreArrowShorthand:!0,ignoreVoidOperator:!0}],"@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-duplicate-type-constituents":"error","@typescript-eslint/no-dynamic-delete":"error","@typescript-eslint/no-empty-function":"error","@typescript-eslint/no-empty-interface":"error","@typescript-eslint/no-explicit-any":["error",{fixToUnknown:!0}],"@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-extraneous-class":"error","@typescript-eslint/no-floating-promises":["error",{ignoreVoid:!0}],"@typescript-eslint/no-for-in-array":"error","@typescript-eslint/no-implied-eval":"error","@typescript-eslint/no-import-type-side-effects":"error","@typescript-eslint/no-inferrable-types":"error","@typescript-eslint/no-invalid-void-type":["error",{allowInGenericTypeArguments:!0,allowAsThisParameter:!1}],"@typescript-eslint/no-loop-func":"error","@typescript-eslint/no-loss-of-precision":"error","@typescript-eslint/no-meaningless-void-operator":"error","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-misused-promises":["error",{checksConditionals:!0,checksSpreads:!0,checksVoidReturn:{arguments:!0,attributes:!0,properties:!0,returns:!0,variables:!0}}],"@typescript-eslint/no-mixed-enums":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"error","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-redundant-type-constituents":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-shadow":"error","@typescript-eslint/no-this-alias":"error","@typescript-eslint/no-throw-literal":"error","@typescript-eslint/no-unnecessary-boolean-literal-compare":["error",{allowComparingNullableBooleansToTrue:!1,allowComparingNullableBooleansToFalse:!0}],"@typescript-eslint/no-unnecessary-condition":"error","@typescript-eslint/no-unnecessary-qualifier":"error","@typescript-eslint/no-unnecessary-type-arguments":"error","@typescript-eslint/no-unnecessary-type-assertion":"error","@typescript-eslint/no-unnecessary-type-constraint":"error","@typescript-eslint/no-unsafe-argument":"error","@typescript-eslint/no-unsafe-assignment":"error","@typescript-eslint/no-unsafe-call":"error","@typescript-eslint/no-unsafe-declaration-merging":"error","@typescript-eslint/no-unsafe-enum-comparison":"error","@typescript-eslint/no-unsafe-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-unsafe-unary-minus":"error","@typescript-eslint/no-unused-expressions":"error","@typescript-eslint/no-use-before-define":["error",{functions:!1,enums:!0,typedefs:!1}],"@typescript-eslint/no-useless-constructor":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"error","@typescript-eslint/prefer-as-const":"error","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-for-of":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-includes":"error","@typescript-eslint/prefer-literal-enum-member":"error","@typescript-eslint/prefer-nullish-coalescing":["error",{ignoreTernaryTests:!1,ignoreConditionalTests:!1,ignoreMixedLogicalExpressions:!1,ignorePrimitives:{bigint:!1,boolean:!1,number:!1,string:!1}}],"@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/prefer-readonly":"error","@typescript-eslint/prefer-readonly-parameter-types":"off","@typescript-eslint/prefer-reduce-type-parameter":"error","@typescript-eslint/prefer-regexp-exec":"error","@typescript-eslint/prefer-return-this-type":"error","@typescript-eslint/prefer-string-starts-ends-with":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/promise-function-async":"error","@typescript-eslint/require-array-sort-compare":"error","@typescript-eslint/require-await":"error","@typescript-eslint/restrict-plus-operands":"error","@typescript-eslint/restrict-template-expressions":"error","@typescript-eslint/strict-boolean-expressions":"off","@typescript-eslint/switch-exhaustiveness-check":["error",{requireDefaultForNonUnion:!0}],"@typescript-eslint/unbound-method":"error","@typescript-eslint/unified-signatures":["error",{ignoreDifferentlyNamedParameters:!0}],...n?.typescript??{}};return{files:l,languageOptions:{ecmaVersion:"latest",sourceType:"module",parser:s,parserOptions:{project:e,tsconfigRootDir:o.cwd()}},plugins:{"@typescript-eslint":a},rules:p}}async function l(r){const{overrides:e,vue:o}=r;if(!o)return[];const[n,s,a]=await Promise.all([await i(import("vue-eslint-parser")),await i(import("eslint-plugin-vue")),await i(import("@typescript-eslint/parser"))]),l={...s.configs.base.rules,"vue/attribute-hyphenation":["error","always"],"vue/attributes-order":"error","vue/block-lang":["error",{script:{lang:"ts"},style:{lang:"scss",allowNoLang:!0}}],"vue/block-order":["error",{order:[["script","template"],"style:not([scoped])","style[scoped]"]}],"vue/block-tag-newline":["error",{singleline:"always",multiline:"always",maxEmptyLines:0}],"vue/component-api-style":["error",["script-setup"]],"vue/component-definition-name-casing":["error","PascalCase"],"vue/component-name-in-template-casing":["error","PascalCase"],"vue/custom-event-name-casing":["error","camelCase"],"vue/define-emits-declaration":["error","type-based"],"vue/define-macros-order":["error",{order:["defineProps","defineEmits"]}],"vue/define-props-declaration":["error","type-based"],"vue/first-attribute-linebreak":"off","vue/html-button-has-type":["error",{button:!0,submit:!0,reset:!0}],"vue/html-closing-bracket-newline":["error",{singleline:"never",multiline:"always"}],"vue/html-closing-bracket-spacing":["error",{startTag:"never",endTag:"never",selfClosingTag:"always"}],"vue/html-self-closing":["error",{html:{void:"never",normal:"always",component:"always"},svg:"always",math:"always"}],"vue/match-component-file-name":["error",{extensions:["tsx","vue"],shouldMatchCase:!1}],"vue/match-component-import-name":"error","vue/multi-word-component-names":"off","vue/mustache-interpolation-spacing":["error","always"],"vue/no-arrow-functions-in-watch":"off","vue/no-async-in-computed-properties":"error","vue/no-boolean-default":["error","no-default"],"vue/no-computed-properties-in-data":"error","vue/no-dupe-keys":"error","vue/no-dupe-v-else-if":"error","vue/no-duplicate-attributes":["error",{allowCoexistClass:!0,allowCoexistStyle:!0}],"vue/no-export-in-script-setup":"error","vue/no-expose-after-await":"error","vue/no-lifecycle-after-await":"error","vue/no-lone-template":"error","vue/no-multi-spaces":"error","vue/no-multiple-objects-in-class":"error","vue/no-mutating-props":"error","vue/no-parsing-error":"error","vue/no-ref-as-operand":"error","vue/no-ref-object-reactivity-loss":"error","vue/no-reserved-component-names":"error","vue/no-reserved-keys":"error","vue/no-reserved-props":"error","vue/no-required-prop-with-default":["error",{autofix:!0}],"vue/no-root-v-if":"error","vue/no-setup-props-reactivity-loss":"error","vue/no-shared-component-data":"error","vue/no-side-effects-in-computed-properties":"error","vue/no-spaces-around-equal-signs-in-attribute":"error","vue/no-static-inline-styles":["error",{allowBinding:!1}],"vue/no-template-key":"error","vue/no-template-shadow":"error","vue/no-template-target-blank":"error","vue/no-textarea-mustache":"error","vue/no-unused-components":"error","vue/no-unused-properties":"error","vue/no-unused-refs":"error","vue/no-unused-vars":["error",{ignorePattern:"^_"}],"vue/no-use-computed-property-like-method":"error","vue/no-use-v-else-with-v-for":"error","vue/no-use-v-if-with-v-for":"error","vue/no-useless-mustaches":["error",{ignoreIncludesComment:!1,ignoreStringEscape:!1}],"vue/no-useless-template-attributes":"error","vue/no-useless-v-bind":"error","vue/no-v-for-template-key-on-child":"error","vue/no-v-text-v-html-on-component":"error","vue/no-v-html":"off","vue/no-watch-after-await":"error","vue/order-in-components":"error","vue/padding-line-between-blocks":["error","always"],"vue/prefer-define-options":"error","vue/prefer-import-from-vue":"error","vue/prefer-separate-static-class":"error","vue/prefer-true-attribute-shorthand":"error","vue/prop-name-casing":["error","camelCase"],"vue/require-component-is":"error","vue/require-default-prop":"error","vue/require-explicit-emits":["error",{allowProps:!1}],"vue/require-macro-variable-name":["error",{defineProps:"props",defineEmits:"emit",defineSlots:"slots",useSlots:"slots",useAttrs:"attrs"}],"vue/require-prop-types":"error","vue/require-render-return":"error","vue/require-slots-as-functions":"error","vue/require-toggle-inside-transition":"error","vue/require-typed-ref":"error","vue/require-v-for-key":"error","vue/require-valid-default-prop":"error","vue/return-in-computed-property":"error","vue/return-in-emits-validator":"error","vue/this-in-template":["error","always"],"vue/use-v-on-exact":"error","vue/v-bind-style":["error","shorthand"],"vue/v-for-delimiter-style":["error","of"],"vue/v-on-handler-style":["error",["method","inline-function"],{ignoreIncludesComment:!1}],"vue/v-on-style":["error","shorthand"],"vue/v-slot-style":["error",{atComponent:"shorthand",default:"shorthand",named:"shorthand"}],"vue/v-on-event-hyphenation":["error","always"],"vue/valid-attribute-name":"error","vue/valid-define-emits":"error","vue/valid-define-options":"error","vue/valid-define-props":"error","vue/valid-next-tick":"error","vue/valid-template-root":"error","vue/valid-v-bind":"error","vue/valid-v-cloak":"error","vue/valid-v-else-if":"error","vue/valid-v-else":"error","vue/valid-v-for":"error","vue/valid-v-html":"error","vue/valid-v-if":"error","vue/valid-v-memo":"error","vue/valid-v-model":"error","vue/valid-v-on":"error","vue/valid-v-once":"error","vue/valid-v-pre":"error","vue/valid-v-show":"error","vue/valid-v-slot":"error","vue/valid-v-text":"error",...e?.vue??{}};return[{plugins:{vue:s}},{files:[t.TYPESCRIPT,t.VUE],languageOptions:{parser:n,parserOptions:{parser:a,extraFileExtensions:[".vue"],sourceType:"module",ecmaVersion:"latest",ecmaFeatures:{jsx:Boolean(r.jsx)}}}},{processor:s.processors[".vue"],rules:l}]}async function p(e){const{prettier:o=!0}=e;return await Promise.all([s(e),a(e),...await l(e),o?r:{},{ignores:[...Object.values(n),...e.ignores??[]]}])}!function(r){r.TYPESCRIPT="**/*.?([cm])[jt]s?(x)",r.VUE="**/*.vue"}(t||(t={})),function(r){r.DIST="**/dist",r.NODE_MODULES="**/node_modules",r.OUT="**/out",r.TEMP="**/.temp"}(n||(n={}));export{p as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tb-dev/eslint-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "ESLint config",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,17 +25,21 @@
|
|
|
25
25
|
"minify": "pnpm exec minify-it dist",
|
|
26
26
|
"prepare": "husky install",
|
|
27
27
|
"release": "miho -l publish",
|
|
28
|
-
"rollup": "rollup --config rollup.config.
|
|
28
|
+
"rollup": "rollup --config rollup.config.js",
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "^6.13.
|
|
33
|
-
"@typescript-eslint/parser": "^6.13.
|
|
34
|
-
"
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
33
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
34
|
+
"eslint-config-prettier": "^9.0.0",
|
|
35
|
+
"eslint-plugin-vue": "^9.18.1",
|
|
36
|
+
"globals": "^13.23.0",
|
|
37
|
+
"vue-eslint-parser": "^9.3.2"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
40
|
"@octokit/core": "^5.0.2",
|
|
38
41
|
"@rollup/plugin-typescript": "^11.1.5",
|
|
42
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
39
43
|
"@types/node": "^20.10.0",
|
|
40
44
|
"eslint": "^8.54.0",
|
|
41
45
|
"husky": "^8.0.3",
|
|
@@ -44,12 +48,12 @@
|
|
|
44
48
|
"minify-it": "^1.1.1",
|
|
45
49
|
"npm-run-all2": "^6.1.1",
|
|
46
50
|
"prettier": "^3.1.0",
|
|
47
|
-
"rollup": "^4.
|
|
48
|
-
"taze": "^0.12.
|
|
51
|
+
"rollup": "^4.6.0",
|
|
52
|
+
"taze": "^0.12.2",
|
|
49
53
|
"ts-node": "^10.9.1",
|
|
50
54
|
"tslib": "^2.6.2",
|
|
51
|
-
"typescript": "5.
|
|
52
|
-
"vite": "^5.0.
|
|
55
|
+
"typescript": "5.3.2",
|
|
56
|
+
"vite": "^5.0.3",
|
|
53
57
|
"vite-plugin-dts": "^3.6.3"
|
|
54
58
|
},
|
|
55
59
|
"peerDependencies": {
|