├── .eslintignore ├── .eslintrc ├── .github ├── COMMIT_CONVENTION.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature-request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── versioning.yml ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── public ├── demo.apng └── logo.png ├── src ├── components │ ├── alpha │ │ ├── alpha.component.tsx │ │ └── index.ts │ ├── color-picker │ │ ├── color-picker.component.tsx │ │ └── index.ts │ ├── fields │ │ ├── fields.component.tsx │ │ └── index.ts │ ├── hue │ │ ├── hue.component.tsx │ │ └── index.ts │ ├── interactive │ │ ├── index.ts │ │ └── interactive.component.tsx │ └── saturation │ │ ├── index.ts │ │ └── saturation.component.tsx ├── css │ └── rcp.css ├── hooks │ ├── use-bounding-client-rect │ │ ├── index.ts │ │ └── use-bounding-client-rect.hook.ts │ └── use-color │ │ ├── index.ts │ │ └── use-color.hook.ts ├── rcp.ts ├── services │ └── color │ │ ├── color.service.ts │ │ └── index.ts └── utils │ ├── clamp │ ├── clamp.util.ts │ └── index.ts │ ├── float │ ├── float.util.ts │ └── index.ts │ ├── format │ ├── format.util.ts │ └── index.ts │ ├── is-field-hide │ ├── index.ts │ └── is-field-hide.util.ts │ └── is-touch │ ├── index.ts │ └── is-touch.util.ts ├── tsconfig.json └── tsup.config.ts /.eslintignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | /node_modules 3 | 4 | # Production 5 | /dist 6 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": ["./tsconfig.json"], 5 | "ecmaVersion": "latest", 6 | "sourceType": "module", 7 | "ecmaFeatures": { 8 | "jsx": true 9 | } 10 | }, 11 | "settings": { 12 | "react": { 13 | "version": "detect" 14 | } 15 | }, 16 | "env": { 17 | "es2022": true, 18 | "browser": true 19 | }, 20 | "plugins": [ 21 | "@typescript-eslint", 22 | "prettier", 23 | "react", 24 | "react-hooks" 25 | ], 26 | "rules": { 27 | // ESLint 28 | "array-callback-return": "error", 29 | "constructor-super": "off", 30 | "for-direction": "error", 31 | "getter-return": "off", 32 | "no-async-promise-executor": "error", 33 | "no-await-in-loop": "off", 34 | "no-class-assign": "error", 35 | "no-compare-neg-zero": "error", 36 | "no-cond-assign": ["error", "always"], 37 | "no-const-assign": "off", 38 | "no-constant-binary-expression": "error", 39 | "no-constant-condition": "error", 40 | "no-constructor-return": "error", 41 | "no-control-regex": "error", 42 | "no-debugger": "error", 43 | "no-dupe-args": "off", 44 | "no-dupe-class-members": "off", 45 | "no-dupe-else-if": "error", 46 | "no-dupe-keys": "off", 47 | "no-duplicate-case": "error", 48 | "no-duplicate-imports": "error", 49 | "no-empty-character-class": "error", 50 | "no-empty-pattern": "error", 51 | "no-ex-assign": "error", 52 | "no-fallthrough": "error", 53 | "no-func-assign": "off", 54 | "no-import-assign": "off", 55 | "no-inner-declarations": "error", 56 | "no-invalid-regexp": "error", 57 | "no-irregular-whitespace": "error", 58 | "no-loss-of-precision": "off", 59 | "no-misleading-character-class": "error", 60 | "no-new-native-nonconstructor": "error", 61 | "no-new-symbol": "off", 62 | "no-obj-calls": "off", 63 | "no-promise-executor-return": "error", 64 | "no-prototype-builtins": "error", 65 | "no-self-assign": "error", 66 | "no-self-compare": "error", 67 | "no-setter-return": "off", 68 | "no-sparse-arrays": "error", 69 | "no-template-curly-in-string": "error", 70 | "no-this-before-super": "off", 71 | "no-undef": "off", 72 | "no-unexpected-multiline": "off", 73 | "no-unmodified-loop-condition": "error", 74 | "no-unreachable": "off", 75 | "no-unreachable-loop": "error", 76 | "no-unsafe-finally": "error", 77 | "no-unsafe-negation": "off", 78 | "no-unsafe-optional-chaining": "error", 79 | "no-unused-private-class-members": "error", 80 | "no-unused-vars": "off", 81 | "no-use-before-define": "off", 82 | "no-useless-backreference": "error", 83 | "require-atomic-updates": "error", 84 | "use-isnan": "error", 85 | "valid-typeof": "off", 86 | "accessor-pairs": "off", 87 | "arrow-body-style": "off", 88 | "block-scoped-var": "error", 89 | "camelcase": "off", 90 | "capitalized-comments": "error", 91 | "class-methods-use-this": "off", 92 | "complexity": "off", 93 | "consistent-return": "off", 94 | "consistent-this": "off", 95 | "curly": "off", 96 | "default-case": "off", 97 | "default-case-last": "error", 98 | "default-param-last": "off", 99 | "dot-notation": "off", 100 | "eqeqeq": ["error", "smart"], 101 | "func-name-matching": "off", 102 | "func-names": ["error", "as-needed"], 103 | "grouped-accessor-pairs": ["error", "getBeforeSet"], 104 | "guard-for-in": "off", 105 | "id-denylist": "off", 106 | "id-length": "off", 107 | "id-match": "off", 108 | "init-declarations": "off", 109 | "logical-assignment-operators": ["error", "always"], 110 | "max-classes-per-file": "off", 111 | "max-depth": "off", 112 | "max-lines": "off", 113 | "max-lines-per-function": "off", 114 | "max-nested-callbacks": "off", 115 | "max-params": "off", 116 | "max-statements": "off", 117 | "multiline-comment-style": "error", 118 | "new-cap": ["error", { "capIsNew": false }], 119 | "no-alert": "error", 120 | "no-array-constructor": "off", 121 | "no-bitwise": "off", 122 | "no-caller": "error", 123 | "no-case-declarations": "error", 124 | "no-confusing-arrow": "off", 125 | "no-console": "off", 126 | "no-continue": "off", 127 | "no-delete-var": "error", 128 | "no-div-regex": "error", 129 | "no-else-return": "error", 130 | "no-empty": ["error", { "allowEmptyCatch": true }], 131 | "no-empty-function": "off", 132 | "no-empty-static-block": "error", 133 | "no-eq-null": "off", 134 | "no-eval": "error", 135 | "no-extend-native": "error", 136 | "no-extra-bind": "error", 137 | "no-extra-boolean-cast": "error", 138 | "no-extra-label": "error", 139 | "no-extra-semi": "off", 140 | "no-floating-decimal": "off", 141 | "no-global-assign": "error", 142 | "no-implicit-coercion": "off", 143 | "no-implicit-globals": "off", 144 | "no-implied-eval": "off", 145 | "no-inline-comments": "error", 146 | "no-invalid-this": "off", 147 | "no-iterator": "error", 148 | "no-label-var": "error", 149 | "no-labels": ["error", { "allowLoop": true }], 150 | "no-lone-blocks": "error", 151 | "no-lonely-if": "off", 152 | "no-loop-func": "off", 153 | "no-magic-numbers": "off", 154 | "no-mixed-operators": "off", 155 | "no-multi-assign": "error", 156 | "no-multi-str": "error", 157 | "no-negated-condition": "error", 158 | "no-nested-ternary": "off", 159 | "no-new": "error", 160 | "no-new-func": "error", 161 | "no-new-object": "error", 162 | "no-new-wrappers": "error", 163 | "no-nonoctal-decimal-escape": "error", 164 | "no-octal": "error", 165 | "no-octal-escape": "error", 166 | "no-param-reassign": "off", 167 | "no-plusplus": "error", 168 | "no-proto": "error", 169 | "no-redeclare": "off", 170 | "no-regex-spaces": "error", 171 | "no-restricted-exports": "off", 172 | "no-restricted-globals": "off", 173 | "no-restricted-imports": "off", 174 | "no-restricted-properties": "off", 175 | "no-restricted-syntax": "off", 176 | "no-return-assign": "error", 177 | "no-return-await": "off", 178 | "no-script-url": "error", 179 | "no-sequences": "error", 180 | "no-shadow": "off", 181 | "no-shadow-restricted-names": "error", 182 | "no-ternary": "off", 183 | "no-throw-literal": "off", 184 | "no-undef-init": "off", 185 | "no-undefined": "off", 186 | "no-underscore-dangle": "off", 187 | "no-unneeded-ternary": "error", 188 | "no-unused-expressions": "off", 189 | "no-unused-labels": "error", 190 | "no-useless-call": "error", 191 | "no-useless-catch": "off", 192 | "no-useless-computed-key": "error", 193 | "no-useless-concat": "error", 194 | "no-useless-constructor": "off", 195 | "no-useless-escape": "error", 196 | "no-useless-rename": "error", 197 | "no-useless-return": "off", 198 | "no-var": "off", 199 | "no-void": "error", 200 | "no-warning-comments": "off", 201 | "no-with": "error", 202 | "object-shorthand": "off", 203 | "one-var": "off", 204 | "one-var-declaration-per-line": "off", 205 | "operator-assignment": "error", 206 | "prefer-arrow-callback": "off", 207 | "prefer-const": "off", 208 | "prefer-destructuring": "error", 209 | "prefer-exponentiation-operator": "error", 210 | "prefer-named-capture-group": "off", 211 | "prefer-numeric-literals": "error", 212 | "prefer-object-has-own": "error", 213 | "prefer-object-spread": "error", 214 | "prefer-promise-reject-errors": "off", 215 | "prefer-regex-literals": "error", 216 | "prefer-rest-params": "off", 217 | "prefer-spread": "off", 218 | "prefer-template": "error", 219 | "quote-props": "off", 220 | "radix": "error", 221 | "require-await": "off", 222 | "require-unicode-regexp": "error", 223 | "require-yield": "error", 224 | "sort-imports": "off", 225 | "sort-keys": "off", 226 | "sort-vars": "off", 227 | "spaced-comment": "off", 228 | "strict": "off", 229 | "symbol-description": "error", 230 | "vars-on-top": "off", 231 | "yoda": "error", 232 | "array-bracket-newline": "off", 233 | "array-bracket-spacing": "off", 234 | "array-element-newline": "off", 235 | "arrow-parens": "off", 236 | "arrow-spacing": "off", 237 | "block-spacing": "off", 238 | "brace-style": "off", 239 | "comma-dangle": "off", 240 | "comma-spacing": "off", 241 | "comma-style": "off", 242 | "computed-property-spacing": "off", 243 | "dot-location": "off", 244 | "eol-last": "off", 245 | "func-call-spacing": "off", 246 | "function-call-argument-newline": "off", 247 | "function-paren-newline": "off", 248 | "generator-star-spacing": "off", 249 | "implicit-arrow-linebreak": "off", 250 | "indent": "off", 251 | "jsx-quotes": "off", 252 | "key-spacing": "off", 253 | "keyword-spacing": "off", 254 | "line-comment-position": "error", 255 | "linebreak-style": "off", 256 | "lines-around-comment": "off", 257 | "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], 258 | "max-len": "off", 259 | "max-statements-per-line": "off", 260 | "multiline-ternary": "off", 261 | "new-parens": "off", 262 | "newline-per-chained-call": "off", 263 | "no-extra-parens": "off", 264 | "no-mixed-spaces-and-tabs": "off", 265 | "no-multi-spaces": "off", 266 | "no-multiple-empty-lines": "off", 267 | "no-tabs": "off", 268 | "no-trailing-spaces": "off", 269 | "no-whitespace-before-property": "off", 270 | "nonblock-statement-body-position": "off", 271 | "object-curly-newline": "off", 272 | "object-curly-spacing": "off", 273 | "object-property-newline": "off", 274 | "operator-linebreak": "off", 275 | "padded-blocks": "off", 276 | "padding-line-between-statements": [ 277 | "error", 278 | { "blankLine": "always", "prev": "*", "next": "return" }, 279 | { "blankLine": "always", "prev": "*", "next": ["const", "let"] }, 280 | { "blankLine": "always", "prev": ["const", "let"], "next": "*" }, 281 | { "blankLine": "any", "prev": ["const", "let"], "next" : ["const", "let"] }, 282 | { "blankLine": "always", "prev": "*", "next": "break" }, 283 | { "blankLine": "always", "prev": "*", "next": "for" }, 284 | { "blankLine": "always", "prev": "for", "next": "*" }, 285 | { "blankLine": "always", "prev": "*", "next": "while" }, 286 | { "blankLine": "always", "prev": "while", "next": "*" } 287 | ], 288 | "quotes": "off", 289 | "rest-spread-spacing": "off", 290 | "semi": "off", 291 | "semi-spacing": "off", 292 | "semi-style": "off", 293 | "space-before-blocks": "off", 294 | "space-before-function-paren": "off", 295 | "space-in-parens": "off", 296 | "space-infix-ops": "off", 297 | "space-unary-ops": "off", 298 | "switch-colon-spacing": "off", 299 | "template-curly-spacing": "off", 300 | "template-tag-spacing": "off", 301 | "unicode-bom": "off", 302 | "wrap-iife": "off", 303 | "wrap-regex": "off", 304 | "yield-star-spacing": "off", 305 | // TypeScript ESLint 306 | "@typescript-eslint/adjacent-overload-signatures": "error", 307 | "@typescript-eslint/array-type": ["error", { "default": "array", "readonly": "array" }], 308 | "@typescript-eslint/await-thenable": "error", 309 | "@typescript-eslint/ban-ts-comment": "error", 310 | "@typescript-eslint/ban-tslint-comment": "error", 311 | "@typescript-eslint/ban-types": "error", 312 | "@typescript-eslint/class-literal-property-style": "error", 313 | "@typescript-eslint/consistent-generic-constructors": "error", 314 | "@typescript-eslint/consistent-indexed-object-style": "error", 315 | "@typescript-eslint/consistent-type-assertions": "off", 316 | "@typescript-eslint/consistent-type-definitions": "error", 317 | "@typescript-eslint/consistent-type-exports": "off", 318 | "@typescript-eslint/consistent-type-imports": ["error", { "prefer": "type-imports", "fixStyle": "inline-type-imports" }], 319 | "@typescript-eslint/explicit-function-return-type": "off", 320 | "@typescript-eslint/explicit-member-accessibility": "off", 321 | "@typescript-eslint/explicit-module-boundary-types": "off", 322 | "@typescript-eslint/member-delimiter-style": "off", 323 | "@typescript-eslint/member-ordering": "off", 324 | "@typescript-eslint/method-signature-style": ["error", "property"], 325 | "@typescript-eslint/naming-convention": [ 326 | "error", 327 | { "selector": "interface", "format": ["StrictPascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid", "prefix": ["I"] }, 328 | { "selector": "typeAlias", "format": ["StrictPascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid", "prefix": ["T"] }, 329 | { "selector": "enum", "format": ["StrictPascalCase"], "leadingUnderscore": "forbid", "trailingUnderscore": "forbid", "prefix": ["E"] } 330 | ], 331 | "@typescript-eslint/no-base-to-string": "error", 332 | "@typescript-eslint/no-confusing-non-null-assertion": "error", 333 | "@typescript-eslint/no-confusing-void-expression": ["error", { "ignoreArrowShorthand": true }], 334 | "@typescript-eslint/no-duplicate-enum-values": "error", 335 | "@typescript-eslint/no-dynamic-delete": "error", 336 | "@typescript-eslint/no-empty-interface": "error", 337 | "@typescript-eslint/no-explicit-any": "off", 338 | "@typescript-eslint/no-extra-non-null-assertion": "error", 339 | "@typescript-eslint/no-extraneous-class": "off", 340 | "@typescript-eslint/no-floating-promises": "off", 341 | "@typescript-eslint/no-for-in-array": "error", 342 | "@typescript-eslint/no-inferrable-types": "error", 343 | "@typescript-eslint/no-invalid-void-type": "error", 344 | "@typescript-eslint/no-meaningless-void-operator": "error", 345 | "@typescript-eslint/no-misused-new": "error", 346 | "@typescript-eslint/no-misused-promises": "off", 347 | "@typescript-eslint/no-namespace": "error", 348 | "@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error", 349 | "@typescript-eslint/no-non-null-asserted-optional-chain": "error", 350 | "@typescript-eslint/no-non-null-assertion": "error", 351 | "@typescript-eslint/no-redundant-type-constituents": "error", 352 | "@typescript-eslint/no-require-imports": "error", 353 | "@typescript-eslint/no-this-alias": "error", 354 | "@typescript-eslint/no-type-alias": "off", 355 | "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", 356 | "@typescript-eslint/no-unnecessary-condition": "off", 357 | "@typescript-eslint/no-unnecessary-qualifier": "error", 358 | "@typescript-eslint/no-unnecessary-type-arguments": "error", 359 | "@typescript-eslint/no-unnecessary-type-assertion": "error", 360 | "@typescript-eslint/no-unnecessary-type-constraint": "error", 361 | "@typescript-eslint/no-unsafe-argument": "off", 362 | "@typescript-eslint/no-unsafe-assignment": "off", 363 | "@typescript-eslint/no-unsafe-call": "off", 364 | "@typescript-eslint/no-unsafe-declaration-merging": "error", 365 | "@typescript-eslint/no-unsafe-member-access": "off", 366 | "@typescript-eslint/no-unsafe-return": "off", 367 | "@typescript-eslint/no-useless-empty-export": "error", 368 | "@typescript-eslint/no-var-requires": "error", 369 | "@typescript-eslint/non-nullable-type-assertion-style": "off", 370 | "@typescript-eslint/parameter-properties": "off", 371 | "@typescript-eslint/prefer-as-const": "error", 372 | "@typescript-eslint/prefer-enum-initializers": "error", 373 | "@typescript-eslint/prefer-for-of": "off", 374 | "@typescript-eslint/prefer-function-type": "error", 375 | "@typescript-eslint/prefer-includes": "error", 376 | "@typescript-eslint/prefer-literal-enum-member": ["error", { "allowBitwiseExpressions": true }], 377 | "@typescript-eslint/prefer-namespace-keyword": "error", 378 | "@typescript-eslint/prefer-nullish-coalescing": "error", 379 | "@typescript-eslint/prefer-optional-chain": "error", 380 | "@typescript-eslint/prefer-readonly": "off", 381 | "@typescript-eslint/prefer-readonly-parameter-types": "off", 382 | "@typescript-eslint/prefer-reduce-type-parameter": "error", 383 | "@typescript-eslint/prefer-regexp-exec": "off", 384 | "@typescript-eslint/prefer-return-this-type": "error", 385 | "@typescript-eslint/prefer-string-starts-ends-with": "error", 386 | "@typescript-eslint/prefer-ts-expect-error": "error", 387 | "@typescript-eslint/promise-function-async": "error", 388 | "@typescript-eslint/require-array-sort-compare": "off", 389 | "@typescript-eslint/restrict-plus-operands": "error", 390 | "@typescript-eslint/restrict-template-expressions": "off", 391 | "@typescript-eslint/sort-type-constituents": "off", 392 | "@typescript-eslint/strict-boolean-expressions": "off", 393 | "@typescript-eslint/switch-exhaustiveness-check": "off", 394 | "@typescript-eslint/triple-slash-reference": "error", 395 | "@typescript-eslint/typedef": "off", 396 | "@typescript-eslint/unbound-method": "off", 397 | "@typescript-eslint/unified-signatures": "error", 398 | "@typescript-eslint/default-param-last": "error", 399 | "@typescript-eslint/dot-notation": "error", 400 | "@typescript-eslint/init-declarations": "off", 401 | "@typescript-eslint/no-array-constructor": "error", 402 | "@typescript-eslint/no-dupe-class-members": "error", 403 | "@typescript-eslint/no-empty-function": "error", 404 | "@typescript-eslint/no-extra-semi": "off", 405 | "@typescript-eslint/no-implied-eval": "error", 406 | "@typescript-eslint/no-invalid-this": "error", 407 | "@typescript-eslint/no-loop-func": "error", 408 | "@typescript-eslint/no-loss-of-precision": "error", 409 | "@typescript-eslint/no-magic-numbers": "off", 410 | "@typescript-eslint/no-redeclare": "error", 411 | "@typescript-eslint/no-restricted-imports": "off", 412 | "@typescript-eslint/no-shadow": "off", 413 | "@typescript-eslint/no-throw-literal": "off", 414 | "@typescript-eslint/no-unused-expressions": "error", 415 | "@typescript-eslint/no-unused-vars": "error", 416 | "@typescript-eslint/no-use-before-define": "error", 417 | "@typescript-eslint/no-useless-constructor": "error", 418 | "@typescript-eslint/require-await": "off", 419 | "@typescript-eslint/return-await": "error", 420 | "@typescript-eslint/brace-style": "off", 421 | "@typescript-eslint/comma-dangle": "off", 422 | "@typescript-eslint/comma-spacing": "off", 423 | "@typescript-eslint/func-call-spacing": "off", 424 | "@typescript-eslint/indent": "off", 425 | "@typescript-eslint/keyword-spacing": "off", 426 | "@typescript-eslint/lines-between-class-members": "off", 427 | "@typescript-eslint/no-extra-parens": "off", 428 | "@typescript-eslint/object-curly-spacing": "off", 429 | "@typescript-eslint/padding-line-between-statements": "off", 430 | "@typescript-eslint/quotes": "off", 431 | "@typescript-eslint/semi": "off", 432 | "@typescript-eslint/space-before-blocks": "off", 433 | "@typescript-eslint/space-before-function-paren": "off", 434 | "@typescript-eslint/space-infix-ops": "off", 435 | "@typescript-eslint/type-annotation-spacing": "off", 436 | // Prettier 437 | "prettier/prettier": "error", 438 | // React 439 | "react/boolean-prop-naming": "off", 440 | "react/button-has-type": "error", 441 | "react/default-props-match-prop-types": "off", 442 | "react/destructuring-assignment": ["error", "always"], 443 | "react/display-name": "off", 444 | "react/forbid-component-props": "off", 445 | "react/forbid-dom-props": "off", 446 | "react/forbid-elements": "off", 447 | "react/forbid-foreign-prop-types": "off", 448 | "react/forbid-prop-types": "off", 449 | "react/function-component-definition": ["error", { "namedComponents": "function-declaration", "unnamedComponents": "arrow-function" }], 450 | "react/hook-use-state": "error", 451 | "react/iframe-missing-sandbox": "off", 452 | "react/jsx-boolean-value": ["error", "never"], 453 | "react/jsx-child-element-spacing": "off", 454 | "react/jsx-closing-bracket-location": "off", 455 | "react/jsx-closing-tag-location": "off", 456 | "react/jsx-curly-brace-presence": "off", 457 | "react/jsx-curly-newline": "off", 458 | "react/jsx-curly-spacing": "off", 459 | "react/jsx-equals-spacing": "off", 460 | "react/jsx-filename-extension": "off", 461 | "react/jsx-first-prop-new-line": "off", 462 | "react/jsx-fragments": ["error", "element"], 463 | "react/jsx-handler-names": "error", 464 | "react/jsx-indent": "off", 465 | "react/jsx-indent-props": "off", 466 | "react/jsx-key": "error", 467 | "react/jsx-max-depth": "off", 468 | "react/jsx-max-props-per-line": "off", 469 | "react/jsx-newline": "off", 470 | "react/jsx-no-bind": "off", 471 | "react/jsx-no-comment-textnodes": "error", 472 | "react/jsx-no-constructed-context-values": "error", 473 | "react/jsx-no-duplicate-props": "error", 474 | "react/jsx-no-leaked-render": "error", 475 | "react/jsx-no-literals": "off", 476 | "react/jsx-no-script-url": "error", 477 | "react/jsx-no-target-blank": ["error", { "allowReferrer": true, "enforceDynamicLinks": "always", "links": false }], 478 | "react/jsx-no-undef": "error", 479 | "react/jsx-no-useless-fragment": "off", 480 | "react/jsx-one-expression-per-line": "off", 481 | "react/jsx-pascal-case": "error", 482 | "react/jsx-props-no-multi-spaces": "off", 483 | "react/jsx-props-no-spreading": "off", 484 | "react/jsx-sort-props": "off", 485 | "react/jsx-tag-spacing": "off", 486 | "react/jsx-uses-react": "off", 487 | "react/jsx-uses-vars": "error", 488 | "react/jsx-wrap-multilines": "off", 489 | "react/no-access-state-in-setstate": "error", 490 | "react/no-adjacent-inline-elements": "off", 491 | "react/no-array-index-key": "error", 492 | "react/no-arrow-function-lifecycle": "error", 493 | "react/no-children-prop": "error", 494 | "react/no-danger": "off", 495 | "react/no-danger-with-children": "error", 496 | "react/no-deprecated": "error", 497 | "react/no-did-mount-set-state": "error", 498 | "react/no-did-update-set-state": "error", 499 | "react/no-direct-mutation-state": "error", 500 | "react/no-find-dom-node": "error", 501 | "react/no-invalid-html-attribute": "error", 502 | "react/no-is-mounted": "error", 503 | "react/no-multi-comp": "error", 504 | "react/no-namespace": "error", 505 | "react/no-object-type-as-default-prop": "off", 506 | "react/no-redundant-should-component-update": "error", 507 | "react/no-render-return-value": "error", 508 | "react/no-set-state": "off", 509 | "react/no-string-refs": "error", 510 | "react/no-this-in-sfc": "error", 511 | "react/no-typos": "error", 512 | "react/no-unescaped-entities": "error", 513 | "react/no-unknown-property": "error", 514 | "react/no-unsafe": "off", 515 | "react/no-unstable-nested-components": "error", 516 | "react/no-unused-class-component-methods": "off", 517 | "react/no-unused-prop-types": "off", 518 | "react/no-unused-state": "off", 519 | "react/no-will-update-set-state": "error", 520 | "react/prefer-es6-class": "error", 521 | "react/prefer-exact-props": "off", 522 | "react/prefer-read-only-props": "off", 523 | "react/prefer-stateless-function": "off", 524 | "react/prop-types": "off", 525 | "react/react-in-jsx-scope": "off", 526 | "react/require-default-props": "off", 527 | "react/require-optimization": "off", 528 | "react/require-render-return": "error", 529 | "react/self-closing-comp": "error", 530 | "react/sort-comp": "off", 531 | "react/sort-default-props": "off", 532 | "react/sort-prop-types": "off", 533 | "react/state-in-constructor": "error", 534 | "react/static-property-placement": "off", 535 | "react/style-prop-object": "error", 536 | "react/void-dom-elements-no-children": "error", 537 | // React Hooks 538 | "react-hooks/rules-of-hooks": "error", 539 | "react-hooks/exhaustive-deps": "warn" 540 | } 541 | } 542 | -------------------------------------------------------------------------------- /.github/COMMIT_CONVENTION.md: -------------------------------------------------------------------------------- 1 | ## Git Commit Message Convention 2 | 3 | > This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). 4 | 5 | #### TL;DR: 6 | 7 | Messages must be matched by the following regex: 8 | 9 | ```js 10 | /^(feat|fix|chore|docs|style|refactor|perf|test|ci)(\(.+\))?: .{1,72}/; 11 | ``` 12 | 13 | ### Full Message Format 14 | 15 | A commit message consists of a **header**, **body** and **footer**. The header has a **type** and **subject**: 16 | 17 | ``` 18 | : 19 | 20 | 21 | 22 |