Skip to content
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

Update ESlint development rules #2688

Closed
brian-mann opened this issue Oct 31, 2018 · 1 comment · Fixed by #2685
Closed

Update ESlint development rules #2688

brian-mann opened this issue Oct 31, 2018 · 1 comment · Fixed by #2685
Assignees
Milestone

Comments

@brian-mann
Copy link
Member

brian-mann commented Oct 31, 2018

Updates our ESlint rules to better accommodate the transition between CS -> JS via bulk-decaffeinate.

Specifically these rules have been added to extend our dev eslint rules:

{
  "extends": [
    "plugin:cypress-dev/general"
  ],
  "rules": {
    "no-multiple-empty-lines": ["error", { "max": 1 } ],
    "no-else-return": [ "error", { "allowElseIf": false } ],
    "brace-style": ["error", "1tbs", { "allowSingleLine": false }],
    "no-unneeded-ternary": ["error"],
    "array-bracket-newline": ["error", "consistent"],
    "arrow-body-style": ["error", "always"],
    "padding-line-between-statements": [
      "error",
      {
        "blankLine": "always",
        "prev": "*",
        "next": "return"
      },
      {
        "blankLine": "always",
        "prev": [
          "const",
          "let",
          "var",
          "if",
          "while",
          "export",
          "cjs-export",
          "import",
          "cjs-import"
        ],
        "next": "*"
      },
      {
        "blankLine": "any",
        "prev": [
          "const",
          "let",
          "var"
        ],
        "next": [
          "const",
          "let",
          "var"
        ]
      }
    ]
  },
}

These are debatable, but I'd like to make these the official rules and update our official cypress dev eslint rules. @chrisbreiding @amirrustam @bahmutov

@brian-mann brian-mann added this to the Sprint 9 milestone Oct 31, 2018
@brian-mann brian-mann self-assigned this Oct 31, 2018
@chrisbreiding
Copy link
Contributor

I'd like to discuss/go over some of these. Ultimately they should be added here and not directly in this repo: https://github.com/cypress-io/eslint-plugin-cypress-dev

brian-mann added a commit that referenced this issue Nov 1, 2018
- fixes #1264 
- fixes #1321 
- fixes #1799  
- fixes #2689
- fixes #2688
- fixes #2687 	
- fixes #2686
kuceb pushed a commit that referenced this issue Nov 14, 2018
- fixes #1264
- fixes #1321
- fixes #1799
- fixes #2689
- fixes #2688
- fixes #2687
- fixes #2686
kuceb pushed a commit to kuceb/cypress that referenced this issue Apr 23, 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 a pull request may close this issue.

3 participants