Skip to content

Invalid rule configurations compiled by "eslint --print-config" on eslint-config-airbnb-typescript #2227

@U-4-E-A

Description

@U-4-E-A

I recently ran eslint --print-config example.js > output.json on my eslint config extending from airbnb-typescript-prettier and some of the rules extracted from packages such as eslint-config-airbnb-base are invalid. Example: -

"import/no-cycle": [
	"error",
	{
		"maxDepth": null
	}
]

Results in the error: -

Error: .eslintrc.js:
Configuration for rule "import/no-cycle" is invalid:
Value null should be integer.

There are a number of other rules that have invalid config: -

"react/destructuring-assignment": [
  "always",
  "error"
],
"react/jsx-closing-bracket-location": [
  "line-aligned",
  "off"
],
"react/jsx-curly-spacing": [
  "never",
  "off",
  {
	"allowMultiline": true
  }
],
"react/jsx-equals-spacing": [
  "never",
  "off"
],
"react/jsx-first-prop-new-line": [
  "multiline-multiprop",
  "off"
],
"react/jsx-space-before-closing": [
  "always",
  "off"
],
"react/prefer-es6-class": [
  "always",
  "error"
],
"react/sort-prop-types": [
  "off",
  {
	"callbacksLast": false,
	"ignoreCase": true,
	"requiredFirst": false,
	"sortShapeProp": true
  }
],
"react/state-in-constructor": [
  "always",
  "error"
],
"array-bracket-newline": [
  "consistent",
  "off"
],
"array-bracket-spacing": [
  "never",
  "off"
],
"arrow-body-style": [
  "as-needed",
  0,
  {
	"requireReturnForObjectLiteral": false
  }
],
"arrow-parens": [
  "always",
  "off"
],
"block-spacing": [
  "always",
  "off"
],
"brace-style": [
  "1tbs",
  "off",
  {
	"allowSingleLine": true
  }
],
"capitalized-comments": [
  "never",
  "off",
  {
	"block": {
	  "ignoreConsecutiveComments": true,
	  "ignoreInlineComments": true,
	  "ignorePattern": ".*"
	},
	"line": {
	  "ignoreConsecutiveComments": true,
	  "ignoreInlineComments": true,
	  "ignorePattern": ".*"
	}
  }
],
"comma-style": [
  "last",
  "off",
  {
	"exceptions": {
	  "ArrayExpression": false,
	  "ArrayPattern": false,
	  "ArrowFunctionExpression": false,
	  "CallExpression": false,
	  "FunctionDeclaration": false,
	  "FunctionExpression": false,
	  "ImportDeclaration": false,
	  "NewExpression": false,
	  "ObjectExpression": false,
	  "ObjectPattern": false,
	  "VariableDeclaration": false
	}
  }
],
"computed-property-spacing": [
  "never",
  "off"
],
"curly": [
  "multi-line",
  0
],
"eol-last": [
  "always",
  "off"
],
"eqeqeq": [
  "always",
  "error",
  {
	"null": "ignore"
  }
],
"func-call-spacing": [
  "never",
  "off"
],
"func-name-matching": [
  "always",
  "off",
  {
	"considerPropertyDescriptor": true,
	"includeCommonJSModuleExports": false
  }
],
"func-style": [
  "expression",
  "off"
],
"function-call-argument-newline": [
  "consistent",
  "off"
],
"function-paren-newline": [
  "consistent",
  "off"
],
"implicit-arrow-linebreak": [
  "beside",
  "off"
],
"lines-between-class-members": [
  "always",
  "error",
  {
	"exceptAfterSingleLine": false
  }
],
"multiline-ternary": [
  "never",
  "off"
],
"no-cond-assign": [
  "always",
  "error"
],
"no-extra-parens": [
  "all",
  "off",
  {
	"conditionalAssign": true,
	"enforceForArrowConditionals": false,
	"ignoreJSX": "all",
	"nestedBinaryExpressions": false,
	"returnAssign": false
  }
],
"no-restricted-globals": [
  "addEventListener",
  "blur",
  "close",
  "closed",
  "confirm",
  "defaultStatus",
  "defaultstatus",
  "error",
  "event",
  "external",
  "find",
  "focus",
  "frameElement",
  "frames",
  "history",
  "innerHeight",
  "innerWidth",
  "isFinite",
  "isNaN",
  "length",
  "location",
  "locationbar",
  "menubar",
  "moveBy",
  "moveTo",
  "name",
  "onblur",
  "onerror",
  "onfocus",
  "onload",
  "onresize",
  "onunload",
  "open",
  "opener",
  "opera",
  "outerHeight",
  "outerWidth",
  "pageXOffset",
  "pageYOffset",
  "parent",
  "print",
  "removeEventListener",
  "resizeBy",
  "resizeTo",
  "screen",
  "screenLeft",
  "screenTop",
  "screenX",
  "screenY",
  "scroll",
  "scrollBy",
  "scrollTo",
  "scrollX",
  "scrollY",
  "scrollbars",
  "self",
  "status",
  "statusbar",
  "stop",
  "toolbar",
  "top"
],
"no-return-assign": [
  "always",
  "error"
],
"nonblock-statement-body-position": [
  "beside",
  "off",
  {
	"overrides": {}
  }
],
"object-curly-newline": [
  "off",
  {
	"ExportDeclaration": {
	  "consistent": true,
	  "minProperties": 4,
	  "multiline": true
	},
	"ImportDeclaration": {
	  "consistent": true,
	  "minProperties": 4,
	  "multiline": true
	},
	"ObjectExpression": {
	  "consistent": true,
	  "minProperties": 4,
	  "multiline": true
	},
	"ObjectPattern": {
	  "consistent": true,
	  "minProperties": 4,
	  "multiline": true
	}
  }
],
"object-curly-spacing": [
  "always",
  "off"
],
"object-shorthand": [
  "always",
  "error",
  {
	"avoidQuotes": true,
	"ignoreConstructors": false
  }
],
"one-var-declaration-per-line": [
  "always",
  "off"
],
"operator-assignment": [
  "always",
  "error"
],
"operator-linebreak": [
  "before",
  "off",
  {
	"overrides": {
	  "=": "none"
	}
  }
],
"quote-props": [
  "as-needed",
  "off",
  {
	"keywords": false,
	"numbers": false,
	"unnecessary": true
  }
],
"quotes": [
  "single",
  0,
  {
	"avoidEscape": true
  }
],
"rest-spread-spacing": [
  "never",
  "off"
],
"semi": [
  "always",
  "off"
],
"semi-style": [
  "last",
  "off"
],
"sort-keys": [
  "asc",
  "off",
  {
	"caseSensitive": false,
	"natural": true
  }
],
"space-in-parens": [
  "never",
  "off"
],
"spaced-comment": [
  "always",
  "error",
  {
	"block": {
	  "balanced": true,
	  "exceptions": [
		"+",
		"-"
	  ],
	  "markers": [
		"!",
		":",
		"::",
		"="
	  ]
	},
	"line": {
	  "exceptions": [
		"+",
		"-"
	  ],
	  "markers": [
		"!",
		"="
	  ]
	}
  }
],
"template-tag-spacing": [
  "never",
  "off"
],
"unicode-bom": [
  "never",
  "off"
],
"yield-star-spacing": [
  "after",
  "off"
],

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions