├── .eslintrc.json ├── .gitignore ├── README.md ├── components.json ├── eslint.config.js ├── eslint ├── eslint-ebn.json └── eslint-react.json ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public └── vite.svg ├── src ├── App.css ├── App.tsx ├── assets │ └── react.svg ├── components │ └── ui │ │ └── button.tsx ├── constants.ts ├── index.css ├── lib │ └── utils.ts ├── main.tsx ├── screens │ └── home │ │ └── index.tsx └── vite-env.d.ts ├── tailwind.config.js ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint/eslint-ebn", 4 | "eslint/eslint-react", 5 | "plugin:@typescript-eslint/eslint-recommended", 6 | "plugin:@typescript-eslint/recommended", 7 | "plugin:react-hooks/recommended", 8 | "react-app" 9 | ], 10 | "parser": "@typescript-eslint/parser", 11 | "plugins": [ 12 | "@typescript-eslint", 13 | "import", 14 | ], 15 | "settings": { 16 | "react": { 17 | "pragma": "React", 18 | "version": "18.2.0" 19 | } 20 | }, 21 | "env": { 22 | "jest": true 23 | }, 24 | "globals": { 25 | "__DEV__": true 26 | }, 27 | "rules": { 28 | "react/jsx-uses-react": "off", 29 | "react/react-in-jsx-scope": "off", 30 | "linebreak-style": 0, 31 | "eol-last": ["error", "always"], 32 | "global-require": 0, 33 | "no-undefined": 0, 34 | "no-shadow": "off", 35 | "react/display-name": [2, { "ignoreTranspilerName": false }], 36 | "react/jsx-filename-extension": 0, 37 | "react-hooks/exhaustive-deps": 0, 38 | "camelcase": [ 39 | 0, 40 | { 41 | "properties": "never" 42 | } 43 | ], 44 | "@typescript-eslint/ban-types": 0, 45 | "@typescript-eslint/no-non-null-assertion": 0, 46 | "@typescript-eslint/no-unused-vars": [ 47 | 2, 48 | { 49 | "vars": "all", 50 | "args": "after-used" 51 | } 52 | ], 53 | "@typescript-eslint/no-shadow": ["error"], 54 | "@typescript-eslint/no-explicit-any": "warn", 55 | "no-use-before-define": "off", 56 | "@typescript-eslint/no-use-before-define": 0, 57 | "@typescript-eslint/no-var-requires": 0, 58 | "@typescript-eslint/explicit-function-return-type": 0, 59 | "@typescript-eslint/explicit-module-boundary-types": "off", 60 | "no-underscore-dangle": "off", 61 | "indent": [2, 4, {"SwitchCase": 1}], 62 | "key-spacing": [2, { 63 | "singleLine": { 64 | "beforeColon": false, 65 | "afterColon": true 66 | }}], 67 | "@typescript-eslint/member-delimiter-style": 2, 68 | "@typescript-eslint/no-unsafe-declaration-merging": "off", 69 | "import/order": [ 70 | 2, 71 | { 72 | "groups": ["builtin", "external", "parent", "sibling", "index", "type"], 73 | "newlines-between": "always", 74 | "pathGroups": [ 75 | { 76 | "pattern": "{@(@/action|@/app|@/assets|@/client|@/components|@/constants|@/database|@/global|@/hooks|@/screens|@/storage|@/store|@/typings|@/utils)/**,@(@/constants|@/notifications|@/store|@/websocket)}", 77 | "group": "external", 78 | "position": "after" 79 | }, 80 | { 81 | "pattern": "src/**", 82 | "group": "parent", 83 | "position": "before" 84 | } 85 | ], 86 | "alphabetize": { 87 | "order": "asc", 88 | "caseInsensitive": true 89 | }, 90 | "pathGroupsExcludedImportTypes": ["type"] 91 | } 92 | ] 93 | }, 94 | "overrides": [ 95 | { 96 | "files": ["*.test.js", "*.test.jsx"], 97 | "env": { 98 | "jest": true 99 | } 100 | }, 101 | { 102 | "files": ["detox/e2e/**"], 103 | "globals": { 104 | "by": true, 105 | "detox": true, 106 | "device": true, 107 | "element": true, 108 | "waitFor": true 109 | }, 110 | "rules": { 111 | "func-names": 0, 112 | "import/no-unresolved": 0, 113 | "max-nested-callbacks": 0, 114 | "no-process-env": 0, 115 | "no-unused-expressions": 0 116 | } 117 | } 118 | ] 119 | } 120 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default tseslint.config({ 18 | languageOptions: { 19 | // other options... 20 | parserOptions: { 21 | project: ['./tsconfig.node.json', './tsconfig.app.json'], 22 | tsconfigRootDir: import.meta.dirname, 23 | }, 24 | }, 25 | }) 26 | ``` 27 | 28 | - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` 29 | - Optionally add `...tseslint.configs.stylisticTypeChecked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: 31 | 32 | ```js 33 | // eslint.config.js 34 | import react from 'eslint-plugin-react' 35 | 36 | export default tseslint.config({ 37 | // Set the react version 38 | settings: { react: { version: '18.3' } }, 39 | plugins: { 40 | // Add the react plugin 41 | react, 42 | }, 43 | rules: { 44 | // other rules... 45 | // Enable its recommended rules 46 | ...react.configs.recommended.rules, 47 | ...react.configs['jsx-runtime'].rules, 48 | }, 49 | }) 50 | ``` 51 | # calc-fe 52 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config({ 8 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 9 | files: ['**/*.{ts,tsx}'], 10 | ignores: ['dist'], 11 | languageOptions: { 12 | ecmaVersion: 2020, 13 | globals: globals.browser, 14 | }, 15 | plugins: { 16 | 'react-hooks': reactHooks, 17 | 'react-refresh': reactRefresh, 18 | }, 19 | rules: { 20 | ...reactHooks.configs.recommended.rules, 21 | 'react-refresh/only-export-components': [ 22 | 'warn', 23 | { allowConstantExport: true }, 24 | ], 25 | }, 26 | }) 27 | -------------------------------------------------------------------------------- /eslint/eslint-ebn.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "eslint:recommended" 4 | ], 5 | "parserOptions": { 6 | "ecmaVersion": 8, 7 | "sourceType": "module", 8 | "ecmaFeatures": { 9 | "jsx": true, 10 | "impliedStrict": true, 11 | "modules": true 12 | } 13 | }, 14 | "parser": "babel-eslint", 15 | "plugins": [ 16 | "header" 17 | ], 18 | "env": { 19 | "browser": true, 20 | "node": true, 21 | "jquery": true, 22 | "es6": true 23 | }, 24 | "rules": { 25 | "array-bracket-spacing": [ 26 | 2, 27 | "never" 28 | ], 29 | "array-callback-return": 2, 30 | "arrow-body-style": 0, 31 | "arrow-parens": [ 32 | 2, 33 | "always" 34 | ], 35 | "arrow-spacing": [ 36 | 2, 37 | { 38 | "before": true, 39 | "after": true 40 | } 41 | ], 42 | "block-scoped-var": 2, 43 | "brace-style": [ 44 | 2, 45 | "1tbs", 46 | { 47 | "allowSingleLine": false 48 | } 49 | ], 50 | "camelcase": [ 51 | 2, 52 | { 53 | "properties": "never" 54 | } 55 | ], 56 | "capitalized-comments": 0, 57 | "class-methods-use-this": 0, 58 | "comma-dangle": [ 59 | 2, 60 | "always-multiline" 61 | ], 62 | "comma-spacing": [ 63 | 2, 64 | { 65 | "before": false, 66 | "after": true 67 | } 68 | ], 69 | "comma-style": [ 70 | 2, 71 | "last" 72 | ], 73 | "complexity": [ 74 | 0, 75 | 10 76 | ], 77 | "computed-property-spacing": [ 78 | 2, 79 | "never" 80 | ], 81 | "consistent-return": 2, 82 | "consistent-this": [ 83 | 2, 84 | "self" 85 | ], 86 | "constructor-super": 2, 87 | "curly": [ 88 | 2, 89 | "all" 90 | ], 91 | "dot-location": [ 92 | 2, 93 | "object" 94 | ], 95 | "dot-notation": 2, 96 | "eqeqeq": [ 97 | 2, 98 | "smart" 99 | ], 100 | "func-call-spacing": [ 101 | 2, 102 | "never" 103 | ], 104 | "func-name-matching": 0, 105 | "func-names": 2, 106 | "func-style": [ 107 | 2, 108 | "declaration", 109 | { 110 | "allowArrowFunctions": true 111 | } 112 | ], 113 | "generator-star-spacing": [ 114 | 2, 115 | { 116 | "before": false, 117 | "after": true 118 | } 119 | ], 120 | "global-require": 2, 121 | "guard-for-in": 2, 122 | "header/header": [ 123 | 2, 124 | "line", 125 | " Copyright (c) 2024-present Error By Night, Inc. All Rights Reserved." 126 | ], 127 | "id-blacklist": 0, 128 | "indent": [ 129 | 2, 130 | 4, 131 | { 132 | "SwitchCase": 0 133 | } 134 | ], 135 | "jsx-quotes": [ 136 | 2, 137 | "prefer-single" 138 | ], 139 | "key-spacing": [ 140 | 2, 141 | { 142 | "beforeColon": false, 143 | "afterColon": true, 144 | "mode": "strict" 145 | } 146 | ], 147 | "keyword-spacing": [ 148 | 2, 149 | { 150 | "before": true, 151 | "after": true, 152 | "overrides": {} 153 | } 154 | ], 155 | "line-comment-position": 0, 156 | "linebreak-style": 2, 157 | "lines-around-comment": [ 158 | 2, 159 | { 160 | "beforeBlockComment": true, 161 | "beforeLineComment": true, 162 | "allowBlockStart": true, 163 | "allowBlockEnd": true 164 | } 165 | ], 166 | "max-lines": [ 167 | 1, 168 | { 169 | "max": 550, 170 | "skipBlankLines": true, 171 | "skipComments": true 172 | } 173 | ], 174 | "max-nested-callbacks": [ 175 | 2, 176 | { 177 | "max": 2 178 | } 179 | ], 180 | "max-statements-per-line": [ 181 | 2, 182 | { 183 | "max": 1 184 | } 185 | ], 186 | "multiline-ternary": [ 187 | 1, 188 | "never" 189 | ], 190 | "new-cap": 2, 191 | "new-parens": 2, 192 | "newline-before-return": 0, 193 | "newline-per-chained-call": 0, 194 | "no-alert": 2, 195 | "no-array-constructor": 2, 196 | "no-await-in-loop": 2, 197 | "no-caller": 2, 198 | "no-case-declarations": 2, 199 | "no-class-assign": 2, 200 | "no-compare-neg-zero": 2, 201 | "no-cond-assign": [ 202 | 2, 203 | "except-parens" 204 | ], 205 | "no-confusing-arrow": 2, 206 | "no-console": 2, 207 | "no-const-assign": 2, 208 | "no-constant-condition": 2, 209 | "no-debugger": 2, 210 | "no-div-regex": 2, 211 | "no-dupe-args": 2, 212 | "no-dupe-class-members": 2, 213 | "no-dupe-keys": 2, 214 | "no-duplicate-case": 2, 215 | "no-duplicate-imports": [ 216 | 2, 217 | { 218 | "includeExports": true 219 | } 220 | ], 221 | "no-else-return": 2, 222 | "no-empty": 2, 223 | "no-empty-function": 2, 224 | "no-empty-pattern": 2, 225 | "no-eval": 2, 226 | "no-ex-assign": 2, 227 | "no-extend-native": 2, 228 | "no-extra-bind": 2, 229 | "no-extra-label": 2, 230 | "no-extra-parens": 0, 231 | "no-extra-semi": 2, 232 | "no-fallthrough": 2, 233 | "no-floating-decimal": 2, 234 | "no-func-assign": 2, 235 | "no-global-assign": 2, 236 | "no-implicit-coercion": 2, 237 | "no-implicit-globals": 0, 238 | "no-implied-eval": 2, 239 | "no-inner-declarations": 0, 240 | "no-invalid-regexp": 2, 241 | "no-irregular-whitespace": 2, 242 | "no-iterator": 2, 243 | "no-labels": 2, 244 | "no-lone-blocks": 2, 245 | "no-lonely-if": 2, 246 | "no-loop-func": 2, 247 | "no-magic-numbers": 0, 248 | "no-mixed-operators": [ 249 | 2, 250 | { 251 | "allowSamePrecedence": false 252 | } 253 | ], 254 | "no-mixed-spaces-and-tabs": 2, 255 | "no-multi-assign": 2, 256 | "no-multi-spaces": [ 257 | 2, 258 | { 259 | "exceptions": { 260 | "Property": false 261 | } 262 | } 263 | ], 264 | "no-multi-str": 0, 265 | "no-multiple-empty-lines": [ 266 | 2, 267 | { 268 | "max": 1 269 | } 270 | ], 271 | "no-native-reassign": 2, 272 | "no-negated-condition": 2, 273 | "no-nested-ternary": 2, 274 | "no-new": 2, 275 | "no-new-func": 2, 276 | "no-new-object": 2, 277 | "no-new-symbol": 2, 278 | "no-new-wrappers": 2, 279 | "no-octal-escape": 2, 280 | "no-param-reassign": 2, 281 | "no-process-env": 2, 282 | "no-process-exit": 2, 283 | "no-proto": 2, 284 | "no-prototype-builtins": 1, 285 | "no-redeclare": 2, 286 | "no-return-assign": [ 287 | 2, 288 | "always" 289 | ], 290 | "no-return-await": 2, 291 | "no-script-url": 2, 292 | "no-self-assign": [ 293 | 2, 294 | { 295 | "props": true 296 | } 297 | ], 298 | "no-self-compare": 2, 299 | "no-sequences": 2, 300 | "no-shadow": [ 301 | 2, 302 | { 303 | "hoist": "functions" 304 | } 305 | ], 306 | "no-shadow-restricted-names": 2, 307 | "no-spaced-func": 2, 308 | "no-tabs": 0, 309 | "no-template-curly-in-string": 2, 310 | "no-ternary": 0, 311 | "no-this-before-super": 2, 312 | "no-throw-literal": 2, 313 | "no-trailing-spaces": [ 314 | 2, 315 | { 316 | "skipBlankLines": false 317 | } 318 | ], 319 | "no-undef-init": 2, 320 | "no-undefined": 2, 321 | "no-underscore-dangle": 2, 322 | "no-unexpected-multiline": 2, 323 | "no-unmodified-loop-condition": 2, 324 | "no-unneeded-ternary": [ 325 | 2, 326 | { 327 | "defaultAssignment": false 328 | } 329 | ], 330 | "no-unreachable": 2, 331 | "no-unsafe-finally": 2, 332 | "no-unsafe-negation": 2, 333 | "no-unused-expressions": 2, 334 | "no-unused-vars": [ 335 | 2, 336 | { 337 | "vars": "all", 338 | "args": "after-used" 339 | } 340 | ], 341 | "no-use-before-define": [ 342 | 2, 343 | { 344 | "classes": false, 345 | "functions": false, 346 | "variables": false 347 | } 348 | ], 349 | "no-useless-computed-key": 2, 350 | "no-useless-concat": 2, 351 | "no-useless-constructor": 2, 352 | "no-useless-escape": 2, 353 | "no-useless-rename": 2, 354 | "no-useless-return": 2, 355 | "no-var": 0, 356 | "no-void": 2, 357 | "no-warning-comments": 1, 358 | "no-whitespace-before-property": 2, 359 | "no-with": 2, 360 | "object-curly-newline": 0, 361 | "object-curly-spacing": [ 362 | 2, 363 | "never" 364 | ], 365 | "object-property-newline": [ 366 | 2, 367 | { 368 | "allowMultiplePropertiesPerLine": true 369 | } 370 | ], 371 | "object-shorthand": [ 372 | 2, 373 | "always" 374 | ], 375 | "one-var": [ 376 | 2, 377 | "never" 378 | ], 379 | "one-var-declaration-per-line": 0, 380 | "operator-assignment": [ 381 | 2, 382 | "always" 383 | ], 384 | "operator-linebreak": [ 385 | 2, 386 | "after" 387 | ], 388 | "padded-blocks": [ 389 | 2, 390 | "never" 391 | ], 392 | "prefer-arrow-callback": 2, 393 | "prefer-const": 2, 394 | "prefer-destructuring": 0, 395 | "prefer-numeric-literals": 2, 396 | "prefer-promise-reject-errors": 2, 397 | "prefer-rest-params": 2, 398 | "prefer-spread": 2, 399 | "prefer-template": 0, 400 | "quote-props": [ 401 | 2, 402 | "as-needed" 403 | ], 404 | "quotes": [ 405 | 2, 406 | "single", 407 | "avoid-escape" 408 | ], 409 | "radix": 2, 410 | "require-yield": 2, 411 | "rest-spread-spacing": [ 412 | 2, 413 | "never" 414 | ], 415 | "semi": [ 416 | 2, 417 | "always" 418 | ], 419 | "semi-spacing": [ 420 | 2, 421 | { 422 | "before": false, 423 | "after": true 424 | } 425 | ], 426 | "sort-imports": 0, 427 | "sort-keys": 0, 428 | "space-before-blocks": [ 429 | 2, 430 | "always" 431 | ], 432 | "space-before-function-paren": [ 433 | 2, 434 | { 435 | "anonymous": "never", 436 | "named": "never", 437 | "asyncArrow": "always" 438 | } 439 | ], 440 | "space-in-parens": [ 441 | 2, 442 | "never" 443 | ], 444 | "space-infix-ops": 2, 445 | "space-unary-ops": [ 446 | 2, 447 | { 448 | "words": true, 449 | "nonwords": false 450 | } 451 | ], 452 | "symbol-description": 2, 453 | "template-curly-spacing": [ 454 | 2, 455 | "never" 456 | ], 457 | "valid-typeof": [ 458 | 2, 459 | { 460 | "requireStringLiterals": false 461 | } 462 | ], 463 | "vars-on-top": 0, 464 | "wrap-iife": [ 465 | 2, 466 | "outside" 467 | ], 468 | "wrap-regex": 2, 469 | "yoda": [ 470 | 2, 471 | "never", 472 | { 473 | "exceptRange": false, 474 | "onlyEquality": false 475 | } 476 | ], 477 | "@typescript-eslint/array-type": [2, {"default": "array-simple"}], 478 | "@typescript-eslint/member-delimiter-style": 2, 479 | "@typescript-eslint/type-annotation-spacing": 2 480 | }, 481 | "overrides": [ 482 | { 483 | "files": ["*.test.js", "*.test.jsx", "*.test.ts", "*.test.tsx", "tests/**"], 484 | "globals": { 485 | "after": true, 486 | "afterAll": true, 487 | "afterEach": true, 488 | "before": true, 489 | "beforeAll": true, 490 | "beforeEach": true, 491 | "describe": true, 492 | "expect": true, 493 | "it": true, 494 | "jest": true, 495 | "test": true 496 | }, 497 | "rules": { 498 | "no-empty-function": 0, 499 | "no-console": 0, 500 | "max-nested-callbacks": 0, 501 | "no-undefined": 0 502 | } 503 | } 504 | ] 505 | } 506 | -------------------------------------------------------------------------------- /eslint/eslint-react.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "plugin:react/recommended" 4 | ], 5 | "plugins": [ 6 | "react" 7 | ], 8 | "rules": { 9 | "react/display-name": [ 10 | 0, 11 | { 12 | "ignoreTranspilerName": false 13 | } 14 | ], 15 | "react/forbid-component-props": 0, 16 | "react/forbid-elements": [ 17 | 2, 18 | { 19 | "forbid": [ 20 | "embed" 21 | ] 22 | } 23 | ], 24 | "react/jsx-boolean-value": [ 25 | 2, 26 | "always" 27 | ], 28 | "react/jsx-closing-bracket-location": [ 29 | 2, 30 | { 31 | "location": "tag-aligned" 32 | } 33 | ], 34 | "react/jsx-curly-spacing": [ 35 | 2, 36 | "never" 37 | ], 38 | "react/jsx-equals-spacing": [ 39 | 2, 40 | "never" 41 | ], 42 | "react/jsx-filename-extension": 2, 43 | "react/jsx-first-prop-new-line": [ 44 | 2, 45 | "multiline" 46 | ], 47 | "react/jsx-handler-names": 0, 48 | "react/jsx-indent": [ 49 | 2, 50 | 4 51 | ], 52 | "react/jsx-indent-props": [ 53 | 2, 54 | 4 55 | ], 56 | "react/jsx-key": 2, 57 | "react/jsx-max-props-per-line": [ 58 | 2, 59 | { 60 | "maximum": 1 61 | } 62 | ], 63 | "react/jsx-no-bind": 0, 64 | "react/jsx-no-comment-textnodes": 2, 65 | "react/jsx-no-duplicate-props": [ 66 | 2, 67 | { 68 | "ignoreCase": false 69 | } 70 | ], 71 | "react/jsx-no-target-blank": 2, 72 | "react/jsx-no-undef": 2, 73 | "react/jsx-pascal-case": 2, 74 | "react/jsx-tag-spacing": [ 75 | 2, 76 | { 77 | "closingSlash": "never", 78 | "beforeSelfClosing": "never", 79 | "afterOpening": "never" 80 | } 81 | ], 82 | "react/jsx-uses-react": 2, 83 | "react/jsx-uses-vars": 2, 84 | "react/jsx-wrap-multilines": 2, 85 | "react/no-array-index-key": 1, 86 | "react/no-children-prop": 2, 87 | "react/no-danger": 0, 88 | "react/no-danger-with-children": 2, 89 | "react/no-deprecated": 1, 90 | "react/no-did-mount-set-state": 2, 91 | "react/no-did-update-set-state": 2, 92 | "react/no-direct-mutation-state": 2, 93 | "react/no-find-dom-node": 1, 94 | "react/no-is-mounted": 2, 95 | "react/no-multi-comp": [ 96 | 2, 97 | { 98 | "ignoreStateless": true 99 | } 100 | ], 101 | "react/no-render-return-value": 2, 102 | "react/no-set-state": 0, 103 | "react/no-string-refs": 0, 104 | "react/no-unescaped-entities": 2, 105 | "react/no-unknown-property": 2, 106 | "react/no-unused-prop-types": [ 107 | 1, 108 | { 109 | "skipShapeProps": true 110 | } 111 | ], 112 | "react/prefer-es6-class": 2, 113 | "react/prefer-stateless-function": 0, 114 | "react/require-default-props": 0, 115 | "react/require-optimization": 1, 116 | "react/require-render-return": 2, 117 | "react/self-closing-comp": 2, 118 | "react/sort-comp": 0, 119 | "react/style-prop-object": 2, 120 | "react/prop-types": [0] 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |