-
Notifications
You must be signed in to change notification settings - Fork 173
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
Interoperate with Existing ESLint Rules and Configs #25
Comments
What if |
My opinion is that linter should be fewer configurations (even 0) The most popular eslint rules should be adopted, but no options are provided. In the short term, this is very bad, because everyone's writing habits are different But in the long term, it unifies the code style As I think about We should not add some flags to set the code style, eg. whether use trailing commas, whether to use spaces or tabs. I think this is very bad. People don’t have to discuss which one is the best style |
Code style is only limited by your project and your personal writing style as you said. But having no option to thinker with that options only removes value to an otherwise highly (though opinionated by default) customizable environment As has been discussed before, Deno doesn't do magic, doesn't pick default files and prefers to allow customization even though its defaults will be highly influenced by products such as ESLint and Prettier |
I would suggest having the linting setup include only common problems only; perhaps extending {
"parserOptions": {
"ecmaVersion": X
},
"extends": [
"eslint:recommended"
]
} |
Discussed offline with @magurotuna, we agree this is highly desirable and will look into what are the prerequisites. |
Deno's linter doesn't provide alternatives for all the Eslint rules we've historically used, which is a deal-breaker for us switching to Deno. We tried adding workarounds to Eslint to let it run in Deno files (see typescript-eslint/typescript-eslint#5921), but it's overly complicated and kind-of outside the scope of Eslint. IMO it would really behoove Deno Lint to natively support Eslint rules, rather than Deno Lint trying to come up with its own replacements for Eslint rules. AFAIK there are a few things that prevent Eslint from working with Deno: Eslint can't resolve
|
Update: Well, I'm getting there. I have ESlint itself apparently working. But I can't make the VSCode ESlint extension play nice with Deno imports. |
Related discussion: #305 (comment) |
@axetroy If you say there are too many options, why build out a
deno lint
at all? That's only adding more options. We already have a linting tool for linting JavaScript and TypeScript and it is calledeslint
. I don't see a value in duplicating all that work again.Unless a developer only writes backend code, they will still need to touch
eslint
.If a parallel lint tool must be built (are there really not better ways to improve deno?) then it MUST be able to consume existing eslint rules. Otherwise people will waste their time reinventing the wheel, writing duplicate rules for deno and frontend code rather than application code.
Instead
deno lint
would be more useful as something like golangci-lint where it aggregates and calls other already written lint rules and linters. It provides a "default lint config" (via url import) with sane default but still extendable.Originally posted by @brandonkal in denoland/deno#1880 (comment)
Emphasis added.
The text was updated successfully, but these errors were encountered: