Skip to content

Fix ruleArguments #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 15, 2019

Conversation

bouzuya
Copy link
Contributor

@bouzuya bouzuya commented Dec 12, 2019

PR Checklist

Overview

1. Prepare tslint.json

tslint.json

{
    "rules": {
        "newline-before-return": true,
        "semicolon": [true, "always"]
    }
}

2. Run tslint-to-eslint-config

npx tslint-to-eslint-config@0.3.1

3. A broken config file is generated

.eslintrc.js

module.exports = {
    "env": {
        "es6": true,
        "node": true
    },
    "extends": [],
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
        "project": "tsconfig.json",
        "sourceType": "module"
    },
    "plugins": [
        "@typescript-eslint"
    ],
    "rules": {
        "@typescript-eslint/member-delimiter-style": [
            "error",
            "error",
            {
                "multiline": {
                    "delimiter": "semi",
                    "requireLast": true
                },
                "singleline": {
                    "delimiter": "semi",
                    "requireLast": false
                }
            }
        ],
        "@typescript-eslint/semi": [
            "error",
            "always"
        ],
        "padding-line-between-statements": [
            "error",
            "error",
            {
                "blankLine": "always",
                "prev": "*",
                "next": "return"
            }
        ]
    },
    "settings": {}
};

@typescript-eslint/member-delimiter-style and padding-line-between-statements rules are broken.


#!/bin/bash
mkdir example
cd example/
npm init -y
npm i -D typescript tslint
cat <<EOS >tslint.json
{
    "rules": {
        "newline-before-return": true,
        "semicolon": [true, "always"]
    }
}
EOS
npx tslint-to-eslint-config@0.3.1
cat .eslintrc.js

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch. Thanks @bouzuya!

@JoshuaKGoldberg JoshuaKGoldberg merged commit 358612c into typescript-eslint:master Dec 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@typescript-eslint/member-delimiter-style and padding-line-between-statements rules are broken
2 participants