Skip to content

Commit

Permalink
Merge branch 'main' into v2/no-secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Oct 7, 2024
2 parents 7f5d2e8 + 055b0db commit f40fa20
Show file tree
Hide file tree
Showing 71 changed files with 2,393 additions and 1,264 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
with:
node-version: 20
- name: Cache pnpm modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Free Disk Space
uses: ./.github/actions/free-disk-space
- name: Cache pnpm modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: echo "nightly=true" >> $GITHUB_ENV

- name: Check version changes
uses: EndBug/version-check@d4be4219408b50d1bbbfd350a47cbcb126878692 # v2.1.4
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # v2.1.5
if: env.nightly != 'true'
id: version
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_js_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: echo "nightly=true" >> $GITHUB_ENV

- name: Check version changes
uses: EndBug/version-check@d4be4219408b50d1bbbfd350a47cbcb126878692 # v2.1.4
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # v2.1.5
if: env.nightly != 'true'
id: version
with:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: Cache pnpm modules
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_knope.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Check version changes
uses: EndBug/version-check@d4be4219408b50d1bbbfd350a47cbcb126878692 # v2.1.4
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # v2.1.5
id: version
with:
diff-search: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repository_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Warm up wasm-pack cache
id: cache-restore
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: |
./target
Expand All @@ -52,7 +52,7 @@ jobs:
continue-on-error: true

- name: Save new wasm-pack cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/save@2cdf405574d6ef1f33a1d12acccd3ae82f47b3f2 # v4.1.0
with:
path: |
./target
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### Analyzer

#### Bug fixes

- Improved the message for unused suppression comments. Contributed by @dyc3

### CLI

### Configuration
Expand All @@ -29,8 +33,42 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### Linter

