Skip to content

Commit

Permalink
Update dependencies, enable react-hooks plugin and customize rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bedrich-schindler committed Mar 3, 2020
1 parent efa9de1 commit d162081
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 58 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![dependencies Status](https://david-dm.org/visionappscz/eslint-config-visionapps/status.svg)](https://david-dm.org/visionappscz/eslint-config-visionapps)
[![peerDependency Status](https://david-dm.org/visionappscz/eslint-config-visionapps/peer-status.svg)](https://david-dm.org/visionappscz/eslint-config-visionapps?type=peer)

VisionApps' shareable config for [eslint](https://github.com/eslint/eslint) that extends [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) and
VisionApps' shareable config for [eslint](https://github.com/eslint/eslint) that extends [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb),
[react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) and
[eslint-plugin-promise](https://www.npmjs.com/package/eslint-plugin-promise) with
[more strict rules](./index.js).
19 changes: 14 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
module.exports = {
parserOptions: {
ecmaVersion: 9,
ecmaVersion: 11,
sourceType: 'module'
},
extends: [
'airbnb',
'plugin:promise/recommended'
'plugin:promise/recommended',

],
plugins: [
'react-hooks'
],
rules: {
'import/order': ['error', {
'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index']
}],
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'object-curly-newline': ['error', {
'multiline': true,
'minProperties': 2,
'consistent': true
}],
'object-curly-spacing': ['error', 'always'],
'object-property-newline': ['error', { 'allowMultiplePropertiesPerLine': false }],
'sort-keys': ['error', 'asc'],
'no-undef-init': ['error']
'no-multiple-empty-lines': ['error', { 'max': 1 }],
'no-undef-init': ['error'],
'promise/catch-or-return': ['off'],
'promise/no-nesting': ['off'],
'react/jsx-props-no-spreading': ['off'],
'react-hooks/exhaustive-deps': ['error'],
'react-hooks/rules-of-hooks': ['error'],
'sort-keys': ['error', 'asc']
}
};
95 changes: 48 additions & 47 deletions package-lock.json

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

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visionappscz/eslint-config-visionapps",
"version": "1.1.2",
"version": "1.2.0",
"description": "VisionApps' shareable config for eslint.",
"keywords": [
"eslint",
Expand Down Expand Up @@ -29,11 +29,11 @@
"eslint-plugin-promise": "^4.2.1"
},
"peerDependencies": {
"eslint": "^6.3.0",
"eslint-plugin-import": "^2.18.2",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^2.0.1"
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^2.5.0"
},
"engines": {
"node": ">= 6"
Expand Down

0 comments on commit d162081

Please sign in to comment.