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

Remove 76 rules deprecated in 15.0.0 #6979

Merged
merged 16 commits into from Jun 29, 2023
Merged

Remove 76 rules deprecated in 15.0.0 #6979

merged 16 commits into from Jun 29, 2023

Conversation

mattxwang
Copy link
Member

@mattxwang mattxwang commented Jun 26, 2023

Which issue, if any, is this issue related to?

Closes #6961.

Is there anything in the PR that needs further explanation?

I apologize for how large this change is 😅 I'm not sure if this is easier to review (since it is clean + accomplishes it in one go), or if we'd prefer one that splits them up piecemeal (e.g. into sections) - let me know what we'd prefer!


I'll quickly explain the methodology for this PR:

  1. remove each lib/rules/* for each deprecated test
  2. remove each (now invalid) path from lib/rules/index.js
  3. fix all broken tests, which fall into one of several categories:
    • tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually color-named for color-hex-case and number-max-precision for indentation)
      • one of these is about a custom plugin, so I've rewritten the plugin
    • tests that are about deprecated rules; I added a .skip (have left comments in the review)
    • fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      • the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    • indentation-specific behaviour (it being last); I deleted these!
  4. remove all documentation related to removed rules (mostly indentation)
  5. remove all unused utilities (via code coverage, not manual inspection)

Methodology:

- remove each `lib/rules/*` for each deprecated test
- remove each (now invalid) path from `lib/rules/index.js`
- fix all broken tests, which fall into one of several categories:
  - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
  - tests that are *about* deprecated rules; I added a `.skip`
  - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
    - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
  - `indentation`-specific behaviour (it being last); I deleted this

In contrast, I have not:

- removed now-unused utilities
- removed now-unused packages (not sure if these exist)
@changeset-bot
Copy link

changeset-bot bot commented Jun 26, 2023

🦋 Changeset detected

Latest commit: aef7b5e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

lib/rules/__tests__/index.test.mjs Outdated Show resolved Hide resolved
lib/__tests__/standalone-fix.test.mjs Show resolved Hide resolved
lib/__tests__/standalone-fix.test.mjs Outdated Show resolved Hide resolved
@ybiquitous
Copy link
Member

How about creating a v16 branch? Maybe we should keep the main branch for minor changes like bugfixes.

@mattxwang
Copy link
Member Author

Sounds good! I'll wrap up one more local change and then retarget this PR!

@mattxwang mattxwang changed the base branch from main to v16 June 26, 2023 01:54
@mattxwang mattxwang mentioned this pull request Jun 26, 2023
10 tasks
@mattxwang mattxwang marked this pull request as ready for review June 26, 2023 02:44
docs/migration-guide/to-15.md Outdated Show resolved Hide resolved
docs/migration-guide/to-15.md Outdated Show resolved Hide resolved
Co-authored-by: Masafumi Koba <473530+ybiquitous@users.noreply.github.com>
@ybiquitous
Copy link
Member

[ask] Just to confirm about Part of #6961, do you have a plan for follow-up PRs?

@jeddy3
Copy link
Member

jeddy3 commented Jun 26, 2023

@mattxwang Thanks for getting the ball rolling on this!

I've pushed a commit to move the list of deprecated rules into the corresponding section of the 15.0.0 migration guide. We can include a link to the section from our migrating to 16.0.0 guide, which we should create as part of this pull request. Something along the lines of "We've removed the stylistic rules we deprecated in 15.0.0. See the 15.0.0 migration guide for details of how to migrate".

Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Can any of the dependencies be removed? I suspect style-search is redundant, as only the older stylistic rules used it.

.changeset/rare-squids-tell.md Outdated Show resolved Hide resolved
@ybiquitous
Copy link
Member

I suspect style-search is redundant, as only the older stylistic rules used it.

Agree. 👍🏼

FYI, here's the output of the tool depcheck:

$ npx depcheck@latest
...
Unused dependencies
* style-search
...

(also @types/style-search)

@Mouvedia
Copy link
Member

Since no one was against tackling them all at once, I surmise this PR can be reviewed.

@Mouvedia
Copy link
Member

You forgot a mention of indentation here. You should grep the rules on the docs folder.
Also depending on the number of tests left you will have to edit that line.

ybiquitous pushed a commit that referenced this pull request Jul 8, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 8, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 8, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 13, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 13, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 20, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 20, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 24, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 24, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 25, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 25, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 26, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 26, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 26, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 26, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Jul 27, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Jul 27, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Aug 12, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Aug 12, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Aug 14, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Aug 14, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Aug 27, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Aug 27, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Aug 27, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Aug 27, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Sep 28, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Sep 28, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
ybiquitous pushed a commit that referenced this pull request Oct 19, 2023
I'll quickly explain the methodology for this PR:

1. remove each `lib/rules/*` for each deprecated test
2. remove each (now invalid) path from `lib/rules/index.js`
3. fix all broken tests, which fall into one of several categories:
    - tests that use a deprecated rule as an arbitrary rule; to resolve this, I just picked a different rule (usually `color-named` for `color-hex-case` and `number-max-precision` for `indentation`)
        - one of these is about a custom plugin, so I've rewritten the plugin
    - tests that are *about* deprecated rules; I added a `.skip` (have left comments in the review)
    - fs tests that use deprecated rules; I removed these from the config, then updated the snapshot.
      - the zen garden one doesn't work "out of the box" anymore, i.e. the snapshot has nontrivially changed because of indentation/spacing rules
    - `indentation`-specific behaviour (it being last); I deleted these!
4. remove all documentation related to removed rules (mostly `indentation`)
5. remove all unused utilities (via code coverage, not manual inspection)
ybiquitous pushed a commit that referenced this pull request Oct 19, 2023
Ref: #6979 (comment)

Re-running the script indicates no newly-unused files:

```sh
$ node scripts/find-unused-modules.mjs
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants