Comments (8)
I think we should start with all of the recommended rules in the possible errors
section of eslint
. These are lints that prevent runtime errors, so they are most useful. Those would be:
- for-direction
- getter-return
- no-async-promise-executor
- no-compare-neg-zero
- no-cond-assign
- no-constant-condition
- no-control-regex
- no-debugger
- no-dupe-args
- no-dupe-else-if
- no-dupe-keys
- no-duplicate-case
- no-empty
- no-empty-character-class
- no-ex-assign
- no-extra-boolean-cast
- no-extra-semi
- no-func-assign
- no-import-assign
- no-inner-declarations
- no-invalid-regexp
- no-irregular-whitespace
- no-misleading-character-class
- no-obj-calls
- no-prototype-builtins
- no-regex-spaces
- no-setter-return
- no-sparse-arrays
- no-unexpected-multiline
- no-unreachable
- no-unsafe-finally
- no-unsafe-negation
- use-isnan
- valid-typeof
Then later we should implement the possible errors
recommended rules for typescript and then the remaining recommended eslint
and typescript specific rules. It would be awesome if we could have support for eslint:recommended
and @typescript-eslint/recommended
out of the box.
Ideas?
from deno_lint.
I think we should start with all of the recommended rules in the possible errors section of eslint. These are lints that prevent runtime errors, so they are most useful. Those would be:
Then later we should implement the possible errors recommended rules for typescript and then the remaining recommended eslint and typescript specific rules. It would be awesome if we could have support for eslint:recommended and @typescript-eslint/recommended out of the box.
@lucacasonato thanks for compiling the list, presented approach seems to be reasonable.
Keep in mind I'm still iterating heavily on AST traversal and the AstTraverser
will most likely be removed altogether in the near future.
from deno_lint.
Update: AstTraverser
was replaced with swc_ecma_visit::Visit
trait which serves the same purpose. I'm working on control flow analysis for more complex rules, but a lot of listed rules could now be implemented.
from deno_lint.
Hi @bartlomieju, are you looking for contributors for any of these rules? If so, I would be happy to have a look at one or more of them.
from deno_lint.
Hey @DomParfitt; this project hasn't received much attention in the past weeks due to release of Deno. There is still some core infrastructure missing, but if you can find a rule and implement it feel free to open a PR :) Keep in mind that scope analysis is not complete #21
from deno_lint.
How about no-unused-vars
?
from deno_lint.
@sgtpep no-unused-vars
requires scope analysis, which is WIP in #21
from deno_lint.
I've written down list of all recommended rules from ESLint in: #48
from deno_lint.
Related Issues (20)
- Rule against `await await` HOT 15
- Rule against redundant closures HOT 2
- Disable `require-await` by default HOT 2
- warn about sync usage inside async function
- Rule suggestion: prefer-object-shorthand
- Rule suggestion: no-compare-to-new
- fresh-server-event-handlers should now allow colocated (_islands) directory HOT 2
- Fallthrough is not allowed when adding comment above switch case HOT 2
- upgrade no-sync-fn-in-async-fn HOT 2
- `no-var`: report on the `var` keyword, not the entire var declaration
- `no-unused-vars` warning when variable in module scope is named `globalThis` HOT 2
- require-await doesn't consider `await using` expressions
- Rule suggestion: react-hooks/rules-of-hooks
- Docs: Add a label to show which config is ON by default/what value it uses HOT 1
- `explicit-module-boundary-types` complains about setters
- Rule semiColons for Deno lint HOT 1
- refactor: `Context` needs to be split up
- The require-await rule does more harm than good HOT 1
- Hint is wrong when use `deno.readAll` HOT 2
- Lint to detect npm dependencies without versions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno_lint.