Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate stylistic rules handled by Prettier #6504

Merged
merged 11 commits into from Dec 6, 2022
2 changes: 2 additions & 0 deletions lib/rules/at-rule-name-case/README.md
@@ -1,5 +1,7 @@
# at-rule-name-case

> **Warning** This rule is deprecated and will be removed in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[ask] I believe the warning message is helpful, but what do you think?


[note] GitHub renders the > **Warning** text as follows:

image

On the other hand, Docusaurus has a different rendering syntax called Admonitions. E.g.

:::caution

This rule is deprecated and will be removed in the future.

:::

If using Admonitions, we need to rewrite the warning syntax on the stylelint.io repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the warning message is helpful, but what do you think?

LGTM

we need to rewrite the warning syntax on the stylelint.io repo.

Yes, but only if it's quick to do as:

  • I think it'll look good enough on the website
  • we'll be removing the rules in the next major release

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. It looks like we don't need to add an extra process.

Specify lowercase or uppercase for at-rules names.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/at-rule-name-case/index.js
Expand Up @@ -14,6 +14,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/at-rule-name-case',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/at-rule-name-newline-after/README.md
@@ -1,5 +1,7 @@
# at-rule-name-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline after at-rule names.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/at-rule-name-newline-after/index.js
Expand Up @@ -13,6 +13,7 @@ const messages = ruleMessages(ruleName, {

const meta = {
url: 'https://stylelint.io/user-guide/rules/at-rule-name-newline-after',
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/at-rule-name-space-after/README.md
@@ -1,5 +1,7 @@
# at-rule-name-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space after at-rule names.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/at-rule-name-space-after/index.js
Expand Up @@ -14,6 +14,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/at-rule-name-space-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/at-rule-semicolon-newline-after/README.md
@@ -1,5 +1,7 @@
# at-rule-semicolon-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline after the semicolon of at-rules.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/at-rule-semicolon-newline-after/index.js
Expand Up @@ -18,6 +18,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/at-rule-semicolon-newline-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/at-rule-semicolon-space-before/README.md
@@ -1,5 +1,7 @@
# at-rule-semicolon-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the semicolons of at-rules.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/at-rule-semicolon-space-before/index.js
Expand Up @@ -17,6 +17,7 @@ const messages = ruleMessages(ruleName, {

const meta = {
url: 'https://stylelint.io/user-guide/rules/at-rule-semicolon-space-before',
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-closing-brace-empty-line-before/README.md
@@ -1,5 +1,7 @@
# block-closing-brace-empty-line-before

> **Warning** This rule is deprecated and will be removed in the future.

Require or disallow an empty line before the closing brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-closing-brace-empty-line-before/index.js
Expand Up @@ -22,6 +22,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-closing-brace-empty-line-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-closing-brace-newline-after/README.md
@@ -1,5 +1,7 @@
# block-closing-brace-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace after the closing brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-closing-brace-newline-after/index.js
Expand Up @@ -23,6 +23,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-closing-brace-newline-after',
fixable: true,
deprecated: true,
Copy link
Contributor

@Mouvedia Mouvedia Dec 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to check whether all the rules that were being deprecated were properly covered by prettier.

This one has options:

  • "always"
  • "always-single-line"
  • "never-single-line"
  • "always-multi-line"
  • "never-multi-line"

Are all of these properly covered by prettier?
If not, we need to make a list of rules that are being deprecated but are only partially covered by the prettier replacement.
e.g.

name support note
rule A full
rule B partial does not support option X and Y
rule C partial only support option Z

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mouvedia was please suggested list created? To see which deprecated rule can be covered by the prettier replacement? Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we might make a list, but we need more resources. Also, it may not be precious since the rules will be removed in the next major update.

However, we welcome your contribution if you have time.

Copy link
Member

@jeddy3 jeddy3 Feb 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following on from #6657 (comment), I suggest the people working on the plugin pack draw up the list.

As @ybiquitous said, we've other things to focus on (that will benefit most of our users). I suspect most people already use a pretty printer alongside Stylelint (as we've been advocating that approach for over a year now in our docs), and most of those who don't will soon, as it's our recommended approach in our new migration guide.

Anyone wanting to continue using Stylelint for formatting can work together on a community plugin pack. As with custom syntaxes, the health of the plugin will be determined by the health of the community that maintains it.

};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-closing-brace-newline-before/README.md
@@ -1,5 +1,7 @@
# block-closing-brace-newline-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace before the closing brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-closing-brace-newline-before/index.js
Expand Up @@ -19,6 +19,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-closing-brace-newline-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-closing-brace-space-after/README.md
@@ -1,5 +1,7 @@
# block-closing-brace-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace after the closing brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-closing-brace-space-after/index.js
Expand Up @@ -21,6 +21,7 @@ const messages = ruleMessages(ruleName, {

const meta = {
url: 'https://stylelint.io/user-guide/rules/block-closing-brace-space-after',
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-closing-brace-space-before/README.md
@@ -1,5 +1,7 @@
# block-closing-brace-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the closing brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-closing-brace-space-before/index.js
Expand Up @@ -22,6 +22,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-closing-brace-space-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-opening-brace-newline-after/README.md
@@ -1,5 +1,7 @@
# block-opening-brace-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline after the opening brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-opening-brace-newline-after/index.js
Expand Up @@ -22,6 +22,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-opening-brace-newline-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-opening-brace-newline-before/README.md
@@ -1,5 +1,7 @@
# block-opening-brace-newline-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace before the opening brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-opening-brace-newline-before/index.js
Expand Up @@ -22,6 +22,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-opening-brace-newline-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-opening-brace-space-after/README.md
@@ -1,5 +1,7 @@
# block-opening-brace-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace after the opening brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-opening-brace-space-after/index.js
Expand Up @@ -24,6 +24,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-opening-brace-space-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/block-opening-brace-space-before/README.md
@@ -1,5 +1,7 @@
# block-opening-brace-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the opening brace of blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/block-opening-brace-space-before/index.js
Expand Up @@ -25,6 +25,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/block-opening-brace-space-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/color-hex-case/README.md
@@ -1,5 +1,7 @@
# color-hex-case

> **Warning** This rule is deprecated and will be removed in the future.

Specify lowercase or uppercase for hex colors.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/color-hex-case/index.js
Expand Up @@ -18,6 +18,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/color-hex-case',
fixable: true,
deprecated: true,
};

const HEX = /^#[0-9A-Za-z]+/;
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-bang-space-after/README.md
@@ -1,5 +1,7 @@
# declaration-bang-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace after the bang of declarations.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-bang-space-after/index.js
Expand Up @@ -18,6 +18,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-bang-space-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-bang-space-before/README.md
@@ -1,5 +1,7 @@
# declaration-bang-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the bang of declarations.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-bang-space-before/index.js
Expand Up @@ -18,6 +18,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-bang-space-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-block-semicolon-newline-after/README.md
@@ -1,5 +1,7 @@
# declaration-block-semicolon-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
Expand Down
Expand Up @@ -20,6 +20,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
@@ -1,5 +1,7 @@
# declaration-block-semicolon-newline-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace before the semicolons of declaration blocks.

<!-- prettier-ignore -->
Expand Down
Expand Up @@ -18,6 +18,7 @@ const messages = ruleMessages(ruleName, {

const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-block-semicolon-newline-before',
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-block-semicolon-space-after/README.md
@@ -1,5 +1,7 @@
# declaration-block-semicolon-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace after the semicolons of declaration blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-block-semicolon-space-after/index.js
Expand Up @@ -22,6 +22,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-block-semicolon-space-before/README.md
@@ -1,5 +1,7 @@
# declaration-block-semicolon-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the semicolons of declaration blocks.

<!-- prettier-ignore -->
Expand Down
Expand Up @@ -23,6 +23,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-block-semicolon-space-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-block-trailing-semicolon/README.md
@@ -1,5 +1,7 @@
# declaration-block-trailing-semicolon

> **Warning** This rule is deprecated and will be removed in the future.

Require or disallow a trailing semicolon within declaration blocks.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-block-trailing-semicolon/index.js
Expand Up @@ -17,6 +17,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-colon-newline-after/README.md
@@ -1,5 +1,7 @@
# declaration-colon-newline-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a newline or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-colon-newline-after/index.js
Expand Up @@ -17,6 +17,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-colon-newline-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-colon-space-after/README.md
@@ -1,5 +1,7 @@
# declaration-colon-space-after

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace after the colon of declarations.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-colon-space-after/index.js
Expand Up @@ -17,6 +17,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-colon-space-after',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down
2 changes: 2 additions & 0 deletions lib/rules/declaration-colon-space-before/README.md
@@ -1,5 +1,7 @@
# declaration-colon-space-before

> **Warning** This rule is deprecated and will be removed in the future.

Require a single space or disallow whitespace before the colon of declarations.

<!-- prettier-ignore -->
Expand Down
1 change: 1 addition & 0 deletions lib/rules/declaration-colon-space-before/index.js
Expand Up @@ -16,6 +16,7 @@ const messages = ruleMessages(ruleName, {
const meta = {
url: 'https://stylelint.io/user-guide/rules/declaration-colon-space-before',
fixable: true,
deprecated: true,
};

/** @type {import('stylelint').Rule} */
Expand Down