Closed
Description
🐛 Bug Report
tslint-to-eslint-config
version: 0.4.0- ESLint version: 6.8.0
- Node version: 12.14.0
Actual Behavior
The capitalized-comments
is disabled in TSLint but enabled in ESLint.
tslint.json
{
"rules": {
"comment-format": [true, "check-space"]
}
}
.eslintrc.js
module.exports = {
// ...
"rules": {
"capitalized-comments": "error",
"spaced-comment": "error"
}
};
Expected Behavior
module.exports = {
// ...
"rules": {
"spaced-comment": "error"
}
};
Reproduction
#!/bin/bash -x
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.8.0 \
tslint@5.20.1 \
typescript@3.7.4
cat <<EOS >tslint.json
{
"rules": {
"comment-format": [true, "check-space"]
}
}
EOS
cat <<'EOS' >index.ts
// lowercase comment
function add(x: number, y: number) { return x + y; }
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": {
# "capitalized-comments": "error",
# "spaced-comment": "error"
# }
# };
$(npm bin)/tslint index.ts # ok
$(npm bin)/eslint index.ts # ng
# 1:1 error Comments should not begin with a lowercase character capitalized-comments
#
# ✖ 1 problem (1 error, 0 warnings)
# 1 error and 0 warnings potentially fixable with the `--fix` option.