Skip to content

Commit a679128

Browse files
committed
feat(deno-lint): upgrade deno-lint
1 parent 9f7b42c commit a679128

File tree

7 files changed

+57
-19
lines changed

7 files changed

+57
-19
lines changed

.taplo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
exclude = ["node_modules/**/*.toml"]
2+
3+
# https://taplo.tamasfe.dev/configuration/formatter-options.html
4+
[formatting]
5+
align_entries = true
6+
indent_tables = true
7+
reorder_keys = true

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ nodeLinker: node-modules
22

33
npmRegistryServer: 'https://registry.npmjs.org/'
44

5+
plugins:
6+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
7+
spec: '@yarnpkg/plugin-workspace-tools'
8+
59
yarnPath: .yarn/releases/yarn-3.3.1.cjs

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"packages/*"
1111
],
1212
"scripts": {
13-
"artifacts": "lerna run artifacts",
13+
"artifacts": "yarn workspaces foreach --no-private run artifacts",
1414
"bench": "lerna run bench --concurrency 1 --stream --no-prefix",
15-
"build": "lerna run build --concurrency 1 --stream --no-prefix",
15+
"build": "yarn workspaces foreach --no-private -j 1 run build",
1616
"build:ts": "tsc -b tsconfig.project.json -verbose",
1717
"lint": "eslint . -c ./.eslintrc.yml \"packages/**/*.{ts,js}\"",
1818
"test": "ava",

packages/deno-lint/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[package]
22
authors = ["LongYinan <[email protected]>"]
33
edition = "2021"
4-
name = "deno-lint"
4+
name = "deno-lint"
55
version = "0.1.0"
66

77
[lib]
88
crate-type = ["cdylib"]
99

1010
[dependencies]
1111
annotate-snippets = { version = "0.9", features = ["color"] }
12-
anyhow = "1"
13-
deno_ast = "=0.21.0"
14-
deno_lint = "=0.35.0"
15-
env_logger = "0.10"
16-
global_alloc = { path = "../../crates/alloc" }
17-
globwalk = "0.8"
18-
ignore = "0.4"
19-
miette = { version = "5", features = ["fancy-no-backtrace"] }
20-
napi = { version = "2", default-features = false, features = ["napi3"] }
21-
napi-derive = { version = "2" }
22-
serde = "1"
23-
serde_json = "1"
12+
anyhow = "1"
13+
deno_ast = "=0.24.0"
14+
deno_lint = "=0.41.0"
15+
env_logger = "0.10"
16+
global_alloc = { path = "../../crates/alloc" }
17+
globwalk = "0.8"
18+
ignore = "0.4"
19+
miette = { version = "5", features = ["fancy-no-backtrace"] }
20+
napi = { version = "2", default-features = false, features = ["napi3"] }
21+
napi-derive = { version = "2" }
22+
serde = "1"
23+
serde_json = "1"
2424

2525
[build-dependencies]
2626
napi-build = "2"

packages/deno-lint/src/config.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
use deno_lint::rules::{get_filtered_rules, LintRule};
33
use serde::Deserialize;
44
use std::path::Path;
5-
use std::sync::Arc;
65

76
#[derive(Debug, Default, Deserialize)]
87
#[serde(default)]
@@ -27,7 +26,7 @@ pub struct Config {
2726
}
2827

2928
impl Config {
30-
pub fn get_rules(&self) -> Vec<Arc<dyn LintRule>> {
29+
pub fn get_rules(&self) -> Vec<&'static dyn LintRule> {
3130
get_filtered_rules(
3231
Some(self.rules.tags.clone()),
3332
Some(self.rules.exclude.clone()),
@@ -64,7 +63,7 @@ mod tests {
6463
}}
6564
}
6665

67-
fn into_codes(rules: Vec<Arc<dyn LintRule>>) -> HashSet<&'static str> {
66+
fn into_codes(rules: Vec<&'static dyn LintRule>) -> HashSet<&'static str> {
6867
rules.iter().map(|rule| rule.code()).collect()
6968
}
7069

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"downlevelIteration": true,
77
"emitDecoratorMetadata": true,
88
"experimentalDecorators": true,
9-
"importHelpers": true,
9+
"importHelpers": false,
1010
"module": "CommonJS",
1111
"moduleResolution": "node",
1212
"newLine": "LF",

0 commit comments

Comments
 (0)