Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
codacy: codacy/base@12.1.3
codacy: codacy/base@12.2.0
codacy_plugins_test: codacy/plugins-test@2.0.11

workflows:
Expand All @@ -11,8 +11,8 @@ workflows:
write_sbt_version: true
- codacy/sbt:
name: publish_docker_local
openjdk_version: "11"
install_sbt_version: "1.10.0"
openjdk_version: "17"
install_sbt_version: "1.10.1"
cmd: |
sbt "scalafmtCheckAll;
scalafmtSbtCheck;
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ project/metals.sbt
node_modules/
.stylelint-version
.vscode/


#Ignore vscode AI rules
.github/copilot-instructions.md
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-alpine3.20
FROM node:lts-alpine3.22

WORKDIR /workdir

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ThisBuild / scalaVersion := "2.13.13"

ThisBuild / libraryDependencies ++= Seq(
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.3",
"com.codacy" %% "codacy-engine-scala-seed" % "6.1.5",
"com.github.pathikrit" %% "better-files" % "3.9.2")

name := "codacy-stylelint"
Expand Down
30 changes: 21 additions & 9 deletions docs/description/alpha-value-notation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ Specify percentage or number notation for alpha-values.
* This notation */
```

The [`fix` option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
The [`fix` option](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/options.md#fix) can automatically fix all of the problems reported by this rule.

## Options

`string`: `"number"|"percentage"`

### `"number"`

Alpha-values _must always_ use the number notation.

```json
{
"alpha-value-notation": "number"
}
```

The following patterns are considered problems:

<!-- prettier-ignore -->
Expand Down Expand Up @@ -49,6 +51,12 @@ a { color: rgb(0 0 0 / 0.5) }

Alpha-values _must always_ use percentage notation.

```json
{
"alpha-value-notation": "percentage"
}
```

The following patterns are considered problems:

<!-- prettier-ignore -->
Expand All @@ -75,16 +83,20 @@ a { color: rgb(0 0 0 / 50%) }

## Optional secondary options

### `exceptProperties: ["/regex/", /regex/, "string"]`
### `exceptProperties`

Reverse the primary option for matching properties.
```json
{ "exceptProperties": ["array", "of", "properties", "/regex/"] }
```

For example with `"percentage"`.
Reverse the primary option for matching properties.

Given:

```json
["opacity"]
{
"alpha-value-notation": ["percentage", { "exceptProperties": ["opacity"] }]
}
```

The following patterns are considered problems:
Expand Down
21 changes: 17 additions & 4 deletions docs/description/annotation-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ a { color: green !imprtant; }

This rule considers annotations defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

### `true`

```json
{
"annotation-no-unknown": true
}
```

The following pattern is considered a problem:

<!-- prettier-ignore -->
Expand All @@ -37,12 +41,21 @@ a {

## Optional secondary options

### `ignoreAnnotations: ["/regex/", /regex/, "string"]`
### `ignoreAnnotations`

```json
{ "ignoreAnnotations": ["array", "of", "annotations", "/regex/"] }
```

Given:

```json
["/^--foo-/", "--bar"]
{
"annotation-no-unknown": [
true,
{ "ignoreAnnotations": ["/^--foo-/", "--bar"] }
]
}
```

The following patterns are _not_ considered problems:
Expand Down
12 changes: 8 additions & 4 deletions docs/description/at-rule-allowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ Specify a list of allowed at-rules.

This rule ignores the `@charset` rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

`array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"`
### `Array<string>`

```json
["array", "of", "unprefixed", "at-rules"]
```

Given:

```json
["extend", "keyframes"]
{
"at-rule-allowed-list": ["extend", "keyframes"]
}
```

The following patterns are considered problems:
Expand Down
12 changes: 8 additions & 4 deletions docs/description/at-rule-descriptor-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn

This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.
This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/property-no-unknown/README.md) rule.

This rule checks descriptors within at-rules. To check properties, you can use the [`property-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/property-no-unknown/README.md) rule.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section.
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.

Prior art:

Expand All @@ -31,6 +29,12 @@ Prior art:

### `true`

```json
{
"at-rule-descriptor-no-unknown": true
}
```

The following patterns are considered problems:

<!-- prettier-ignore -->
Expand Down
22 changes: 13 additions & 9 deletions docs/description/at-rule-descriptor-value-no-unknown.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ You can filter the [CSSTree Syntax Reference](https://csstree.github.io/docs/syn

This rule is only appropriate for CSS. You should not turn it on for CSS-like languages, such as SCSS or Less.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules.
This rule checks descriptor values within at-rules. You can use [`declaration-property-value-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/declaration-property-value-no-unknown/README.md) to disallow unknown values for properties within declarations, and [`at-rule-descriptor-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/at-rule-descriptor-no-unknown/README.md) to disallow unknown descriptors for at-rules.

This rule overlaps with:

- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/color-no-invalid-hex/README.md)
- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/function-no-unknown/README.md)
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/string-no-newline/README.md)
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.17.0/lib/rules/unit-no-unknown/README.md)
- [`color-no-invalid-hex`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/color-no-invalid-hex/README.md)
- [`function-linear-gradient-no-nonstandard-direction`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-linear-gradient-no-nonstandard-direction/README.md)
- [`function-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/function-no-unknown/README.md)
- [`string-no-newline`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/string-no-newline/README.md)
- [`unit-no-unknown`](https://github.com/stylelint/stylelint/16.23.0/lib/rules/unit-no-unknown/README.md)

You can either turn off the rules or configure them to ignore the overlaps.

For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#languageoptions) section.
For customizing syntax, see the [`languageOptions`](https://github.com/stylelint/stylelint/16.23.0/docs/user-guide/configure.md#languageoptions) section.

Prior art:

Expand All @@ -41,6 +39,12 @@ Prior art:

### `true`

```json
{
"at-rule-descriptor-value-no-unknown": true
}
```

The following patterns are considered problems:

<!-- prettier-ignore -->
Expand Down
12 changes: 8 additions & 4 deletions docs/description/at-rule-disallowed-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,20 @@ Specify a list of disallowed at-rules.

This rule ignores the `@charset` rule.

The [`message` secondary option](https://github.com/stylelint/stylelint/16.17.0/docs/user-guide/configure.md#message) can accept the arguments of this rule.

## Options

`array|string`: `["array", "of", "unprefixed", "at-rules"]|"at-rule"`
### `Array<string>`

```json
["array", "of", "unprefixed", "at-rules"]
```

Given:

```json
["extend", "keyframes"]
{
"at-rule-disallowed-list": ["extend", "keyframes"]
}
```

The following patterns are considered problems:
Expand Down
Loading