UNPKG

eslint-config-shiny

Version:

An eslint config that makes your code so clean and polished that it shines!

2 lines (1 loc) 4.98 kB
import i from"@eslint-community/eslint-plugin-eslint-comments";import a from"@eslint/js";import c from"eslint-plugin-array-func";import l from"eslint-plugin-autofix";import o from"eslint-plugin-es-x";import t from"eslint-plugin-import";import p from"eslint-plugin-no-secrets";import u from"eslint-plugin-promise";import m from"eslint-plugin-regexp";import f from"eslint-plugin-unicorn-x";import r from"typescript-eslint";function d(s){let e={apply:{"@eslint-community/eslint-comments":i,"array-func":c,promise:u,regexp:m,"unicorn-x":f},extends:["empty"],name:"base",plugins:{autofix:l,"es-x":o,import:t,"no-secrets":p},rules:[o.configs["flat/no-new-in-esnext"],a.configs.recommended,t.flatConfigs.recommended,{"accessor-pairs":0,"array-func/prefer-array-from":0,"arrow-body-style":2,"autofix/no-proto":2,"autofix/no-prototype-builtins":2,"autofix/no-useless-concat":1,eqeqeq:2,"guard-for-in":2,"import/no-unresolved":0,"import/order":0,"logical-assignment-operators":1,"no-alert":1,"no-case-declarations":0,"no-console":1,"no-constructor-return":2,"no-control-regex":0,"no-div-regex":1,"no-dupe-class-members":0,"no-duplicate-imports":[1,{includeExports:!0}],"no-else-return":1,"no-eq-null":1,"no-eval":2,"no-extend-native":2,"no-extra-bind":1,"no-extra-label":1,"no-fallthrough":0,"no-floating-decimal":1,"no-implicit-globals":1,"no-implied-eval":2,"no-iterator":2,"no-label-var":2,"no-lone-blocks":1,"no-lonely-if":1,"no-loss-of-precision":1,"no-new-wrappers":2,"no-object-constructor":2,"no-param-reassign":0,"no-promise-executor-return":2,"no-return-assign":2,"no-script-url":2,"no-secrets/no-secrets":[2,{tolerance:4.2}],"no-sequences":2,"no-template-curly-in-string":1,"no-undef":0,"no-undef-init":1,"no-underscore-dangle":0,"no-unmodified-loop-condition":1,"no-unneeded-ternary":1,"no-useless-call":1,"no-useless-computed-key":1,"no-useless-concat":1,"no-useless-rename":1,"no-useless-return":1,"no-var":1,"no-void":2,"no-warning-comments":1,"object-shorthand":2,"operator-assignment":2,"prefer-arrow-callback":2,"prefer-const":2,"prefer-exponentiation-operator":1,"prefer-numeric-literals":1,"prefer-object-has-own":1,"prefer-promise-reject-errors":1,"prefer-regex-literals":1,"prefer-spread":1,"prefer-template":1,"promise/always-return":0,"promise/avoid-new":0,"promise/catch-or-return":0,"promise/no-multiple-resolved":1,"promise/param-names":0,"promise/prefer-await-to-then":0,"promise/spec-only":1,"regexp/strict":2,"unicorn-x/catch-error-name":0,"unicorn-x/custom-error-definition":1,"unicorn-x/expiring-todo-comments":0,"unicorn-x/explicit-length-check":0,"unicorn-x/filename-case":0,"unicorn-x/import-style":0,"unicorn-x/no-array-callback-reference":0,"unicorn-x/no-await-expression-member":0,"unicorn-x/no-for-loop":0,"unicorn-x/no-new-array":0,"unicorn-x/no-object-as-default-parameter":0,"unicorn-x/no-static-only-class":0,"unicorn-x/no-thenable":0,"unicorn-x/no-this-assignment":0,"unicorn-x/no-useless-undefined":0,"unicorn-x/number-literal-case":0,"unicorn-x/numeric-separators-style":0,"unicorn-x/prefer-at":0,"unicorn-x/prefer-event-target":0,"unicorn-x/prefer-math-min-max":0,"unicorn-x/prefer-math-trunc":0,"unicorn-x/prefer-modern-math-apis":0,"unicorn-x/prefer-number-properties":0,"unicorn-x/prefer-query-selector":0,"unicorn-x/prefer-spread":0,"unicorn-x/prefer-string-raw":0,"unicorn-x/prefer-string-slice":0,"unicorn-x/prevent-abbreviations":0,"unicorn-x/switch-case-braces":0,"unicorn-x/text-encoding-identifier-case":0,yoda:1}]};if(!s.tsconfig)return e;let n=r.configs.disableTypeChecked;return e.name="base-ts",e.plugins.ts=r.plugin,e.rules=[...e.rules,r.configs.strictTypeChecked,r.configs.stylisticTypeChecked,{"ts/class-methods-use-this":2,"ts/consistent-type-exports":2,"ts/default-param-last":2,"ts/dot-notation":2,"ts/explicit-function-return-type":2,"ts/method-signature-style":2,"ts/naming-convention":[2,{format:["camelCase","PascalCase","UPPER_CASE"],leadingUnderscore:"allow",selector:"variableLike",trailingUnderscore:"allow"}],"ts/no-array-constructor":2,"ts/no-dynamic-delete":0,"ts/no-import-type-side-effects":2,"ts/no-loop-func":2,"ts/no-misused-promises":[2,{checksVoidReturn:!1}],"ts/no-shadow":2,"ts/no-this-alias":0,"ts/no-unnecessary-condition":[2,{allowConstantLoopConditions:!0}],"ts/no-unnecessary-parameter-property-assignment":1,"ts/no-unnecessary-qualifier":1,"ts/no-unused-vars":[2,{args:"all",argsIgnorePattern:"^_",caughtErrors:"all",caughtErrorsIgnorePattern:"^_",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0,varsIgnorePattern:"^_"}],"ts/no-useless-constructor":2,"ts/no-useless-empty-export":2,"ts/prefer-readonly":1,"ts/prefer-string-starts-ends-with":0,"ts/promise-function-async":2,"ts/require-array-sort-compare":1,"ts/require-await":2,"ts/switch-exhaustiveness-check":2,"ts/unbound-method":0}],[e,{extends:[n],files:["**/*.js"],languageOptions:{sourceType:"script"},name:"base-script"},{extends:[n],files:["**/*.cjs"],languageOptions:{sourceType:"commonjs"},name:"base-cjs"}]}export{d as default};