mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
feat: miette v7 (#2465)
This commit is contained in:
parent
88f94bb6f6
commit
265b2fb640
50 changed files with 1146 additions and 833 deletions
137
Cargo.lock
generated
137
Cargo.lock
generated
|
|
@ -136,7 +136,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "edc932b40b31d9bea0196f54c5b1b721b9aff3882fc08d9fe4082970c7e94d3d"
|
||||
dependencies = [
|
||||
"bpaf_derive",
|
||||
"owo-colors 4.0.0",
|
||||
"owo-colors",
|
||||
"supports-color",
|
||||
]
|
||||
|
||||
|
|
@ -214,9 +214,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.89"
|
||||
version = "1.0.90"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723"
|
||||
checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
|
|
@ -253,18 +253,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.5.1"
|
||||
version = "4.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da"
|
||||
checksum = "b230ab84b0ffdf890d5a10abdbc8b83ae1c4918275daea1ab8801f71536b2651"
|
||||
dependencies = [
|
||||
"clap_builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clap_builder"
|
||||
version = "4.5.1"
|
||||
version = "4.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb"
|
||||
checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"clap_lex",
|
||||
|
|
@ -276,6 +276,12 @@ version = "0.7.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce"
|
||||
|
||||
[[package]]
|
||||
name = "clean-path"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aaa6b4b263a5d737e9bf6b7c09b72c41a5480aec4d7219af827f6564e950b6a5"
|
||||
|
||||
[[package]]
|
||||
name = "codspeed"
|
||||
version = "2.4.0"
|
||||
|
|
@ -539,9 +545,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.11.2"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d"
|
||||
checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9"
|
||||
dependencies = [
|
||||
"env_filter",
|
||||
"humantime",
|
||||
|
|
@ -970,9 +976,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
|
|||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.8.2"
|
||||
version = "0.8.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2caa5afb8bf9f3a2652760ce7d4f62d21c4d5a423e68466fca30df82f2330164"
|
||||
checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.52.4",
|
||||
|
|
@ -1046,18 +1052,13 @@ checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
|||
|
||||
[[package]]
|
||||
name = "miette"
|
||||
version = "5.10.0"
|
||||
version = "7.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59bb584eaeeab6bd0226ccf3509a69d7936d148cf3d036ad350abe35e8c6856e"
|
||||
checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1"
|
||||
dependencies = [
|
||||
"is-terminal",
|
||||
"cfg-if",
|
||||
"miette-derive",
|
||||
"once_cell",
|
||||
"owo-colors 3.5.0",
|
||||
"supports-color",
|
||||
"supports-hyperlinks",
|
||||
"supports-unicode",
|
||||
"terminal_size",
|
||||
"owo-colors",
|
||||
"textwrap",
|
||||
"thiserror",
|
||||
"unicode-width",
|
||||
|
|
@ -1065,9 +1066,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "miette-derive"
|
||||
version = "5.10.0"
|
||||
version = "7.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c"
|
||||
checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -1179,6 +1180,20 @@ dependencies = [
|
|||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nodejs_package_json"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "770813a997f38d144fa7c0e0b15012b8d1ff863f16d875c9ac8ab1b3ebd5cff8"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"rustc-hash",
|
||||
"semver 1.0.22",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
|
|
@ -1301,12 +1316,6 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "owo-colors"
|
||||
version = "3.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
|
||||
|
||||
[[package]]
|
||||
name = "owo-colors"
|
||||
version = "4.0.0"
|
||||
|
|
@ -1444,9 +1453,8 @@ dependencies = [
|
|||
name = "oxc_diagnostics"
|
||||
version = "0.9.0"
|
||||
dependencies = [
|
||||
"is-terminal",
|
||||
"miette",
|
||||
"owo-colors 3.5.0",
|
||||
"owo-colors",
|
||||
"textwrap",
|
||||
"thiserror",
|
||||
"unicode-width",
|
||||
|
|
@ -1651,20 +1659,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "oxc_resolver"
|
||||
version = "1.5.4"
|
||||
version = "1.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2033cc3b0e72446d3321866db0954804b9ca559ad692480205053f6aea4bfc15"
|
||||
checksum = "2255c105f844bd9793db2fa57ee443ac82668d7d86e5601d0245de5efd7686df"
|
||||
dependencies = [
|
||||
"dashmap",
|
||||
"dunce",
|
||||
"indexmap",
|
||||
"json-strip-comments",
|
||||
"nodejs_package_json",
|
||||
"once_cell",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"tracing",
|
||||
"typescript_tsconfig_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -1917,18 +1926,18 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"
|
|||
|
||||
[[package]]
|
||||
name = "pin-project"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0"
|
||||
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
|
||||
dependencies = [
|
||||
"pin-project-internal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-internal"
|
||||
version = "1.1.4"
|
||||
version = "1.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690"
|
||||
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
|
@ -1986,7 +1995,7 @@ dependencies = [
|
|||
"quote",
|
||||
"syn 2.0.52",
|
||||
"version_check",
|
||||
"yansi 1.0.0-rc.1",
|
||||
"yansi 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -2242,6 +2251,9 @@ name = "semver"
|
|||
version = "1.0.22"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
|
|
@ -2455,24 +2467,6 @@ dependencies = [
|
|||
"is_ci",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "supports-hyperlinks"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f84231692eb0d4d41e4cdd0cabfdd2e6cd9e255e65f80c9aa7c98dd502b4233d"
|
||||
dependencies = [
|
||||
"is-terminal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "supports-unicode"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f850c19edd184a205e883199a261ed44471c81e39bd95b1357f5febbef00e77a"
|
||||
dependencies = [
|
||||
"is-terminal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.109"
|
||||
|
|
@ -2495,21 +2489,11 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "terminal_size"
|
||||
version = "0.1.17"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.15.0"
|
||||
version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
|
||||
checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
|
||||
dependencies = [
|
||||
"smawk",
|
||||
"unicode-linebreak",
|
||||
|
|
@ -2784,6 +2768,19 @@ version = "1.17.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
||||
|
||||
[[package]]
|
||||
name = "typescript_tsconfig_json"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7891656ce99f05b8866301d3a97abc9b260fb80ac962aad3d31616947b068646"
|
||||
dependencies = [
|
||||
"clean-path",
|
||||
"indexmap",
|
||||
"rustc-hash",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ucd-trie"
|
||||
version = "0.1.6"
|
||||
|
|
@ -3188,9 +3185,9 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec"
|
|||
|
||||
[[package]]
|
||||
name = "yansi"
|
||||
version = "1.0.0-rc.1"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377"
|
||||
checksum = "6c2861d76f58ec8fc95708b9b1e417f7b12fd72ad33c01fa6886707092dea0d3"
|
||||
|
||||
[[package]]
|
||||
name = "zeroize"
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ ignore = { version = "0.4.22" }
|
|||
itertools = { version = "0.12.1" }
|
||||
jemallocator = { version = "0.5.4" }
|
||||
lazy_static = { version = "1.4.0" }
|
||||
miette = { version = "5.10.0", features = ["fancy-no-backtrace"] }
|
||||
miette = { version = "7.2.0", features = ["fancy-no-syscall"] }
|
||||
mimalloc = { version = "0.1.39" }
|
||||
num-bigint = { version = "0.4.4" }
|
||||
num-traits = { version = "0.2.18" }
|
||||
|
|
|
|||
|
|
@ -19,9 +19,8 @@ doctest = false
|
|||
|
||||
[dependencies]
|
||||
thiserror = { workspace = true }
|
||||
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
||||
miette = { workspace = true }
|
||||
|
||||
unicode-width = "0.1.11"
|
||||
owo-colors = { version = "3.5.0" }
|
||||
textwrap = { version = "=0.15.0" } # pinned to 0.15.0 to sync with miette
|
||||
is-terminal = { version = "0.4.12" }
|
||||
owo-colors = { version = "4.0.0" }
|
||||
textwrap = { version = "0.16.0" }
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3,16 +3,20 @@
|
|||
#![allow(clippy::nursery)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
/// origin file: https://github.com/zkat/miette/blob/78fe18e6990feacc8bdaeeb10e1439a12c111e6e/src/handlers/theme.rs
|
||||
use is_terminal::IsTerminal;
|
||||
use owo_colors::{style, Style};
|
||||
/// origin file: https://github.com/zkat/miette/blob/75fea0935e495d0215518c80d32dd820910982e3/src/handlers/theme.rs
|
||||
use std::io::IsTerminal;
|
||||
|
||||
use miette::ThemeCharacters;
|
||||
use owo_colors::Style;
|
||||
|
||||
/**
|
||||
Theme used by [`GraphicalReportHandler`](crate::GraphicalReportHandler) to
|
||||
render fancy [`Diagnostic`](miette::Diagnostic) reports.
|
||||
render fancy [`Diagnostic`](crate::Diagnostic) reports.
|
||||
|
||||
A theme consists of two things: the set of characters to be used for drawing,
|
||||
and the
|
||||
[`owo_colors::Style`](https://docs.rs/owo-colors/latest/owo_colors/struct.Style.html)s to be used to paint various items.
|
||||
|
||||
You can create your own custom graphical theme using this type, or you can use
|
||||
one of the predefined ones using the methods below.
|
||||
*/
|
||||
|
|
@ -32,6 +36,12 @@ impl GraphicalTheme {
|
|||
|
||||
/// Graphical theme that draws using both ansi colors and unicode
|
||||
/// characters.
|
||||
///
|
||||
/// Note that full rgb colors aren't enabled by default because they're
|
||||
/// an accessibility hazard, especially in the context of terminal themes
|
||||
/// that can change the background color and make hardcoded colors illegible.
|
||||
/// Such themes typically remap ansi codes properly, treating them more
|
||||
/// like CSS classes than specific colors.
|
||||
pub fn unicode() -> Self {
|
||||
Self { characters: ThemeCharacters::unicode(), styles: ThemeStyles::rgb() }
|
||||
}
|
||||
|
|
@ -44,9 +54,7 @@ impl GraphicalTheme {
|
|||
|
||||
/// A "basic" graphical theme that skips colors and unicode characters and
|
||||
/// just does monochrome ascii art. If you want a completely non-graphical
|
||||
/// rendering of your `Diagnostic`s, check out
|
||||
/// [miette::NarratableReportHandler], or write your own
|
||||
/// [miette::ReportHandler]!
|
||||
/// rendering of your [`Diagnostic`](crate::Diagnostic)s
|
||||
pub fn none() -> Self {
|
||||
Self { characters: ThemeCharacters::ascii(), styles: ThemeStyles::none() }
|
||||
}
|
||||
|
|
@ -65,7 +73,8 @@ impl Default for GraphicalTheme {
|
|||
}
|
||||
|
||||
/**
|
||||
Styles for various parts of graphical rendering for the [crate::GraphicalReportHandler].
|
||||
Styles for various parts of graphical rendering for the
|
||||
[`GraphicalReportHandler`](crate::GraphicalReportHandler).
|
||||
*/
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ThemeStyles {
|
||||
|
|
@ -86,6 +95,10 @@ pub struct ThemeStyles {
|
|||
pub highlights: Vec<Style>,
|
||||
}
|
||||
|
||||
fn style() -> Style {
|
||||
Style::new()
|
||||
}
|
||||
|
||||
impl ThemeStyles {
|
||||
/// Nice RGB colors.
|
||||
/// [Credit](http://terminal.sexy/#FRUV0NDQFRUVrEFCkKlZ9L91ap-1qnWfdbWq0NDQUFBQrEFCkKlZ9L91ap-1qnWfdbWq9fX1).
|
||||
|
|
@ -112,7 +125,7 @@ impl ThemeStyles {
|
|||
warning: style().yellow(),
|
||||
advice: style().cyan(),
|
||||
help: style().cyan(),
|
||||
link: style().bold(),
|
||||
link: style().cyan().underline().bold(),
|
||||
linum: style().dimmed(),
|
||||
highlights: vec![
|
||||
style().magenta().bold(),
|
||||
|
|
@ -135,124 +148,3 @@ impl ThemeStyles {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------
|
||||
// Most of these characters were taken from
|
||||
// https://github.com/zesterer/ariadne/blob/e3cb394cb56ecda116a0a1caecd385a49e7f6662/src/draw.rs
|
||||
|
||||
/// Characters to be used when drawing when using
|
||||
/// [crate::GraphicalReportHandler].
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
pub struct ThemeCharacters {
|
||||
pub hbar: char,
|
||||
pub vbar: char,
|
||||
pub xbar: char,
|
||||
pub vbar_break: char,
|
||||
|
||||
pub uarrow: char,
|
||||
pub rarrow: char,
|
||||
|
||||
pub ltop: char,
|
||||
pub mtop: char,
|
||||
pub rtop: char,
|
||||
pub lbot: char,
|
||||
pub rbot: char,
|
||||
pub mbot: char,
|
||||
|
||||
pub lbox: char,
|
||||
pub rbox: char,
|
||||
|
||||
pub lcross: char,
|
||||
pub rcross: char,
|
||||
|
||||
pub underbar: char,
|
||||
pub underline: char,
|
||||
|
||||
pub error: String,
|
||||
pub warning: String,
|
||||
pub advice: String,
|
||||
}
|
||||
|
||||
impl ThemeCharacters {
|
||||
/// Fancy unicode-based graphical elements.
|
||||
pub fn unicode() -> Self {
|
||||
Self {
|
||||
hbar: '─',
|
||||
vbar: '│',
|
||||
xbar: '┼',
|
||||
vbar_break: '·',
|
||||
uarrow: '▲',
|
||||
rarrow: '▶',
|
||||
ltop: '╭',
|
||||
mtop: '┬',
|
||||
rtop: '╮',
|
||||
lbot: '╰',
|
||||
mbot: '┴',
|
||||
rbot: '╯',
|
||||
lbox: '[',
|
||||
rbox: ']',
|
||||
lcross: '├',
|
||||
rcross: '┤',
|
||||
underbar: '┬',
|
||||
underline: '─',
|
||||
error: "×".into(),
|
||||
warning: "⚠".into(),
|
||||
advice: "☞".into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Emoji-heavy unicode characters.
|
||||
pub fn emoji() -> Self {
|
||||
Self {
|
||||
hbar: '─',
|
||||
vbar: '│',
|
||||
xbar: '┼',
|
||||
vbar_break: '·',
|
||||
uarrow: '▲',
|
||||
rarrow: '▶',
|
||||
ltop: '╭',
|
||||
mtop: '┬',
|
||||
rtop: '╮',
|
||||
lbot: '╰',
|
||||
mbot: '┴',
|
||||
rbot: '╯',
|
||||
lbox: '[',
|
||||
rbox: ']',
|
||||
lcross: '├',
|
||||
rcross: '┤',
|
||||
underbar: '┬',
|
||||
underline: '─',
|
||||
error: "💥".into(),
|
||||
warning: "⚠️".into(),
|
||||
advice: "💡".into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// ASCII-art-based graphical elements. Works well on older terminals.
|
||||
pub fn ascii() -> Self {
|
||||
Self {
|
||||
hbar: '-',
|
||||
vbar: '|',
|
||||
xbar: '+',
|
||||
vbar_break: ':',
|
||||
uarrow: '^',
|
||||
rarrow: '>',
|
||||
ltop: ',',
|
||||
mtop: 'v',
|
||||
rtop: '.',
|
||||
lbot: '`',
|
||||
mbot: '^',
|
||||
rbot: '\'',
|
||||
lbox: '[',
|
||||
rbox: ']',
|
||||
lcross: '|',
|
||||
rcross: '|',
|
||||
underbar: '|',
|
||||
underline: '^',
|
||||
error: "x".into(),
|
||||
warning: "!".into(),
|
||||
advice: ">".into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,15 @@ mod service;
|
|||
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub use crate::service::{DiagnosticSender, DiagnosticService, DiagnosticTuple};
|
||||
pub use graphic_reporter::{GraphicalReportHandler, GraphicalTheme};
|
||||
pub use miette;
|
||||
pub use thiserror;
|
||||
|
||||
pub use crate::{
|
||||
graphic_reporter::GraphicalReportHandler,
|
||||
graphical_theme::GraphicalTheme,
|
||||
service::{DiagnosticSender, DiagnosticService, DiagnosticTuple},
|
||||
};
|
||||
|
||||
pub type Error = miette::Error;
|
||||
pub type Severity = miette::Severity;
|
||||
pub type Report = miette::Report;
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ expression: array_type
|
|||
╰────
|
||||
|
||||
× Expected `<` but found `EOF`
|
||||
╭─[array_type.tsx:1:1]
|
||||
╭─[array_type.tsx:1:40]
|
||||
1 │ let y: string[] = <Array<string>>['2'];
|
||||
╰────
|
||||
|
||||
|
|
@ -420,7 +420,7 @@ expression: array_type
|
|||
╰────
|
||||
|
||||
× Expected `<` but found `EOF`
|
||||
╭─[array_type.tsx:1:1]
|
||||
╭─[array_type.tsx:1:40]
|
||||
1 │ let y: string[] = <Array<string>>['2'];
|
||||
╰────
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ expression: array_type
|
|||
╰────
|
||||
|
||||
× Expected `<` but found `EOF`
|
||||
╭─[array_type.tsx:1:1]
|
||||
╭─[array_type.tsx:1:40]
|
||||
1 │ let y: string[] = <Array<string>>['2'];
|
||||
╰────
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ expression: expect_expect
|
|||
help: Add assertion(s) in this Test
|
||||
|
||||
⚠ eslint-plugin-jest(expect-expect): Test has no assertions
|
||||
╭─[expect_expect.tsx:4:13]
|
||||
╭─[expect_expect.tsx:4:10]
|
||||
3 │
|
||||
4 │ checkThat('this passes', () => {
|
||||
· ─────────
|
||||
|
|
@ -103,7 +103,7 @@ expression: expect_expect
|
|||
help: Add assertion(s) in this Test
|
||||
|
||||
⚠ eslint-plugin-jest(expect-expect): Test has no assertions
|
||||
╭─[expect_expect.tsx:4:13]
|
||||
╭─[expect_expect.tsx:4:10]
|
||||
3 │
|
||||
4 │ checkThat.skip('this passes', () => {
|
||||
· ──────────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: google_font_display
|
||||
---
|
||||
⚠ eslint-plugin-next(google-font-display): A font-display parameter is missing (adding `&display=optional` is recommended).
|
||||
╭─[google_font_display.tsx:6:25]
|
||||
╭─[google_font_display.tsx:6:16]
|
||||
5 │ <Head>
|
||||
6 │ <link
|
||||
· ────
|
||||
|
|
@ -12,7 +12,7 @@ expression: google_font_display
|
|||
help: See https://nextjs.org/docs/messages/google-font-display
|
||||
|
||||
⚠ eslint-plugin-next(google-font-display): `block` is not a recommended font-display value.
|
||||
╭─[google_font_display.tsx:7:26]
|
||||
╭─[google_font_display.tsx:7:17]
|
||||
6 │ <link
|
||||
7 │ href="https://fonts.googleapis.com/css2?family=Krona+One&display=block"
|
||||
· ───────────────────────────────────────────────────────────────────────
|
||||
|
|
@ -21,7 +21,7 @@ expression: google_font_display
|
|||
help: See https://nextjs.org/docs/messages/google-font-display
|
||||
|
||||
⚠ eslint-plugin-next(google-font-display): `auto` is not a recommended font-display value.
|
||||
╭─[google_font_display.tsx:7:26]
|
||||
╭─[google_font_display.tsx:7:17]
|
||||
6 │ <link
|
||||
7 │ href="https://fonts.googleapis.com/css2?family=Krona+One&display=auto"
|
||||
· ──────────────────────────────────────────────────────────────────────
|
||||
|
|
@ -30,7 +30,7 @@ expression: google_font_display
|
|||
help: See https://nextjs.org/docs/messages/google-font-display
|
||||
|
||||
⚠ eslint-plugin-next(google-font-display): `fallback` is not a recommended font-display value.
|
||||
╭─[google_font_display.tsx:7:26]
|
||||
╭─[google_font_display.tsx:7:17]
|
||||
6 │ <link
|
||||
7 │ href="https://fonts.googleapis.com/css2?display=fallback&family=Krona+One"
|
||||
· ──────────────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: google_font_preconnect
|
||||
---
|
||||
⚠ eslint-plugin-next(google-font-preconnect): `rel="preconnect"` is missing from Google Font.
|
||||
╭─[google_font_preconnect.tsx:4:24]
|
||||
╭─[google_font_preconnect.tsx:4:15]
|
||||
3 │ <div>
|
||||
4 │ <link href="https://fonts.gstatic.com"/>
|
||||
· ────
|
||||
|
|
@ -12,7 +12,7 @@ expression: google_font_preconnect
|
|||
help: See: https://nextjs.org/docs/messages/google-font-preconnect
|
||||
|
||||
⚠ eslint-plugin-next(google-font-preconnect): `rel="preconnect"` is missing from Google Font.
|
||||
╭─[google_font_preconnect.tsx:4:24]
|
||||
╭─[google_font_preconnect.tsx:4:15]
|
||||
3 │ <div>
|
||||
4 │ <link rel="preload" href="https://fonts.gstatic.com"/>
|
||||
· ────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: inline_script_id
|
||||
---
|
||||
⚠ eslint-plugin-next(inline-script-id): `next/script` components with inline content must specify an `id` attribute.
|
||||
╭─[inline_script_id.tsx:5:26]
|
||||
╭─[inline_script_id.tsx:5:17]
|
||||
4 │ return (
|
||||
5 │ <Script>
|
||||
· ──────
|
||||
|
|
@ -12,7 +12,7 @@ expression: inline_script_id
|
|||
help: See https://nextjs.org/docs/messages/inline-script-id
|
||||
|
||||
⚠ eslint-plugin-next(inline-script-id): `next/script` components with inline content must specify an `id` attribute.
|
||||
╭─[inline_script_id.tsx:5:26]
|
||||
╭─[inline_script_id.tsx:5:17]
|
||||
4 │ return (
|
||||
5 │ <Script
|
||||
· ──────
|
||||
|
|
@ -21,7 +21,7 @@ expression: inline_script_id
|
|||
help: See https://nextjs.org/docs/messages/inline-script-id
|
||||
|
||||
⚠ eslint-plugin-next(inline-script-id): `next/script` components with inline content must specify an `id` attribute.
|
||||
╭─[inline_script_id.tsx:5:26]
|
||||
╭─[inline_script_id.tsx:5:17]
|
||||
4 │ return (
|
||||
5 │ <MyScript>
|
||||
· ────────
|
||||
|
|
@ -30,7 +30,7 @@ expression: inline_script_id
|
|||
help: See https://nextjs.org/docs/messages/inline-script-id
|
||||
|
||||
⚠ eslint-plugin-next(inline-script-id): `next/script` components with inline content must specify an `id` attribute.
|
||||
╭─[inline_script_id.tsx:5:26]
|
||||
╭─[inline_script_id.tsx:5:17]
|
||||
4 │ return (
|
||||
5 │ <MyScript
|
||||
· ────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: jsx_no_comment_textnodes
|
||||
---
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:38]
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:29]
|
||||
3 │ render() {
|
||||
4 │ return (<div>// invalid</div>);
|
||||
· ──────────
|
||||
|
|
@ -11,7 +11,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:35]
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:26]
|
||||
3 │ render() {
|
||||
4 │ return (<>// invalid</>);
|
||||
· ──────────
|
||||
|
|
@ -19,7 +19,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:38]
|
||||
╭─[jsx_no_comment_textnodes.tsx:4:29]
|
||||
3 │ render() {
|
||||
4 │ return (<div>/* invalid */</div>);
|
||||
· ─────────────
|
||||
|
|
@ -27,7 +27,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:5:32]
|
||||
╭─[jsx_no_comment_textnodes.tsx:5:23]
|
||||
4 │ return (
|
||||
5 │ ╭─▶ <div>
|
||||
6 │ │ // invalid
|
||||
|
|
@ -36,7 +36,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:5:32]
|
||||
╭─[jsx_no_comment_textnodes.tsx:5:23]
|
||||
4 │ return (
|
||||
5 │ ╭─▶ <div>
|
||||
6 │ │ asdjfl
|
||||
|
|
@ -47,7 +47,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:6:39]
|
||||
╭─[jsx_no_comment_textnodes.tsx:6:30]
|
||||
5 │ <div>
|
||||
6 │ ╭─▶ {'asdjfl'}
|
||||
7 │ │ // invalid
|
||||
|
|
@ -56,7 +56,7 @@ expression: jsx_no_comment_textnodes
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(jsx-no-comment-textnodes): Comments inside children section of tag should be placed inside braces
|
||||
╭─[jsx_no_comment_textnodes.tsx:3:36]
|
||||
╭─[jsx_no_comment_textnodes.tsx:3:27]
|
||||
2 │ const Component2 = () => {
|
||||
3 │ return <span>/*</span>;
|
||||
· ──
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ expression: new_for_builtins
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-unicorn(new-for-builtins): Use `new Array()` instead of `Array()`
|
||||
╭─[new_for_builtins.tsx:13:24]
|
||||
╭─[new_for_builtins.tsx:13:12]
|
||||
12 │ }
|
||||
13 │ return Array()
|
||||
· ───────
|
||||
|
|
@ -281,7 +281,7 @@ expression: new_for_builtins
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-unicorn(new-for-builtins): Use `new Map()` instead of `Map()`
|
||||
╭─[new_for_builtins.tsx:19:24]
|
||||
╭─[new_for_builtins.tsx:19:12]
|
||||
18 │ }
|
||||
19 │ return Map()
|
||||
· ─────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: next_script_for_ga
|
||||
---
|
||||
⚠ eslint-plugin-next(next-script-for-ga): Prefer `next/script` component when using the inline script for Google Analytics.
|
||||
╭─[next_script_for_ga.tsx:7:30]
|
||||
╭─[next_script_for_ga.tsx:7:21]
|
||||
6 │ <h1>Hello title</h1>
|
||||
7 │ <script async src='https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}' />
|
||||
· ──────
|
||||
|
|
@ -12,7 +12,7 @@ expression: next_script_for_ga
|
|||
help: See https://nextjs.org/docs/messages/next-script-for-ga
|
||||
|
||||
⚠ eslint-plugin-next(next-script-for-ga): Prefer `next/script` component when using the inline script for Google Analytics.
|
||||
╭─[next_script_for_ga.tsx:8:30]
|
||||
╭─[next_script_for_ga.tsx:8:21]
|
||||
7 │ {/* Google Tag Manager - Global base code */}
|
||||
8 │ <script
|
||||
· ──────
|
||||
|
|
@ -21,7 +21,7 @@ expression: next_script_for_ga
|
|||
help: See https://nextjs.org/docs/messages/next-script-for-ga
|
||||
|
||||
⚠ eslint-plugin-next(next-script-for-ga): Prefer `next/script` component when using the inline script for Google Analytics.
|
||||
╭─[next_script_for_ga.tsx:7:30]
|
||||
╭─[next_script_for_ga.tsx:7:21]
|
||||
6 │ <h1>Hello title</h1>
|
||||
7 │ <script dangerouslySetInnerHTML={{
|
||||
· ──────
|
||||
|
|
@ -30,7 +30,7 @@ expression: next_script_for_ga
|
|||
help: See https://nextjs.org/docs/messages/next-script-for-ga
|
||||
|
||||
⚠ eslint-plugin-next(next-script-for-ga): Prefer `next/script` component when using the inline script for Google Analytics.
|
||||
╭─[next_script_for_ga.tsx:14:30]
|
||||
╭─[next_script_for_ga.tsx:14:21]
|
||||
13 │ }}/>
|
||||
14 │ <script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
· ──────
|
||||
|
|
@ -39,7 +39,7 @@ expression: next_script_for_ga
|
|||
help: See https://nextjs.org/docs/messages/next-script-for-ga
|
||||
|
||||
⚠ eslint-plugin-next(next-script-for-ga): Prefer `next/script` component when using the inline script for Google Analytics.
|
||||
╭─[next_script_for_ga.tsx:18:30]
|
||||
╭─[next_script_for_ga.tsx:18:21]
|
||||
17 │ <script dangerouslySetInnerHTML={this.createGoogleAnalyticsMarkup()} />
|
||||
18 │ <script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
· ──────
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:19]
|
||||
╭─[no_array_reduce.tsx:2:10]
|
||||
1 │
|
||||
2 │ array.reduce((obj, item) => {
|
||||
· ──────
|
||||
|
|
@ -26,7 +26,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:3:29]
|
||||
╭─[no_array_reduce.tsx:3:20]
|
||||
2 │ const hyphenate = (str, char) => `${str}-${char}`;
|
||||
3 │ ["a", "b", "c"].reduce(hyphenate);
|
||||
· ──────
|
||||
|
|
@ -98,7 +98,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:19]
|
||||
╭─[no_array_reduce.tsx:2:10]
|
||||
1 │
|
||||
2 │ array.reduce((total, item) => {
|
||||
· ──────
|
||||
|
|
@ -149,7 +149,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:23]
|
||||
╭─[no_array_reduce.tsx:2:11]
|
||||
1 │
|
||||
2 │ array.reduce((total, item) => {
|
||||
· ──────
|
||||
|
|
@ -165,7 +165,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:19]
|
||||
╭─[no_array_reduce.tsx:2:10]
|
||||
1 │
|
||||
2 │ array.reduceRight((obj, item) => {
|
||||
· ───────────
|
||||
|
|
@ -181,7 +181,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:3:29]
|
||||
╭─[no_array_reduce.tsx:3:20]
|
||||
2 │ const hyphenate = (str, char) => `${str}-${char}`;
|
||||
3 │ ["a", "b", "c"].reduceRight(hyphenate);
|
||||
· ───────────
|
||||
|
|
@ -253,7 +253,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:19]
|
||||
╭─[no_array_reduce.tsx:2:10]
|
||||
1 │
|
||||
2 │ array.reduceRight((total, item) => {
|
||||
· ───────────
|
||||
|
|
@ -304,7 +304,7 @@ expression: no_array_reduce
|
|||
help: Refactor your code to use `for` loops instead.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-array-reduce): Don't use `Array#reduce()` and `Array#reduceRight()`, use `for` loops instead.
|
||||
╭─[no_array_reduce.tsx:2:23]
|
||||
╭─[no_array_reduce.tsx:2:11]
|
||||
1 │
|
||||
2 │ array.reduceRight((total, item) => {
|
||||
· ───────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_assign_module_variable
|
||||
---
|
||||
⚠ eslint-plugin-next(no-assign-module-variable): Do not assign to the variable `module`.
|
||||
╭─[no_assign_module_variable.tsx:2:23]
|
||||
╭─[no_assign_module_variable.tsx:2:14]
|
||||
1 │
|
||||
2 │ let module = {};
|
||||
· ──────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_async_client_component
|
||||
---
|
||||
⚠ eslint-plugin-next(no-async-client-component): Prevent client components from being async functions.
|
||||
╭─[no_async_client_component.tsx:4:49]
|
||||
╭─[no_async_client_component.tsx:4:40]
|
||||
3 │
|
||||
4 │ export default async function MyComponent() {
|
||||
· ───────────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_async_client_component
|
|||
help: See: https://nextjs.org/docs/messages/no-async-client-component
|
||||
|
||||
⚠ eslint-plugin-next(no-async-client-component): Prevent client components from being async functions.
|
||||
╭─[no_async_client_component.tsx:4:49]
|
||||
╭─[no_async_client_component.tsx:4:40]
|
||||
3 │
|
||||
4 │ export default async function MyFunction() {
|
||||
· ──────────
|
||||
|
|
@ -21,7 +21,7 @@ expression: no_async_client_component
|
|||
help: See: https://nextjs.org/docs/messages/no-async-client-component
|
||||
|
||||
⚠ eslint-plugin-next(no-async-client-component): Prevent client components from being async functions.
|
||||
╭─[no_async_client_component.tsx:4:34]
|
||||
╭─[no_async_client_component.tsx:4:25]
|
||||
3 │
|
||||
4 │ async function MyComponent() {
|
||||
· ───────────
|
||||
|
|
@ -30,7 +30,7 @@ expression: no_async_client_component
|
|||
help: See: https://nextjs.org/docs/messages/no-async-client-component
|
||||
|
||||
⚠ eslint-plugin-next(no-async-client-component): Prevent client components from being async functions.
|
||||
╭─[no_async_client_component.tsx:4:34]
|
||||
╭─[no_async_client_component.tsx:4:25]
|
||||
3 │
|
||||
4 │ async function MyFunction() {
|
||||
· ──────────
|
||||
|
|
@ -39,7 +39,7 @@ expression: no_async_client_component
|
|||
help: See: https://nextjs.org/docs/messages/no-async-client-component
|
||||
|
||||
⚠ eslint-plugin-next(no-async-client-component): Prevent client components from being async functions.
|
||||
╭─[no_async_client_component.tsx:4:25]
|
||||
╭─[no_async_client_component.tsx:4:16]
|
||||
3 │
|
||||
4 │ const MyFunction = async () => {
|
||||
· ──────────
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ expression: no_conditional_expect
|
|||
help: Avoid calling `expect` conditionally`
|
||||
|
||||
⚠ eslint-plugin-jest(no-conditional-expect): Unexpected conditional expect
|
||||
╭─[no_conditional_expect.tsx:6:41]
|
||||
╭─[no_conditional_expect.tsx:6:32]
|
||||
5 │ .catch(error => expect(error).toBeInstanceOf(Error))
|
||||
6 │ .catch(error => expect(error).toBeInstanceOf(Error));
|
||||
· ──────
|
||||
|
|
@ -363,7 +363,7 @@ expression: no_conditional_expect
|
|||
help: Avoid calling `expect` conditionally`
|
||||
|
||||
⚠ eslint-plugin-jest(no-conditional-expect): Unexpected conditional expect
|
||||
╭─[no_conditional_expect.tsx:5:41]
|
||||
╭─[no_conditional_expect.tsx:5:32]
|
||||
4 │ .catch(error => expect(error).toBeInstanceOf(Error))
|
||||
5 │ .catch(error => expect(error).toBeInstanceOf(Error))
|
||||
· ──────
|
||||
|
|
@ -372,7 +372,7 @@ expression: no_conditional_expect
|
|||
help: Avoid calling `expect` conditionally`
|
||||
|
||||
⚠ eslint-plugin-jest(no-conditional-expect): Unexpected conditional expect
|
||||
╭─[no_conditional_expect.tsx:4:41]
|
||||
╭─[no_conditional_expect.tsx:4:32]
|
||||
3 │ await Promise.resolve()
|
||||
4 │ .catch(error => expect(error).toBeInstanceOf(Error))
|
||||
· ──────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_css_tags
|
||||
---
|
||||
⚠ eslint-plugin-next(no-css-tags): Do not include stylesheets manually.
|
||||
╭─[no_css_tags.tsx:9:30]
|
||||
╭─[no_css_tags.tsx:9:21]
|
||||
8 │ <h1>Hello title</h1>
|
||||
9 │ <link href="/_next/static/css/styles.css" rel="stylesheet" />
|
||||
· ────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_css_tags
|
|||
help: See https://nextjs.org/docs/messages/no-css-tags
|
||||
|
||||
⚠ eslint-plugin-next(no-css-tags): Do not include stylesheets manually.
|
||||
╭─[no_css_tags.tsx:3:22]
|
||||
╭─[no_css_tags.tsx:3:13]
|
||||
2 │ <div>
|
||||
3 │ <link href="/_next/static/css/styles.css" rel="stylesheet" />
|
||||
· ────
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ expression: no_duplicate_case
|
|||
⚠ eslint(no-duplicate-case): Disallow duplicate case labels
|
||||
╭─[no_duplicate_case.tsx:1:54]
|
||||
1 │ ╭─▶ var a = 1, p = {p: {p1: 1, p2: 1}}; switch (a) {case p.p.p1: break; case p. p // comment
|
||||
· ││ ──────
|
||||
· │ ──────
|
||||
2 │ ╰─▶ .p1: break; default: break;}
|
||||
╰────
|
||||
help: Remove the duplicated case
|
||||
|
|
@ -115,7 +115,7 @@ expression: no_duplicate_case
|
|||
⚠ eslint(no-duplicate-case): Disallow duplicate case labels
|
||||
╭─[no_duplicate_case.tsx:1:54]
|
||||
1 │ ╭─▶ var a = 1, p = {p: {p1: 1, p2: 1}}; switch (a) {case p.p.p1: break; case p. p // comment
|
||||
· ││ ──────
|
||||
· │ ──────
|
||||
2 │ ╰─▶ .p1: break; case p .p
|
||||
3 │ /* comment */
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_duplicate_enum_values
|
||||
---
|
||||
⚠ typescript-eslint(no-duplicate-enum-values): Disallow duplicate enum member values
|
||||
╭─[no_duplicate_enum_values.tsx:3:19]
|
||||
╭─[no_duplicate_enum_values.tsx:3:10]
|
||||
2 │ enum E {
|
||||
3 │ A = 1,
|
||||
· ─
|
||||
|
|
@ -14,7 +14,7 @@ expression: no_duplicate_enum_values
|
|||
help: Duplicate values can lead to bugs that are hard to track down
|
||||
|
||||
⚠ typescript-eslint(no-duplicate-enum-values): Disallow duplicate enum member values
|
||||
╭─[no_duplicate_enum_values.tsx:3:19]
|
||||
╭─[no_duplicate_enum_values.tsx:3:10]
|
||||
2 │ enum E {
|
||||
3 │ A = 'A',
|
||||
· ───
|
||||
|
|
@ -25,7 +25,7 @@ expression: no_duplicate_enum_values
|
|||
help: Duplicate values can lead to bugs that are hard to track down
|
||||
|
||||
⚠ typescript-eslint(no-duplicate-enum-values): Disallow duplicate enum member values
|
||||
╭─[no_duplicate_enum_values.tsx:3:19]
|
||||
╭─[no_duplicate_enum_values.tsx:3:10]
|
||||
2 │ enum E {
|
||||
3 │ A = 'A',
|
||||
· ───
|
||||
|
|
@ -36,7 +36,7 @@ expression: no_duplicate_enum_values
|
|||
help: Duplicate values can lead to bugs that are hard to track down
|
||||
|
||||
⚠ typescript-eslint(no-duplicate-enum-values): Disallow duplicate enum member values
|
||||
╭─[no_duplicate_enum_values.tsx:5:19]
|
||||
╭─[no_duplicate_enum_values.tsx:5:10]
|
||||
4 │ B = 'A',
|
||||
5 │ C = 1,
|
||||
· ─
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ expression: no_empty_file
|
|||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:0:1]
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
0 │
|
||||
· ▲
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_head_element
|
||||
---
|
||||
⚠ eslint-plugin-next(no-head-element): Do not use `<head>` element. Use `<Head />` from `next/head` instead.
|
||||
╭─[no_head_element.tsx:6:27]
|
||||
╭─[no_head_element.tsx:6:24]
|
||||
5 │ <div>
|
||||
6 │ <head>
|
||||
· ──────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_head_element
|
|||
help: See https://nextjs.org/docs/messages/no-head-element
|
||||
|
||||
⚠ eslint-plugin-next(no-head-element): Do not use `<head>` element. Use `<Head />` from `next/head` instead.
|
||||
╭─[no_head_element.tsx:7:27]
|
||||
╭─[no_head_element.tsx:7:24]
|
||||
6 │ <div>
|
||||
7 │ <head>
|
||||
· ──────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_head_import_in_document
|
||||
---
|
||||
⚠ eslint-plugin-next(no-head-import-in-document): Prevent usage of `next/head` in `pages/_document.js`.
|
||||
╭─[no_head_import_in_document.tsx:3:19]
|
||||
╭─[no_head_import_in_document.tsx:3:10]
|
||||
2 │ import Document, { Html, Main, NextScript } from 'next/document'
|
||||
3 │ import Head from 'next/head'
|
||||
· ────────────────────────────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_head_import_in_document
|
|||
help: See https://nextjs.org/docs/messages/no-head-import-in-document
|
||||
|
||||
⚠ eslint-plugin-next(no-head-import-in-document): Prevent usage of `next/head` in `pages/_document.js`.
|
||||
╭─[no_head_import_in_document.tsx:3:19]
|
||||
╭─[no_head_import_in_document.tsx:3:10]
|
||||
2 │ import Document, { Html, Main, NextScript } from 'next/document'
|
||||
3 │ import Head from 'next/head'
|
||||
· ────────────────────────────
|
||||
|
|
@ -21,7 +21,7 @@ expression: no_head_import_in_document
|
|||
help: See https://nextjs.org/docs/messages/no-head-import-in-document
|
||||
|
||||
⚠ eslint-plugin-next(no-head-import-in-document): Prevent usage of `next/head` in `pages/_document.js`.
|
||||
╭─[no_head_import_in_document.tsx:3:19]
|
||||
╭─[no_head_import_in_document.tsx:3:10]
|
||||
2 │ import Document, { Html, Main, NextScript } from 'next/document'
|
||||
3 │ import Head from 'next/head'
|
||||
· ────────────────────────────
|
||||
|
|
@ -30,7 +30,7 @@ expression: no_head_import_in_document
|
|||
help: See https://nextjs.org/docs/messages/no-head-import-in-document
|
||||
|
||||
⚠ eslint-plugin-next(no-head-import-in-document): Prevent usage of `next/head` in `pages/_document.js`.
|
||||
╭─[no_head_import_in_document.tsx:3:19]
|
||||
╭─[no_head_import_in_document.tsx:3:10]
|
||||
2 │ import Document, { Html, Main, NextScript } from 'next/document'
|
||||
3 │ import Head from 'next/head'
|
||||
· ────────────────────────────
|
||||
|
|
@ -39,7 +39,7 @@ expression: no_head_import_in_document
|
|||
help: See https://nextjs.org/docs/messages/no-head-import-in-document
|
||||
|
||||
⚠ eslint-plugin-next(no-head-import-in-document): Prevent usage of `next/head` in `pages/_document.js`.
|
||||
╭─[no_head_import_in_document.tsx:3:19]
|
||||
╭─[no_head_import_in_document.tsx:3:10]
|
||||
2 │ import Document, { Html, Main, NextScript } from 'next/document'
|
||||
3 │ import Head from 'next/head'
|
||||
· ────────────────────────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_img_element
|
||||
---
|
||||
⚠ eslint-plugin-next(no-img-element): Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
||||
╭─[no_img_element.tsx:6:28]
|
||||
╭─[no_img_element.tsx:6:19]
|
||||
5 │ <div>
|
||||
6 │ <img
|
||||
· ───
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_img_element
|
|||
help: See https://nextjs.org/docs/messages/no-img-element
|
||||
|
||||
⚠ eslint-plugin-next(no-img-element): Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
||||
╭─[no_img_element.tsx:5:26]
|
||||
╭─[no_img_element.tsx:5:17]
|
||||
4 │ return (
|
||||
5 │ <img
|
||||
· ───
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:29]
|
||||
╭─[no_irregular_whitespace.tsx:1:30]
|
||||
1 │ var any = 'thing', other = 'thing';
|
||||
· ──
|
||||
2 │ var third = 'thing';
|
||||
|
|
@ -175,7 +175,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:2:23]
|
||||
╭─[no_irregular_whitespace.tsx:2:14]
|
||||
1 │ var any = 'thing', other = 'thing';
|
||||
2 │ var third = 'thing';
|
||||
· ──
|
||||
|
|
@ -228,14 +228,14 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:13]
|
||||
╭─[no_irregular_whitespace.tsx:1:14]
|
||||
1 │ ` template`
|
||||
· ──
|
||||
╰────
|
||||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:2:22]
|
||||
╭─[no_irregular_whitespace.tsx:2:13]
|
||||
1 │ ` multiline
|
||||
2 │ template`
|
||||
· ──
|
||||
|
|
@ -243,7 +243,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:2:13]
|
||||
╭─[no_irregular_whitespace.tsx:2:4]
|
||||
1 │ ` template`
|
||||
2 │
|
||||
· ──
|
||||
|
|
@ -251,7 +251,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:3:13]
|
||||
╭─[no_irregular_whitespace.tsx:3:4]
|
||||
2 │ template`
|
||||
3 │
|
||||
· ──
|
||||
|
|
@ -280,7 +280,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:11]
|
||||
╭─[no_irregular_whitespace.tsx:1:12]
|
||||
1 │ var foo = bar;
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -294,7 +294,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:11]
|
||||
╭─[no_irregular_whitespace.tsx:1:12]
|
||||
1 │ var foo = bar;
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -308,7 +308,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:12]
|
||||
╭─[no_irregular_whitespace.tsx:1:13]
|
||||
1 │ var foo = bar;
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -322,7 +322,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:14]
|
||||
╭─[no_irregular_whitespace.tsx:1:15]
|
||||
1 │ var foo = bar;
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -343,14 +343,14 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:2]
|
||||
╭─[no_irregular_whitespace.tsx:1:3]
|
||||
1 │
|
||||
· ─
|
||||
╰────
|
||||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:3]
|
||||
╭─[no_irregular_whitespace.tsx:1:6]
|
||||
1 │
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -374,7 +374,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:2:9]
|
||||
╭─[no_irregular_whitespace.tsx:2:10]
|
||||
1 │ var foo =
|
||||
2 │ bar
|
||||
· ─
|
||||
|
|
@ -383,7 +383,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:2:9]
|
||||
╭─[no_irregular_whitespace.tsx:2:11]
|
||||
1 │ var foo =
|
||||
2 │ bar
|
||||
· ─
|
||||
|
|
@ -427,7 +427,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:5]
|
||||
╭─[no_irregular_whitespace.tsx:1:7]
|
||||
1 │ foo
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -441,7 +441,7 @@ expression: no_irregular_whitespace
|
|||
help: Try to remove the irregular whitespace
|
||||
|
||||
⚠ eslint(no-irregular-whitespace): Unexpected irregular whitespace
|
||||
╭─[no_irregular_whitespace.tsx:1:5]
|
||||
╭─[no_irregular_whitespace.tsx:1:7]
|
||||
1 │ foo
|
||||
· ─
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace Foo.Bar {
|
||||
· ─────────
|
||||
|
|
@ -89,7 +89,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:15]
|
||||
╭─[no_namespace.tsx:3:9]
|
||||
2 │ namespace Foo.Bar {
|
||||
3 │ namespace Baz.Bas {
|
||||
· ─────────
|
||||
|
|
@ -98,7 +98,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -107,7 +107,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:15]
|
||||
╭─[no_namespace.tsx:3:9]
|
||||
2 │ namespace A {
|
||||
3 │ namespace B {
|
||||
· ─────────
|
||||
|
|
@ -116,7 +116,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -125,7 +125,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:15]
|
||||
╭─[no_namespace.tsx:3:9]
|
||||
2 │ namespace A {
|
||||
3 │ namespace B {
|
||||
· ─────────
|
||||
|
|
@ -134,7 +134,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -143,7 +143,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -152,7 +152,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -161,7 +161,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -170,7 +170,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -179,7 +179,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:13]
|
||||
╭─[no_namespace.tsx:2:7]
|
||||
1 │
|
||||
2 │ namespace A {
|
||||
· ─────────
|
||||
|
|
@ -188,7 +188,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:22]
|
||||
╭─[no_namespace.tsx:3:16]
|
||||
2 │ namespace A {
|
||||
3 │ export namespace B {
|
||||
· ─────────
|
||||
|
|
@ -197,7 +197,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -206,7 +206,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:15]
|
||||
╭─[no_namespace.tsx:3:9]
|
||||
2 │ export namespace A {
|
||||
3 │ namespace B {
|
||||
· ─────────
|
||||
|
|
@ -215,7 +215,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -224,7 +224,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:15]
|
||||
╭─[no_namespace.tsx:3:9]
|
||||
2 │ export namespace A {
|
||||
3 │ namespace B {
|
||||
· ─────────
|
||||
|
|
@ -233,7 +233,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -242,7 +242,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -251,7 +251,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -260,7 +260,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -269,7 +269,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -278,7 +278,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:2:20]
|
||||
╭─[no_namespace.tsx:2:14]
|
||||
1 │
|
||||
2 │ export namespace A {
|
||||
· ─────────
|
||||
|
|
@ -287,7 +287,7 @@ expression: no_namespace
|
|||
help: Replace the namespace with an ES2015 module or use `declare module`
|
||||
|
||||
⚠ typescript-eslint(no-namespace): ES2015 module syntax is preferred over namespaces.
|
||||
╭─[no_namespace.tsx:3:22]
|
||||
╭─[no_namespace.tsx:3:16]
|
||||
2 │ export namespace A {
|
||||
3 │ export namespace B {
|
||||
· ─────────
|
||||
|
|
|
|||
|
|
@ -101,14 +101,14 @@ expression: no_nonoctal_decimal_escape
|
|||
help: Replace '\8' with '\\8' to include the actual backslash character.
|
||||
|
||||
⚠ eslint(no-nonoctal-decimal-escape): Don't use '\8' escape sequence.
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:4]
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:6]
|
||||
1 │ '👍\8'
|
||||
· ──
|
||||
╰────
|
||||
help: Replace '\8' with '8'. This maintains the current functionality.
|
||||
|
||||
⚠ eslint(no-nonoctal-decimal-escape): Don't use '\8' escape sequence.
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:4]
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:6]
|
||||
1 │ '👍\8'
|
||||
· ──
|
||||
╰────
|
||||
|
|
@ -178,7 +178,7 @@ expression: no_nonoctal_decimal_escape
|
|||
help: Replace '\8' with '\\8' to include the actual backslash character.
|
||||
|
||||
⚠ eslint(no-nonoctal-decimal-escape): Don't use '\8' escape sequence.
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:5]
|
||||
╭─[no_nonoctal_decimal_escape.tsx:1:7]
|
||||
1 │ '\👍\8'
|
||||
· ──
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ expression: no_render_return_value
|
|||
help: Using the return value is a legacy feature.
|
||||
|
||||
⚠ eslint-plugin-react(no-render-return-value): Do not depend on the return value from ReactDOM.render.
|
||||
╭─[no_render_return_value.tsx:3:29]
|
||||
╭─[no_render_return_value.tsx:3:26]
|
||||
2 │ var o = {
|
||||
3 │ inst: ReactDOM.render(<div />, document.body)
|
||||
· ───────────────
|
||||
|
|
@ -19,7 +19,7 @@ expression: no_render_return_value
|
|||
help: Using the return value is a legacy feature.
|
||||
|
||||
⚠ eslint-plugin-react(no-render-return-value): Do not depend on the return value from ReactDOM.render.
|
||||
╭─[no_render_return_value.tsx:3:30]
|
||||
╭─[no_render_return_value.tsx:3:27]
|
||||
2 │ function render () {
|
||||
3 │ return ReactDOM.render(<div />, document.body)
|
||||
· ───────────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_return_await
|
||||
---
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:12]
|
||||
╭─[no_return_await.tsx:3:9]
|
||||
2 │ async function foo() {
|
||||
3 │ return await bar();
|
||||
· ─────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:12]
|
||||
╭─[no_return_await.tsx:3:9]
|
||||
2 │ async function foo() {
|
||||
3 │ return await(bar());
|
||||
· ─────
|
||||
|
|
@ -21,7 +21,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:16]
|
||||
╭─[no_return_await.tsx:3:13]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a, await bar());
|
||||
· ─────
|
||||
|
|
@ -30,7 +30,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:19]
|
||||
╭─[no_return_await.tsx:3:16]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a, b, await bar());
|
||||
· ─────
|
||||
|
|
@ -39,7 +39,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:18]
|
||||
╭─[no_return_await.tsx:3:15]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a && await bar());
|
||||
· ─────
|
||||
|
|
@ -48,7 +48,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:23]
|
||||
╭─[no_return_await.tsx:3:20]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a && b && await bar());
|
||||
· ─────
|
||||
|
|
@ -57,7 +57,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:18]
|
||||
╭─[no_return_await.tsx:3:15]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a || await bar());
|
||||
· ─────
|
||||
|
|
@ -66,7 +66,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:26]
|
||||
╭─[no_return_await.tsx:3:23]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a, b, (c, d, await bar()));
|
||||
· ─────
|
||||
|
|
@ -75,7 +75,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:25]
|
||||
╭─[no_return_await.tsx:3:22]
|
||||
2 │ async function foo() {
|
||||
3 │ return (a, b, (c && await bar()));
|
||||
· ─────
|
||||
|
|
@ -84,7 +84,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:29]
|
||||
╭─[no_return_await.tsx:3:26]
|
||||
2 │ async function foo() {
|
||||
3 │ return (await baz(), b, await bar());
|
||||
· ─────
|
||||
|
|
@ -93,7 +93,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:21]
|
||||
╭─[no_return_await.tsx:3:18]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? await bar() : b);
|
||||
· ─────
|
||||
|
|
@ -102,7 +102,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:25]
|
||||
╭─[no_return_await.tsx:3:22]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? a : await bar());
|
||||
· ─────
|
||||
|
|
@ -111,7 +111,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:25]
|
||||
╭─[no_return_await.tsx:3:22]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? (a, await bar()) : b);
|
||||
· ─────
|
||||
|
|
@ -120,7 +120,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:29]
|
||||
╭─[no_return_await.tsx:3:26]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? a : (b, await bar()));
|
||||
· ─────
|
||||
|
|
@ -129,7 +129,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:27]
|
||||
╭─[no_return_await.tsx:3:24]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? (a && await bar()) : b);
|
||||
· ─────
|
||||
|
|
@ -138,7 +138,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:3:31]
|
||||
╭─[no_return_await.tsx:3:28]
|
||||
2 │ async function foo() {
|
||||
3 │ return (baz() ? a : (b && await bar()));
|
||||
· ─────
|
||||
|
|
@ -203,7 +203,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:5:20]
|
||||
╭─[no_return_await.tsx:5:11]
|
||||
4 │ if (b) {
|
||||
5 │ return await bar();
|
||||
· ─────
|
||||
|
|
@ -212,7 +212,7 @@ expression: no_return_await
|
|||
help: Remove redundant `await`.
|
||||
|
||||
⚠ eslint(no-return-await): Redundant use of `await` on a return value.
|
||||
╭─[no_return_await.tsx:5:20]
|
||||
╭─[no_return_await.tsx:5:11]
|
||||
4 │ if (b) {
|
||||
5 │ return await bar();
|
||||
· ─────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_script_component_in_head
|
||||
---
|
||||
⚠ eslint-plugin-next(no-script-component-in-head): Prevent usage of `next/script` in `next/head` component.
|
||||
╭─[no_script_component_in_head.tsx:7:26]
|
||||
╭─[no_script_component_in_head.tsx:7:17]
|
||||
6 │ return (
|
||||
7 │ <Head>
|
||||
· ────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_sync_scripts
|
||||
---
|
||||
⚠ eslint-plugin-next(no-sync-scripts): Prevent synchronous scripts.
|
||||
╭─[no_sync_scripts.tsx:9:30]
|
||||
╭─[no_sync_scripts.tsx:9:21]
|
||||
8 │ <h1>Hello title</h1>
|
||||
9 │ <script src='https://blah.com'></script>
|
||||
· ──────
|
||||
|
|
@ -12,7 +12,7 @@ expression: no_sync_scripts
|
|||
help: See https://nextjs.org/docs/messages/no-sync-scripts
|
||||
|
||||
⚠ eslint-plugin-next(no-sync-scripts): Prevent synchronous scripts.
|
||||
╭─[no_sync_scripts.tsx:9:30]
|
||||
╭─[no_sync_scripts.tsx:9:21]
|
||||
8 │ <h1>Hello title</h1>
|
||||
9 │ <script src={props.src}></script>
|
||||
· ──────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_title_in_document_head
|
||||
---
|
||||
⚠ eslint-plugin-next(no-title-in-document-head): Prevent usage of `<title>` with `Head` component from `next/document`.
|
||||
╭─[no_title_in_document_head.tsx:7:26]
|
||||
╭─[no_title_in_document_head.tsx:7:17]
|
||||
6 │ return (
|
||||
7 │ <Head>
|
||||
· ────
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ expression: no_unescaped_entities
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-react(no-unescaped-entities): `"` can be escaped with " or “ or " or ”
|
||||
╭─[no_unescaped_entities.tsx:1:14]
|
||||
╭─[no_unescaped_entities.tsx:1:16]
|
||||
1 │ <script>测试 " 测试</script>
|
||||
· ─
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ expression: no_unknown_property
|
|||
help: Property 'webkitdirectory' is only allowed on: input
|
||||
|
||||
⚠ eslint-plugin-react(no-unknown-property): Unknown property found
|
||||
╭─[no_unknown_property.tsx:2:42]
|
||||
╭─[no_unknown_property.tsx:2:33]
|
||||
1 │
|
||||
2 │ <div className="App" data-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash-crash:c="customValue">
|
||||
· ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_unsafe_declaration_merging
|
||||
---
|
||||
⚠ typescript-eslint(no-unsafe-declaration-merging): Unsafe declaration merging between classes and interfaces.
|
||||
╭─[no_unsafe_declaration_merging.tsx:2:23]
|
||||
╭─[no_unsafe_declaration_merging.tsx:2:14]
|
||||
1 │
|
||||
2 │ interface Foo {}
|
||||
· ───
|
||||
|
|
@ -14,7 +14,7 @@ expression: no_unsafe_declaration_merging
|
|||
help: The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
|
||||
|
||||
⚠ typescript-eslint(no-unsafe-declaration-merging): Unsafe declaration merging between classes and interfaces.
|
||||
╭─[no_unsafe_declaration_merging.tsx:2:27]
|
||||
╭─[no_unsafe_declaration_merging.tsx:2:19]
|
||||
1 │
|
||||
2 │ class Foo {}
|
||||
· ───
|
||||
|
|
@ -25,7 +25,7 @@ expression: no_unsafe_declaration_merging
|
|||
help: The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
|
||||
|
||||
⚠ typescript-eslint(no-unsafe-declaration-merging): Unsafe declaration merging between classes and interfaces.
|
||||
╭─[no_unsafe_declaration_merging.tsx:3:33]
|
||||
╭─[no_unsafe_declaration_merging.tsx:3:25]
|
||||
2 │ declare global {
|
||||
3 │ interface Foo {}
|
||||
· ───
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: no_unused_private_class_members
|
||||
---
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedMember' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedMember = 5;
|
||||
· ─────────────
|
||||
|
|
@ -11,7 +11,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedMemberInSecondClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:3:17]
|
||||
╭─[no_unused_private_class_members.tsx:3:8]
|
||||
2 │ class Second {
|
||||
3 │ #unusedMemberInSecondClass = 5;
|
||||
· ──────────────────────────
|
||||
|
|
@ -19,7 +19,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedMemberInFirstClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class First {
|
||||
2 │ #unusedMemberInFirstClass = 5;
|
||||
· ─────────────────────────
|
||||
|
|
@ -27,7 +27,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'firstUnusedMemberInSameClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class First {
|
||||
2 │ #firstUnusedMemberInSameClass = 5;
|
||||
· ─────────────────────────────
|
||||
|
|
@ -35,7 +35,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'secondUnusedMemberInSameClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:3:17]
|
||||
╭─[no_unused_private_class_members.tsx:3:8]
|
||||
2 │ #firstUnusedMemberInSameClass = 5;
|
||||
3 │ #secondUnusedMemberInSameClass = 5;
|
||||
· ──────────────────────────────
|
||||
|
|
@ -43,7 +43,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'usedOnlyInWrite' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #usedOnlyInWrite = 5;
|
||||
· ────────────────
|
||||
|
|
@ -51,7 +51,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'usedOnlyInWriteStatement' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #usedOnlyInWriteStatement = 5;
|
||||
· ─────────────────────────
|
||||
|
|
@ -59,7 +59,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'usedOnlyInIncrement' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class C {
|
||||
2 │ #usedOnlyInIncrement;
|
||||
· ────────────────────
|
||||
|
|
@ -67,7 +67,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedInOuterClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class C {
|
||||
2 │ #unusedInOuterClass;
|
||||
· ───────────────────
|
||||
|
|
@ -75,7 +75,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedOnlyInSecondNestedClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:20:25]
|
||||
╭─[no_unused_private_class_members.tsx:20:16]
|
||||
19 │ return class {
|
||||
20 │ #unusedOnlyInSecondNestedClass;
|
||||
· ──────────────────────────────
|
||||
|
|
@ -83,7 +83,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedMethod' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedMethod() {}
|
||||
· ─────────────
|
||||
|
|
@ -91,7 +91,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedMethod' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedMethod() {}
|
||||
· ─────────────
|
||||
|
|
@ -99,7 +99,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedSetter' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:21]
|
||||
╭─[no_unused_private_class_members.tsx:2:12]
|
||||
1 │ class Foo {
|
||||
2 │ set #unusedSetter(value) {}
|
||||
· ─────────────
|
||||
|
|
@ -107,7 +107,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedForInLoop' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedForInLoop;
|
||||
· ────────────────
|
||||
|
|
@ -115,7 +115,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedForOfLoop' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedForOfLoop;
|
||||
· ────────────────
|
||||
|
|
@ -123,7 +123,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedInDestructuring' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedInDestructuring;
|
||||
· ──────────────────────
|
||||
|
|
@ -131,7 +131,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedInRestPattern' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedInRestPattern;
|
||||
· ────────────────────
|
||||
|
|
@ -139,7 +139,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedInAssignmentPattern' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedInAssignmentPattern;
|
||||
· ──────────────────────────
|
||||
|
|
@ -147,7 +147,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'unusedInAssignmentPattern' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class Foo {
|
||||
2 │ #unusedInAssignmentPattern;
|
||||
· ──────────────────────────
|
||||
|
|
@ -155,7 +155,7 @@ expression: no_unused_private_class_members
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-unused-private-class-members): 'usedOnlyInTheSecondInnerClass' is defined but never used.
|
||||
╭─[no_unused_private_class_members.tsx:2:17]
|
||||
╭─[no_unused_private_class_members.tsx:2:8]
|
||||
1 │ class C {
|
||||
2 │ #usedOnlyInTheSecondInnerClass;
|
||||
· ──────────────────────────────
|
||||
|
|
|
|||
|
|
@ -345,31 +345,31 @@ expression: no_useless_escape
|
|||
╰────
|
||||
|
||||
⚠ eslint(no-useless-escape): Unnecessary escape character ')'
|
||||
╭─[no_useless_escape.tsx:1:18]
|
||||
╭─[no_useless_escape.tsx:1:19]
|
||||
1 │ var foo = /\(([^\)\(]+)\)$|\(([^\)\)]+)\)$/;
|
||||
· ───
|
||||
╰────
|
||||
|
||||
⚠ eslint(no-useless-escape): Unnecessary escape character '('
|
||||
╭─[no_useless_escape.tsx:1:21]
|
||||
╭─[no_useless_escape.tsx:1:23]
|
||||
1 │ var foo = /\(([^\)\(]+)\)$|\(([^\)\)]+)\)$/;
|
||||
· ───
|
||||
╰────
|
||||
|
||||
⚠ eslint(no-useless-escape): Unnecessary escape character ')'
|
||||
╭─[no_useless_escape.tsx:1:27]
|
||||
╭─[no_useless_escape.tsx:1:30]
|
||||
1 │ var foo = /\(([^\)\(]+)\)$|\(([^\)\)]+)\)$/;
|
||||
· ───
|
||||
╰────
|
||||
|
||||
⚠ eslint(no-useless-escape): Unnecessary escape character ')'
|
||||
╭─[no_useless_escape.tsx:1:37]
|
||||
╭─[no_useless_escape.tsx:1:41]
|
||||
1 │ var foo = /\(([^\)\(]+)\)$|\(([^\)\)]+)\)$/;
|
||||
· ──
|
||||
╰────
|
||||
|
||||
⚠ eslint(no-useless-escape): Unnecessary escape character ')'
|
||||
╭─[no_useless_escape.tsx:1:39]
|
||||
╭─[no_useless_escape.tsx:1:43]
|
||||
1 │ var foo = /\(([^\)\(]+)\)$|\(([^\)\)]+)\)$/;
|
||||
· ──
|
||||
╰────
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `return value` over `return Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ (async function() {
|
||||
3 │ return Promise.resolve(bar);
|
||||
· ────────────────────
|
||||
|
|
@ -55,7 +55,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `return value` over `return Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ return Promise.resolve(bar);
|
||||
· ────────────────────
|
||||
|
|
@ -64,7 +64,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `return value` over `return Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:15]
|
||||
2 │ (async function*() {
|
||||
3 │ return Promise.resolve(bar);
|
||||
· ────────────────────
|
||||
|
|
@ -80,7 +80,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async () => {
|
||||
3 │ return Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -89,7 +89,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function foo() {
|
||||
3 │ return Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -98,7 +98,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ (async function() {
|
||||
3 │ return Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -107,7 +107,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ return Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -116,7 +116,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ (async function*() {
|
||||
3 │ return Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -125,7 +125,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `yield value` over `yield Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ yield Promise.resolve(bar);
|
||||
· ────────────────────
|
||||
|
|
@ -134,7 +134,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `yield value` over `yield Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ (async function * () {
|
||||
3 │ yield Promise.resolve(bar);
|
||||
· ────────────────────
|
||||
|
|
@ -143,7 +143,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `yield Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ yield Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -152,7 +152,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `yield Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ (async function * () {
|
||||
3 │ yield Promise.reject(bar);
|
||||
· ───────────────────
|
||||
|
|
@ -168,7 +168,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `return value` over `return Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:28]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:13]
|
||||
2 │ async function foo() {
|
||||
3 │ return Promise.resolve();
|
||||
· ─────────────────
|
||||
|
|
@ -184,7 +184,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:28]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:13]
|
||||
2 │ async function foo() {
|
||||
3 │ return Promise.reject();
|
||||
· ────────────────
|
||||
|
|
@ -193,7 +193,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `yield value` over `yield Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ yield Promise.resolve();
|
||||
· ─────────────────
|
||||
|
|
@ -216,7 +216,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `yield value` over `yield Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:27]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:12]
|
||||
2 │ async function * foo() {
|
||||
3 │ yield Promise.resolve((bar, baz));
|
||||
· ───────────────────────────
|
||||
|
|
@ -239,7 +239,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `return value` over `return Promise.resolve(value)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:4:32]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:4:14]
|
||||
3 │ try {
|
||||
4 │ return Promise.resolve(1);
|
||||
· ──────────────────
|
||||
|
|
@ -248,7 +248,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the return value in `Promise.Resolve` is needlessly verbose. All return values in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `return Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:4:32]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:4:14]
|
||||
3 │ try {
|
||||
4 │ return Promise.reject(1);
|
||||
· ─────────────────
|
||||
|
|
@ -310,7 +310,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `yield Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:24]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:16]
|
||||
2 │ async function * foo() {
|
||||
3 │ (yield Promise.reject(bar));
|
||||
· ───────────────────
|
||||
|
|
@ -319,7 +319,7 @@ expression: no_useless_promise_resolve_reject
|
|||
help: Wrapping the error in `Promise.reject` is needlessly verbose. All errors thrown in async functions are already wrapped in a `Promise`.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-useless-promise-resolve-reject): Prefer `throw error` over `yield Promise.reject(error)`.
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:25]
|
||||
╭─[no_useless_promise_resolve_reject.tsx:3:17]
|
||||
2 │ async function * foo() {
|
||||
3 │ ((yield Promise.reject(bar)));
|
||||
· ───────────────────
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ expression: prefer_modern_math_apis
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-unicorn(prefer-modern-math-apis): Prefer `Math.log10(x)` over `Math.log(x) / Math.LN10`
|
||||
╭─[prefer_modern_math_apis.tsx:4:21]
|
||||
╭─[prefer_modern_math_apis.tsx:4:6]
|
||||
3 │ return (
|
||||
4 │ ╭─▶ Math.log(x)
|
||||
5 │ ╰─▶ / Math.LN10
|
||||
|
|
@ -161,7 +161,7 @@ expression: prefer_modern_math_apis
|
|||
╰────
|
||||
|
||||
⚠ eslint-plugin-unicorn(prefer-modern-math-apis): Prefer `Math.log2(x)` over `Math.log(x) / Math.LN2`
|
||||
╭─[prefer_modern_math_apis.tsx:4:21]
|
||||
╭─[prefer_modern_math_apis.tsx:4:6]
|
||||
3 │ return (
|
||||
4 │ ╭─▶ Math.log(x)
|
||||
5 │ ╰─▶ / Math.LN2
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: require_render_return
|
||||
---
|
||||
⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
|
||||
╭─[require_render_return.tsx:4:42]
|
||||
╭─[require_render_return.tsx:4:39]
|
||||
3 │ displayName: 'Hello',
|
||||
4 │ render: function() {}
|
||||
· ──
|
||||
|
|
@ -12,7 +12,7 @@ expression: require_render_return
|
|||
help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.
|
||||
|
||||
⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
|
||||
╭─[require_render_return.tsx:3:32]
|
||||
╭─[require_render_return.tsx:3:29]
|
||||
2 │ class Hello extends React.Component {
|
||||
3 │ render() {}
|
||||
· ──
|
||||
|
|
@ -21,7 +21,7 @@ expression: require_render_return
|
|||
help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.
|
||||
|
||||
⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
|
||||
╭─[require_render_return.tsx:3:32]
|
||||
╭─[require_render_return.tsx:3:29]
|
||||
2 │ class Hello extends React.Component {
|
||||
3 │ ╭─▶ render() {
|
||||
4 │ │ const names = this.props.names.map(function(name) {
|
||||
|
|
@ -33,7 +33,7 @@ expression: require_render_return
|
|||
help: When writing the `render` method in a component it is easy to forget to return the JSX content. This rule will warn if the return statement is missing.
|
||||
|
||||
⚠ eslint-plugin-react(require-render-return): Your render method should have a return statement
|
||||
╭─[require_render_return.tsx:3:38]
|
||||
╭─[require_render_return.tsx:3:35]
|
||||
2 │ class Hello extends React.Component {
|
||||
3 │ ╭─▶ render = () => {
|
||||
4 │ │ <div>Hello {this.props.name}</div>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ source: crates/oxc_linter/src/tester.rs
|
|||
expression: triple_slash_reference
|
||||
---
|
||||
⚠ typescript-eslint(triple-slash-reference): Do not use a triple slash reference for foo, use `import` style instead.
|
||||
╭─[triple_slash_reference.tsx:2:13]
|
||||
╭─[triple_slash_reference.tsx:2:4]
|
||||
1 │
|
||||
2 │ /// <reference types="foo" />
|
||||
· ─────────────────────────────
|
||||
|
|
@ -12,7 +12,7 @@ expression: triple_slash_reference
|
|||
help: Use of triple-slash reference type directives is generally discouraged in favor of ECMAScript Module imports.
|
||||
|
||||
⚠ typescript-eslint(triple-slash-reference): Do not use a triple slash reference for foo, use `import` style instead.
|
||||
╭─[triple_slash_reference.tsx:2:13]
|
||||
╭─[triple_slash_reference.tsx:2:10]
|
||||
1 │
|
||||
2 │ /// <reference types="foo" />
|
||||
· ─────────────────────────────
|
||||
|
|
|
|||
|
|
@ -238,8 +238,7 @@ impl Tester {
|
|||
|
||||
let handler = GraphicalReportHandler::new().with_theme(GraphicalTheme::unicode_nocolor());
|
||||
for diagnostic in result {
|
||||
let diagnostic = diagnostic.error.with_source_code(source_text.to_string());
|
||||
let diagnostic = diagnostic.with_source_code(NamedSource::new(
|
||||
let diagnostic = diagnostic.error.with_source_code(NamedSource::new(
|
||||
diagnostic_path.clone(),
|
||||
source_text.to_string(),
|
||||
));
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ memchr = "2.7.1"
|
|||
|
||||
[dev-dependencies]
|
||||
oxc_ast = { workspace = true, features = ["serde"] }
|
||||
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
||||
miette = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
ouroboros = "0.18.3" # for `multi-thread` example
|
||||
ouroboros = "0.18.3" # for `multi-thread` example
|
||||
|
||||
[features]
|
||||
# Expose Lexer for benchmarks
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ impl Hash for Span {
|
|||
|
||||
impl From<Span> for SourceSpan {
|
||||
fn from(val: Span) -> Self {
|
||||
Self::new(SourceOffset::from(val.start as usize), SourceOffset::from(val.size() as usize))
|
||||
Self::new(SourceOffset::from(val.start as usize), val.size() as usize)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ oxc_tasks_common = { workspace = true }
|
|||
serde = { workspace = true, features = ["derive"] }
|
||||
serde_json = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
miette = { workspace = true, features = ["fancy-no-backtrace"] }
|
||||
miette = { workspace = true }
|
||||
project-root = { workspace = true }
|
||||
pico-args = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ Expect to Parse: "core/opts/allowNewTargetOutsideFunction-true/input.js"
|
|||
Expect to Parse: "typescript/arrow-function/generic-tsx-babel-7/input.ts"
|
||||
|
||||
× Expected `<` but found `EOF`
|
||||
╭─[typescript/arrow-function/generic-tsx-babel-7/input.ts:2:1]
|
||||
╭─[typescript/arrow-function/generic-tsx-babel-7/input.ts:3:1]
|
||||
2 │ <T>(a: T): T => a;
|
||||
╰────
|
||||
Expect to Parse: "typescript/class/constructor-with-modifier-names/input.ts"
|
||||
|
|
@ -1032,7 +1032,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
help: Try insert a semicolon here
|
||||
|
||||
× Expected `}` but found `EOF`
|
||||
╭─[core/uncategorised/345/input.js:1:1]
|
||||
╭─[core/uncategorised/345/input.js:1:2]
|
||||
1 │ {
|
||||
╰────
|
||||
|
||||
|
|
@ -1061,7 +1061,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected end of file
|
||||
╭─[core/uncategorised/349/input.js:1:1]
|
||||
╭─[core/uncategorised/349/input.js:1:3]
|
||||
1 │ 3e
|
||||
╰────
|
||||
|
||||
|
|
@ -1072,7 +1072,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected end of file
|
||||
╭─[core/uncategorised/350/input.js:1:1]
|
||||
╭─[core/uncategorised/350/input.js:1:4]
|
||||
1 │ 3e+
|
||||
╰────
|
||||
|
||||
|
|
@ -1083,7 +1083,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected end of file
|
||||
╭─[core/uncategorised/351/input.js:1:1]
|
||||
╭─[core/uncategorised/351/input.js:1:4]
|
||||
1 │ 3e-
|
||||
╰────
|
||||
|
||||
|
|
@ -1106,7 +1106,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected end of file
|
||||
╭─[core/uncategorised/354/input.js:1:1]
|
||||
╭─[core/uncategorised/354/input.js:1:3]
|
||||
1 │ 0x
|
||||
╰────
|
||||
|
||||
|
|
@ -1136,12 +1136,12 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Invalid Character `\`
|
||||
╭─[core/uncategorised/362/input.js:1:1]
|
||||
╭─[core/uncategorised/362/input.js:1:8]
|
||||
1 │ x\u005c
|
||||
╰────
|
||||
|
||||
× Invalid Character `*`
|
||||
╭─[core/uncategorised/363/input.js:1:1]
|
||||
╭─[core/uncategorised/363/input.js:1:8]
|
||||
1 │ x\u002a
|
||||
╰────
|
||||
|
||||
|
|
@ -1219,27 +1219,27 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Expected `]` but found `EOF`
|
||||
╭─[core/uncategorised/375/input.js:1:1]
|
||||
╭─[core/uncategorised/375/input.js:1:2]
|
||||
1 │ [
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/376/input.js:1:1]
|
||||
╭─[core/uncategorised/376/input.js:1:3]
|
||||
1 │ [,
|
||||
╰────
|
||||
|
||||
× Expected `}` but found `EOF`
|
||||
╭─[core/uncategorised/377/input.js:1:1]
|
||||
╭─[core/uncategorised/377/input.js:1:6]
|
||||
1 │ 1 + {
|
||||
╰────
|
||||
|
||||
× Expected `}` but found `EOF`
|
||||
╭─[core/uncategorised/378/input.js:1:1]
|
||||
╭─[core/uncategorised/378/input.js:2:1]
|
||||
1 │ 1 + { t:t
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/379/input.js:1:1]
|
||||
╭─[core/uncategorised/379/input.js:1:11]
|
||||
1 │ 1 + { t:t,
|
||||
╰────
|
||||
|
||||
|
|
@ -1251,7 +1251,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/380/input.js:1:1]
|
||||
╭─[core/uncategorised/380/input.js:2:2]
|
||||
1 │ var x = /
|
||||
2 │ /
|
||||
╰────
|
||||
|
|
@ -1281,12 +1281,12 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Expected `)` but found `EOF`
|
||||
╭─[core/uncategorised/385/input.js:1:1]
|
||||
╭─[core/uncategorised/385/input.js:1:6]
|
||||
1 │ 1 + (
|
||||
╰────
|
||||
|
||||
× Expected `}` but found `EOF`
|
||||
╭─[core/uncategorised/386/input.js:3:1]
|
||||
╭─[core/uncategorised/386/input.js:4:2]
|
||||
3 │
|
||||
4 │ {
|
||||
╰────
|
||||
|
|
@ -1464,7 +1464,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/413/input.js:1:1]
|
||||
╭─[core/uncategorised/413/input.js:1:6]
|
||||
1 │ throw
|
||||
╰────
|
||||
|
||||
|
|
@ -1500,37 +1500,37 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/419/input.js:1:1]
|
||||
╭─[core/uncategorised/419/input.js:1:10]
|
||||
1 │ if(false)
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/420/input.js:1:1]
|
||||
╭─[core/uncategorised/420/input.js:1:25]
|
||||
1 │ if(false) doThis(); else
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/421/input.js:1:1]
|
||||
╭─[core/uncategorised/421/input.js:1:3]
|
||||
1 │ do
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/422/input.js:1:1]
|
||||
╭─[core/uncategorised/422/input.js:1:13]
|
||||
1 │ while(false)
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/423/input.js:1:1]
|
||||
╭─[core/uncategorised/423/input.js:1:8]
|
||||
1 │ for(;;)
|
||||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/424/input.js:1:1]
|
||||
╭─[core/uncategorised/424/input.js:1:8]
|
||||
1 │ with(x)
|
||||
╰────
|
||||
|
||||
× Missing catch or finally clause
|
||||
╭─[core/uncategorised/425/input.js:1:1]
|
||||
╭─[core/uncategorised/425/input.js:1:8]
|
||||
1 │ try { }
|
||||
╰────
|
||||
|
||||
|
|
@ -1600,7 +1600,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/436/input.js:1:1]
|
||||
╭─[core/uncategorised/436/input.js:2:1]
|
||||
1 │
]
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -1613,7 +1613,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/438/input.js:2:1]
|
||||
╭─[core/uncategorised/438/input.js:3:1]
|
||||
2 │
]
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -1626,7 +1626,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/440/input.js:2:1]
|
||||
╭─[core/uncategorised/440/input.js:3:1]
|
||||
2 │
]
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -1639,7 +1639,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/441/input.js:1:1]
|
||||
╭─[core/uncategorised/441/input.js:2:2]
|
||||
1 │ /a\
|
||||
2 │ /
|
||||
╰────
|
||||
|
|
@ -1659,7 +1659,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Unexpected token
|
||||
╭─[core/uncategorised/444/input.js:2:3]
|
||||
╭─[core/uncategorised/444/input.js:3:3]
|
||||
2 │
*/]
|
||||
· ─
|
||||
╰────
|
||||
|
|
@ -1678,7 +1678,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Invalid Character `\`
|
||||
╭─[core/uncategorised/447/input.js:1:1]
|
||||
╭─[core/uncategorised/447/input.js:1:7]
|
||||
1 │ \u005c
|
||||
╰────
|
||||
|
||||
|
|
@ -1689,7 +1689,7 @@ Expect to Parse: "typescript/types/const-type-parameters-babel-7/input.ts"
|
|||
╰────
|
||||
|
||||
× Invalid Character ` | ||||