UNPKG

react-storage-hooks

Version:
143 lines (142 loc) 3.5 kB
{ "name": "react-storage-hooks", "version": "4.0.1", "description": "React hooks for persistent state", "keywords": [ "react", "react-hooks", "persistent", "useState", "useReducer", "storage", "localstorage", "sessionstorage" ], "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "lint": "eslint src/*.ts", "fmt": "prettier --check *.md *.json src/*.ts", "types": "tsd", "test": "jest", "test:watch": "npm test -- --watch", "test:coverage": "npm test -- --coverage", "test:staged": "npm test -- --findRelatedTests --bail", "prebuild": "del dist", "build": "tsc", "build:watch": "npm run build -- --watch", "size": "size-limit", "precheck": "npm run build", "check": "run-s lint fmt types test:coverage size", "examples:setup": "cd examples && npm install && npm link ../.", "examples:start": "cd examples && npm start", "examples:watch": "run-p build:watch examples:start", "prerelease": "npm run check", "release": "git push --follow-tags origin master" }, "files": [ "dist", "dist/index.d.ts" ], "author": "Ramón Guijarro <hola@soyguijarro.com>", "license": "MIT", "repository": "https://github.com/soyguijarro/react-storage-hooks", "peerDependencies": { "react": "^16.8.0" }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "prettier": { "singleQuote": true }, "eslintConfig": { "parser": "@typescript-eslint/parser", "plugins": [ "@typescript-eslint", "react-hooks" ], "extends": [ "plugin:@typescript-eslint/recommended", "plugin:react-app/recommended", "prettier", "prettier/@typescript-eslint" ], "rules": { "no-console": "error", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "error", "@typescript-eslint/explicit-function-return-type": "off" }, "settings": { "react": { "version": "detect" } } }, "lint-staged": { "*.{md,json}": "prettier --write", "*.ts": [ "prettier --write", "eslint --fix", "npm run test:staged" ] }, "jest": { "moduleFileExtensions": [ "ts", "js" ], "preset": "ts-jest", "testMatch": [ "**/src/tests/*.test.ts" ], "coveragePathIgnorePatterns": [ "/node_modules/", "<rootDir>/src/tests/" ], "coverageThreshold": { "global": { "branches": 100, "functions": 100, "lines": 100, "statements": 100 } } }, "tsd": { "directory": "src" }, "size-limit": [ { "limit": "700 B", "path": "dist/index.js" } ], "devDependencies": { "@size-limit/preset-small-lib": "^4.4.5", "@testing-library/react-hooks": "^3.2.1", "@types/jest": "^25.2.1", "@types/react": "^16.9.34", "@typescript-eslint/eslint-plugin": "^2.28.0", "@typescript-eslint/parser": "^2.28.0", "del-cli": "^3.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.10.1", "eslint-plugin-react-app": "^6.2.2", "eslint-plugin-react-hooks": "^3.0.0", "husky": "^4.2.5", "jest": "^25.3.0", "lint-staged": "^10.1.5", "npm-run-all": "^4.1.5", "prettier": "^2.0.4", "react": "^16.13.1", "react-test-renderer": "^16.13.1", "size-limit": "^4.4.5", "ts-jest": "^25.4.0", "tsd": "^0.11.0", "typescript": "^3.8.3" } }