diff --git a/.eslintrc.json b/.eslintrc.json index 23a2297..6bc13d1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,50 +1,40 @@ { - "parser": "@typescript-eslint/parser", "extends": [ - "standard", - "plugin:promise/recommended", - "plugin:jsx-a11y/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended" + "collaborne", + "plugin:storybook/recommended" ], - "env": { - "node": true - }, - "parserOptions": { - "ecmaVersion": 2020, - "ecmaFeatures": { - "legacyDecorators": true, - "jsx": true + "overrides": [ + { + "files": [ + "**/*.ts", + "**/*.tsx" + ], + "extends": [ + "standard", + "prettier", + "collaborne" + ], + "env": { + "node": false + }, + "plugins": [ + "react", + "react-hooks", + "@typescript-eslint" + ], + "rules": { + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn" + } + }, + { + "files": [ + ".storybook/**/*.ts", + ".storybook/**/*.tsx" + ], + "parserOptions": { + "project": "tsconfig.test.json" + } } - }, - "settings": { - "react": { - "version": "17" - } - }, - "plugins": [ - "import", - "jsx-a11y", - "react", - "react-hooks" - ], - "rules": { - "space-before-function-paren": 0, - "react/prop-types": 0, - "react/jsx-handler-names": 0, - "react/jsx-fragments": 0, - "react/jsx-no-bind": "off", - "react/jsx-uses-react": "off", - "react/no-unused-prop-types": 0, - "react/react-in-jsx-scope": "off", - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn", - "import/export": 0, - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-empty-interface": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": ["error"], - "no-use-before-define": "off", - "@typescript-eslint/no-use-before-define": ["error"] - } + ] } diff --git a/.prettierrc b/.prettierrc index a160dba..9638dcd 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,10 +1,11 @@ { - "singleQuote": true, - "jsxSingleQuote": false, - "semi": true, - "tabWidth": 2, - "bracketSpacing": true, - "jsxBracketSameLine": false, - "arrowParens": "avoid", - "trailingComma": "all" + "singleQuote": true, + "jsxSingleQuote": false, + "semi": true, + "tabWidth": 2, + "useTabs": true, + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "avoid", + "trailingComma": "all" } diff --git a/.storybook/stories/custom-column.stories.tsx b/.storybook/stories/custom-column.stories.tsx index afb0d6c..b4392bd 100644 --- a/.storybook/stories/custom-column.stories.tsx +++ b/.storybook/stories/custom-column.stories.tsx @@ -1,7 +1,7 @@ -import { createElement, useCallback } from 'react'; -import { action } from '@storybook/addon-actions'; -import IconButton from '@mui/material/IconButton'; import CallToAction from '@mui/icons-material/CallToAction'; +import IconButton from '@mui/material/IconButton'; +import { action } from '@storybook/addon-actions'; +import { createElement, useCallback } from 'react'; import { Board, Column } from '../../src'; diff --git a/.storybook/stories/external-change.stories.tsx b/.storybook/stories/external-change.stories.tsx index 6b2ad31..a11c4eb 100644 --- a/.storybook/stories/external-change.stories.tsx +++ b/.storybook/stories/external-change.stories.tsx @@ -1,5 +1,5 @@ -import { useCallback, useState } from 'react'; import Button from '@mui/material/Button'; +import { useCallback, useState } from 'react'; import { Board } from '../../src'; diff --git a/.storybook/stories/generic-data.stories.tsx b/.storybook/stories/generic-data.stories.tsx index cf9e249..56a9fce 100644 --- a/.storybook/stories/generic-data.stories.tsx +++ b/.storybook/stories/generic-data.stories.tsx @@ -1,6 +1,6 @@ -import { useCallback, useState } from 'react'; import MaterialCard from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; +import { useCallback, useState } from 'react'; import { Board, Card, Column } from '../../src'; diff --git a/.storybook/stories/utils/with-theme.tsx b/.storybook/stories/utils/with-theme.tsx index eb03739..1d27495 100644 --- a/.storybook/stories/utils/with-theme.tsx +++ b/.storybook/stories/utils/with-theme.tsx @@ -1,7 +1,6 @@ import { createTheme, CssBaseline } from '@mui/material'; import { ThemeProvider } from '@mui/material/styles'; import { StoryFn } from '@storybook/react'; - import type { StoryContext } from '@storybook/types'; const theme = createTheme({ diff --git a/package-lock.json b/package-lock.json index b5e2094..19a4682 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "chromatic": "^11.2.0", "cross-env": "^7.0.3", "eslint": "^8.18.0", + "eslint-config-collaborne": "^5.4.10", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.5.1", @@ -43,6 +44,7 @@ "eslint-plugin-react": "^7.30.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-standard": "^4.1.0", + "eslint-plugin-storybook": "^0.11.0", "gh-pages": "^4.0.0", "npm-run-all": "^4.1.5", "prettier": "^2.7.1", @@ -4412,9 +4414,9 @@ } }, "node_modules/@storybook/csf": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.3.tgz", - "integrity": "sha512-IPZvXXo4b3G+gpmgBSBqVM81jbp2ePOKsvhgJdhyZJtkYQCII7rg9KKLQhvBQM5sLaF1eU6r0iuwmyynC9d9SA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.11.tgz", + "integrity": "sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==", "dev": true, "dependencies": { "type-fest": "^2.19.0" @@ -7944,6 +7946,39 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint-config-collaborne": { + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/eslint-config-collaborne/-/eslint-config-collaborne-5.4.10.tgz", + "integrity": "sha512-eD1CjN9uqZkSODlSmnOYEe/Ky93HR9u2kh1/4ML1B0J4H42h5c8obeJ2yHi9UQpvIafjpDfL9L2DxJUUuiTX2Q==", + "dev": true, + "dependencies": { + "eslint-config-prettier": "^9.1.0", + "eslint-config-standard": "^17.1.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.29.0 || ^6.0.0 || ^7.0.0", + "@typescript-eslint/parser": "^5.29.0 || ^6.0.0 || ^7.0.0", + "eslint": ">= 8", + "eslint-plugin-disable": "^2.0.3", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-promise": "^6.0.0", + "prettier": "^2.7.1" + } + }, + "node_modules/eslint-config-collaborne/node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, "node_modules/eslint-config-prettier": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", @@ -8055,6 +8090,19 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-plugin-disable": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-disable/-/eslint-plugin-disable-2.0.3.tgz", + "integrity": "sha512-JWT4TPhcIhd8jcwACbsDValvAtHl7BQDhbTZC40vqcp4Fciz2oTnEAFtOCGojdskviN3VGOObVCrjjWe8DGYIg==", + "dev": true, + "peer": true, + "dependencies": { + "resolve": "^1.1.6" + }, + "peerDependencies": { + "eslint": ">=0.16.0" + } + }, "node_modules/eslint-plugin-es": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", @@ -8422,6 +8470,156 @@ "eslint": ">=5.0.0" } }, + "node_modules/eslint-plugin-storybook": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.11.0.tgz", + "integrity": "sha512-MvPJgF+ORwgK04a1CY5itO4pwdAOFIRqczlNEHL62+4Ocvj1d61GWRqIdeX1BNCKno6fdPC6TksUHCZMGsq26g==", + "dev": true, + "dependencies": { + "@storybook/csf": "^0.1.11", + "@typescript-eslint/utils": "^8.8.1", + "ts-dedent": "^2.2.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "eslint": ">=6" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/scope-manager": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", + "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/types": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/utils": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", + "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.14.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/eslint-plugin-storybook/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -8940,9 +9138,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -14704,6 +14902,18 @@ "node": ">=0.8.0" } }, + "node_modules/ts-api-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", @@ -18498,9 +18708,9 @@ } }, "@storybook/csf": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.3.tgz", - "integrity": "sha512-IPZvXXo4b3G+gpmgBSBqVM81jbp2ePOKsvhgJdhyZJtkYQCII7rg9KKLQhvBQM5sLaF1eU6r0iuwmyynC9d9SA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.11.tgz", + "integrity": "sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==", "dev": true, "requires": { "type-fest": "^2.19.0" @@ -21221,6 +21431,25 @@ } } }, + "eslint-config-collaborne": { + "version": "5.4.10", + "resolved": "https://registry.npmjs.org/eslint-config-collaborne/-/eslint-config-collaborne-5.4.10.tgz", + "integrity": "sha512-eD1CjN9uqZkSODlSmnOYEe/Ky93HR9u2kh1/4ML1B0J4H42h5c8obeJ2yHi9UQpvIafjpDfL9L2DxJUUuiTX2Q==", + "dev": true, + "requires": { + "eslint-config-prettier": "^9.1.0", + "eslint-config-standard": "^17.1.0" + }, + "dependencies": { + "eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "requires": {} + } + } + }, "eslint-config-prettier": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", @@ -21284,6 +21513,16 @@ } } }, + "eslint-plugin-disable": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-disable/-/eslint-plugin-disable-2.0.3.tgz", + "integrity": "sha512-JWT4TPhcIhd8jcwACbsDValvAtHl7BQDhbTZC40vqcp4Fciz2oTnEAFtOCGojdskviN3VGOObVCrjjWe8DGYIg==", + "dev": true, + "peer": true, + "requires": { + "resolve": "^1.1.6" + } + }, "eslint-plugin-es": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", @@ -21535,6 +21774,97 @@ "dev": true, "requires": {} }, + "eslint-plugin-storybook": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-storybook/-/eslint-plugin-storybook-0.11.0.tgz", + "integrity": "sha512-MvPJgF+ORwgK04a1CY5itO4pwdAOFIRqczlNEHL62+4Ocvj1d61GWRqIdeX1BNCKno6fdPC6TksUHCZMGsq26g==", + "dev": true, + "requires": { + "@storybook/csf": "^0.1.11", + "@typescript-eslint/utils": "^8.8.1", + "ts-dedent": "^2.2.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.14.0.tgz", + "integrity": "sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0" + } + }, + "@typescript-eslint/types": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.14.0.tgz", + "integrity": "sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz", + "integrity": "sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/visitor-keys": "8.14.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + } + }, + "@typescript-eslint/utils": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.14.0.tgz", + "integrity": "sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.14.0", + "@typescript-eslint/types": "8.14.0", + "@typescript-eslint/typescript-estree": "8.14.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz", + "integrity": "sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "8.14.0", + "eslint-visitor-keys": "^3.4.3" + } + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true + } + } + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -21845,9 +22175,9 @@ "dev": true }, "fast-glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", - "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -26101,6 +26431,13 @@ } } }, + "ts-api-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.0.tgz", + "integrity": "sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==", + "dev": true, + "requires": {} + }, "ts-dedent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.2.0.tgz", diff --git a/package.json b/package.json index 31fa914..c5246bc 100644 --- a/package.json +++ b/package.json @@ -1,92 +1,94 @@ { - "name": "@collaborne/material-kanban", - "version": "2.2.14", - "description": "Material styled Kanban board", - "author": "Collaborne", - "license": "MIT", - "repository": "Collaborne/material-kanban", - "main": "dist/index.js", - "source": "src/index.tsx", - "engines": { - "npm": ">=8.3.0", - "node": ">=10" - }, - "scripts": { - "build": "tsc --noEmit false", - "build:watch": "npm run build -- --watch", - "lint": "npx eslint --report-unused-disable-directives $(node -p 'require(\"./tsconfig.test.json\").include.map(include => `'\\${include}.\\{js,ts,tsx\\}'`).join(\" \")')", - "test": "npm run lint", - "predeploy": "run-s storybook:build", - "deploy": "gh-pages -d storybook-static -b deploy/gh-pages", - "storybook": "NODE_OPTIONS=\"${NODE_OPTIONS} --openssl-legacy-provider\" storybook dev -p 9009", - "storybook:build": "NODE_OPTIONS=\"${NODE_OPTIONS} --openssl-legacy-provider\" storybook build --quiet" - }, - "peerDependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", - "@mui/icons-material": "^5.10.9", - "@mui/material": "^5.10.11", - "react": "^17.0.0 || ^18.0.0", - "tss-react": "^4.4.0" - }, - "devDependencies": { - "@emotion/react": "^11.10.5", - "@emotion/styled": "^11.10.5", - "@mui/icons-material": "^5.10.9", - "@mui/material": "^5.10.11", - "@storybook/addon-actions": "^8.0.4", - "@storybook/addon-backgrounds": "^8.0.4", - "@storybook/react": "^8.0.4", - "@storybook/react-vite": "^8.0.4", - "@testing-library/jest-dom": "6.4.2", - "@testing-library/react": "^13.3.0", - "@testing-library/user-event": "^14.2.1", - "@types/jest": "^28.1.2", - "@types/node": "^18.0.0", - "@types/react": "^18.0.14", - "@types/react-dom": "^18.0.5", - "@typescript-eslint/eslint-plugin": "^5.29.0", - "@typescript-eslint/parser": "^5.29.0", - "@vitejs/plugin-react": "^4.2.1", - "chromatic": "^11.2.0", - "cross-env": "^7.0.3", - "eslint": "^8.18.0", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.0.0", - "eslint-plugin-react": "^7.30.0", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-standard": "^4.1.0", - "gh-pages": "^4.0.0", - "npm-run-all": "^4.1.5", - "prettier": "^2.7.1", - "react": "^18.2.0", - "react-dom": "^18.2.0", - "react-is": "^18.2.0", - "standard": "^17.1.0", - "storybook": "^8.0.4", - "tss-react": "^4.4.0", - "typescript": "^5.1.6" - }, - "dependencies": { - "@types/react-beautiful-dnd": "^13.1.2", - "react-beautiful-dnd": "^13.1.0" - }, - "overrides": { - "react-beautiful-dnd": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0" - }, - "eslint-config-standard-react": { - "eslint": "^8" - } - }, - "files": [ - "dist", - "src", - "tsconfig.json" - ] + "name": "@collaborne/material-kanban", + "version": "2.2.14", + "description": "Material styled Kanban board", + "author": "Collaborne", + "license": "MIT", + "repository": "Collaborne/material-kanban", + "main": "dist/index.js", + "source": "src/index.tsx", + "engines": { + "npm": ">=8.3.0", + "node": ">=10" + }, + "scripts": { + "build": "tsc --noEmit false", + "build:watch": "npm run build -- --watch", + "lint": "npx eslint --report-unused-disable-directives $(node -p 'require(\"./tsconfig.test.json\").include.map(include => `'\\${include}.\\{js,ts,tsx\\}'`).join(\" \")')", + "test": "npm run lint", + "predeploy": "run-s storybook:build", + "deploy": "gh-pages -d storybook-static -b deploy/gh-pages", + "storybook": "NODE_OPTIONS=\"${NODE_OPTIONS} --openssl-legacy-provider\" storybook dev -p 9009", + "storybook:build": "NODE_OPTIONS=\"${NODE_OPTIONS} --openssl-legacy-provider\" storybook build --quiet" + }, + "peerDependencies": { + "@emotion/react": "^11.10.5", + "@emotion/styled": "^11.10.5", + "@mui/icons-material": "^5.10.9", + "@mui/material": "^5.10.11", + "react": "^17.0.0 || ^18.0.0", + "tss-react": "^4.4.0" + }, + "devDependencies": { + "@emotion/react": "^11.10.5", + "@emotion/styled": "^11.10.5", + "@mui/icons-material": "^5.10.9", + "@mui/material": "^5.10.11", + "@storybook/addon-actions": "^8.0.4", + "@storybook/addon-backgrounds": "^8.0.4", + "@storybook/react": "^8.0.4", + "@storybook/react-vite": "^8.0.4", + "@testing-library/jest-dom": "6.4.2", + "@testing-library/react": "^13.3.0", + "@testing-library/user-event": "^14.2.1", + "@types/jest": "^28.1.2", + "@types/node": "^18.0.0", + "@types/react": "^18.0.14", + "@types/react-dom": "^18.0.5", + "@typescript-eslint/eslint-plugin": "^5.29.0", + "@typescript-eslint/parser": "^5.29.0", + "@vitejs/plugin-react": "^4.2.1", + "chromatic": "^11.2.0", + "cross-env": "^7.0.3", + "eslint": "^8.18.0", + "eslint-config-collaborne": "^5.4.10", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-import": "^2.29.1", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-standard": "^4.1.0", + "eslint-plugin-storybook": "^0.11.0", + "gh-pages": "^4.0.0", + "npm-run-all": "^4.1.5", + "prettier": "^2.7.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-is": "^18.2.0", + "standard": "^17.1.0", + "storybook": "^8.0.4", + "tss-react": "^4.4.0", + "typescript": "^5.1.6" + }, + "dependencies": { + "@types/react-beautiful-dnd": "^13.1.2", + "react-beautiful-dnd": "^13.1.0" + }, + "overrides": { + "react-beautiful-dnd": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + }, + "eslint-config-standard-react": { + "eslint": "^8" + } + }, + "files": [ + "dist", + "src", + "tsconfig.json" + ] } diff --git a/src/Board.tsx b/src/Board.tsx index ae02d2d..bbd7d37 100644 --- a/src/Board.tsx +++ b/src/Board.tsx @@ -1,7 +1,6 @@ -import * as React from 'react'; - -import { makeStyles } from 'tss-react/mui'; +/* eslint-disable max-lines */ import Container from '@mui/material/Container'; +import * as React from 'react'; import { useCallback, useMemo } from 'react'; import { DragDropContext, @@ -10,14 +9,8 @@ import { Droppable, Draggable, } from 'react-beautiful-dnd'; +import { makeStyles } from 'tss-react/mui'; -import * as Data from './data'; - -import { - KanbanColumn, - KanbanColumnProps, - KanbanColumnStyles, -} from './components/KanbanColumn'; import { AddCardButtonStyles } from './components/AddCardButton'; import { AddColumnButton, @@ -25,6 +18,12 @@ import { } from './components/AddColumnButton'; import { Intl, IntlContext, DEFAULT_INTL } from './components/IntlContext'; import { RenderCard } from './components/KanbanCard'; +import { + KanbanColumn, + KanbanColumnProps, + KanbanColumnStyles, +} from './components/KanbanColumn'; +import * as Data from './data'; /** Styles that can be modified by a caller */ export type BoardClassKey = never; diff --git a/src/components/AddCardButton.tsx b/src/components/AddCardButton.tsx index 586431f..df8613c 100644 --- a/src/components/AddCardButton.tsx +++ b/src/components/AddCardButton.tsx @@ -1,8 +1,7 @@ -import { makeStyles } from 'tss-react/mui'; - -import Button from '@mui/material/Button'; import AddIcon from '@mui/icons-material/Add'; +import Button from '@mui/material/Button'; import { memo, useMemo } from 'react'; +import { makeStyles } from 'tss-react/mui'; import { IntlContext } from './IntlContext'; diff --git a/src/components/AddColumnButton.tsx b/src/components/AddColumnButton.tsx index af0393f..d5ae3e3 100644 --- a/src/components/AddColumnButton.tsx +++ b/src/components/AddColumnButton.tsx @@ -1,7 +1,7 @@ -import { makeStyles } from 'tss-react/mui'; -import Button from '@mui/material/Button'; import AddIcon from '@mui/icons-material/Add'; +import Button from '@mui/material/Button'; import { memo } from 'react'; +import { makeStyles } from 'tss-react/mui'; import { IntlContext } from './IntlContext'; diff --git a/src/components/ColumnHeader.tsx b/src/components/ColumnHeader.tsx index 3ce7aa5..82ceb31 100644 --- a/src/components/ColumnHeader.tsx +++ b/src/components/ColumnHeader.tsx @@ -2,6 +2,7 @@ import { ReactNode, memo, useCallback } from 'react'; import { makeStyles } from 'tss-react/mui'; import * as Data from '../data'; + import { Intl, IntlContext } from './IntlContext'; export interface ColumnHeaderStyles { diff --git a/src/components/KanbanCard.tsx b/src/components/KanbanCard.tsx index d53e68a..76d79d5 100644 --- a/src/components/KanbanCard.tsx +++ b/src/components/KanbanCard.tsx @@ -1,14 +1,12 @@ -import { memo, ReactElement, useCallback } from 'react'; - -import { makeStyles } from 'tss-react/mui'; import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; - +import { memo, ReactElement, useCallback } from 'react'; import { Draggable, DraggableProvided, DraggableStateSnapshot, } from 'react-beautiful-dnd'; +import { makeStyles } from 'tss-react/mui'; import * as Data from '../data'; diff --git a/src/components/KanbanColumn.tsx b/src/components/KanbanColumn.tsx index 2eacb2b..fb30bb0 100644 --- a/src/components/KanbanColumn.tsx +++ b/src/components/KanbanColumn.tsx @@ -1,8 +1,8 @@ -import { useCallback, ReactNode } from 'react'; -import { makeStyles } from 'tss-react/mui'; import List from '@mui/material/List'; import Paper from '@mui/material/Paper'; +import { useCallback, ReactNode } from 'react'; import { Droppable } from 'react-beautiful-dnd'; +import { makeStyles } from 'tss-react/mui'; import * as Data from '../data'; diff --git a/tsconfig.json b/tsconfig.json index 5240244..d790e04 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,7 +30,8 @@ "noFallthroughCasesInSwitch": true }, "include": [ - "src/**/*" + "src/**/*", + ".storybook/**/*" ], "exclude": [ "node_modules/**/*",