Skip to content

Commit 3f2cc25

Browse files
authored
feat(eslint-config): add eslint-plugin-deprecation to typescript config (#1064)
* feat(eslint-config): add eslint-plugin-deprecation to typescript config * fix: upgrade config
1 parent 64969d9 commit 3f2cc25

File tree

4 files changed

+2286
-6233
lines changed

4 files changed

+2286
-6233
lines changed

.eslintrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
22
"root": true,
3-
"parser": "@babel/eslint-parser",
43
"env": {
54
"browser": true,
65
"jest": true
76
},
8-
"extends": "./packages/eslint-config-react/index.js",
97
"rules": {
108
"import/no-extraneous-dependencies": [
119
"error",
@@ -15,6 +13,11 @@
1513
]
1614
},
1715
"overrides": [
16+
{
17+
"parser": "@babel/eslint-parser",
18+
"files": ["*.js", "*.mjs"],
19+
"extends": "./packages/eslint-config-react/index.js"
20+
},
1821
{
1922
"files": ["*.ts", "*.tsx"],
2023
"parserOptions": {

packages/eslint-config-react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"eslint-config-airbnb": "19.0.4",
2323
"eslint-config-airbnb-typescript": "17.0.0",
2424
"eslint-config-prettier": "8.5.0",
25+
"eslint-plugin-deprecation": "^1.3.2",
2526
"eslint-plugin-eslint-comments": "3.2.0",
2627
"eslint-plugin-import": "2.26.0",
2728
"eslint-plugin-jsx-a11y": "6.6.1",

packages/eslint-config-react/typescript.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ module.exports = {
66
'plugin:@typescript-eslint/recommended-requiring-type-checking',
77
require.resolve('./shared'),
88
],
9-
plugins: ['@typescript-eslint'],
9+
plugins: ['deprecation', '@typescript-eslint'],
1010
rules: {
11+
'deprecation/deprecation': 'warn',
1112
// https://github.com/typescript-eslint/typescript-eslint/issues/4619
1213
'@typescript-eslint/no-misused-promises': [
1314
'error',

0 commit comments

Comments
 (0)