@anolilab/eslint-config 6.0.1 → 6.0.2
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/chunk-6ZQSXLLR.mjs +7 -0
- package/dist/chunk-6ZQSXLLR.mjs.map +1 -0
- package/dist/chunk-ROX6JHFJ.js +9 -0
- package/dist/chunk-ROX6JHFJ.js.map +1 -0
- package/dist/config/plugins/babel.js +2 -2
- package/dist/config/plugins/babel.mjs +1 -1
- package/dist/config/plugins/react.js +2 -2
- package/dist/config/plugins/react.mjs +1 -1
- package/dist/config/plugins/typescript.js +4 -4
- package/dist/config/plugins/typescript.js.map +1 -1
- package/dist/config/plugins/typescript.mjs +4 -4
- package/dist/config/plugins/typescript.mjs.map +1 -1
- package/dist/config/plugins/unicorn.js +2 -2
- package/dist/config/plugins/unicorn.mjs +1 -1
- package/dist/config/style.js +2 -2
- package/dist/config/style.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-F6JHPR4L.mjs +0 -7
- package/dist/chunk-F6JHPR4L.mjs.map +0 -1
- package/dist/chunk-NO36P4BR.js +0 -9
- package/dist/chunk-NO36P4BR.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## @anolilab/eslint-config [6.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@6.0.1...@anolilab/eslint-config@6.0.2) (2023-06-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **eslint-config:** changed func-names to ["error", "as-needed"] to work better with "func-style": ["error", "expression"] ([1d0f5b5](https://github.com/anolilab/javascript-style-guide/commit/1d0f5b560c8d5830f155657a204299f4206dde11))
|
|
7
|
+
* **eslint-config:** fixed the behavior of warn_on_unsupported_typescript_version ([635ebec](https://github.com/anolilab/javascript-style-guide/commit/635ebecc6fbfa3a4cbcf45b5e1af168bbc4295be))
|
|
8
|
+
|
|
1
9
|
## @anolilab/eslint-config [6.0.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@6.0.0...@anolilab/eslint-config@6.0.1) (2023-06-16)
|
|
2
10
|
|
|
3
11
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { pkg } from '@anolilab/package-json-utils';
|
|
2
|
+
|
|
3
|
+
var e={};pkg&&(e=pkg?.anolilab?.["eslint-config"]);var n=4;if(e?.indent){if(Number.isNaN(e.indent))throw new TypeError("Indent must be a number");n=Number(e.indent);}var o={rules:{"array-bracket-newline":"off","array-element-newline":"off","array-bracket-spacing":["error","never"],"block-spacing":["error","always"],"brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["error",{properties:"never",ignoreDestructuring:!1}],"capitalized-comments":["off","never",{line:{ignorePattern:".*",ignoreInlineComments:!0,ignoreConsecutiveComments:!0},block:{ignorePattern:".*",ignoreInlineComments:!0,ignoreConsecutiveComments:!0}}],"comma-dangle":["error",{arrays:"always-multiline",objects:"always-multiline",imports:"always-multiline",exports:"always-multiline",functions:"always-multiline"}],"comma-spacing":["error",{before:!1,after:!0}],"comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"computed-property-spacing":["error","never"],"consistent-this":"off","default-param-last":["error"],"eol-last":["error","always"],"function-call-argument-newline":["error","consistent"],"func-call-spacing":["error","never"],"func-name-matching":["off","always",{includeCommonJSModuleExports:!1,considerPropertyDescriptor:!0}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-paren-newline":["error","consistent"],"id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":["error","beside"],indent:["error",n,{SwitchCase:1,VariableDeclarator:1,outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},CallExpression:{arguments:1},ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:["JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],ignoreComments:!1}],"jsx-quotes":["off","prefer-double"],"key-spacing":["error",{beforeColon:!1,afterColon:!0}],"keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"line-comment-position":["off",{position:"above",ignorePattern:"",applyDefaultPatterns:!0}],"linebreak-style":["error","unix"],"lines-between-class-members":["error","always",{exceptAfterSingleLine:!1}],"lines-around-comment":"off","lines-around-directive":["error",{before:"always",after:"always"}],"max-depth":["off",4],"max-len":["error",160,2,{ignoreUrls:!0,ignoreComments:!1,ignoreRegExpLiterals:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0}],"max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{max:50,skipBlankLines:!0,skipComments:!0,IIFEs:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":["off",{max:1}],"multiline-comment-style":["off","starred-block"],"multiline-ternary":["off","never"],"new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"new-parens":"error","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":["error",{ignoreChainWithDepth:4}],"no-array-constructor":"error","no-bitwise":"error","no-continue":"error","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!1}],"no-mixed-spaces-and-tabs":"error","no-multi-assign":["error"],"no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{selector:"ForInStatement",message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."},{selector:"ForOfStatement",message:"iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."},{selector:"LabeledStatement",message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."},{selector:"WithStatement",message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize."}],"no-spaced-func":"off","no-tabs":"error","no-ternary":"off","no-trailing-spaces":["error",{skipBlankLines:!1,ignoreComments:!1}],"no-underscore-dangle":["error",{allow:["__DEV__"],allowAfterThis:!1,allowAfterSuper:!1,enforceInMethodNames:!0}],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"error","nonblock-statement-body-position":["error","beside",{overrides:{}}],"object-curly-spacing":["error","always"],"object-curly-newline":["error",{ObjectExpression:{minProperties:4,multiline:!0,consistent:!0},ObjectPattern:{minProperties:4,multiline:!0,consistent:!0},ImportDeclaration:{minProperties:4,multiline:!0,consistent:!0},ExportDeclaration:{minProperties:4,multiline:!0,consistent:!0}}],"object-property-newline":["error",{allowAllPropertiesOnSameLine:!0}],"one-var":["error","never"],"one-var-declaration-per-line":["error","always"],"operator-assignment":["error","always"],"operator-linebreak":["error","before",{overrides:{"=":"none"}}],"padded-blocks":["error",{blocks:"never",classes:"never",switches:"never"},{allowSingleLineBlocks:!0}],"padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],quotes:["error","double",{avoidEscape:!0}],"require-jsdoc":"off",semi:["error","always"],"semi-spacing":["error",{before:!1,after:!0}],"semi-style":["error","last"],"sort-keys":["off","asc",{caseSensitive:!1,natural:!0}],"sort-vars":"off","space-before-blocks":"error","space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"space-in-parens":["error","never"],"space-infix-ops":"error","space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"spaced-comment":["error","always",{line:{exceptions:["-","+","*"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"switch-colon-spacing":["error",{after:!0,before:!1}],"template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"wrap-regex":"off"}},a=o;
|
|
4
|
+
|
|
5
|
+
export { a };
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=chunk-6ZQSXLLR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/style.ts"],"names":["pkg","anolilabEslintConfig","indent","config","style_default"],"mappings":"AAAA,OAAS,OAAAA,MAAW,+BAGpB,IAAIC,EAA6D,CAAC,EAE9DD,IAEAC,EAAuBD,GAAM,WAAc,eAAe,GAG9D,IAAIE,EAAiB,EAErB,GAAID,GAAuB,OAAW,CAClC,GAAI,OAAO,MAAMA,EAAqB,MAAS,EAC3C,MAAM,IAAI,UAAU,yBAAyB,EAGjDC,EAAS,OAAOD,EAAqB,MAAS,EAGlD,IAAME,EAAwB,CAC1B,MAAO,CAGH,wBAAyB,MAIzB,wBAAyB,MAGzB,wBAAyB,CAAC,QAAS,OAAO,EAI1C,gBAAiB,CAAC,QAAS,QAAQ,EAGnC,cAAe,CAAC,QAAS,OAAQ,CAAE,gBAAiB,EAAK,CAAC,EAG1D,UAAW,CAAC,QAAS,CAAE,WAAY,QAAS,oBAAqB,EAAM,CAAC,EAIxE,uBAAwB,CACpB,MACA,QACA,CACI,KAAM,CACF,cAAe,KACf,qBAAsB,GACtB,0BAA2B,EAC/B,EACA,MAAO,CACH,cAAe,KAC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EAC7B,SAAU,EACd,CACJ,CACJ,EAIA,uBAAwB,CAAC,QAAS,CAAE,MAAO,GAAM,OAAQ,EAAM,CAAC,EAIhE,uBAAwB,CAAC,QAAS,OAAO,EAIzC,cAAe,CAAC,QAAS,OAAO,EAGhC,aAAc,KAClB,CACJ,EAEOE,EAAQD","sourcesContent":["import { pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet indent: number = 4;\n\nif (anolilabEslintConfig?.[\"indent\"]) {\n if (Number.isNaN(anolilabEslintConfig[\"indent\"])) {\n throw new TypeError(\"Indent must be a number\");\n }\n\n indent = Number(anolilabEslintConfig[\"indent\"]);\n}\n\nconst config: Linter.Config = {\n rules: {\n // enforce line breaks after opening and before closing array brackets\n // https://eslint.org/docs/rules/array-bracket-newline\n \"array-bracket-newline\": \"off\",\n\n // enforce line breaks between array elements\n // https://eslint.org/docs/rules/array-element-newline\n \"array-element-newline\": \"off\",\n\n // enforce spacing inside array brackets\n \"array-bracket-spacing\": [\"error\", \"never\"],\n\n // enforce spacing inside single-line blocks\n // https://eslint.org/docs/rules/block-spacing\n \"block-spacing\": [\"error\", \"always\"],\n\n // enforce one true brace style\n \"brace-style\": [\"error\", \"1tbs\", { allowSingleLine: true }],\n\n // require camel case names\n camelcase: [\"error\", { properties: \"never\", ignoreDestructuring: false }],\n\n // enforce or disallow capitalization of the first letter of a comment\n // https://eslint.org/docs/rules/capitalized-comments\n \"capitalized-comments\": [\n \"off\",\n \"never\",\n {\n line: {\n ignorePattern: \".*\",\n ignoreInlineComments: true,\n ignoreConsecutiveComments: true,\n },\n block: {\n ignorePattern: \".*\",\n ignoreInlineComments: true,\n ignoreConsecutiveComments: true,\n },\n },\n ],\n\n // require trailing commas in multiline object literals\n \"comma-dangle\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n arrays: \"always-multiline\",\n objects: \"always-multiline\",\n imports: \"always-multiline\",\n exports: \"always-multiline\",\n functions: \"always-multiline\",\n },\n ],\n\n // enforce spacing before and after comma\n \"comma-spacing\": [\"error\", { before: false, after: true }],\n\n // enforce one true comma style\n \"comma-style\": [\n \"error\",\n \"last\",\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false,\n NewExpression: false,\n },\n },\n ],\n\n // disallow padding inside computed properties\n \"computed-property-spacing\": [\"error\", \"never\"],\n\n // enforces consistent naming when capturing the current execution context\n \"consistent-this\": \"off\",\n\n // enforce that default parameters should come last\n \"default-param-last\": [\"error\"],\n\n // enforce newline at the end of file, with no multiple empty lines\n \"eol-last\": [\"error\", \"always\"],\n\n // https://eslint.org/docs/rules/function-call-argument-newline\n \"function-call-argument-newline\": [\"error\", \"consistent\"],\n\n // enforce spacing between functions and their invocations\n // https://eslint.org/docs/rules/func-call-spacing\n \"func-call-spacing\": [\"error\", \"never\"],\n\n // requires function names to match the name of the variable or property to which they are\n // assigned\n // https://eslint.org/docs/rules/func-name-matching\n \"func-name-matching\": [\n \"off\",\n \"always\",\n {\n includeCommonJSModuleExports: false,\n considerPropertyDescriptor: true,\n },\n ],\n\n // require function expressions to have a name\n // https://eslint.org/docs/rules/func-names\n \"func-names\": [\"error\", \"as-needed\"],\n\n // enforces use of function declarations or expressions\n // https://eslint.org/docs/rules/func-style\n \"func-style\": [\"error\", \"expression\"],\n\n // enforce consistent line breaks inside function parentheses\n // https://eslint.org/docs/rules/function-paren-newline\n \"function-paren-newline\": [\"error\", \"consistent\"],\n\n // Blacklist certain identifiers to prevent them being used\n // https://eslint.org/docs/rules/id-blacklist\n \"id-blacklist\": \"error\",\n\n // disallow specified identifiers\n // https://eslint.org/docs/rules/id-denylist\n \"id-denylist\": \"off\",\n\n // this option enforces minimum and maximum identifier lengths\n // (variable names, property names etc.)\n \"id-length\": \"off\",\n\n // require identifiers to match the provided regular expression\n \"id-match\": \"off\",\n\n // Enforce the location of arrow function bodies with implicit returns\n // https://eslint.org/docs/rules/implicit-arrow-linebreak\n \"implicit-arrow-linebreak\": [\"error\", \"beside\"],\n\n // this option sets a specific tab width for your code\n // https://eslint.org/docs/rules/indent\n indent: [\n \"error\",\n indent,\n {\n SwitchCase: 1,\n VariableDeclarator: 1,\n outerIIFEBody: 1,\n // MemberExpression: null,\n FunctionDeclaration: {\n parameters: 1,\n body: 1,\n },\n FunctionExpression: {\n parameters: 1,\n body: 1,\n },\n CallExpression: {\n arguments: 1,\n },\n ArrayExpression: 1,\n ObjectExpression: 1,\n ImportDeclaration: 1,\n flatTernaryExpressions: false,\n // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js\n ignoredNodes: [\n \"JSXElement\",\n \"JSXElement > *\",\n \"JSXAttribute\",\n \"JSXIdentifier\",\n \"JSXNamespacedName\",\n \"JSXMemberExpression\",\n \"JSXSpreadAttribute\",\n \"JSXExpressionContainer\",\n \"JSXOpeningElement\",\n \"JSXClosingElement\",\n \"JSXFragment\",\n \"JSXOpeningFragment\",\n \"JSXClosingFragment\",\n \"JSXText\",\n \"JSXEmptyExpression\",\n \"JSXSpreadChild\",\n ],\n ignoreComments: false,\n },\n ],\n\n // specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"off\", \"prefer-double\"],\n\n // enforces spacing between keys and values in object literal properties\n \"key-spacing\": [\"error\", { beforeColon: false, afterColon: true }],\n\n // require a space before & after certain keywords\n \"keyword-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n overrides: {\n return: { after: true },\n throw: { after: true },\n case: { after: true },\n },\n },\n ],\n\n // enforce position of line comments\n // https://eslint.org/docs/rules/line-comment-position\n // TODO: enable?\n \"line-comment-position\": [\n \"off\",\n {\n position: \"above\",\n ignorePattern: \"\",\n applyDefaultPatterns: true,\n },\n ],\n\n // disallow mixed 'LF' and 'CRLF' as linebreaks\n // https://eslint.org/docs/rules/linebreak-style\n \"linebreak-style\": [\"error\", \"unix\"],\n\n // require or disallow an empty line between class members\n // https://eslint.org/docs/rules/lines-between-class-members\n \"lines-between-class-members\": [\"error\", \"always\", { exceptAfterSingleLine: false }],\n\n // enforces empty lines around comments\n \"lines-around-comment\": \"off\",\n\n // require or disallow newlines around directives\n // https://eslint.org/docs/rules/lines-around-directive\n \"lines-around-directive\": [\n \"error\",\n {\n before: \"always\",\n after: \"always\",\n },\n ],\n\n // specify the maximum depth that blocks can be nested\n \"max-depth\": [\"off\", 4],\n\n // specify the maximum length of a line in your program\n // https://eslint.org/docs/rules/max-len\n \"max-len\": [\n \"error\",\n 160,\n 2,\n {\n ignoreUrls: true,\n ignoreComments: false,\n ignoreRegExpLiterals: true,\n ignoreStrings: true,\n ignoreTemplateLiterals: true,\n },\n ],\n\n // specify the max number of lines in a file\n // https://eslint.org/docs/rules/max-lines\n \"max-lines\": [\n \"off\",\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // enforce a maximum function length\n // https://eslint.org/docs/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"off\",\n {\n max: 50,\n skipBlankLines: true,\n skipComments: true,\n IIFEs: true,\n },\n ],\n\n // specify the maximum depth callbacks can be nested\n \"max-nested-callbacks\": \"off\",\n\n // limits the number of parameters that can be used in the function declaration.\n \"max-params\": [\"off\", 3],\n\n // specify the maximum number of statement allowed in a function\n \"max-statements\": [\"off\", 10],\n\n // restrict the number of statements per line\n // https://eslint.org/docs/rules/max-statements-per-line\n \"max-statements-per-line\": [\"off\", { max: 1 }],\n\n // enforce a particular style for multiline comments\n // https://eslint.org/docs/rules/multiline-comment-style\n \"multiline-comment-style\": [\"off\", \"starred-block\"],\n\n // require multiline ternary\n // https://eslint.org/docs/rules/multiline-ternary\n // TODO: enable?\n \"multiline-ternary\": [\"off\", \"never\"],\n\n // require a capital letter for constructors\n \"new-cap\": [\n \"error\",\n {\n newIsCap: true,\n newIsCapExceptions: [],\n capIsNew: false,\n capIsNewExceptions: [\"Immutable.Map\", \"Immutable.Set\", \"Immutable.List\"],\n },\n ],\n\n // disallow the omission of parentheses when invoking a constructor with no arguments\n // https://eslint.org/docs/rules/new-parens\n \"new-parens\": \"error\",\n\n // allow/disallow an empty newline after var statement\n \"newline-after-var\": \"off\",\n\n // https://eslint.org/docs/rules/newline-before-return\n \"newline-before-return\": \"off\",\n\n // enforces new line after each method call in the chain to make it\n // more readable and easy to maintain\n // https://eslint.org/docs/rules/newline-per-chained-call\n \"newline-per-chained-call\": [\"error\", { ignoreChainWithDepth: 4 }],\n\n // disallow use of the Array constructor\n \"no-array-constructor\": \"error\",\n\n // disallow use of bitwise operators\n // https://eslint.org/docs/rules/no-bitwise\n \"no-bitwise\": \"error\",\n\n // disallow use of the continue statement\n // https://eslint.org/docs/rules/no-continue\n \"no-continue\": \"error\",\n\n // disallow comments inline after code\n \"no-inline-comments\": \"off\",\n\n // disallow if as the only statement in an else block\n // https://eslint.org/docs/rules/no-lonely-if\n \"no-lonely-if\": \"error\",\n\n // disallow un-paren'd mixes of different operators\n // https://eslint.org/docs/rules/no-mixed-operators\n \"no-mixed-operators\": [\n \"error\",\n {\n // the list of arithmetic groups disallows mixing `%` and `**`\n // with other arithmetic operators.\n groups: [\n [\"%\", \"**\"],\n [\"%\", \"+\"],\n [\"%\", \"-\"],\n [\"%\", \"*\"],\n [\"%\", \"/\"],\n [\"/\", \"*\"],\n [\"&\", \"|\", \"<<\", \">>\", \">>>\"],\n [\"==\", \"!=\", \"===\", \"!==\"],\n [\"&&\", \"||\"],\n [\"in\", \"instanceof\"],\n ],\n allowSamePrecedence: false,\n },\n ],\n\n // disallow mixed spaces and tabs for indentation\n \"no-mixed-spaces-and-tabs\": \"error\",\n\n // disallow use of chained assignment expressions\n // https://eslint.org/docs/rules/no-multi-assign\n \"no-multi-assign\": [\"error\"],\n\n // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning\n // https://eslint.org/docs/rules/no-multiple-empty-lines\n \"no-multiple-empty-lines\": [\"error\", { max: 1, maxBOF: 0, maxEOF: 0 }],\n\n // disallow negated conditions\n // https://eslint.org/docs/rules/no-negated-condition\n \"no-negated-condition\": \"off\",\n\n // disallow nested ternary expressions\n \"no-nested-ternary\": \"error\",\n\n // disallow use of the Object constructor\n \"no-new-object\": \"error\",\n\n // disallow use of unary operators, ++ and --\n // https://eslint.org/docs/rules/no-plusplus\n \"no-plusplus\": \"error\",\n\n // disallow certain syntax forms\n // https://eslint.org/docs/rules/no-restricted-syntax\n \"no-restricted-syntax\": [\n \"error\",\n {\n selector: \"ForInStatement\",\n message:\n \"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.\",\n },\n {\n selector: \"ForOfStatement\",\n message:\n \"iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.\",\n },\n {\n selector: \"LabeledStatement\",\n message: \"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.\",\n },\n {\n selector: \"WithStatement\",\n message: \"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.\",\n },\n ],\n\n // disallow space between function identifier and application\n // deprecated in favor of func-call-spacing\n \"no-spaced-func\": \"off\",\n\n // disallow tab characters entirely\n \"no-tabs\": \"error\",\n\n // disallow the use of ternary operators\n \"no-ternary\": \"off\",\n\n // disallow trailing whitespace at the end of lines\n \"no-trailing-spaces\": [\n \"error\",\n {\n skipBlankLines: false,\n ignoreComments: false,\n },\n ],\n\n // disallow dangling underscores in identifiers\n // https://eslint.org/docs/rules/no-underscore-dangle\n \"no-underscore-dangle\": [\n \"error\",\n {\n allow: [\"__DEV__\"],\n allowAfterThis: false,\n allowAfterSuper: false,\n enforceInMethodNames: true,\n },\n ],\n\n // disallow the use of Boolean literals in conditional expressions\n // also, prefer `a || b` over `a ? a : b`\n // https://eslint.org/docs/rules/no-unneeded-ternary\n \"no-unneeded-ternary\": [\"error\", { defaultAssignment: false }],\n\n // disallow whitespace before properties\n // https://eslint.org/docs/rules/no-whitespace-before-property\n \"no-whitespace-before-property\": \"error\",\n\n // enforce the location of single-line statements\n // https://eslint.org/docs/rules/nonblock-statement-body-position\n \"nonblock-statement-body-position\": [\"error\", \"beside\", { overrides: {} }],\n\n // require padding inside curly braces\n \"object-curly-spacing\": [\"error\", \"always\"],\n\n // enforce line breaks between braces\n // https://eslint.org/docs/rules/object-curly-newline\n \"object-curly-newline\": [\n \"error\",\n {\n ObjectExpression: { minProperties: 4, multiline: true, consistent: true },\n ObjectPattern: { minProperties: 4, multiline: true, consistent: true },\n ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },\n ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },\n },\n ],\n\n // enforce \"same line\" or \"multiple line\" on object properties.\n // https://eslint.org/docs/rules/object-property-newline\n \"object-property-newline\": [\n \"error\",\n {\n allowAllPropertiesOnSameLine: true,\n },\n ],\n\n // allow just one var statement per function\n \"one-var\": [\"error\", \"never\"],\n\n // require a newline around variable declaration\n // https://eslint.org/docs/rules/one-var-declaration-per-line\n \"one-var-declaration-per-line\": [\"error\", \"always\"],\n\n // require assignment operator shorthand where possible or prohibit it entirely\n // https://eslint.org/docs/rules/operator-assignment\n \"operator-assignment\": [\"error\", \"always\"],\n\n // Requires operator at the beginning of the line in multiline statements\n // https://eslint.org/docs/rules/operator-linebreak\n \"operator-linebreak\": [\"error\", \"before\", { overrides: { \"=\": \"none\" } }],\n\n // disallow padding within blocks\n \"padded-blocks\": [\n \"error\",\n {\n blocks: \"never\",\n classes: \"never\",\n switches: \"never\",\n },\n {\n allowSingleLineBlocks: true,\n },\n ],\n\n // Require or disallow padding lines between statements\n // https://eslint.org/docs/rules/padding-line-between-statements\n \"padding-line-between-statements\": \"off\",\n\n // Disallow the use of Math.pow in favor of the ** operator\n // https://eslint.org/docs/rules/prefer-exponentiation-operator\n \"prefer-exponentiation-operator\": \"error\",\n\n // Prefer use of an object spread over Object.assign\n // https://eslint.org/docs/rules/prefer-object-spread\n \"prefer-object-spread\": \"error\",\n\n // require quotes around object literal property names\n // https://eslint.org/docs/rules/quote-props.html\n \"quote-props\": [\"error\", \"as-needed\", { keywords: false, unnecessary: true, numbers: false }],\n\n // specify whether double or single quotes should be used\n quotes: [\"error\", \"double\", { avoidEscape: true }],\n\n // do not require jsdoc\n // https://eslint.org/docs/rules/require-jsdoc\n \"require-jsdoc\": \"off\",\n\n // require or disallow use of semicolons instead of ASI\n semi: [\"error\", \"always\"],\n\n // enforce spacing before and after semicolons\n \"semi-spacing\": [\"error\", { before: false, after: true }],\n\n // Enforce location of semicolons\n // https://eslint.org/docs/rules/semi-style\n \"semi-style\": [\"error\", \"last\"],\n\n // requires object keys to be sorted\n \"sort-keys\": [\"off\", \"asc\", { caseSensitive: false, natural: true }],\n\n // sort variables within the same declaration block\n \"sort-vars\": \"off\",\n\n // require or disallow space before blocks\n \"space-before-blocks\": \"error\",\n\n // require or disallow space before function opening parenthesis\n // https://eslint.org/docs/rules/space-before-function-paren\n \"space-before-function-paren\": [\n \"error\",\n {\n anonymous: \"always\",\n named: \"never\",\n asyncArrow: \"always\",\n },\n ],\n\n // require or disallow spaces inside parentheses\n \"space-in-parens\": [\"error\", \"never\"],\n\n // require spaces around operators\n \"space-infix-ops\": \"error\",\n\n // Require or disallow spaces before/after unary operators\n // https://eslint.org/docs/rules/space-unary-ops\n \"space-unary-ops\": [\n \"error\",\n {\n words: true,\n nonwords: false,\n overrides: {},\n },\n ],\n\n // require or disallow a space immediately following the // or /* in a comment\n // https://eslint.org/docs/rules/spaced-comment\n \"spaced-comment\": [\n \"error\",\n \"always\",\n {\n line: {\n exceptions: [\"-\", \"+\", \"*\"],\n markers: [\"=\", \"!\", \"/\"], // space here to support sprockets directives, slash for TS /// comments\n },\n block: {\n exceptions: [\"-\", \"+\"],\n markers: [\"=\", \"!\", \":\", \"::\"], // space here to support sprockets directives and flow comment types\n balanced: true,\n },\n },\n ],\n\n // Enforce spacing around colons of switch statements\n // https://eslint.org/docs/rules/switch-colon-spacing\n \"switch-colon-spacing\": [\"error\", { after: true, before: false }],\n\n // Require or disallow spacing between template tags and their literals\n // https://eslint.org/docs/rules/template-tag-spacing\n \"template-tag-spacing\": [\"error\", \"never\"],\n\n // require or disallow the Unicode Byte Order Mark\n // https://eslint.org/docs/rules/unicode-bom\n \"unicode-bom\": [\"error\", \"never\"],\n\n // require regex literals to be wrapped in parentheses\n \"wrap-regex\": \"off\",\n },\n};\n\nexport default config;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
4
|
+
|
|
5
|
+
var e={};packageJsonUtils.pkg&&(e=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);var n=4;if(e?.indent){if(Number.isNaN(e.indent))throw new TypeError("Indent must be a number");n=Number(e.indent);}var o={rules:{"array-bracket-newline":"off","array-element-newline":"off","array-bracket-spacing":["error","never"],"block-spacing":["error","always"],"brace-style":["error","1tbs",{allowSingleLine:!0}],camelcase:["error",{properties:"never",ignoreDestructuring:!1}],"capitalized-comments":["off","never",{line:{ignorePattern:".*",ignoreInlineComments:!0,ignoreConsecutiveComments:!0},block:{ignorePattern:".*",ignoreInlineComments:!0,ignoreConsecutiveComments:!0}}],"comma-dangle":["error",{arrays:"always-multiline",objects:"always-multiline",imports:"always-multiline",exports:"always-multiline",functions:"always-multiline"}],"comma-spacing":["error",{before:!1,after:!0}],"comma-style":["error","last",{exceptions:{ArrayExpression:!1,ArrayPattern:!1,ArrowFunctionExpression:!1,CallExpression:!1,FunctionDeclaration:!1,FunctionExpression:!1,ImportDeclaration:!1,ObjectExpression:!1,ObjectPattern:!1,VariableDeclaration:!1,NewExpression:!1}}],"computed-property-spacing":["error","never"],"consistent-this":"off","default-param-last":["error"],"eol-last":["error","always"],"function-call-argument-newline":["error","consistent"],"func-call-spacing":["error","never"],"func-name-matching":["off","always",{includeCommonJSModuleExports:!1,considerPropertyDescriptor:!0}],"func-names":["error","as-needed"],"func-style":["error","expression"],"function-paren-newline":["error","consistent"],"id-blacklist":"error","id-denylist":"off","id-length":"off","id-match":"off","implicit-arrow-linebreak":["error","beside"],indent:["error",n,{SwitchCase:1,VariableDeclarator:1,outerIIFEBody:1,FunctionDeclaration:{parameters:1,body:1},FunctionExpression:{parameters:1,body:1},CallExpression:{arguments:1},ArrayExpression:1,ObjectExpression:1,ImportDeclaration:1,flatTernaryExpressions:!1,ignoredNodes:["JSXElement","JSXElement > *","JSXAttribute","JSXIdentifier","JSXNamespacedName","JSXMemberExpression","JSXSpreadAttribute","JSXExpressionContainer","JSXOpeningElement","JSXClosingElement","JSXFragment","JSXOpeningFragment","JSXClosingFragment","JSXText","JSXEmptyExpression","JSXSpreadChild"],ignoreComments:!1}],"jsx-quotes":["off","prefer-double"],"key-spacing":["error",{beforeColon:!1,afterColon:!0}],"keyword-spacing":["error",{before:!0,after:!0,overrides:{return:{after:!0},throw:{after:!0},case:{after:!0}}}],"line-comment-position":["off",{position:"above",ignorePattern:"",applyDefaultPatterns:!0}],"linebreak-style":["error","unix"],"lines-between-class-members":["error","always",{exceptAfterSingleLine:!1}],"lines-around-comment":"off","lines-around-directive":["error",{before:"always",after:"always"}],"max-depth":["off",4],"max-len":["error",160,2,{ignoreUrls:!0,ignoreComments:!1,ignoreRegExpLiterals:!0,ignoreStrings:!0,ignoreTemplateLiterals:!0}],"max-lines":["off",{max:300,skipBlankLines:!0,skipComments:!0}],"max-lines-per-function":["off",{max:50,skipBlankLines:!0,skipComments:!0,IIFEs:!0}],"max-nested-callbacks":"off","max-params":["off",3],"max-statements":["off",10],"max-statements-per-line":["off",{max:1}],"multiline-comment-style":["off","starred-block"],"multiline-ternary":["off","never"],"new-cap":["error",{newIsCap:!0,newIsCapExceptions:[],capIsNew:!1,capIsNewExceptions:["Immutable.Map","Immutable.Set","Immutable.List"]}],"new-parens":"error","newline-after-var":"off","newline-before-return":"off","newline-per-chained-call":["error",{ignoreChainWithDepth:4}],"no-array-constructor":"error","no-bitwise":"error","no-continue":"error","no-inline-comments":"off","no-lonely-if":"error","no-mixed-operators":["error",{groups:[["%","**"],["%","+"],["%","-"],["%","*"],["%","/"],["/","*"],["&","|","<<",">>",">>>"],["==","!=","===","!=="],["&&","||"],["in","instanceof"]],allowSamePrecedence:!1}],"no-mixed-spaces-and-tabs":"error","no-multi-assign":["error"],"no-multiple-empty-lines":["error",{max:1,maxBOF:0,maxEOF:0}],"no-negated-condition":"off","no-nested-ternary":"error","no-new-object":"error","no-plusplus":"error","no-restricted-syntax":["error",{selector:"ForInStatement",message:"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array."},{selector:"ForOfStatement",message:"iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."},{selector:"LabeledStatement",message:"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."},{selector:"WithStatement",message:"`with` is disallowed in strict mode because it makes code impossible to predict and optimize."}],"no-spaced-func":"off","no-tabs":"error","no-ternary":"off","no-trailing-spaces":["error",{skipBlankLines:!1,ignoreComments:!1}],"no-underscore-dangle":["error",{allow:["__DEV__"],allowAfterThis:!1,allowAfterSuper:!1,enforceInMethodNames:!0}],"no-unneeded-ternary":["error",{defaultAssignment:!1}],"no-whitespace-before-property":"error","nonblock-statement-body-position":["error","beside",{overrides:{}}],"object-curly-spacing":["error","always"],"object-curly-newline":["error",{ObjectExpression:{minProperties:4,multiline:!0,consistent:!0},ObjectPattern:{minProperties:4,multiline:!0,consistent:!0},ImportDeclaration:{minProperties:4,multiline:!0,consistent:!0},ExportDeclaration:{minProperties:4,multiline:!0,consistent:!0}}],"object-property-newline":["error",{allowAllPropertiesOnSameLine:!0}],"one-var":["error","never"],"one-var-declaration-per-line":["error","always"],"operator-assignment":["error","always"],"operator-linebreak":["error","before",{overrides:{"=":"none"}}],"padded-blocks":["error",{blocks:"never",classes:"never",switches:"never"},{allowSingleLineBlocks:!0}],"padding-line-between-statements":"off","prefer-exponentiation-operator":"error","prefer-object-spread":"error","quote-props":["error","as-needed",{keywords:!1,unnecessary:!0,numbers:!1}],quotes:["error","double",{avoidEscape:!0}],"require-jsdoc":"off",semi:["error","always"],"semi-spacing":["error",{before:!1,after:!0}],"semi-style":["error","last"],"sort-keys":["off","asc",{caseSensitive:!1,natural:!0}],"sort-vars":"off","space-before-blocks":"error","space-before-function-paren":["error",{anonymous:"always",named:"never",asyncArrow:"always"}],"space-in-parens":["error","never"],"space-infix-ops":"error","space-unary-ops":["error",{words:!0,nonwords:!1,overrides:{}}],"spaced-comment":["error","always",{line:{exceptions:["-","+","*"],markers:["=","!","/"]},block:{exceptions:["-","+"],markers:["=","!",":","::"],balanced:!0}}],"switch-colon-spacing":["error",{after:!0,before:!1}],"template-tag-spacing":["error","never"],"unicode-bom":["error","never"],"wrap-regex":"off"}},a=o;
|
|
6
|
+
|
|
7
|
+
exports.a = a;
|
|
8
|
+
//# sourceMappingURL=out.js.map
|
|
9
|
+
//# sourceMappingURL=chunk-ROX6JHFJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/style.ts"],"names":["pkg","anolilabEslintConfig","indent","config","style_default"],"mappings":"AAAA,OAAS,OAAAA,MAAW,+BAGpB,IAAIC,EAA6D,CAAC,EAE9DD,IAEAC,EAAuBD,GAAM,WAAc,eAAe,GAG9D,IAAIE,EAAiB,EAErB,GAAID,GAAuB,OAAW,CAClC,GAAI,OAAO,MAAMA,EAAqB,MAAS,EAC3C,MAAM,IAAI,UAAU,yBAAyB,EAGjDC,EAAS,OAAOD,EAAqB,MAAS,EAGlD,IAAME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X,MAAO,QACP,WAAY,QAChB,CACJ,EAGA,kBAAmB,CAAC,QAAS,OAAO,EAGpC,kBAAmB,QAInB,kBAAmB,CACf,QACA,CACI,MAAO,GACP,SAAU,GACV,UAAW,CAAC,CAChB,CACJ,EAIA,iBAAkB,CACd,QACA,SACA,CACI,KAAM,CACF,WAAY,CAAC,IAAK,IAAK,GAAG,EAC1B,QAAS,CAAC,IAAK,IAAK,GAAG,CAC3B,EACA,MAAO,CACH,WAAY,CAAC,IAAK,GAAG,EACrB,QAAS,CAAC,IAAK,IAAK,IAAK,IAAI,EAC7B,SAAU,EACd,CACJ,CACJ,EAIA,uBAAwB,CAAC,QAAS,CAAE,MAAO,GAAM,OAAQ,EAAM,CAAC,EAIhE,uBAAwB,CAAC,QAAS,OAAO,EAIzC,cAAe,CAAC,QAAS,OAAO,EAGhC,aAAc,KAClB,CACJ,EAEOE,EAAQD","sourcesContent":["import { pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet indent: number = 4;\n\nif (anolilabEslintConfig?.[\"indent\"]) {\n if (Number.isNaN(anolilabEslintConfig[\"indent\"])) {\n throw new TypeError(\"Indent must be a number\");\n }\n\n indent = Number(anolilabEslintConfig[\"indent\"]);\n}\n\nconst config: Linter.Config = {\n rules: {\n // enforce line breaks after opening and before closing array brackets\n // https://eslint.org/docs/rules/array-bracket-newline\n \"array-bracket-newline\": \"off\",\n\n // enforce line breaks between array elements\n // https://eslint.org/docs/rules/array-element-newline\n \"array-element-newline\": \"off\",\n\n // enforce spacing inside array brackets\n \"array-bracket-spacing\": [\"error\", \"never\"],\n\n // enforce spacing inside single-line blocks\n // https://eslint.org/docs/rules/block-spacing\n \"block-spacing\": [\"error\", \"always\"],\n\n // enforce one true brace style\n \"brace-style\": [\"error\", \"1tbs\", { allowSingleLine: true }],\n\n // require camel case names\n camelcase: [\"error\", { properties: \"never\", ignoreDestructuring: false }],\n\n // enforce or disallow capitalization of the first letter of a comment\n // https://eslint.org/docs/rules/capitalized-comments\n \"capitalized-comments\": [\n \"off\",\n \"never\",\n {\n line: {\n ignorePattern: \".*\",\n ignoreInlineComments: true,\n ignoreConsecutiveComments: true,\n },\n block: {\n ignorePattern: \".*\",\n ignoreInlineComments: true,\n ignoreConsecutiveComments: true,\n },\n },\n ],\n\n // require trailing commas in multiline object literals\n \"comma-dangle\": [\n \"error\",\n {\n // eslint-disable-next-line sonarjs/no-duplicate-string\n arrays: \"always-multiline\",\n objects: \"always-multiline\",\n imports: \"always-multiline\",\n exports: \"always-multiline\",\n functions: \"always-multiline\",\n },\n ],\n\n // enforce spacing before and after comma\n \"comma-spacing\": [\"error\", { before: false, after: true }],\n\n // enforce one true comma style\n \"comma-style\": [\n \"error\",\n \"last\",\n {\n exceptions: {\n ArrayExpression: false,\n ArrayPattern: false,\n ArrowFunctionExpression: false,\n CallExpression: false,\n FunctionDeclaration: false,\n FunctionExpression: false,\n ImportDeclaration: false,\n ObjectExpression: false,\n ObjectPattern: false,\n VariableDeclaration: false,\n NewExpression: false,\n },\n },\n ],\n\n // disallow padding inside computed properties\n \"computed-property-spacing\": [\"error\", \"never\"],\n\n // enforces consistent naming when capturing the current execution context\n \"consistent-this\": \"off\",\n\n // enforce that default parameters should come last\n \"default-param-last\": [\"error\"],\n\n // enforce newline at the end of file, with no multiple empty lines\n \"eol-last\": [\"error\", \"always\"],\n\n // https://eslint.org/docs/rules/function-call-argument-newline\n \"function-call-argument-newline\": [\"error\", \"consistent\"],\n\n // enforce spacing between functions and their invocations\n // https://eslint.org/docs/rules/func-call-spacing\n \"func-call-spacing\": [\"error\", \"never\"],\n\n // requires function names to match the name of the variable or property to which they are\n // assigned\n // https://eslint.org/docs/rules/func-name-matching\n \"func-name-matching\": [\n \"off\",\n \"always\",\n {\n includeCommonJSModuleExports: false,\n considerPropertyDescriptor: true,\n },\n ],\n\n // require function expressions to have a name\n // https://eslint.org/docs/rules/func-names\n \"func-names\": [\"error\", \"as-needed\"],\n\n // enforces use of function declarations or expressions\n // https://eslint.org/docs/rules/func-style\n \"func-style\": [\"error\", \"expression\"],\n\n // enforce consistent line breaks inside function parentheses\n // https://eslint.org/docs/rules/function-paren-newline\n \"function-paren-newline\": [\"error\", \"consistent\"],\n\n // Blacklist certain identifiers to prevent them being used\n // https://eslint.org/docs/rules/id-blacklist\n \"id-blacklist\": \"error\",\n\n // disallow specified identifiers\n // https://eslint.org/docs/rules/id-denylist\n \"id-denylist\": \"off\",\n\n // this option enforces minimum and maximum identifier lengths\n // (variable names, property names etc.)\n \"id-length\": \"off\",\n\n // require identifiers to match the provided regular expression\n \"id-match\": \"off\",\n\n // Enforce the location of arrow function bodies with implicit returns\n // https://eslint.org/docs/rules/implicit-arrow-linebreak\n \"implicit-arrow-linebreak\": [\"error\", \"beside\"],\n\n // this option sets a specific tab width for your code\n // https://eslint.org/docs/rules/indent\n indent: [\n \"error\",\n indent,\n {\n SwitchCase: 1,\n VariableDeclarator: 1,\n outerIIFEBody: 1,\n // MemberExpression: null,\n FunctionDeclaration: {\n parameters: 1,\n body: 1,\n },\n FunctionExpression: {\n parameters: 1,\n body: 1,\n },\n CallExpression: {\n arguments: 1,\n },\n ArrayExpression: 1,\n ObjectExpression: 1,\n ImportDeclaration: 1,\n flatTernaryExpressions: false,\n // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js\n ignoredNodes: [\n \"JSXElement\",\n \"JSXElement > *\",\n \"JSXAttribute\",\n \"JSXIdentifier\",\n \"JSXNamespacedName\",\n \"JSXMemberExpression\",\n \"JSXSpreadAttribute\",\n \"JSXExpressionContainer\",\n \"JSXOpeningElement\",\n \"JSXClosingElement\",\n \"JSXFragment\",\n \"JSXOpeningFragment\",\n \"JSXClosingFragment\",\n \"JSXText\",\n \"JSXEmptyExpression\",\n \"JSXSpreadChild\",\n ],\n ignoreComments: false,\n },\n ],\n\n // specify whether double or single quotes should be used in JSX attributes\n // https://eslint.org/docs/rules/jsx-quotes\n \"jsx-quotes\": [\"off\", \"prefer-double\"],\n\n // enforces spacing between keys and values in object literal properties\n \"key-spacing\": [\"error\", { beforeColon: false, afterColon: true }],\n\n // require a space before & after certain keywords\n \"keyword-spacing\": [\n \"error\",\n {\n before: true,\n after: true,\n overrides: {\n return: { after: true },\n throw: { after: true },\n case: { after: true },\n },\n },\n ],\n\n // enforce position of line comments\n // https://eslint.org/docs/rules/line-comment-position\n // TODO: enable?\n \"line-comment-position\": [\n \"off\",\n {\n position: \"above\",\n ignorePattern: \"\",\n applyDefaultPatterns: true,\n },\n ],\n\n // disallow mixed 'LF' and 'CRLF' as linebreaks\n // https://eslint.org/docs/rules/linebreak-style\n \"linebreak-style\": [\"error\", \"unix\"],\n\n // require or disallow an empty line between class members\n // https://eslint.org/docs/rules/lines-between-class-members\n \"lines-between-class-members\": [\"error\", \"always\", { exceptAfterSingleLine: false }],\n\n // enforces empty lines around comments\n \"lines-around-comment\": \"off\",\n\n // require or disallow newlines around directives\n // https://eslint.org/docs/rules/lines-around-directive\n \"lines-around-directive\": [\n \"error\",\n {\n before: \"always\",\n after: \"always\",\n },\n ],\n\n // specify the maximum depth that blocks can be nested\n \"max-depth\": [\"off\", 4],\n\n // specify the maximum length of a line in your program\n // https://eslint.org/docs/rules/max-len\n \"max-len\": [\n \"error\",\n 160,\n 2,\n {\n ignoreUrls: true,\n ignoreComments: false,\n ignoreRegExpLiterals: true,\n ignoreStrings: true,\n ignoreTemplateLiterals: true,\n },\n ],\n\n // specify the max number of lines in a file\n // https://eslint.org/docs/rules/max-lines\n \"max-lines\": [\n \"off\",\n {\n max: 300,\n skipBlankLines: true,\n skipComments: true,\n },\n ],\n\n // enforce a maximum function length\n // https://eslint.org/docs/rules/max-lines-per-function\n \"max-lines-per-function\": [\n \"off\",\n {\n max: 50,\n skipBlankLines: true,\n skipComments: true,\n IIFEs: true,\n },\n ],\n\n // specify the maximum depth callbacks can be nested\n \"max-nested-callbacks\": \"off\",\n\n // limits the number of parameters that can be used in the function declaration.\n \"max-params\": [\"off\", 3],\n\n // specify the maximum number of statement allowed in a function\n \"max-statements\": [\"off\", 10],\n\n // restrict the number of statements per line\n // https://eslint.org/docs/rules/max-statements-per-line\n \"max-statements-per-line\": [\"off\", { max: 1 }],\n\n // enforce a particular style for multiline comments\n // https://eslint.org/docs/rules/multiline-comment-style\n \"multiline-comment-style\": [\"off\", \"starred-block\"],\n\n // require multiline ternary\n // https://eslint.org/docs/rules/multiline-ternary\n // TODO: enable?\n \"multiline-ternary\": [\"off\", \"never\"],\n\n // require a capital letter for constructors\n \"new-cap\": [\n \"error\",\n {\n newIsCap: true,\n newIsCapExceptions: [],\n capIsNew: false,\n capIsNewExceptions: [\"Immutable.Map\", \"Immutable.Set\", \"Immutable.List\"],\n },\n ],\n\n // disallow the omission of parentheses when invoking a constructor with no arguments\n // https://eslint.org/docs/rules/new-parens\n \"new-parens\": \"error\",\n\n // allow/disallow an empty newline after var statement\n \"newline-after-var\": \"off\",\n\n // https://eslint.org/docs/rules/newline-before-return\n \"newline-before-return\": \"off\",\n\n // enforces new line after each method call in the chain to make it\n // more readable and easy to maintain\n // https://eslint.org/docs/rules/newline-per-chained-call\n \"newline-per-chained-call\": [\"error\", { ignoreChainWithDepth: 4 }],\n\n // disallow use of the Array constructor\n \"no-array-constructor\": \"error\",\n\n // disallow use of bitwise operators\n // https://eslint.org/docs/rules/no-bitwise\n \"no-bitwise\": \"error\",\n\n // disallow use of the continue statement\n // https://eslint.org/docs/rules/no-continue\n \"no-continue\": \"error\",\n\n // disallow comments inline after code\n \"no-inline-comments\": \"off\",\n\n // disallow if as the only statement in an else block\n // https://eslint.org/docs/rules/no-lonely-if\n \"no-lonely-if\": \"error\",\n\n // disallow un-paren'd mixes of different operators\n // https://eslint.org/docs/rules/no-mixed-operators\n \"no-mixed-operators\": [\n \"error\",\n {\n // the list of arithmetic groups disallows mixing `%` and `**`\n // with other arithmetic operators.\n groups: [\n [\"%\", \"**\"],\n [\"%\", \"+\"],\n [\"%\", \"-\"],\n [\"%\", \"*\"],\n [\"%\", \"/\"],\n [\"/\", \"*\"],\n [\"&\", \"|\", \"<<\", \">>\", \">>>\"],\n [\"==\", \"!=\", \"===\", \"!==\"],\n [\"&&\", \"||\"],\n [\"in\", \"instanceof\"],\n ],\n allowSamePrecedence: false,\n },\n ],\n\n // disallow mixed spaces and tabs for indentation\n \"no-mixed-spaces-and-tabs\": \"error\",\n\n // disallow use of chained assignment expressions\n // https://eslint.org/docs/rules/no-multi-assign\n \"no-multi-assign\": [\"error\"],\n\n // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning\n // https://eslint.org/docs/rules/no-multiple-empty-lines\n \"no-multiple-empty-lines\": [\"error\", { max: 1, maxBOF: 0, maxEOF: 0 }],\n\n // disallow negated conditions\n // https://eslint.org/docs/rules/no-negated-condition\n \"no-negated-condition\": \"off\",\n\n // disallow nested ternary expressions\n \"no-nested-ternary\": \"error\",\n\n // disallow use of the Object constructor\n \"no-new-object\": \"error\",\n\n // disallow use of unary operators, ++ and --\n // https://eslint.org/docs/rules/no-plusplus\n \"no-plusplus\": \"error\",\n\n // disallow certain syntax forms\n // https://eslint.org/docs/rules/no-restricted-syntax\n \"no-restricted-syntax\": [\n \"error\",\n {\n selector: \"ForInStatement\",\n message:\n \"for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.\",\n },\n {\n selector: \"ForOfStatement\",\n message:\n \"iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations.\",\n },\n {\n selector: \"LabeledStatement\",\n message: \"Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.\",\n },\n {\n selector: \"WithStatement\",\n message: \"`with` is disallowed in strict mode because it makes code impossible to predict and optimize.\",\n },\n ],\n\n // disallow space between function identifier and application\n // deprecated in favor of func-call-spacing\n \"no-spaced-func\": \"off\",\n\n // disallow tab characters entirely\n \"no-tabs\": \"error\",\n\n // disallow the use of ternary operators\n \"no-ternary\": \"off\",\n\n // disallow trailing whitespace at the end of lines\n \"no-trailing-spaces\": [\n \"error\",\n {\n skipBlankLines: false,\n ignoreComments: false,\n },\n ],\n\n // disallow dangling underscores in identifiers\n // https://eslint.org/docs/rules/no-underscore-dangle\n \"no-underscore-dangle\": [\n \"error\",\n {\n allow: [\"__DEV__\"],\n allowAfterThis: false,\n allowAfterSuper: false,\n enforceInMethodNames: true,\n },\n ],\n\n // disallow the use of Boolean literals in conditional expressions\n // also, prefer `a || b` over `a ? a : b`\n // https://eslint.org/docs/rules/no-unneeded-ternary\n \"no-unneeded-ternary\": [\"error\", { defaultAssignment: false }],\n\n // disallow whitespace before properties\n // https://eslint.org/docs/rules/no-whitespace-before-property\n \"no-whitespace-before-property\": \"error\",\n\n // enforce the location of single-line statements\n // https://eslint.org/docs/rules/nonblock-statement-body-position\n \"nonblock-statement-body-position\": [\"error\", \"beside\", { overrides: {} }],\n\n // require padding inside curly braces\n \"object-curly-spacing\": [\"error\", \"always\"],\n\n // enforce line breaks between braces\n // https://eslint.org/docs/rules/object-curly-newline\n \"object-curly-newline\": [\n \"error\",\n {\n ObjectExpression: { minProperties: 4, multiline: true, consistent: true },\n ObjectPattern: { minProperties: 4, multiline: true, consistent: true },\n ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },\n ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },\n },\n ],\n\n // enforce \"same line\" or \"multiple line\" on object properties.\n // https://eslint.org/docs/rules/object-property-newline\n \"object-property-newline\": [\n \"error\",\n {\n allowAllPropertiesOnSameLine: true,\n },\n ],\n\n // allow just one var statement per function\n \"one-var\": [\"error\", \"never\"],\n\n // require a newline around variable declaration\n // https://eslint.org/docs/rules/one-var-declaration-per-line\n \"one-var-declaration-per-line\": [\"error\", \"always\"],\n\n // require assignment operator shorthand where possible or prohibit it entirely\n // https://eslint.org/docs/rules/operator-assignment\n \"operator-assignment\": [\"error\", \"always\"],\n\n // Requires operator at the beginning of the line in multiline statements\n // https://eslint.org/docs/rules/operator-linebreak\n \"operator-linebreak\": [\"error\", \"before\", { overrides: { \"=\": \"none\" } }],\n\n // disallow padding within blocks\n \"padded-blocks\": [\n \"error\",\n {\n blocks: \"never\",\n classes: \"never\",\n switches: \"never\",\n },\n {\n allowSingleLineBlocks: true,\n },\n ],\n\n // Require or disallow padding lines between statements\n // https://eslint.org/docs/rules/padding-line-between-statements\n \"padding-line-between-statements\": \"off\",\n\n // Disallow the use of Math.pow in favor of the ** operator\n // https://eslint.org/docs/rules/prefer-exponentiation-operator\n \"prefer-exponentiation-operator\": \"error\",\n\n // Prefer use of an object spread over Object.assign\n // https://eslint.org/docs/rules/prefer-object-spread\n \"prefer-object-spread\": \"error\",\n\n // require quotes around object literal property names\n // https://eslint.org/docs/rules/quote-props.html\n \"quote-props\": [\"error\", \"as-needed\", { keywords: false, unnecessary: true, numbers: false }],\n\n // specify whether double or single quotes should be used\n quotes: [\"error\", \"double\", { avoidEscape: true }],\n\n // do not require jsdoc\n // https://eslint.org/docs/rules/require-jsdoc\n \"require-jsdoc\": \"off\",\n\n // require or disallow use of semicolons instead of ASI\n semi: [\"error\", \"always\"],\n\n // enforce spacing before and after semicolons\n \"semi-spacing\": [\"error\", { before: false, after: true }],\n\n // Enforce location of semicolons\n // https://eslint.org/docs/rules/semi-style\n \"semi-style\": [\"error\", \"last\"],\n\n // requires object keys to be sorted\n \"sort-keys\": [\"off\", \"asc\", { caseSensitive: false, natural: true }],\n\n // sort variables within the same declaration block\n \"sort-vars\": \"off\",\n\n // require or disallow space before blocks\n \"space-before-blocks\": \"error\",\n\n // require or disallow space before function opening parenthesis\n // https://eslint.org/docs/rules/space-before-function-paren\n \"space-before-function-paren\": [\n \"error\",\n {\n anonymous: \"always\",\n named: \"never\",\n asyncArrow: \"always\",\n },\n ],\n\n // require or disallow spaces inside parentheses\n \"space-in-parens\": [\"error\", \"never\"],\n\n // require spaces around operators\n \"space-infix-ops\": \"error\",\n\n // Require or disallow spaces before/after unary operators\n // https://eslint.org/docs/rules/space-unary-ops\n \"space-unary-ops\": [\n \"error\",\n {\n words: true,\n nonwords: false,\n overrides: {},\n },\n ],\n\n // require or disallow a space immediately following the // or /* in a comment\n // https://eslint.org/docs/rules/spaced-comment\n \"spaced-comment\": [\n \"error\",\n \"always\",\n {\n line: {\n exceptions: [\"-\", \"+\", \"*\"],\n markers: [\"=\", \"!\", \"/\"], // space here to support sprockets directives, slash for TS /// comments\n },\n block: {\n exceptions: [\"-\", \"+\"],\n markers: [\"=\", \"!\", \":\", \"::\"], // space here to support sprockets directives and flow comment types\n balanced: true,\n },\n },\n ],\n\n // Enforce spacing around colons of switch statements\n // https://eslint.org/docs/rules/switch-colon-spacing\n \"switch-colon-spacing\": [\"error\", { after: true, before: false }],\n\n // Require or disallow spacing between template tags and their literals\n // https://eslint.org/docs/rules/template-tag-spacing\n \"template-tag-spacing\": [\"error\", \"never\"],\n\n // require or disallow the Unicode Byte Order Mark\n // https://eslint.org/docs/rules/unicode-bom\n \"unicode-bom\": [\"error\", \"never\"],\n\n // require regex literals to be wrapped in parentheses\n \"wrap-regex\": \"off\",\n },\n};\n\nexport default config;\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkROX6JHFJ_js = require('../../chunk-ROX6JHFJ.js');
|
|
4
4
|
var chunk6E2RGUNG_js = require('../../chunk-6E2RGUNG.js');
|
|
5
5
|
var chunkSV64EPVP_js = require('../../chunk-SV64EPVP.js');
|
|
6
6
|
var chunkARKJLBXP_js = require('../../chunk-ARKJLBXP.js');
|
|
7
7
|
|
|
8
|
-
var n=chunk6E2RGUNG_js.a.rules,l=chunkSV64EPVP_js.a.rules,e=
|
|
8
|
+
var n=chunk6E2RGUNG_js.a.rules,l=chunkSV64EPVP_js.a.rules,e=chunkROX6JHFJ_js.a.rules,r=chunkARKJLBXP_js.a("all",{plugins:["babel"],rules:{camelcase:"off","babel/camelcase":[e.camelcase[0],{...e.camelcase[1]}],"new-cap":"off","babel/new-cap":e["new-cap"],"no-invalid-this":"off","babel/no-invalid-this":n["no-invalid-this"],"object-curly-spacing":"off","babel/object-curly-spacing":e["object-curly-spacing"],quotes:"off","babel/quotes":e.quotes,semi:"off","babel/semi":e.semi,"no-unused-expressions":"off","babel/no-unused-expressions":n["no-unused-expressions"],"valid-typeof":"off","babel/valid-typeof":l["valid-typeof"]}}),b=r;
|
|
9
9
|
|
|
10
10
|
module.exports = b;
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkYMWD4DNM_js = require('../../chunk-YMWD4DNM.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkROX6JHFJ_js = require('../../chunk-ROX6JHFJ.js');
|
|
5
5
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
6
6
|
var p = require('find-up');
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
|
|
10
10
|
var p__default = /*#__PURE__*/_interopDefault(p);
|
|
11
11
|
|
|
12
|
-
var t=
|
|
12
|
+
var t=chunkROX6JHFJ_js.a.rules,e=t["no-underscore-dangle"],c={};packageJsonUtils.hasAnyDep(["react","react-dom"],{peerDeps:!1})&&(c={"react/jsx-indent":"off","react/jsx-closing-tag-location":"off","react/jsx-closing-bracket-location":"off","react/jsx-curly-spacing":"off","react/jsx-equals-spacing":"off","react/jsx-first-prop-new-line":"off","react/jsx-indent-props":"off","react/jsx-max-props-per-line":"off","react/jsx-tag-spacing":"off","react/jsx-wrap-multilines":"off","react/prefer-stateless-function":"off","react/jsx-one-expression-per-line":"off","react/jsx-props-no-multi-spaces":"off"});var a=(()=>{if(!global.hasAnolilabEsLintConfigReactRuntimePath){let o=p__default.default.sync("node_modules/react/jsx-runtime.js");typeof o=="string"&&chunkYMWD4DNM_js.b(`
|
|
13
13
|
@anolilab/eslint-config found react jsx-runtime.
|
|
14
14
|
|
|
15
15
|
Following rules are disabled: "react/jsx-uses-react" and "react/react-in-jsx-scope".
|
|
@@ -4,15 +4,15 @@ var chunkUJAIXHCQ_js = require('../../chunk-UJAIXHCQ.js');
|
|
|
4
4
|
var chunkYMWD4DNM_js = require('../../chunk-YMWD4DNM.js');
|
|
5
5
|
var chunk72JA2E3L_js = require('../../chunk-72JA2E3L.js');
|
|
6
6
|
var chunkPCIKFIV2_js = require('../../chunk-PCIKFIV2.js');
|
|
7
|
-
var
|
|
7
|
+
var chunkROX6JHFJ_js = require('../../chunk-ROX6JHFJ.js');
|
|
8
8
|
var chunk6E2RGUNG_js = require('../../chunk-6E2RGUNG.js');
|
|
9
9
|
var chunkSV64EPVP_js = require('../../chunk-SV64EPVP.js');
|
|
10
10
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
11
11
|
var process = require('process');
|
|
12
12
|
|
|
13
|
-
var t=chunk6E2RGUNG_js.a.rules,
|
|
14
|
-
Found prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824`)),
|
|
13
|
+
var t=chunk6E2RGUNG_js.a.rules,d=chunkSV64EPVP_js.a.rules,e=chunkROX6JHFJ_js.a.rules,g=chunkPCIKFIV2_js.a.rules,b=chunk72JA2E3L_js.a.rules,r=chunkUJAIXHCQ_js.a.rules,{quotes:C,semi:_}=e,{indent:x}=e;packageJsonUtils.hasAnyDep(["prettier"])&&(global.hasAnolilabEsLintConfigTypescriptPrettier||(global.hasAnolilabEsLintConfigTypescriptPrettier=!0,chunkYMWD4DNM_js.b(`
|
|
14
|
+
Found prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824`)),x="off");var n=b["import/extensions"],o=b["import/no-extraneous-dependencies"],s=e["comma-dangle"],i={};packageJsonUtils.pkg&&(i=packageJsonUtils.pkg?.anolilab?.["eslint-config"]);var h=process.env.DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION!=="true";i?.warn_on_unsupported_typescript_version!==void 0&&(h=i?.warn_on_unsupported_typescript_version);var j={overrides:[{files:["*.ts","*.mts","*.cts","*.tsx"],extends:["plugin:import/typescript"],plugins:["@typescript-eslint"],parser:"@typescript-eslint/parser",parserOptions:{sourceType:"module",ecmaFeatures:{jsx:!0},warnOnUnsupportedTypeScriptVersion:h},settings:{"import/parsers":{"@typescript-eslint/parser":[".ts",".tsx",".d.ts"]},"import/resolver":{node:{extensions:[".mjs",".cjs",".js",".json",".ts",".d.ts"]}},"import/extensions":[".js",".mjs",".jsx",".ts",".tsx",".d.ts"],"import/external-module-folders":["node_modules","node_modules/@types"]},rules:{strict:"off","brace-style":"off","@typescript-eslint/brace-style":e["brace-style"],camelcase:"off","@typescript-eslint/naming-convention":["error",{selector:"variable",format:["camelCase","PascalCase","UPPER_CASE"]},{selector:"function",format:["camelCase","PascalCase"]},{selector:"typeLike",format:["PascalCase"]}],"comma-dangle":"off","@typescript-eslint/comma-dangle":[s[0],{...s[1],enums:s[1].arrays,generics:s[1].arrays,tuples:s[1].arrays}],"comma-spacing":"off","@typescript-eslint/comma-spacing":e["comma-spacing"],"dot-notation":"off","func-call-spacing":"off","@typescript-eslint/func-call-spacing":e["func-call-spacing"],indent:"off","@typescript-eslint/indent":x,"keyword-spacing":"off","@typescript-eslint/keyword-spacing":e["keyword-spacing"],"lines-between-class-members":"off","@typescript-eslint/lines-between-class-members":e["lines-between-class-members"],"no-array-constructor":"off","@typescript-eslint/no-array-constructor":e["no-array-constructor"],"no-dupe-class-members":"off","@typescript-eslint/no-dupe-class-members":g["no-dupe-class-members"],"no-empty-function":"off","@typescript-eslint/no-empty-function":t["no-empty-function"],"no-extra-parens":"off","@typescript-eslint/no-extra-parens":d["no-extra-parens"],"no-extra-semi":"off","@typescript-eslint/no-extra-semi":d["no-extra-semi"],"no-implied-eval":"off","no-new-func":"off","no-loop-func":"off","@typescript-eslint/no-loop-func":t["no-loop-func"],"no-magic-numbers":"off","@typescript-eslint/no-magic-numbers":t["no-magic-numbers"],"no-redeclare":"off","@typescript-eslint/no-redeclare":t["no-redeclare"],"no-shadow":"off","@typescript-eslint/no-shadow":r["no-shadow"],"no-throw-literal":"off","no-unused-expressions":"off","@typescript-eslint/no-unused-expressions":t["no-unused-expressions"],"no-unused-vars":"off","@typescript-eslint/no-unused-vars":r["no-unused-vars"],"no-use-before-define":"off","@typescript-eslint/no-use-before-define":r["no-use-before-define"],"no-useless-constructor":"off","@typescript-eslint/no-useless-constructor":g["no-useless-constructor"],quotes:"off","@typescript-eslint/quotes":C,semi:"off","@typescript-eslint/semi":_,"space-before-function-paren":"off","@typescript-eslint/space-before-function-paren":e["space-before-function-paren"],"no-return-await":"off","@typescript-eslint/return-await":t["no-return-await"],"space-infix-ops":"off","@typescript-eslint/space-infix-ops":e["space-infix-ops"],"import/extensions":[n[0],n[1],{...n[2],ts:"never",tsx:"never"}],"import/no-extraneous-dependencies":[o[0],{...o[1],devDependencies:o[1].devDependencies.map(v=>v.replaceAll(/\bjs(x?)\b/g,"ts$1"))}],"constructor-super":"off","getter-return":"off","no-const-assign":"off","no-dupe-args":"off","no-dupe-keys":"off","no-func-assign":"off","no-new-symbol":"off","no-obj-calls":"off","no-this-before-super":"off","no-undef":"off","no-unreachable":"off","no-unsafe-negation":"off","valid-typeof":"off","import/named":"off","import/no-unresolved":"off","react/require-default-props":"off","@typescript-eslint/consistent-type-imports":"error","@typescript-eslint/adjacent-overload-signatures":"error","@typescript-eslint/member-ordering":["error",{default:["public-static-field","protected-static-field","private-static-field","public-static-method","protected-static-method","private-static-method","public-instance-field","protected-instance-field","private-instance-field","constructor","public-instance-method","protected-instance-method","private-instance-method"]}],"@typescript-eslint/array-type":["error",{default:"array",readonly:"generic"}],"@typescript-eslint/ban-types":["error",{types:{String:{message:"Use string instead",fixWith:"string"},Boolean:{message:"Use boolean instead",fixWith:"boolean"},Number:{message:"Use number instead",fixWith:"number"},Object:{message:"Use object instead",fixWith:"object"},Array:{message:"Provide a more specific type"}}}],"@typescript-eslint/sort-type-constituents":"error","@typescript-eslint/prefer-ts-expect-error":"error","@typescript-eslint/consistent-generic-constructors":"error","@typescript-eslint/explicit-member-accessibility":"error","@typescript-eslint/explicit-module-boundary-types":"error","@typescript-eslint/method-signature-style":"error","@typescript-eslint/no-confusing-non-null-assertion":"error","@typescript-eslint/no-duplicate-enum-values":"error","@typescript-eslint/no-dynamic-delete":"warn","@typescript-eslint/no-extra-non-null-assertion":"error","@typescript-eslint/no-invalid-void-type":"warn","@typescript-eslint/no-misused-new":"error","@typescript-eslint/no-namespace":"error","@typescript-eslint/no-non-null-asserted-nullish-coalescing":"warn","@typescript-eslint/no-non-null-asserted-optional-chain":"error","@typescript-eslint/no-non-null-assertion":"error","@typescript-eslint/no-require-imports":"error","@typescript-eslint/no-this-alias":"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-member-access":"error","@typescript-eslint/no-unsafe-return":"error","@typescript-eslint/no-useless-empty-export":"error","@typescript-eslint/non-nullable-type-assertion-style":"off","@typescript-eslint/prefer-enum-initializers":"error","@typescript-eslint/prefer-function-type":"error","@typescript-eslint/prefer-nullish-coalescing":"error","@typescript-eslint/prefer-optional-chain":"error","@typescript-eslint/no-import-type-side-effects":"error"}},{files:["*.d.ts"],rules:{"import/no-duplicates":"off"}}]},N=j;
|
|
15
15
|
|
|
16
|
-
module.exports =
|
|
16
|
+
module.exports = N;
|
|
17
17
|
//# sourceMappingURL=out.js.map
|
|
18
18
|
//# sourceMappingURL=typescript.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","consoleLog","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","config","glob","typescript_default"],"mappings":"+SAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,CAAK,EAAIT,EACrB,CAAE,OAAAU,CAAO,EAAIV,EAEbP,EAAU,CAAC,UAAU,CAAC,IAEjB,OAAO,4CACR,OAAO,0CAA4C,GAEnDkB,EACI;AAAA,wLACJ,GAGJD,EAAS,OAGb,IAAME,EAAmBR,EAAa,mBAAmB,EACnDS,EAAiCT,EAAa,mCAAmC,EACjFU,EAAcd,EAAW,cAAc,EAEzCe,EAA6D,CAAC,EAE9DrB,IAEAqB,EAAuBrB,GAAM,WAAc,eAAe,GAG9D,IAAMsB,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,0BAA0B,EACpC,QAAS,CAAC,oBAAoB,EAC9B,OAAQ,4BACR,cAAe,CACX,WAAY,SACZ,aAAc,CACV,IAAK,EACT,EACA,mCAAoCD,GAAuB,wCAA6CpB,EAAI,qDAA0D,MAC1K,EACA,SAAU,CAEN,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAO,CACxD,EAGA,kBAAmB,CACf,KAAM,CAC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AS,qBAAsB,QAAS,QAAS,EAC3D,QAAS,CAAE,QAAS,sBAAuB,QAAS,SAAU,EAC9D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,OAAQ,CAAE,QAAS,qBAAsB,QAAS,QAAS,EAC3D,MAAO,CAAE,QAAS,8BAA+B,CACrD,CACJ,CACJ,EAIA,4CAA6C,QAI7C,4CAA6C,QAI7C,qDAAsD,QAItD,mDAAoD,QAIpD,oDAAqD,QAIrD,4CAA6C,QAI7C,qDAAsD,QAItD,8CAA+C,QAI/C,uCAAwC,OAIxC,iDAAkD,QAIlD,0CAA2C,OAI3C,oCAAqC,QAIrC,kCAAmC,QAInC,6DAA8D,OAI9D,yDAA0D,QAI1D,2CAA4C,QAI5C,wCAAyC,QAIzC,mCAAoC,QAIpC,mDAAoD,QAIpD,oDAAqD,QAIrD,wCAAyC,QAIzC,0CAA2C,QAI3C,oCAAqC,QAIrC,mDAAoD,QAIpD,6CAA8C,QAI9C,sCAAuC,QAIvC,6CAA8C,QAI9C,uDAAwD,MAIxD,8CAA+C,QAI/C,0CAA2C,QAI3C,+CAAgD,QAIhD,2CAA4C,QAG5C,iDAAkD,OACtD,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi } = styleRules;\nlet { indent } = styleRules;\n\nif (hasAnyDep([\"prettier\"])) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigTypescriptPrettier) {\n global.hasAnolilabEsLintConfigTypescriptPrettier = true;\n\n consoleLog(\n \"\\nFound prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824\",\n );\n }\n\n indent = \"off\";\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] ?? env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\",\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/typescript.ts"],"names":["hasAnyDep","pkg","env","bestPracticesRules","best_practices_default","errorsRules","errors_default","styleRules","style_default","eS6Rules","es6_default","importsRules","import_default","variablesRules","variables_default","quotes","semi","indent","consoleLog","importExtensions","importNoExtraneousDependencies","commaDangle","anolilabEslintConfig","showUnsupportedTypeScriptVersionWarning","config","glob","typescript_default"],"mappings":"+SAAA,OAAS,aAAAA,EAAW,OAAAC,MAAW,+BAE/B,OAAS,OAAAC,MAAW,UAWpB,IAAMC,EAAqBC,EAAoB,MACzCC,EAAcC,EAAa,MAC3BC,EAAaC,EAAY,MAEzBC,EAAWC,EAAU,MACrBC,EAAeC,EAAc,MAC7BC,EAAiBC,EAAgB,MAEjC,CAAE,OAAAC,EAAQ,KAAAC,CAAK,EAAIT,EACrB,CAAE,OAAAU,CAAO,EAAIV,EAEbP,EAAU,CAAC,UAAU,CAAC,IAEjB,OAAO,4CACR,OAAO,0CAA4C,GAEnDkB,EACI;AAAA,wLACJ,GAGJD,EAAS,OAGb,IAAME,EAAmBR,EAAa,mBAAmB,EACnDS,EAAiCT,EAAa,mCAAmC,EACjFU,EAAcd,EAAW,cAAc,EAEzCe,EAA6D,CAAC,EAE9DrB,IAEAqB,EAAuBrB,GAAM,WAAc,eAAe,GAG9D,IAAIsB,EAAmDrB,EAAI,qDAA0D,OAEjHoB,GAAuB,yCAA8C,SACrEC,EAA0CD,GAAuB,wCAGrE,IAAME,EAAwB,CAC1B,UAAW,CACP,CACI,MAAO,CAAC,OAAQ,QAAS,QAAS,OAAO,EACzC,QAAS,CAAC,0BAA0B,EACpC,QAAS,CAAC,oBAAoB,EAC9B,OAAQ,4BACR,cAAe,CACX,WAAY,SACZ,aAAc,CACV,IAAK,EACT,EACA,mCAAoCD,CACxC,EACA,SAAU,CAEN,iBAAkB,CACd,4BAA6B,CAAC,MAAO,OAAQ,OAAO,CACxD,EAGA,kBAAmB,CACf,KAAM,CACF,WAAY,CAAC,OAAQ,OAAQ,MAAO,QAAS,MAAO,OAAO,CAC/D,CACJ,EAGA,oBAAqB,CAAC,MAAO,OAAQ,OAAQ,MAAO,OAAQ,OAAO,EAGnE,iCAAkC,CAAC,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,QAAS,QAAS,EAC3D,MAAO,CAAE,QAAS,8BAA+B,CACrD,CACJ,CACJ,EAIA,4CAA6C,QAI7C,4CAA6C,QAI7C,qDAAsD,QAItD,mDAAoD,QAIpD,oDAAqD,QAIrD,4CAA6C,QAI7C,qDAAsD,QAItD,8CAA+C,QAI/C,uCAAwC,OAIxC,iDAAkD,QAIlD,0CAA2C,OAI3C,oCAAqC,QAIrC,kCAAmC,QAInC,6DAA8D,OAI9D,yDAA0D,QAI1D,2CAA4C,QAI5C,wCAAyC,QAIzC,mCAAoC,QAIpC,mDAAoD,QAIpD,oDAAqD,QAIrD,wCAAyC,QAIzC,0CAA2C,QAI3C,oCAAqC,QAIrC,mDAAoD,QAIpD,6CAA8C,QAI9C,sCAAuC,QAIvC,6CAA8C,QAI9C,uDAAwD,MAIxD,8CAA+C,QAI/C,0CAA2C,QAI3C,+CAAgD,QAIhD,2CAA4C,QAG5C,iDAAkD,OACtD,CACJ,EACA,CACI,MAAO,CAAC,QAAQ,EAChB,MAAO,CACH,uBAAwB,KAC5B,CACJ,CACJ,CACJ,EAEOC,EAAQF","sourcesContent":["import { hasAnyDep, pkg } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { env } from \"node:process\";\n\nimport { consoleLog } from \"../../utils/loggers\";\nimport bestPracticesConfig from \"../best-practices\";\nimport errorsConfig from \"../errors\";\n// eslint-disable-next-line unicorn/prevent-abbreviations\nimport eS6Config from \"../es6\";\nimport styleConfig from \"../style\";\nimport variablesConfig from \"../variables\";\nimport importsConfig from \"./import\";\n\nconst bestPracticesRules = bestPracticesConfig.rules as Linter.RulesRecord;\nconst errorsRules = errorsConfig.rules as Linter.RulesRecord;\nconst styleRules = styleConfig.rules as Linter.RulesRecord;\n// eslint-disable-next-line unicorn/prevent-abbreviations\nconst eS6Rules = eS6Config.rules as Linter.RulesRecord;\nconst importsRules = importsConfig.rules as Linter.RulesRecord;\nconst variablesRules = variablesConfig.rules as Linter.RulesRecord;\n\nconst { quotes, semi } = styleRules;\nlet { indent } = styleRules;\n\nif (hasAnyDep([\"prettier\"])) {\n // Workaround VS Code trying to run this file twice!\n if (!global.hasAnolilabEsLintConfigTypescriptPrettier) {\n global.hasAnolilabEsLintConfigTypescriptPrettier = true;\n\n consoleLog(\n \"\\nFound prettier as dependency, disabling the '@typescript-eslint/indent' rule to fix wrong behavior of the rule; @see https://github.com/typescript-eslint/typescript-eslint/issues/1824\",\n );\n }\n\n indent = \"off\";\n}\n\nconst importExtensions = importsRules[\"import/extensions\"] as any[];\nconst importNoExtraneousDependencies = importsRules[\"import/no-extraneous-dependencies\"] as any[];\nconst commaDangle = styleRules[\"comma-dangle\"] as any[];\n\nlet anolilabEslintConfig: { [key: string]: false | undefined } = {};\n\nif (pkg) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n anolilabEslintConfig = pkg?.[\"anolilab\"]?.[\"eslint-config\"];\n}\n\nlet showUnsupportedTypeScriptVersionWarning: boolean = env[\"DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION\"] !== \"true\";\n\nif (anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"] !== undefined) {\n showUnsupportedTypeScriptVersionWarning = anolilabEslintConfig?.[\"warn_on_unsupported_typescript_version\"];\n}\n\nconst config: Linter.Config = {\n overrides: [\n {\n files: [\"*.ts\", \"*.mts\", \"*.cts\", \"*.tsx\"],\n extends: [\"plugin:import/typescript\"],\n plugins: [\"@typescript-eslint\"],\n parser: \"@typescript-eslint/parser\",\n parserOptions: {\n sourceType: \"module\",\n ecmaFeatures: {\n jsx: true,\n },\n warnOnUnsupportedTypeScriptVersion: showUnsupportedTypeScriptVersionWarning,\n },\n settings: {\n // Apply special parsing for TypeScript files\n \"import/parsers\": {\n \"@typescript-eslint/parser\": [\".ts\", \".tsx\", \".d.ts\"],\n },\n\n // Append 'ts' extensions to 'import/resolver' setting\n \"import/resolver\": {\n node: {\n extensions: [\".mjs\", \".cjs\", \".js\", \".json\", \".ts\", \".d.ts\"],\n },\n },\n\n // Append 'ts' extensions to 'import/extensions' setting\n \"import/extensions\": [\".js\", \".mjs\", \".jsx\", \".ts\", \".tsx\", \".d.ts\"],\n\n // Resolve type definition packages\n \"import/external-module-folders\": [\"node_modules\", \"node_modules/@types\"],\n },\n rules: {\n // Breaks @typescript-eslint/parser\n strict: \"off\",\n\n // Replace 'brace-style' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/brace-style.md\n \"brace-style\": \"off\",\n \"@typescript-eslint/brace-style\": styleRules[\"brace-style\"],\n\n // Replace 'camelcase' rule with '@typescript-eslint/naming-convention'\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/naming-convention.md\n camelcase: \"off\",\n\n // eslint-disable-next-line max-len\n // The `@typescript-eslint/naming-convention` rule allows `leadingUnderscore` and `trailingUnderscore` settings. However, the existing `no-underscore-dangle` rule already takes care of this.\n \"@typescript-eslint/naming-convention\": [\n \"error\",\n // Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables (23.10)\n {\n selector: \"variable\",\n format: [\"camelCase\", \"PascalCase\", \"UPPER_CASE\"],\n },\n // Allow camelCase functions (23.2), and PascalCase functions (23.8)\n {\n selector: \"function\",\n format: [\"camelCase\", \"PascalCase\"],\n },\n // eslint-disable-next-line max-len\n // recommends PascalCase for classes (23.3), and although it does not make TypeScript recommendations, we are assuming this rule would similarly apply to anything \"type like\", including interfaces, type aliases, and enums\n {\n selector: \"typeLike\",\n format: [\"PascalCase\"],\n },\n ],\n\n // Replace 'comma-dangle' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-dangle.md\n // The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config\n \"comma-dangle\": \"off\",\n \"@typescript-eslint/comma-dangle\": [\n commaDangle[0],\n {\n ...commaDangle[1],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n enums: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n generics: commaDangle[1].arrays,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access\n tuples: commaDangle[1].arrays,\n },\n ],\n\n // Replace 'comma-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/comma-spacing.md\n \"comma-spacing\": \"off\",\n \"@typescript-eslint/comma-spacing\": styleRules[\"comma-spacing\"],\n\n // Disable the \"dot-notation\" rule, as it can report incorrect errors on TypeScript code\n \"dot-notation\": \"off\",\n\n // Replace 'func-call-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/func-call-spacing.md\n \"func-call-spacing\": \"off\",\n \"@typescript-eslint/func-call-spacing\": styleRules[\"func-call-spacing\"],\n\n // Replace 'indent' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/indent.md\n indent: \"off\",\n \"@typescript-eslint/indent\": indent,\n\n // Replace 'keyword-spacing' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/keyword-spacing.md\n \"keyword-spacing\": \"off\",\n \"@typescript-eslint/keyword-spacing\": styleRules[\"keyword-spacing\"],\n\n // Replace 'lines-between-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md\n \"lines-between-class-members\": \"off\",\n \"@typescript-eslint/lines-between-class-members\": styleRules[\"lines-between-class-members\"],\n\n // Replace 'no-array-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-array-constructor.md\n \"no-array-constructor\": \"off\",\n \"@typescript-eslint/no-array-constructor\": styleRules[\"no-array-constructor\"],\n\n // Replace 'no-dupe-class-members' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-dupe-class-members.md\n \"no-dupe-class-members\": \"off\",\n \"@typescript-eslint/no-dupe-class-members\": eS6Rules[\"no-dupe-class-members\"],\n\n // Replace 'no-empty-function' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md\n \"no-empty-function\": \"off\",\n \"@typescript-eslint/no-empty-function\": bestPracticesRules[\"no-empty-function\"],\n\n // Replace 'no-extra-parens' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-parens.md\n \"no-extra-parens\": \"off\",\n \"@typescript-eslint/no-extra-parens\": errorsRules[\"no-extra-parens\"],\n\n // Replace 'no-extra-semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-extra-semi.md\n \"no-extra-semi\": \"off\",\n \"@typescript-eslint/no-extra-semi\": errorsRules[\"no-extra-semi\"],\n\n // Disable the \"no-implied-eval\" and \"no-new-func\" rule, as it can report incorrect errors on TypeScript code\n \"no-implied-eval\": \"off\",\n \"no-new-func\": \"off\",\n\n // Replace 'no-loop-func' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md\n \"no-loop-func\": \"off\",\n \"@typescript-eslint/no-loop-func\": bestPracticesRules[\"no-loop-func\"],\n\n // Replace 'no-magic-numbers' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-magic-numbers.md\n \"no-magic-numbers\": \"off\",\n \"@typescript-eslint/no-magic-numbers\": bestPracticesRules[\"no-magic-numbers\"],\n\n // Replace 'no-redeclare' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md\n \"no-redeclare\": \"off\",\n \"@typescript-eslint/no-redeclare\": bestPracticesRules[\"no-redeclare\"],\n\n // Replace 'no-shadow' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md\n \"no-shadow\": \"off\",\n \"@typescript-eslint/no-shadow\": variablesRules[\"no-shadow\"],\n\n // Disable the \"no-throw-literal\" rule, as it can report incorrect errors on TypeScript code\n \"no-throw-literal\": \"off\",\n\n // Replace 'no-unused-expressions' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-expressions.md\n \"no-unused-expressions\": \"off\",\n \"@typescript-eslint/no-unused-expressions\": bestPracticesRules[\"no-unused-expressions\"],\n\n // Replace 'no-unused-vars' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-unused-vars.md\n \"no-unused-vars\": \"off\",\n \"@typescript-eslint/no-unused-vars\": variablesRules[\"no-unused-vars\"],\n\n // Replace 'no-use-before-define' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-use-before-define.md\n \"no-use-before-define\": \"off\",\n \"@typescript-eslint/no-use-before-define\": variablesRules[\"no-use-before-define\"],\n\n // Replace 'no-useless-constructor' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-useless-constructor.md\n \"no-useless-constructor\": \"off\",\n \"@typescript-eslint/no-useless-constructor\": eS6Rules[\"no-useless-constructor\"],\n\n // Replace 'quotes' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/quotes.md\n quotes: \"off\",\n \"@typescript-eslint/quotes\": quotes,\n\n // Replace 'semi' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/semi.md\n semi: \"off\",\n \"@typescript-eslint/semi\": semi,\n\n // Replace 'space-before-function-paren' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-before-function-paren.md\n \"space-before-function-paren\": \"off\",\n \"@typescript-eslint/space-before-function-paren\": styleRules[\"space-before-function-paren\"],\n\n // Replace 'no-return-await' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/return-await.md\n \"no-return-await\": \"off\",\n \"@typescript-eslint/return-await\": bestPracticesRules[\"no-return-await\"],\n\n // Replace 'space-infix-ops' rule with '@typescript-eslint' version\n // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/space-infix-ops.md\n \"space-infix-ops\": \"off\",\n \"@typescript-eslint/space-infix-ops\": styleRules[\"space-infix-ops\"],\n\n // Append 'ts' and 'tsx' to 'import/extensions' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md\n \"import/extensions\": [\n importExtensions[0],\n importExtensions[1],\n {\n ...importExtensions[2],\n ts: \"never\",\n tsx: \"never\",\n },\n ],\n\n // Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule\n // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md\n \"import/no-extraneous-dependencies\": [\n importNoExtraneousDependencies[0],\n {\n ...importNoExtraneousDependencies[1],\n // eslint-disable-next-line max-len\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call\n devDependencies: importNoExtraneousDependencies[1].devDependencies.map((glob: string) => glob.replaceAll(/\\bjs(x?)\\b/g, \"ts$1\")),\n },\n ],\n\n // The following rules are enabled in config, but are already checked (more thoroughly) by the TypeScript compiler\n // Some rules also fail in TypeScript files, for example: https://github.com/typescript-eslint/typescript-eslint/issues/662#issuecomment-507081586\n \"constructor-super\": \"off\",\n \"getter-return\": \"off\",\n \"no-const-assign\": \"off\",\n \"no-dupe-args\": \"off\",\n \"no-dupe-keys\": \"off\",\n \"no-func-assign\": \"off\",\n \"no-new-symbol\": \"off\",\n \"no-obj-calls\": \"off\",\n \"no-this-before-super\": \"off\",\n \"no-undef\": \"off\",\n \"no-unreachable\": \"off\",\n \"no-unsafe-negation\": \"off\",\n \"valid-typeof\": \"off\",\n \"import/named\": \"off\",\n \"import/no-unresolved\": \"off\",\n \"react/require-default-props\": \"off\",\n\n // Enforce consistent usage of type imports.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-type-imports.md\n \"@typescript-eslint/consistent-type-imports\": \"error\",\n\n // Require that function overload signatures be consecutive.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md\n \"@typescript-eslint/adjacent-overload-signatures\": \"error\",\n\n // Enforce a standard member declaration order. (member-ordering from TSLint)\n \"@typescript-eslint/member-ordering\": [\n \"error\",\n {\n default: [\n \"public-static-field\",\n \"protected-static-field\",\n \"private-static-field\",\n \"public-static-method\",\n \"protected-static-method\",\n \"private-static-method\",\n \"public-instance-field\",\n \"protected-instance-field\",\n \"private-instance-field\",\n \"constructor\",\n \"public-instance-method\",\n \"protected-instance-method\",\n \"private-instance-method\",\n ],\n },\n ],\n\n // Requires using either T[] for arrays (array-type)\n \"@typescript-eslint/array-type\": [\n \"error\",\n {\n default: \"array\",\n readonly: \"generic\",\n },\n ],\n\n // Some built-in types have aliases, while some types are considered dangerous or harmful.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/ban-types.md\n // Enforces that types will not to be used\n \"@typescript-eslint/ban-types\": [\n \"error\",\n {\n types: {\n String: { message: \"Use string instead\", fixWith: \"string\" },\n Boolean: { message: \"Use boolean instead\", fixWith: \"boolean\" },\n Number: { message: \"Use number instead\", fixWith: \"number\" },\n Object: { message: \"Use object instead\", fixWith: \"object\" },\n Array: { message: \"Provide a more specific type\" },\n },\n },\n ],\n\n // Enforce constituents of a type union/intersection to be sorted alphabetically.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/sort-type-constituents.md\n \"@typescript-eslint/sort-type-constituents\": \"error\",\n\n // Enforce using @ts-expect-error over @ts-ignore.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md\n \"@typescript-eslint/prefer-ts-expect-error\": \"error\",\n\n // Enforce specifying generic type arguments on constructor name of a constructor call.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md\n \"@typescript-eslint/consistent-generic-constructors\": \"error\",\n\n // Require explicit accessibility modifiers on class properties and methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md\n \"@typescript-eslint/explicit-member-accessibility\": \"error\",\n\n // Require explicit return and argument types on exported functions' and classes' public class methods.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md\n \"@typescript-eslint/explicit-module-boundary-types\": \"error\",\n\n // Enforce using a particular method signature syntax.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/method-signature-style.md\n \"@typescript-eslint/method-signature-style\": \"error\",\n\n // Disallow non-null assertion in locations that may be confusing.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"error\",\n\n // Disallow duplicate enum member values.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md\n \"@typescript-eslint/no-duplicate-enum-values\": \"error\",\n\n // Disallow using to delete operator on computed key expressions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-dynamic-delete.md\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n\n // Disallow extra non-null assertions.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md\n \"@typescript-eslint/no-extra-non-null-assertion\": \"error\",\n\n // Disallow void type outside of generic or return types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-invalid-void-type.md\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n\n // Enforce valid definition of new and constructor.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-misused-new.md\n \"@typescript-eslint/no-misused-new\": \"error\",\n\n // Disallow TypeScript namespaces.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-namespace.md\n \"@typescript-eslint/no-namespace\": \"error\",\n\n // Disallow non-null assertions in the left operand of a nullish coalescing operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n\n // Disallow non-null assertions after an optional chain expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"error\",\n\n // Disallow non-null assertions using the ! postfix operator.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-non-null-assertion.md\n \"@typescript-eslint/no-non-null-assertion\": \"error\",\n\n // Disallow invocation of require().\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-require-imports.md\n \"@typescript-eslint/no-require-imports\": \"error\",\n\n // Disallow aliasing this.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-this-alias.md\n \"@typescript-eslint/no-this-alias\": \"error\",\n\n // Disallow type assertions that do not change the type of expression.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"error\",\n\n // Disallow unnecessary constraints on generic types.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"error\",\n\n // Disallow calling a function with a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-argument.md\n \"@typescript-eslint/no-unsafe-argument\": \"error\",\n\n // Disallow assigning a value with type any to variables and properties.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md\n \"@typescript-eslint/no-unsafe-assignment\": \"error\",\n\n // Disallow calling a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-call.md\n \"@typescript-eslint/no-unsafe-call\": \"error\",\n\n // Disallow unsafe declaration merging.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"error\",\n\n // Disallow member access on a value with type any.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md\n \"@typescript-eslint/no-unsafe-member-access\": \"error\",\n\n // Disallow returning a value with type any from a function.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-unsafe-return.md\n \"@typescript-eslint/no-unsafe-return\": \"error\",\n\n // Disallow empty exports that don't change anything in a module file.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-useless-empty-export.md\n \"@typescript-eslint/no-useless-empty-export\": \"error\",\n\n // Enforce non-null assertions over explicit type casts. This rule is disabled by @typescript-eslint/no-non-null-assertion.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n\n // Require each enum member value to be explicitly initialized.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md\n \"@typescript-eslint/prefer-enum-initializers\": \"error\",\n\n // Enforce using function types instead of interfaces with call signatures.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-function-type.md\n \"@typescript-eslint/prefer-function-type\": \"error\",\n\n // Enforce using the nullish coalescing operator instead of logical chaining.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md\n \"@typescript-eslint/prefer-nullish-coalescing\": \"error\",\n\n // Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects.\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/prefer-optional-chain.md\n \"@typescript-eslint/prefer-optional-chain\": \"error\",\n\n // https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md\n \"@typescript-eslint/no-import-type-side-effects\": \"error\",\n },\n },\n {\n files: [\"*.d.ts\"],\n rules: {\n \"import/no-duplicates\": \"off\",\n },\n },\n ],\n};\n\nexport default config;\n"]}
|