Skip to content

Commit f14cd45

Browse files
committed
chore!: upgrade dependenciesBREAKING CHANGE: use of extends in overrides which requires eslint 6.0.0 or greater
1 parent 7bbcacf commit f14cd45

File tree

9 files changed

+1296
-797
lines changed

9 files changed

+1296
-797
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# v3.0.0
2+
[link](https://github.com/weirdpattern/eslint-config-typescript/compare/v2.0.0...v3.0.0)
3+
4+
This release contains **breaking changes**
5+
6+
* Update dependencies
7+
* Introduce `overrides` in configurations that are exclusive to `typescript`
8+
* This requires an upgrade to eslint 6.0.0 to support `extends` in `overrides`
9+
110
# v2.0.0
211
[link](https://github.com/weirdpattern/eslint-config-typescript/compare/v1.1.0...v2.0.0)
312

package.json

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"license": "MIT",
3-
"version": "2.0.0",
3+
"version": "3.0.0",
44
"name": "eslint-config-typescript",
55
"description": "A base set of recommended ESLint rules for TypeScript projects",
66
"author": "Patricio Trevino <patricio@weirdpattern.com>",
@@ -25,28 +25,29 @@
2525
"react.js"
2626
],
2727
"devDependencies": {
28-
"@types/node": "^10.12.21",
29-
"@typescript-eslint/eslint-plugin": "^1.2.0",
30-
"@typescript-eslint/parser": "^1.2.0",
28+
"@types/node": "^12.0.12",
29+
"@typescript-eslint/eslint-plugin": "^1.11.0",
30+
"@typescript-eslint/parser": "^1.11.0",
3131
"create-react-class": "^15.6.3",
3232
"cross-spawn": "^6.0.5",
33-
"eslint": "^5.13.0",
34-
"eslint-config-prettier": "^4.0.0",
33+
"eslint": "^6.0.1",
34+
"eslint-config-prettier": "^6.0.0",
3535
"eslint-plugin-filenames": "^1.3.2",
36-
"eslint-plugin-jsdoc": "^4.1.0",
37-
"eslint-plugin-prettier": "^3.0.1",
38-
"eslint-plugin-react": "^7.12.4",
39-
"husky": "^1.3.1",
40-
"jest": "^24.0.0",
41-
"lint-staged": "^8.1.2",
42-
"prettier": "^1.16.3",
43-
"typescript": "^3.2.1"
36+
"eslint-plugin-jsdoc": "^10.3.0",
37+
"eslint-plugin-prettier": "^3.1.0",
38+
"eslint-plugin-react": "^7.14.2",
39+
"escape-regex-string": "^1.0.6",
40+
"husky": "^3.0.0",
41+
"jest": "^24.8.0",
42+
"lint-staged": "^9.0.2",
43+
"prettier": "^1.18.2",
44+
"typescript": "^3.5.2"
4445
},
4546
"peerDependencies": {
46-
"@typescript-eslint/eslint-plugin": ">=1.0.0",
47-
"@typescript-eslint/parser": ">=1.0.0",
48-
"eslint": ">=5.0.0",
49-
"typescript": ">=3.2.1"
47+
"@typescript-eslint/eslint-plugin": ">=1.8.0",
48+
"@typescript-eslint/parser": ">=1.8.0",
49+
"eslint": ">=6.0.0",
50+
"typescript": "*"
5051
},
5152
"scripts": {
5253
"lint": "eslint .",

specs/config.prettier-react.specs.js

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,24 @@ describe("config", () => {
6868
const config = require("../prettier-react");
6969

7070
expect(config).toBeDefined();
71-
expect(config.extends).toContain("plugin:prettier/recommended");
72-
expect(config.extends).toContain("prettier/@typescript-eslint");
73-
expect(config.extends).toContain("prettier/react");
71+
expect(config).toMatchInlineSnapshot(`
72+
Object {
73+
"extends": Array [
74+
"plugin:prettier/recommended",
75+
"prettier/react",
76+
],
77+
"overrides": Array [
78+
Object {
79+
"extends": Array [
80+
"prettier/@typescript-eslint",
81+
],
82+
"files": Array [
83+
"*.ts",
84+
"*.tsx",
85+
],
86+
},
87+
],
88+
}
89+
`);
7490
});
7591
});

specs/config.prettier.specs.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,23 @@ describe("config", () => {
6969
const config = require("../prettier");
7070

7171
expect(config).toBeDefined();
72-
expect(config.extends).toContain("plugin:prettier/recommended");
73-
expect(config.extends).toContain("prettier/@typescript-eslint");
72+
expect(config).toMatchInlineSnapshot(`
73+
Object {
74+
"extends": Array [
75+
"plugin:prettier/recommended",
76+
],
77+
"overrides": Array [
78+
Object {
79+
"extends": Array [
80+
"prettier/@typescript-eslint",
81+
],
82+
"files": Array [
83+
"*.ts",
84+
"*.tsx",
85+
],
86+
},
87+
],
88+
}
89+
`);
7490
});
7591
});

specs/config.react.specs.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ describe("config", () => {
6868
const config = require("../react");
6969

7070
expect(config).toBeDefined();
71-
expect(config.extends).toContain("plugin:react/recommended");
71+
expect(config).toMatchInlineSnapshot(`
72+
Object {
73+
"extends": Array [
74+
"plugin:react/recommended",
75+
],
76+
}
77+
`);
7278
});
7379
});

specs/config.specs.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,22 @@ describe("config", () => {
7171
const config = require("../index");
7272

7373
expect(config).toBeDefined();
74-
expect(config.extends).toContain("eslint:recommended");
75-
expect(config.extends).toContain("plugin:@typescript-eslint/recommended");
74+
expect(config).toMatchInlineSnapshot(`
75+
Object {
76+
"overrides": Array [
77+
Object {
78+
"extends": Array [
79+
"eslint:recommended",
80+
"plugin:@typescript-eslint/eslint-recommended",
81+
"plugin:@typescript-eslint/recommended",
82+
],
83+
"files": Array [
84+
"*.ts",
85+
"*.tsx",
86+
],
87+
},
88+
],
89+
}
90+
`);
7691
});
7792
});

src/prettier.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,11 @@
99
"use strict";
1010

1111
module.exports = {
12-
extends: ["plugin:prettier/recommended", "prettier/@typescript-eslint"]
12+
extends: ["plugin:prettier/recommended"],
13+
overrides: [
14+
{
15+
files: ["*.ts", "*.tsx"],
16+
extends: ["prettier/@typescript-eslint"]
17+
}
18+
]
1319
};

src/typescript.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,14 @@
99
"use strict";
1010

1111
module.exports = {
12-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"]
12+
overrides: [
13+
{
14+
files: ["*.ts", "*.tsx"],
15+
extends: [
16+
"eslint:recommended",
17+
"plugin:@typescript-eslint/eslint-recommended",
18+
"plugin:@typescript-eslint/recommended"
19+
]
20+
}
21+
]
1322
};

0 commit comments

Comments
 (0)