Upon implementing the eslint rule, I configured it like this.
module.exports = {
rules: {
"@typescript-eslint/consistent-type-imports": [
"error",
{
fixStyle: "inline-type-imports"
}
],
}
}
Subsequently, I attempted to utilize the fix option with eslint.
eslint --fix --ext js,ts,tsx .
However, an error occurred:
Oops! Something went wrong! :(
ESLint: 8.26.0
Error: .eslintrc.js:
Configuration for rule "@typescript-eslint/consistent-type-imports" is invalid:
Value {"fixStyle":"inline-type-imports"} should NOT have additional properties.
at ConfigValidator.validateRuleOptions (.../node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2027:23)
at .../node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2082:18
Despite referencing the same option in the official document, why isn't it being applied?
This is my package.json file:
{
"devDependencies": {
"typescript": "4.8.4"
"eslint": "^8.26.0",
}
}