-
Couldn't load subscription status.
- Fork 100
Closed
Description
🐛 Bug Report
tslint-to-eslint-configversion: 0.4.0- ESLint version: 6.7.2
- Node version: 12.14.0
Actual Behavior
.eslintrc.js
module.exports = {
...
"no-underscore-dangle": [
"error",
"off"
]
...
};
$ eslint index.ts
Error: .eslintrc.js:
Configuration for rule "no-underscore-dangle" is invalid:
Value "off" should be object.
Expected Behavior
module.exports = {
...
"no-underscore-dangle": [
"off"
]
...
};
Reproduction
#!/bin/bash
mkdir example
cd example/
node --version # v12.14.0
npm init -y
npm i -D \
@typescript-eslint/[email protected] \
@typescript-eslint/[email protected] \
[email protected] \
[email protected] \
[email protected]
cat <<EOS >tslint.json
{
"rules": {
"variable-name": [
true,
"check-format",
"allow-leading-underscore"
]
}
}
EOS
$(npm bin)/tsc --init
npx [email protected]
cat .eslintrc.js # generated
# module.exports = {
# "env": {
# "browser": true,
# "es6": true
# },
# "parser": "@typescript-eslint/parser",
# "parserOptions": {
# "project": "tsconfig.json",
# "sourceType": "module"
# },
# "plugins": [
# "@typescript-eslint"
# ],
# "rules": {
# "camelcase": "error",
# "id-blacklist": "error",
# "id-match": "error",
# "no-underscore-dangle": [
# "error",
# "off"
# ]
# }
# };
# dummy source file
cat <<EOS >index.ts
function add(x: number, y: number) {
return x + y;
}
EOS
$(npm bin)/eslint index.ts
# Error: .eslintrc.js:
# Configuration for rule "no-underscore-dangle" is invalid:
# Value "off" should be object.
Metadata
Metadata
Assignees
Labels
No labels