Skip to content

Commit 69fb046

Browse files
committed
feat: support ESLint 8.x
BREAKING CHANGE: Requires Node@^12.22.0 || ^14.17.0 || >=16.0.0
1 parent 9cf6351 commit 69fb046

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

.github/workflows/validate.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@ name: validate
22
on:
33
push:
44
branches:
5-
- '+([0-9])?(.{+([0-9]),x}).x'
6-
- 'main'
7-
- 'next'
8-
- 'next-major'
9-
- 'beta'
10-
- 'alpha'
11-
- '!all-contributors/**'
5+
- "+([0-9])?(.{+([0-9]),x}).x"
6+
- "main"
7+
- "next"
8+
- "next-major"
9+
- "beta"
10+
- "alpha"
11+
- "!all-contributors/**"
1212
pull_request: {}
1313
jobs:
1414
main:
1515
# ignore all-contributors PRs
1616
if: ${{ !contains(github.head_ref, 'all-contributors') }}
1717
strategy:
1818
matrix:
19-
node: [12, 14, 16]
19+
node: [12.22, 12, 14.7, 14, "16.0", 16]
20+
eslint: ["6.8", 6, "7.0", 7, 8]
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: 🛑 Cancel Previous Runs
@@ -35,6 +36,9 @@ jobs:
3536
with:
3637
useLockFile: false
3738

39+
- name: Install ESLint v${{ matrix.eslint }}
40+
run: npm install eslint@${{ matrix.eslint }}
41+
3842
- name: ▶️ Run validate script
3943
run: npm run validate
4044

@@ -44,8 +48,7 @@ jobs:
4448
release:
4549
needs: main
4650
runs-on: ubuntu-latest
47-
if:
48-
${{ github.repository == 'testing-library/eslint-plugin-jest-dom' &&
51+
if: ${{ github.repository == 'testing-library/eslint-plugin-jest-dom' &&
4952
contains('refs/heads/main,refs/heads/beta,refs/heads/next,refs/heads/alpha',
5053
github.ref) && github.event_name == 'push' }}
5154
steps:
@@ -73,7 +76,7 @@ jobs:
7376
- name: 🚀 Release
7477
uses: cycjimmy/semantic-release-action@v2
7578
with:
76-
semantic_version: 17
79+
semantic_version: 18
7780
branches: |
7881
[
7982
'+([0-9])?(.{+([0-9]),x}).x',

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,19 @@
4040
"validate": "kcd-scripts validate"
4141
},
4242
"dependencies": {
43-
"@babel/runtime": "^7.15.4",
44-
"@testing-library/dom": "^7.31.2",
43+
"@babel/runtime": "^7.16.3",
44+
"@testing-library/dom": "^8.11.1",
4545
"requireindex": "^1.2.0"
4646
},
4747
"devDependencies": {
48-
"@typescript-eslint/parser": "^4.31.1",
49-
"eslint": "^7.31.0",
48+
"@typescript-eslint/parser": "^5.4.0",
49+
"eslint": "^7.32.0",
5050
"eslint-remote-tester": "^1.3.1",
51-
"jest-extended": "^0.11.5",
5251
"kcd-scripts": "^11.2.2",
53-
"typescript": "^4.4.3"
52+
"typescript": "^4.5.2"
5453
},
5554
"peerDependencies": {
56-
"eslint": ">=6.8"
55+
"eslint": "^6.8.0 || ^7.0.0 || ^8.0.0"
5756
},
5857
"eslintConfig": {
5958
"extends": "./node_modules/kcd-scripts/eslint.js",
@@ -72,7 +71,7 @@
7271
"eslint-remote-tester-results"
7372
],
7473
"engines": {
75-
"node": "^10.12.0 || >=12.0.0",
74+
"node": "^12.22.0 || ^14.17.0 || >=16.0.0",
7675
"npm": ">=6",
7776
"yarn": ">=1"
7877
}

src/__tests__/index.test.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { rules, generateRecommendedConfig } from "../index";
2-
import "jest-extended";
1+
import { rules, generateRecommendedConfig } from "../";
32

43
it("should have all the rules", () => {
54
expect(Object.keys(rules).length).toBeGreaterThan(0);
@@ -8,9 +7,9 @@ it("should have all the rules", () => {
87
it.each(Object.keys(rules))("%s should export required fields", (ruleName) => {
98
const rule = rules[ruleName];
109
expect(rule).toHaveProperty("create", expect.any(Function));
11-
expect(rule.meta.docs.url).not.toBeEmpty();
10+
expect(rule.meta.docs.url).not.toBe("");
1211
expect(rule.meta.docs.category).toBe("Best Practices");
13-
expect(rule.meta.docs.description).not.toBeEmpty();
12+
expect(rule.meta.docs.description).not.toBe("");
1413
});
1514

1615
it("should have a recommended config with recommended rules", () => {

0 commit comments

Comments
 (0)