Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
chore(deps): upgrade to typescript-eslint v4 (#129)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Update `@typescript-eslint/eslint-plugin` to `^4.0.1`
  • Loading branch information
kripod authored Sep 5, 2020
1 parent c4627e9 commit 0f5adee
Show file tree
Hide file tree
Showing 4 changed files with 580 additions and 1,008 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ npm install eslint-config-airbnb-typescript \
eslint-plugin-jsx-a11y@^6.3.1 \
eslint-plugin-react@^7.20.3 \
eslint-plugin-react-hooks@^4.0.8 \
@typescript-eslint/eslint-plugin@^3.6.1 \
@typescript-eslint/eslint-plugin@^4.0.1 \
--save-dev
```

Expand Down Expand Up @@ -42,7 +42,7 @@ Install dependencies. ESLint plugins [must also be installed](https://github.com
```bash
npm install eslint-config-airbnb-typescript \
eslint-plugin-import@^2.22.0 \
@typescript-eslint/eslint-plugin@^3.6.1 \
@typescript-eslint/eslint-plugin@^4.0.1 \
--save-dev
```

Expand Down
15 changes: 10 additions & 5 deletions lib/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ module.exports = {
'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': baseBestPracticesRules['no-magic-numbers'],

// Replace Airbnb 'no-redeclare' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-redeclare.md
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': baseBestPracticesRules['no-redeclare'],

// Replace Airbnb 'no-shadow' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-shadow.md
'no-shadow': 'off',
'@typescript-eslint/no-shadow': baseVariablesRules['no-shadow'],

// Replace Airbnb 'no-throw-literal' rule with '@typescript-eslint' version
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-throw-literal.md
'no-throw-literal': 'off',
Expand Down Expand Up @@ -183,11 +193,6 @@ module.exports = {
{
files: ['*.ts', '*.tsx'],
rules: {
// Disable `no-undef` rule within TypeScript files because it incorrectly errors when exporting default interfaces
// https://github.com/iamturns/eslint-config-airbnb-typescript/issues/50
// This will be caught by TypeScript compiler if `strictNullChecks` (or `strict`) is enabled
'no-undef': 'off',

/* Using TypeScript makes it safe enough to disable the checks below */

// Disable ESLint-based module resolution check for improved monorepo support
Expand Down
Loading

0 comments on commit 0f5adee

Please sign in to comment.