Skip to content

Commit

Permalink
Merge pull request #314 from iadvize/NO-TICKET-fix-parser
Browse files Browse the repository at this point in the history
NO-TICKET: fix eslint-config typescript parser
  • Loading branch information
guillaumewuip authored Oct 15, 2020
2 parents cf541ba + 36fe751 commit ed17411
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 91 deletions.
6 changes: 6 additions & 0 deletions packages/eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix typescript parser version
- Fix no-shadow and no-redeclare rules for TS
- Disable require-default-props for TS

## [2.1.0]

### Changed
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config/light-typescript-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ module.exports = {
},
rules: {
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.tsx'] }],
'react/require-default-props': 'off',
},
};
182 changes: 93 additions & 89 deletions packages/eslint-config/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
},
"dependencies": {
"@rushstack/eslint-patch": "^1.0.5",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^3.10.1",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.12.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/eslint-config/shared/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@ module.exports = {
'@typescript-eslint/no-empty-function':
javascriptRules['no-empty-function'],

// 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': airbnbBestPracticesRules['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': airbnbVariablesRules['no-shadow'],

// do not force setting funciton return type
'@typescript-eslint/explicit-function-return-type': 'off',

Expand Down

0 comments on commit ed17411

Please sign in to comment.