Closed
Description
🐛 Bug Report
tslint-to-eslint-config
version: 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/parser@2.12.0 \
@typescript-eslint/eslint-plugin@2.12.0 \
eslint@6.7.2 \
tslint@5.20.1 \
typescript@3.7.3
cat <<EOS >tslint.json
{
"rules": {
"variable-name": [
true,
"check-format",
"allow-leading-underscore"
]
}
}
EOS
$(npm bin)/tsc --init
npx tslint-to-eslint-config@0.4.0
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