Skip to content

Commit

Permalink
test(lint): use denolint
Browse files Browse the repository at this point in the history
Note that we also lint tests-corpus to ensure that
bare-ts generates high-quality codes.

For now, we do not use the config file because
it does not take into account the field `files`.
I opened an issue for that:

  napi-rs/node-rs#635

I added a config files for deno lint command.
This allows to manually check extra rules:

  deno lint --config .deno.json

Note that some rules are violated.
I excluded scripts and tests-corpus to avoid excessive rule vilation.
These two problems come from bugs that are reported:

  denoland/deno_lint#1018
  denoland/deno_lint#1048
  denoland/deno_lint#1049
  • Loading branch information
Conaclos committed May 20, 2022
1 parent 1d1ea0c commit 5ef4e46
Show file tree
Hide file tree
Showing 8 changed files with 426 additions and 17 deletions.
26 changes: 26 additions & 0 deletions .deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"lint": {
"files": {
"include": ["src/", "tests/"]
},
"rules": {
"tags": ["recommended"],
"include": [
"camelcase",
"default-param-last",
"eqeqeq",
"explicit-function-return-type",
"explicit-module-boundary-types",
"no-await-in-loop",
"no-eval",
"no-non-null-asserted-optional-chain",
"no-non-null-assertion",
"no-sparse-arrays",
"no-throw-literal",
"no-top-level-await",
"no-undef",
"single-var-declarator"
]
}
}
}
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc.json

This file was deleted.

0 comments on commit 5ef4e46

Please sign in to comment.