- Biome no longer crashes when it encounters a string that contain a multibyte character ([#4181](https://github.com/biomejs/biome/issues/4181)).

This fixes a regression introduced in Biome 1.9.3
The regression affected the following linter rules:

- nursery/useSortedClasses
- nursery/useTrimStartEnd
- style/useTemplate
- suspicious/noMisleadingCharacterClass

Contributed by @Conaclos

- Fix [#4190](https://github.com/biomejs/biome/issues/4190), where the rule `noMissingVarFunction` wrongly reported a variable as missing when used inside a `var()` function that was a newline. Contributed by @ematipico

- Fix [#4041](https://github.com/biomejs/biome/issues/4041). Now the rule `useSortedClasses` won't be triggered if `className` is composed only by inlined variables. Contributed by @ematipico

### Parser

#### Bug Fixes

- The CSS parser now accepts more emoji in identifiers ([#3627](https://github.com/biomejs/biome/issues/3627#issuecomment-2392388022)).

Browsers accept more emoji than the standard allows.
Biome now accepts these additional emoji.

The following code is now correctly parsed:

```css
p {
--✨-color: red;
color: var(--✨-color);
}
```

Contributed by @Conaclos

## v1.9.3 (2024-10-01)

### CLI
Expand Down
4 changes: 2 additions & 2 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"node": ">20.0.0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/eslint-plugin": "8.8.0",
"dprint": "0.47.2",
"eslint": "9.11.1",
"eslint": "9.12.0",
"prettier": "3.3.3"
}
}
2 changes: 1 addition & 1 deletion crates/biome_analyze/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ where
SuppressionDiagnostic::new(
category!("suppressions/unused"),
suppression.comment_span,
"Suppression comment is not being used",
"Suppression comment has no effect. Remove the suppression or make sure you are suppressing the correct rule.",
)
});

Expand Down
10 changes: 8 additions & 2 deletions crates/biome_analyze/src/rule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl TryFrom<FixKind> for Applicability {
}

#[derive(Debug, Clone, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, schemars::JsonSchema))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub enum RuleSource {
/// Rules from [Rust Clippy](https://rust-lang.github.io/rust-clippy/master/index.html)
Expand Down Expand Up @@ -126,6 +126,8 @@ pub enum RuleSource {
EslintBarrelFiles(&'static str),
/// Rules from [Eslint Plugin N](https://github.com/eslint-community/eslint-plugin-n)
EslintN(&'static str),
/// Rules from [Eslint Plugin Next](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next)
EslintNext(&'static str),
/// Rules from [Stylelint](https://github.com/stylelint/stylelint)
Stylelint(&'static str),
/// Rules from [Eslint Plugin No Secrets](https://github.com/nickdeis/eslint-plugin-no-secrets)
Expand Down Expand Up @@ -160,6 +162,7 @@ impl std::fmt::Display for RuleSource {
Self::EslintMysticatea(_) => write!(f, "@mysticatea/eslint-plugin"),
Self::EslintBarrelFiles(_) => write!(f, "eslint-plugin-barrel-files"),
Self::EslintN(_) => write!(f, "eslint-plugin-n"),
Self::EslintNext(_) => write!(f, "@next/eslint-plugin-next"),
Self::Stylelint(_) => write!(f, "Stylelint"),
Self::EslintNoSecrets(_) => write!(f, "eslint-plugin-no-secrets"),
}
Expand Down Expand Up @@ -212,6 +215,7 @@ impl RuleSource {
| Self::EslintN(rule_name)
| Self::Stylelint(rule_name)
| Self::EslintNoSecrets(rule_name) => rule_name,
| Self::Stylelint(rule_name) => rule_name,
}
}

Expand All @@ -235,6 +239,7 @@ impl RuleSource {
Self::EslintMysticatea(rule_name) => format!("@mysticatea/{rule_name}"),
Self::EslintBarrelFiles(rule_name) => format!("barrel-files/{rule_name}"),
Self::EslintN(rule_name) => format!("n/{rule_name}"),
Self::EslintNext(rule_name) => format!("@next/{rule_name}"),
Self::Stylelint(rule_name) => format!("stylelint/{rule_name}"),
Self::EslintNoSecrets(rule_name) => format!("no-secrets/{rule_name}"),
}
Expand All @@ -261,6 +266,7 @@ impl RuleSource {
Self::EslintMysticatea(rule_name) => format!("https://github.com/mysticatea/eslint-plugin/blob/master/docs/rules/{rule_name}.md"),
Self::EslintBarrelFiles(rule_name) => format!("https://github.com/thepassle/eslint-plugin-barrel-files/blob/main/docs/rules/{rule_name}.md"),
Self::EslintN(rule_name) => format!("https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/{rule_name}.md"),
Self::EslintNext(rule_name) => format!("https://nextjs.org/docs/messages/{rule_name}"),
Self::Stylelint(rule_name) => format!("https://github.com/stylelint/stylelint/blob/main/lib/rules/{rule_name}/README.md"),
Self::EslintNoSecrets(_) => "https://github.com/nickdeis/eslint-plugin-no-secrets/blob/master/README.md".to_string(),
}
Expand All @@ -286,7 +292,7 @@ impl RuleSource {
}

#[derive(Debug, Default, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(serde::Serialize))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, schemars::JsonSchema))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub enum RuleSourceKind {
/// The rule implements the same logic of the source
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_cli/src/changed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use std::ffi::OsString;
pub(crate) fn get_changed_files(
fs: &DynRef<'_, dyn FileSystem>,
configuration: &PartialConfiguration,
since: Option<String>,
since: Option<&str>,
) -> Result<Vec<OsString>, CliDiagnostic> {
let default_branch = configuration
.vcs
.as_ref()
.and_then(|v| v.default_branch.as_ref());

let base = match (since.as_ref(), default_branch) {
let base = match (since, default_branch) {
(Some(since), Some(_)) => since,
(Some(since), None) => since,
(None, Some(branch)) => branch,
Expand Down
Loading

0 comments on commit f40fa20

Please sign in to comment.