Skip to content

Commit

Permalink
Merge pull request #107 from hipstersmoothie/reinitialize-glider
Browse files Browse the repository at this point in the history
Updated useEffect dependencies to reinitialize when a prop has changed
  • Loading branch information
kevinfarrugia authored Feb 28, 2022
2 parents 11ca832 + 2dbeaef commit b9f7e4f
Show file tree
Hide file tree
Showing 8 changed files with 1,513 additions and 328 deletions.
50 changes: 50 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"extends": [
"airbnb",
"prettier",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": { "Glider": true },
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"rules": {
"import/prefer-default-export": [0],
"class-methods-use-this": [0],
"react/prop-types": [0],
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
"import/no-extraneous-dependencies": ["error", { "packageDir": "." }],
// https://eslint.org/docs/rules/no-console
"no-console": [
"error",
{
"allow": ["warn", "error", "info"]
}
],
// http://eslint.org/docs/rules/prefer-destructuring
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
},
{
"enforceForRenamedProperties": false
}
],
"prettier/prettier": "error",
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"react/require-default-props": 0,
"react/function-component-definition": 0,
"import/extensions": 0
}
}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
node_modules/
coverage
.cache
build
dist
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"license": "MIT",
"scripts": {
"lint": "tslint -p . --format stylish",
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" src/*",
"build": "tsc",
"storybook": "start-storybook -p 9001 -c .storybook",
"deploy-storybook": "storybook-to-ghpages",
Expand All @@ -33,27 +33,33 @@
"@storybook/addon-storysource": "^5.3.19",
"@storybook/react": "^5.3.19",
"@storybook/storybook-deployer": "2.8.1",
"@types/glider-js": "^1.7.6",
"@types/jest": "23.3.11",
"@types/lodash.times": "^4.3.4",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"auto": "^10.3.0",
"auto-config-hipstersmoothie": "^4.0.0",
"awesome-typescript-loader": "5.2.1",
"babel-core": "6.26.3",
"babel-eslint": "^10.1.0",
"babel-loader": "8.0.4",
"eslint": "^8.10.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.2",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "1.3.1",
"jest": "23.6.0",
"lint-staged": "8.1.0",
"lodash.times": "^4.3.2",
"prettier": "^2.0.5",
"react": "^16.13.1",
"react-docgen-typescript-webpack-plugin": "1.1.0",
"react-dom": "^16.13.1",
"ts-jest": "23.10.5",
"tslint": "5.12.0",
"tslint-config-prettier": "1.17.0",
"tslint-xo": "0.11.0",
"typescript": "^3.9.3",
"typescript-tslint-plugin": "0.2.1",
"webpack": "4.28.3"
},
"prettier": {
Expand All @@ -65,8 +71,8 @@
}
},
"lint-staged": {
"*.{js,json,css,md}": [
"prettier --write",
"*.{js,ts,jsx,tsx}": [
"eslint --no-ignore --fix",
"git add"
]
},
Expand Down
Loading

0 comments on commit b9f7e4f

Please sign in to comment.