Skip to content

Commit

Permalink
chore: upgrade all packages (#179)
Browse files Browse the repository at this point in the history
* update node version

* upgrade dependencies

* update react rules

* add import plugin

* upgrade to eslint-config-prettier 8

* put back deps

* deps

* update node to 16
  • Loading branch information
cball authored May 10, 2021
1 parent 700d27c commit c1edf8f
Show file tree
Hide file tree
Showing 6 changed files with 589 additions and 179 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.13.0
16.1.0
1 change: 0 additions & 1 deletion lib/configs/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
},
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
rules: {
Expand Down
1 change: 0 additions & 1 deletion lib/configs/react-native.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
Expand Down
14 changes: 10 additions & 4 deletions lib/configs/react.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
ignorePatterns: ['generated', 'node_modules/', 'types', 'cypress', 'scripts'],
extends: [
'react-app', // from create react app
'plugin:jsx-a11y/recommended',
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended' // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
plugins: ['jsx-a11y', 'react-hooks'],
plugins: ['jsx-a11y', 'react-hooks', 'import'],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
Expand All @@ -17,13 +17,19 @@ module.exports = {
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
// NOTE: once https://github.com/typescript-eslint/typescript-eslint/issues/149
// is merged, we should be able to renable this
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'jsx-a11y/no-onchange': 'off',
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
},
],
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: '*', next: 'return' },
Expand Down
26 changes: 14 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,20 @@
"test": "jest"
},
"dependencies": {
"@react-native-community/eslint-config": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^2.5.0",
"@typescript-eslint/parser": "^2.5.0",
"babel-eslint": "^10.0.1",
"eslint-config-prettier": "^6.5.0",
"eslint-config-react-app": "^5.0.2",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^2.2.0",
"prettier": "^1.19.1"
"@react-native-community/eslint-config": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"babel-eslint": "^10.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.0.0",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-react": "^7.23.2",
"eslint-plugin-react-hooks": "^4.2.0",
"prettier": "^2.2.1"
},
"devDependencies": {
"@babel/core": "^7.4.5",
Expand Down
Loading

0 comments on commit c1edf8f

Please sign in to comment.