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

Consider removing the TS style guides #101

Closed
aladdin-add opened this issue Apr 18, 2024 · 7 comments · Fixed by #108
Closed

Consider removing the TS style guides #101

aladdin-add opened this issue Apr 18, 2024 · 7 comments · Fixed by #108
Assignees

Comments

@aladdin-add
Copy link
Member

aladdin-add commented Apr 18, 2024

Initially, there were 4 ts style guides listed:

  • airbnb
  • standard,
  • google,
  • xo.

However, aribnb and google were later removed (due to unofficial TS support), and recently, eslint-conifg-standard-with-typescript has been deprecated. Therefore, I suggest skipping the question "Does your project use TypeScript?" when users choose using a style guide. Instead, recommend using --config to apply a ts styleguide.

related:

@aladdin-add aladdin-add self-assigned this Apr 18, 2024
aladdin-add added a commit that referenced this issue Apr 18, 2024
@aladdin-add
Copy link
Member Author

ping @eslint/eslint-team

@nzakas
Copy link
Member

nzakas commented Apr 23, 2024

At this point, I think we should just remove all of the style guides from this wizard. We should be pushing people towards using code formatters anyway.

@mdjermanovic
Copy link
Member

Style guides include a lot of rules that are not covered by code formatters.

For example, airbnb-base enables 94 core rules that are not formatting rules and not already included in js.configs.recommended (former eslint:recommended) + 23 eslint-plugin-import rules:

[
    "array-callback-return",
    "arrow-body-style",
    "block-scoped-var",
    "camelcase",
    "class-methods-use-this",
    "consistent-return",
    "curly",
    "default-case",
    "default-case-last",
    "default-param-last",
    "dot-notation",
    "eqeqeq",
    "func-names",
    "grouped-accessor-pairs",
    "guard-for-in",
    "import/export",
    "import/extensions",
    "import/first",
    "import/named",
    "import/newline-after-import",
    "import/no-absolute-path",
    "import/no-amd",
    "import/no-cycle",
    "import/no-duplicates",
    "import/no-dynamic-require",
    "import/no-extraneous-dependencies",
    "import/no-import-module-exports",
    "import/no-mutable-exports",
    "import/no-named-as-default",
    "import/no-named-as-default-member",
    "import/no-named-default",
    "import/no-relative-packages",
    "import/no-self-import",
    "import/no-unresolved",
    "import/no-useless-path-segments",
    "import/no-webpack-loader-syntax",
    "import/order",
    "import/prefer-default-export",
    "max-classes-per-file",
    "new-cap",
    "no-alert",
    "no-array-constructor",
    "no-await-in-loop",
    "no-bitwise",
    "no-caller",
    "no-console",
    "no-constructor-return",
    "no-continue",
    "no-else-return",
    "no-empty-function",
    "no-eval",
    "no-extend-native",
    "no-extra-bind",
    "no-extra-label",
    "no-implied-eval",
    "no-inner-declarations",
    "no-iterator",
    "no-label-var",
    "no-labels",
    "no-lone-blocks",
    "no-lonely-if",
    "no-loop-func",
    "no-multi-assign",
    "no-multi-str",
    "no-nested-ternary",
    "no-new",
    "no-new-func",
    "no-new-wrappers",
    "no-octal-escape",
    "no-param-reassign",
    "no-plusplus",
    "no-promise-executor-return",
    "no-proto",
    "no-restricted-exports",
    "no-restricted-globals",
    "no-restricted-properties",
    "no-restricted-syntax",
    "no-return-assign",
    "no-script-url",
    "no-self-compare",
    "no-sequences",
    "no-shadow",
    "no-template-curly-in-string",
    "no-throw-literal",
    "no-undef-init",
    "no-underscore-dangle",
    "no-unneeded-ternary",
    "no-unreachable-loop",
    "no-unused-expressions",
    "no-use-before-define",
    "no-useless-computed-key",
    "no-useless-concat",
    "no-useless-constructor",
    "no-useless-rename",
    "no-useless-return",
    "no-var",
    "no-void",
    "object-shorthand",
    "one-var",
    "operator-assignment",
    "prefer-arrow-callback",
    "prefer-const",
    "prefer-destructuring",
    "prefer-exponentiation-operator",
    "prefer-numeric-literals",
    "prefer-object-spread",
    "prefer-promise-reject-errors",
    "prefer-regex-literals",
    "prefer-rest-params",
    "prefer-spread",
    "prefer-template",
    "radix",
    "strict",
    "symbol-description",
    "unicode-bom",
    "vars-on-top",
    "yoda"
]

@aladdin-add
Copy link
Member Author

Yes, but users can use --conifg, which should meet most needs.

@mdjermanovic
Copy link
Member

Yeah, I'm not opposed to removing style guides from the wizard, just wanted to note that I don't think formatting is a very strong argument because what we call "style guides" are configs that can include much more than just formatting rules.

I support removing all style guides from the wizard because the predefined list is somewhat arbitrary, and we now have the --config option.

@nzakas
Copy link
Member

nzakas commented Apr 24, 2024

At the time, the list was made up of the most popular style guides that were encoded with ESLint configs. We've not kept up that list, and many have used to source formatters instead. That's why I think it's a good idea to just remove this question. People can always add in whatever they want after the fact.

@mdjermanovic
Copy link
Member

Agreed, marked as accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

3 participants