├── .github └── workflows │ ├── integration.yml │ ├── npmpublish.yml │ └── test.yml ├── .gitignore ├── CHANGELOG.md ├── README.md ├── biome.json ├── lerna.json ├── package.json ├── packages ├── eslint-config-sentry-app │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ ├── package.json │ ├── strict.js │ └── yarn.lock ├── eslint-config-sentry-docs │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ ├── package.json │ ├── strict.js │ └── yarn.lock ├── eslint-config-sentry-react │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ ├── package.json │ ├── rules │ │ ├── imports.js │ │ ├── jest.js │ │ └── react.js │ └── yarn.lock ├── eslint-config-sentry │ ├── CHANGELOG.md │ ├── README.md │ ├── index.js │ ├── package.json │ ├── rules │ │ └── base.js │ └── yarn.lock └── eslint-plugin-sentry │ ├── CHANGELOG.md │ ├── README.md │ ├── docs │ └── rules │ │ ├── no-digits-in-tn.md │ │ └── no-styled-shortcut.md │ ├── lib │ ├── index.js │ └── rules │ │ ├── no-digits-in-tn.js │ │ ├── no-dynamic-translations.js │ │ └── no-styled-shortcut.js │ ├── package.json │ ├── tests │ └── lib │ │ └── rules │ │ ├── no-digits-in-tn.js │ │ ├── no-dynamic-translations.js │ │ └── no-styled-shortcut.js │ └── yarn.lock └── yarn.lock /.github/workflows/integration.yml: -------------------------------------------------------------------------------- 1 | name: integration 2 | 3 | on: pull_request 4 | 5 | 6 | jobs: 7 | lint: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@v3 12 | 13 | 14 | - name: Checkout sentry repository 15 | uses: actions/checkout@v3 16 | with: 17 | repository: getsentry/sentry 18 | path: sentry 19 | 20 | - uses: actions/setup-node@v3 21 | with: 22 | cache: 'yarn' 23 | node-version: '20' 24 | 25 | - name: Setup Dependencies 26 | run: yarn install --frozen-lockfile 27 | 28 | # We add the package instead of linking here because we need to make 29 | # sure all dependencies are synced as well, which link will not do. 30 | - name: Install sentry dependencies 31 | run: | 32 | cd sentry 33 | yarn install --frozen-lockfile 34 | yarn add -D ../packages/eslint-config-sentry-app 35 | 36 | - name: Run lint in sentry 37 | env: 38 | SENTRY_ESLINT_RELAXED: 1 39 | run: | 40 | cd sentry 41 | yarn lint:prettier && yarn lint:js && yarn lint:css 42 | -------------------------------------------------------------------------------- /.github/workflows/npmpublish.yml: -------------------------------------------------------------------------------- 1 | name: npm publish 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | publish-npm: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v3 13 | - uses: actions/setup-node@v3 14 | with: 15 | cache: 'yarn' 16 | node-version: '20' 17 | registry-url: https://registry.npmjs.org/ 18 | - name: Install Depdendencies 19 | run: | 20 | yarn install --frozen-lockfile 21 | - name: Bootstrap lerna 22 | run: | 23 | yarn lerna bootstrap 24 | - name: Run Tests 25 | run: | 26 | yarn test 27 | - name: Publish 28 | run: | 29 | git config user.name "GitHub Actions" 30 | git config user.email "<>" 31 | yarn lerna publish minor -y --force-publish=* --conventional-commits 32 | env: 33 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 34 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: test 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | 9 | 10 | jobs: 11 | test: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-node@v3 16 | with: 17 | cache: 'yarn' 18 | node-version: '20' 19 | - run: yarn install --frozen-lockfile 20 | - run: yarn lerna bootstrap 21 | - run: yarn test:lint 22 | - run: yarn test 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | yarn-error.log 4 | lerna-debug.log 5 | .idea 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-config-sentry-monorepo 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-config-sentry-monorepo 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-config-sentry-monorepo 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-config-sentry-monorepo 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-config-sentry-monorepo 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-config-sentry-monorepo 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-config-sentry-monorepo 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-config-sentry-monorepo 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-config-sentry-monorepo 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-config-sentry-monorepo 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-config-sentry-monorepo 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-config-sentry-monorepo 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-config-sentry-monorepo 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-config-sentry-monorepo 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-config-sentry-monorepo 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-config-sentry-monorepo 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-config-sentry-monorepo 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-config-sentry-monorepo 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-config-sentry-monorepo 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-config-sentry-monorepo 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-config-sentry-monorepo 290 | 291 | 292 | 293 | 294 | 295 | # 1.112.0 (2023-04-13) 296 | 297 | **Note:** Version bump only for package eslint-config-sentry-monorepo 298 | 299 | 300 | 301 | 302 | 303 | # 1.111.0 (2023-03-31) 304 | 305 | **Note:** Version bump only for package eslint-config-sentry-monorepo 306 | 307 | 308 | 309 | 310 | 311 | # 1.110.0 (2023-02-21) 312 | 313 | **Note:** Version bump only for package eslint-config-sentry-monorepo 314 | 315 | 316 | 317 | 318 | 319 | # 1.109.0 (2022-11-29) 320 | 321 | **Note:** Version bump only for package eslint-config-sentry-monorepo 322 | 323 | 324 | 325 | 326 | 327 | # 1.108.0 (2022-11-29) 328 | 329 | **Note:** Version bump only for package eslint-config-sentry-monorepo 330 | 331 | 332 | 333 | 334 | 335 | # 1.107.0 (2022-10-24) 336 | 337 | **Note:** Version bump only for package eslint-config-sentry-monorepo 338 | 339 | 340 | 341 | 342 | 343 | # 1.106.0 (2022-10-24) 344 | 345 | **Note:** Version bump only for package eslint-config-sentry-monorepo 346 | 347 | 348 | 349 | 350 | 351 | # 1.105.0 (2022-10-24) 352 | 353 | **Note:** Version bump only for package eslint-config-sentry-monorepo 354 | 355 | 356 | 357 | 358 | 359 | # 1.104.0 (2022-10-20) 360 | 361 | **Note:** Version bump only for package eslint-config-sentry-monorepo 362 | 363 | 364 | 365 | 366 | 367 | # 1.103.0 (2022-10-20) 368 | 369 | **Note:** Version bump only for package eslint-config-sentry-monorepo 370 | 371 | 372 | 373 | 374 | 375 | # 1.102.0 (2022-10-20) 376 | 377 | **Note:** Version bump only for package eslint-config-sentry-monorepo 378 | 379 | 380 | 381 | 382 | 383 | # 1.101.0 (2022-10-20) 384 | 385 | **Note:** Version bump only for package eslint-config-sentry-monorepo 386 | 387 | 388 | 389 | 390 | 391 | # 1.100.0 (2022-09-13) 392 | 393 | **Note:** Version bump only for package eslint-config-sentry-monorepo 394 | 395 | 396 | 397 | 398 | 399 | # 1.99.0 (2022-09-13) 400 | 401 | **Note:** Version bump only for package eslint-config-sentry-monorepo 402 | 403 | 404 | 405 | 406 | 407 | # 1.98.0 (2022-09-12) 408 | 409 | **Note:** Version bump only for package eslint-config-sentry-monorepo 410 | 411 | 412 | 413 | 414 | 415 | # 1.97.0 (2022-08-29) 416 | 417 | **Note:** Version bump only for package eslint-config-sentry-monorepo 418 | 419 | 420 | 421 | 422 | 423 | # 1.96.0 (2022-08-11) 424 | 425 | **Note:** Version bump only for package eslint-config-sentry-monorepo 426 | 427 | 428 | 429 | 430 | 431 | # 1.95.0 (2022-07-14) 432 | 433 | 434 | ### Features 435 | 436 | * **rules:** Prevent imports of the withRouter HOC ([8b5f846](https://github.com/getsentry/eslint-config-sentry/commit/8b5f8460e38241b27f227aa867034bfb8d859aae)) 437 | 438 | 439 | 440 | 441 | 442 | # 1.94.0 (2022-06-03) 443 | 444 | **Note:** Version bump only for package eslint-config-sentry-monorepo 445 | 446 | 447 | 448 | 449 | 450 | # 1.93.0 (2022-04-25) 451 | 452 | **Note:** Version bump only for package eslint-config-sentry-monorepo 453 | 454 | 455 | 456 | 457 | 458 | # 1.92.0 (2022-04-06) 459 | 460 | **Note:** Version bump only for package eslint-config-sentry-monorepo 461 | 462 | 463 | 464 | 465 | 466 | # 1.91.0 (2022-04-04) 467 | 468 | **Note:** Version bump only for package eslint-config-sentry-monorepo 469 | 470 | 471 | 472 | 473 | 474 | # 1.90.0 (2022-04-04) 475 | 476 | **Note:** Version bump only for package eslint-config-sentry-monorepo 477 | 478 | 479 | 480 | 481 | 482 | # 1.89.0 (2022-04-04) 483 | 484 | **Note:** Version bump only for package eslint-config-sentry-monorepo 485 | 486 | 487 | 488 | 489 | 490 | # 1.88.0 (2022-04-04) 491 | 492 | **Note:** Version bump only for package eslint-config-sentry-monorepo 493 | 494 | 495 | 496 | 497 | 498 | # 1.87.0 (2022-04-04) 499 | 500 | **Note:** Version bump only for package eslint-config-sentry-monorepo 501 | 502 | 503 | 504 | 505 | 506 | # 1.86.0 (2022-04-04) 507 | 508 | **Note:** Version bump only for package eslint-config-sentry-monorepo 509 | 510 | 511 | 512 | 513 | 514 | # 1.85.0 (2022-04-04) 515 | 516 | **Note:** Version bump only for package eslint-config-sentry-monorepo 517 | 518 | 519 | 520 | 521 | 522 | # 1.84.0 (2022-04-04) 523 | 524 | **Note:** Version bump only for package eslint-config-sentry-monorepo 525 | 526 | 527 | 528 | 529 | 530 | # 1.83.0 (2022-04-01) 531 | 532 | **Note:** Version bump only for package eslint-config-sentry-monorepo 533 | 534 | 535 | 536 | 537 | 538 | # 1.82.0 (2022-03-30) 539 | 540 | **Note:** Version bump only for package eslint-config-sentry-monorepo 541 | 542 | 543 | 544 | 545 | 546 | # 1.81.0 (2022-03-30) 547 | 548 | **Note:** Version bump only for package eslint-config-sentry-monorepo 549 | 550 | 551 | 552 | 553 | 554 | # 1.80.0 (2022-03-30) 555 | 556 | **Note:** Version bump only for package eslint-config-sentry-monorepo 557 | 558 | 559 | 560 | 561 | 562 | # 1.79.0 (2022-03-18) 563 | 564 | **Note:** Version bump only for package eslint-config-sentry-monorepo 565 | 566 | 567 | 568 | 569 | 570 | # 1.78.0 (2022-03-08) 571 | 572 | **Note:** Version bump only for package eslint-config-sentry-monorepo 573 | 574 | 575 | 576 | 577 | 578 | # 1.77.0 (2022-02-25) 579 | 580 | **Note:** Version bump only for package eslint-config-sentry-monorepo 581 | 582 | 583 | 584 | 585 | 586 | # 1.76.0 (2022-02-21) 587 | 588 | **Note:** Version bump only for package eslint-config-sentry-monorepo 589 | 590 | 591 | 592 | 593 | 594 | # 1.75.0 (2022-02-21) 595 | 596 | **Note:** Version bump only for package eslint-config-sentry-monorepo 597 | 598 | 599 | 600 | 601 | 602 | # 1.74.0 (2022-01-31) 603 | 604 | **Note:** Version bump only for package eslint-config-sentry-monorepo 605 | 606 | 607 | 608 | 609 | 610 | # 1.73.0 (2022-01-18) 611 | 612 | **Note:** Version bump only for package eslint-config-sentry-monorepo 613 | 614 | 615 | 616 | 617 | 618 | # 1.72.0 (2022-01-14) 619 | 620 | **Note:** Version bump only for package eslint-config-sentry-monorepo 621 | 622 | 623 | 624 | 625 | 626 | # 1.71.0 (2022-01-14) 627 | 628 | **Note:** Version bump only for package eslint-config-sentry-monorepo 629 | 630 | 631 | 632 | 633 | 634 | # 1.70.0 (2022-01-05) 635 | 636 | **Note:** Version bump only for package eslint-config-sentry-monorepo 637 | 638 | 639 | 640 | 641 | 642 | # 1.69.0 (2021-12-06) 643 | 644 | **Note:** Version bump only for package eslint-config-sentry-monorepo 645 | 646 | 647 | 648 | 649 | 650 | # 1.68.0 (2021-11-12) 651 | 652 | **Note:** Version bump only for package eslint-config-sentry-monorepo 653 | 654 | 655 | 656 | 657 | 658 | # 1.67.0 (2021-11-04) 659 | 660 | **Note:** Version bump only for package eslint-config-sentry-monorepo 661 | 662 | 663 | 664 | 665 | 666 | # 1.66.0 (2021-11-04) 667 | 668 | **Note:** Version bump only for package eslint-config-sentry-monorepo 669 | 670 | 671 | 672 | 673 | 674 | # 1.65.0 (2021-11-03) 675 | 676 | **Note:** Version bump only for package eslint-config-sentry-monorepo 677 | 678 | 679 | 680 | 681 | 682 | # 1.64.0 (2021-10-29) 683 | 684 | **Note:** Version bump only for package eslint-config-sentry-monorepo 685 | 686 | 687 | 688 | 689 | 690 | # 1.63.0 (2021-10-25) 691 | 692 | **Note:** Version bump only for package eslint-config-sentry-monorepo 693 | 694 | 695 | 696 | 697 | 698 | # 1.62.0 (2021-09-14) 699 | 700 | **Note:** Version bump only for package eslint-config-sentry-monorepo 701 | 702 | 703 | 704 | 705 | 706 | # 1.61.0 (2021-08-31) 707 | 708 | **Note:** Version bump only for package eslint-config-sentry-monorepo 709 | 710 | 711 | 712 | 713 | 714 | # 1.60.0 (2021-08-04) 715 | 716 | **Note:** Version bump only for package eslint-config-sentry-monorepo 717 | 718 | 719 | 720 | 721 | 722 | # 1.59.0 (2021-08-04) 723 | 724 | **Note:** Version bump only for package eslint-config-sentry-monorepo 725 | 726 | 727 | 728 | 729 | 730 | # 1.58.0 (2021-06-21) 731 | 732 | **Note:** Version bump only for package eslint-config-sentry-monorepo 733 | 734 | 735 | 736 | 737 | 738 | # 1.57.0 (2021-06-21) 739 | 740 | **Note:** Version bump only for package eslint-config-sentry-monorepo 741 | 742 | 743 | 744 | 745 | 746 | # 1.56.0 (2021-06-21) 747 | 748 | **Note:** Version bump only for package eslint-config-sentry-monorepo 749 | 750 | 751 | 752 | 753 | 754 | # 1.55.0 (2021-05-12) 755 | 756 | **Note:** Version bump only for package eslint-config-sentry-monorepo 757 | 758 | 759 | 760 | 761 | 762 | # 1.54.0 (2021-05-10) 763 | 764 | **Note:** Version bump only for package eslint-config-sentry-monorepo 765 | 766 | 767 | 768 | 769 | 770 | # 1.53.0 (2021-05-05) 771 | 772 | **Note:** Version bump only for package eslint-config-sentry-monorepo 773 | 774 | 775 | 776 | 777 | 778 | # 1.52.0 (2021-05-04) 779 | 780 | **Note:** Version bump only for package eslint-config-sentry-monorepo 781 | 782 | 783 | 784 | 785 | 786 | # 1.51.0 (2021-04-07) 787 | 788 | **Note:** Version bump only for package eslint-config-sentry-monorepo 789 | 790 | 791 | 792 | 793 | 794 | # 1.50.0 (2021-01-25) 795 | 796 | **Note:** Version bump only for package eslint-config-sentry-monorepo 797 | 798 | 799 | 800 | 801 | 802 | # 1.49.0 (2021-01-13) 803 | 804 | **Note:** Version bump only for package eslint-config-sentry-monorepo 805 | 806 | 807 | 808 | 809 | 810 | # 1.48.0 (2021-01-13) 811 | 812 | **Note:** Version bump only for package eslint-config-sentry-monorepo 813 | 814 | 815 | 816 | 817 | 818 | # 1.47.0 (2020-12-02) 819 | 820 | **Note:** Version bump only for package eslint-config-sentry-monorepo 821 | 822 | 823 | 824 | 825 | 826 | # 1.46.0 (2020-11-21) 827 | 828 | **Note:** Version bump only for package eslint-config-sentry-monorepo 829 | 830 | 831 | 832 | 833 | 834 | # 1.45.0 (2020-11-17) 835 | 836 | **Note:** Version bump only for package eslint-config-sentry-monorepo 837 | 838 | 839 | 840 | 841 | 842 | # 1.44.0 (2020-09-11) 843 | 844 | **Note:** Version bump only for package eslint-config-sentry-monorepo 845 | 846 | 847 | 848 | 849 | 850 | # 1.43.0 (2020-07-06) 851 | 852 | **Note:** Version bump only for package eslint-config-sentry-monorepo 853 | 854 | 855 | 856 | 857 | 858 | # 1.42.0 (2020-07-02) 859 | 860 | **Note:** Version bump only for package eslint-config-sentry-monorepo 861 | 862 | 863 | 864 | 865 | 866 | # 1.41.0 (2020-06-18) 867 | 868 | **Note:** Version bump only for package eslint-config-sentry-monorepo 869 | 870 | 871 | 872 | 873 | 874 | # 1.40.0 (2020-06-16) 875 | 876 | **Note:** Version bump only for package eslint-config-sentry-monorepo 877 | 878 | 879 | 880 | 881 | 882 | # 1.39.0 (2020-06-12) 883 | 884 | **Note:** Version bump only for package eslint-config-sentry-monorepo 885 | 886 | 887 | 888 | 889 | 890 | # 1.38.0 (2020-05-26) 891 | 892 | **Note:** Version bump only for package eslint-config-sentry-monorepo 893 | 894 | 895 | 896 | 897 | 898 | # [1.37.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.36.0...v1.37.0) (2020-05-19) 899 | 900 | 901 | ### Features 902 | 903 | * **rule:** Group `sentry`, `getsentry`, and `admin` separately ([9027667](https://github.com/getsentry/eslint-config-sentry/commit/9027667d250ba3f448df942097591dcc829647c8)) 904 | 905 | 906 | 907 | 908 | 909 | # [1.36.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.35.0...v1.36.0) (2020-03-27) 910 | 911 | 912 | ### Features 913 | 914 | * **rule:** Restrict usage of `lodash/get`... ([b72a446](https://github.com/getsentry/eslint-config-sentry/commit/b72a4467ab2bee0abe5567d708a1b064f703eda4)) 915 | 916 | 917 | 918 | 919 | 920 | # [1.35.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.34.0...v1.35.0) (2020-03-17) 921 | 922 | 923 | ### Features 924 | 925 | * **sentry-app:** Move typescript eslint parser and plugin into app config ([4a8374e](https://github.com/getsentry/eslint-config-sentry/commit/4a8374ef6d4da78306ffdcf057808f2b61185736)) 926 | 927 | 928 | 929 | 930 | 931 | # [1.34.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.33.0...v1.34.0) (2020-02-28) 932 | 933 | 934 | ### Features 935 | 936 | * **rule:** Enable arrow-body-style ([7013601](https://github.com/getsentry/eslint-config-sentry/commit/7013601)) 937 | 938 | 939 | 940 | 941 | 942 | # [1.33.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.32.0...v1.33.0) (2020-02-28) 943 | 944 | 945 | ### Features 946 | 947 | * **rule:** added import/order rule ([01c44d1](https://github.com/getsentry/eslint-config-sentry/commit/01c44d116d7fc90cb686f35c3b3f0c781b70c78f)) 948 | 949 | 950 | 951 | 952 | 953 | # [1.32.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.31.0...v1.32.0) (2020-02-27) 954 | 955 | 956 | ### Bug Fixes 957 | 958 | * **yarn:** fixed yarn ([a9f5694](https://github.com/getsentry/eslint-config-sentry/commit/a9f5694fc3de2ce9c4b8d745f44312997c7a5ece)) 959 | 960 | 961 | 962 | 963 | 964 | # [1.31.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.30.0...v1.31.0) (2020-02-13) 965 | 966 | **Note:** Version bump only for package eslint-config-sentry-monorepo 967 | 968 | 969 | 970 | 971 | 972 | # [1.30.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.30.0) (2020-01-27) 973 | 974 | 975 | ### Features 976 | 977 | * **rule:** Adds rule to disallow %d within tn() ([#50](https://github.com/getsentry/eslint-config-sentry/issues/50)) ([b9edec3](https://github.com/getsentry/eslint-config-sentry/commit/b9edec3)) 978 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 979 | 980 | 981 | 982 | 983 | 984 | # [1.29.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.29.0) (2020-01-22) 985 | 986 | 987 | ### Features 988 | 989 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 990 | 991 | 992 | 993 | 994 | 995 | # [1.28.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.26.0...v1.28.0) (2020-01-10) 996 | 997 | 998 | ### Features 999 | 1000 | * **rule:** Forbid importing directly from main module ([f9ff56f](https://github.com/getsentry/eslint-config-sentry/commit/f9ff56f)) 1001 | * **rule:** Update `grid-emotion` rule to new library: `reflexbox` ([f6a5764](https://github.com/getsentry/eslint-config-sentry/commit/f6a5764)) 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | # [1.27.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.26.0...v1.27.0) (2019-11-12) 1008 | 1009 | 1010 | ### Features 1011 | 1012 | * **rule:** Forbid importing directly from main module ([4160fef](https://github.com/getsentry/eslint-config-sentry/commit/4160fef)) 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | # [1.26.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.25.0...v1.26.0) (2019-11-05) 1019 | 1020 | ### Features 1021 | 1022 | * **rule:** Restrict import of `marked` ([f337b14](https://github.com/getsentry/eslint-config-sentry/commit/f337b14)) 1023 | 1024 | 1025 | # [1.25.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.24.0...v1.25.0) (2019-10-23) 1026 | 1027 | 1028 | ### Features 1029 | 1030 | * **docs:** Add link to `grid-emotion` migration guide ([a21975b](https://github.com/getsentry/eslint-config-sentry/commit/a21975b)) 1031 | 1032 | 1033 | 1034 | # [1.24.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.23.0...v1.24.0) (2019-10-18) 1035 | 1036 | 1037 | ### Features 1038 | 1039 | * **rule:** Restrict `grid-emotion` in strict ruleset ([#41](https://github.com/getsentry/eslint-config-sentry/issues/41)) ([dfe84ea](https://github.com/getsentry/eslint-config-sentry/commit/dfe84ea)) 1040 | 1041 | 1042 | 1043 | # [1.23.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.22.0...v1.23.0) (2019-10-16) 1044 | 1045 | 1046 | ### Features 1047 | 1048 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 1049 | 1050 | 1051 | 1052 | # [1.22.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.21.0...v1.22.0) (2019-10-15) 1053 | 1054 | 1055 | ### Features 1056 | 1057 | * **plugin:** Remove `eslint-plugin-getsentry` ([#34](https://github.com/getsentry/eslint-config-sentry/issues/34)) ([6f1a13b](https://github.com/getsentry/eslint-config-sentry/commit/6f1a13b)) 1058 | * **rule:** Add rule to restrict importing from `enzyme` ([#32](https://github.com/getsentry/eslint-config-sentry/issues/32)) ([8895154](https://github.com/getsentry/eslint-config-sentry/commit/8895154)) 1059 | * **rule:** Downgrade `react/sort-comp` to a warning instead of error ([#36](https://github.com/getsentry/eslint-config-sentry/issues/36)) ([5866d6a](https://github.com/getsentry/eslint-config-sentry/commit/5866d6a)) 1060 | 1061 | 1062 | 1063 | # [1.21.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.21.0) (2019-10-14) 1064 | 1065 | 1066 | ### Bug Fixes 1067 | 1068 | * **react:** Fix react version settings ([#31](https://github.com/getsentry/eslint-config-sentry/issues/31)) ([c7936ad](https://github.com/getsentry/eslint-config-sentry/commit/c7936ad)) 1069 | 1070 | 1071 | ### Features 1072 | 1073 | * **rule:** Add rule to restrict importing from `enzyme` ([#32](https://github.com/getsentry/eslint-config-sentry/issues/32)) ([8895154](https://github.com/getsentry/eslint-config-sentry/commit/8895154)) 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | ## [1.16.1](https://github.com/getsentry/eslint-config-sentry/compare/v1.16.0...v1.16.1) (2019-10-04) 1080 | 1081 | **Note:** Version bump only for package eslint-config-sentry-monorepo 1082 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Install 2 | `yarn add -D eslint-config-sentry` 3 | 4 | For packages that use react: 5 | `yarn add -D eslint-config-sentry-react` 6 | 7 | ## Configuration 8 | In your `.eslintrc` (or equivalent config file) 9 | 10 | Use `sentry` for base rules, `sentry-react` contains rules for [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) 11 | and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). 12 | 13 | ```json 14 | { 15 | "extends": [ 16 | "sentry-react", 17 | ], 18 | } 19 | ``` 20 | 21 | ## Deployment 22 | Create a new branch and PR when creating and tagging a new release. Then run 23 | 24 | ```bash 25 | yarn release 26 | ``` 27 | 28 | to bump the verison (it current will always be a minor bump) and create a commit. `lerna` will also try to update relevant `CHANGELOG`s based on conventional commits. 29 | 30 | After merging to master, GitHub Actions will be used to publish to the npm registry. 31 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", 3 | "vcs": { 4 | "enabled": true, 5 | "clientKind": "git", 6 | "useIgnoreFile": true 7 | }, 8 | "organizeImports": { 9 | "enabled": false 10 | }, 11 | "linter": { 12 | "enabled": false 13 | }, 14 | "files": { 15 | "ignoreUnknown": true 16 | }, 17 | "formatter": { 18 | "enabled": true, 19 | "formatWithErrors": false, 20 | "indentStyle": "space", 21 | "indentWidth": 2, 22 | "lineWidth": 90, 23 | "ignore": ["*/package.json", "lerna.json"] 24 | }, 25 | "javascript": { 26 | "formatter": { 27 | "enabled": true, 28 | "quoteStyle": "single", 29 | "arrowParentheses": "asNeeded", 30 | "trailingCommas": "es5", 31 | "lineEnding": "lf", 32 | "bracketSpacing": false, 33 | "bracketSameLine": false, 34 | "semicolons": "always" 35 | } 36 | }, 37 | "json": { 38 | "formatter": { 39 | "enabled": true 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "2.1.2", 3 | "packages": [ 4 | "packages/*" 5 | ], 6 | "npmClient": "yarn", 7 | "command": { 8 | "version": { 9 | "message": "chore(release): Publish %s" 10 | }, 11 | "publish": { 12 | "message": "chore(release): Publish %s", 13 | "yes": true 14 | } 15 | }, 16 | "version": "2.10.0" 17 | } 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-sentry-monorepo", 3 | "private": true, 4 | "scripts": { 5 | "test": "yarn lerna run test", 6 | "test:lint": "biome check .", 7 | "fix:lint": "biome check . --apply", 8 | "release": "yarn lerna exec -- yarn && yarn lerna version minor --conventional-commits" 9 | }, 10 | "devDependencies": { 11 | "@biomejs/biome": "^1.9.3", 12 | "lerna": "3.20.2" 13 | }, 14 | "repository": "getsentry/eslint-config-sentry", 15 | "volta": { 16 | "node": "20.10.0", 17 | "yarn": "1.22.5" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-app/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-config-sentry-app 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-config-sentry-app 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-config-sentry-app 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-config-sentry-app 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-config-sentry-app 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-config-sentry-app 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-config-sentry-app 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-config-sentry-app 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-config-sentry-app 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-config-sentry-app 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-config-sentry-app 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-config-sentry-app 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-config-sentry-app 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-config-sentry-app 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-config-sentry-app 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-config-sentry-app 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-config-sentry-app 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-config-sentry-app 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-config-sentry-app 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-config-sentry-app 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-config-sentry-app 290 | 291 | 292 | 293 | 294 | 295 | # 1.112.0 (2023-04-13) 296 | 297 | **Note:** Version bump only for package eslint-config-sentry-app 298 | 299 | 300 | 301 | 302 | 303 | # 1.111.0 (2023-03-31) 304 | 305 | **Note:** Version bump only for package eslint-config-sentry-app 306 | 307 | 308 | 309 | 310 | 311 | # 1.110.0 (2023-02-21) 312 | 313 | **Note:** Version bump only for package eslint-config-sentry-app 314 | 315 | 316 | 317 | 318 | 319 | # 1.109.0 (2022-11-29) 320 | 321 | **Note:** Version bump only for package eslint-config-sentry-app 322 | 323 | 324 | 325 | 326 | 327 | # 1.108.0 (2022-11-29) 328 | 329 | **Note:** Version bump only for package eslint-config-sentry-app 330 | 331 | 332 | 333 | 334 | 335 | # 1.107.0 (2022-10-24) 336 | 337 | **Note:** Version bump only for package eslint-config-sentry-app 338 | 339 | 340 | 341 | 342 | 343 | # 1.106.0 (2022-10-24) 344 | 345 | **Note:** Version bump only for package eslint-config-sentry-app 346 | 347 | 348 | 349 | 350 | 351 | # 1.105.0 (2022-10-24) 352 | 353 | **Note:** Version bump only for package eslint-config-sentry-app 354 | 355 | 356 | 357 | 358 | 359 | # 1.104.0 (2022-10-20) 360 | 361 | **Note:** Version bump only for package eslint-config-sentry-app 362 | 363 | 364 | 365 | 366 | 367 | # 1.103.0 (2022-10-20) 368 | 369 | **Note:** Version bump only for package eslint-config-sentry-app 370 | 371 | 372 | 373 | 374 | 375 | # 1.102.0 (2022-10-20) 376 | 377 | **Note:** Version bump only for package eslint-config-sentry-app 378 | 379 | 380 | 381 | 382 | 383 | # 1.101.0 (2022-10-20) 384 | 385 | **Note:** Version bump only for package eslint-config-sentry-app 386 | 387 | 388 | 389 | 390 | 391 | # 1.100.0 (2022-09-13) 392 | 393 | **Note:** Version bump only for package eslint-config-sentry-app 394 | 395 | 396 | 397 | 398 | 399 | # 1.99.0 (2022-09-13) 400 | 401 | **Note:** Version bump only for package eslint-config-sentry-app 402 | 403 | 404 | 405 | 406 | 407 | # 1.98.0 (2022-09-12) 408 | 409 | **Note:** Version bump only for package eslint-config-sentry-app 410 | 411 | 412 | 413 | 414 | 415 | # 1.97.0 (2022-08-29) 416 | 417 | **Note:** Version bump only for package eslint-config-sentry-app 418 | 419 | 420 | 421 | 422 | 423 | # 1.96.0 (2022-08-11) 424 | 425 | **Note:** Version bump only for package eslint-config-sentry-app 426 | 427 | 428 | 429 | 430 | 431 | # 1.95.0 (2022-07-14) 432 | 433 | 434 | ### Features 435 | 436 | * **rules:** Prevent imports of the withRouter HOC ([8b5f846](https://github.com/getsentry/eslint-config-sentry/commit/8b5f8460e38241b27f227aa867034bfb8d859aae)) 437 | 438 | 439 | 440 | 441 | 442 | # 1.94.0 (2022-06-03) 443 | 444 | **Note:** Version bump only for package eslint-config-sentry-app 445 | 446 | 447 | 448 | 449 | 450 | # 1.93.0 (2022-04-25) 451 | 452 | **Note:** Version bump only for package eslint-config-sentry-app 453 | 454 | 455 | 456 | 457 | 458 | # 1.92.0 (2022-04-06) 459 | 460 | **Note:** Version bump only for package eslint-config-sentry-app 461 | 462 | 463 | 464 | 465 | 466 | # 1.91.0 (2022-04-04) 467 | 468 | **Note:** Version bump only for package eslint-config-sentry-app 469 | 470 | 471 | 472 | 473 | 474 | # 1.90.0 (2022-04-04) 475 | 476 | **Note:** Version bump only for package eslint-config-sentry-app 477 | 478 | 479 | 480 | 481 | 482 | # 1.89.0 (2022-04-04) 483 | 484 | **Note:** Version bump only for package eslint-config-sentry-app 485 | 486 | 487 | 488 | 489 | 490 | # 1.88.0 (2022-04-04) 491 | 492 | **Note:** Version bump only for package eslint-config-sentry-app 493 | 494 | 495 | 496 | 497 | 498 | # 1.87.0 (2022-04-04) 499 | 500 | **Note:** Version bump only for package eslint-config-sentry-app 501 | 502 | 503 | 504 | 505 | 506 | # 1.86.0 (2022-04-04) 507 | 508 | **Note:** Version bump only for package eslint-config-sentry-app 509 | 510 | 511 | 512 | 513 | 514 | # 1.85.0 (2022-04-04) 515 | 516 | **Note:** Version bump only for package eslint-config-sentry-app 517 | 518 | 519 | 520 | 521 | 522 | # 1.84.0 (2022-04-04) 523 | 524 | **Note:** Version bump only for package eslint-config-sentry-app 525 | 526 | 527 | 528 | 529 | 530 | # 1.83.0 (2022-04-01) 531 | 532 | **Note:** Version bump only for package eslint-config-sentry-app 533 | 534 | 535 | 536 | 537 | 538 | # 1.82.0 (2022-03-30) 539 | 540 | **Note:** Version bump only for package eslint-config-sentry-app 541 | 542 | 543 | 544 | 545 | 546 | # 1.81.0 (2022-03-30) 547 | 548 | **Note:** Version bump only for package eslint-config-sentry-app 549 | 550 | 551 | 552 | 553 | 554 | # 1.80.0 (2022-03-30) 555 | 556 | **Note:** Version bump only for package eslint-config-sentry-app 557 | 558 | 559 | 560 | 561 | 562 | # 1.79.0 (2022-03-18) 563 | 564 | **Note:** Version bump only for package eslint-config-sentry-app 565 | 566 | 567 | 568 | 569 | 570 | # 1.78.0 (2022-03-08) 571 | 572 | **Note:** Version bump only for package eslint-config-sentry-app 573 | 574 | 575 | 576 | 577 | 578 | # 1.77.0 (2022-02-25) 579 | 580 | **Note:** Version bump only for package eslint-config-sentry-app 581 | 582 | 583 | 584 | 585 | 586 | # 1.76.0 (2022-02-21) 587 | 588 | **Note:** Version bump only for package eslint-config-sentry-app 589 | 590 | 591 | 592 | 593 | 594 | # 1.75.0 (2022-02-21) 595 | 596 | **Note:** Version bump only for package eslint-config-sentry-app 597 | 598 | 599 | 600 | 601 | 602 | # 1.74.0 (2022-01-31) 603 | 604 | **Note:** Version bump only for package eslint-config-sentry-app 605 | 606 | 607 | 608 | 609 | 610 | # 1.73.0 (2022-01-18) 611 | 612 | **Note:** Version bump only for package eslint-config-sentry-app 613 | 614 | 615 | 616 | 617 | 618 | # 1.72.0 (2022-01-14) 619 | 620 | **Note:** Version bump only for package eslint-config-sentry-app 621 | 622 | 623 | 624 | 625 | 626 | # 1.71.0 (2022-01-14) 627 | 628 | **Note:** Version bump only for package eslint-config-sentry-app 629 | 630 | 631 | 632 | 633 | 634 | # 1.70.0 (2022-01-05) 635 | 636 | **Note:** Version bump only for package eslint-config-sentry-app 637 | 638 | 639 | 640 | 641 | 642 | # 1.69.0 (2021-12-06) 643 | 644 | **Note:** Version bump only for package eslint-config-sentry-app 645 | 646 | 647 | 648 | 649 | 650 | # 1.68.0 (2021-11-12) 651 | 652 | **Note:** Version bump only for package eslint-config-sentry-app 653 | 654 | 655 | 656 | 657 | 658 | # 1.67.0 (2021-11-04) 659 | 660 | **Note:** Version bump only for package eslint-config-sentry-app 661 | 662 | 663 | 664 | 665 | 666 | # 1.66.0 (2021-11-04) 667 | 668 | **Note:** Version bump only for package eslint-config-sentry-app 669 | 670 | 671 | 672 | 673 | 674 | # 1.65.0 (2021-11-03) 675 | 676 | **Note:** Version bump only for package eslint-config-sentry-app 677 | 678 | 679 | 680 | 681 | 682 | # 1.64.0 (2021-10-29) 683 | 684 | **Note:** Version bump only for package eslint-config-sentry-app 685 | 686 | 687 | 688 | 689 | 690 | # 1.63.0 (2021-10-25) 691 | 692 | **Note:** Version bump only for package eslint-config-sentry-app 693 | 694 | 695 | 696 | 697 | 698 | # 1.62.0 (2021-09-14) 699 | 700 | **Note:** Version bump only for package eslint-config-sentry-app 701 | 702 | 703 | 704 | 705 | 706 | # 1.61.0 (2021-08-31) 707 | 708 | **Note:** Version bump only for package eslint-config-sentry-app 709 | 710 | 711 | 712 | 713 | 714 | # 1.60.0 (2021-08-04) 715 | 716 | **Note:** Version bump only for package eslint-config-sentry-app 717 | 718 | 719 | 720 | 721 | 722 | # 1.59.0 (2021-08-04) 723 | 724 | **Note:** Version bump only for package eslint-config-sentry-app 725 | 726 | 727 | 728 | 729 | 730 | # 1.58.0 (2021-06-21) 731 | 732 | **Note:** Version bump only for package eslint-config-sentry-app 733 | 734 | 735 | 736 | 737 | 738 | # 1.57.0 (2021-06-21) 739 | 740 | **Note:** Version bump only for package eslint-config-sentry-app 741 | 742 | 743 | 744 | 745 | 746 | # 1.56.0 (2021-06-21) 747 | 748 | **Note:** Version bump only for package eslint-config-sentry-app 749 | 750 | 751 | 752 | 753 | 754 | # 1.55.0 (2021-05-12) 755 | 756 | **Note:** Version bump only for package eslint-config-sentry-app 757 | 758 | 759 | 760 | 761 | 762 | # 1.54.0 (2021-05-10) 763 | 764 | **Note:** Version bump only for package eslint-config-sentry-app 765 | 766 | 767 | 768 | 769 | 770 | # 1.53.0 (2021-05-05) 771 | 772 | **Note:** Version bump only for package eslint-config-sentry-app 773 | 774 | 775 | 776 | 777 | 778 | # 1.52.0 (2021-05-04) 779 | 780 | **Note:** Version bump only for package eslint-config-sentry-app 781 | 782 | 783 | 784 | 785 | 786 | # 1.51.0 (2021-04-07) 787 | 788 | **Note:** Version bump only for package eslint-config-sentry-app 789 | 790 | 791 | 792 | 793 | 794 | # 1.50.0 (2021-01-25) 795 | 796 | **Note:** Version bump only for package eslint-config-sentry-app 797 | 798 | 799 | 800 | 801 | 802 | # 1.49.0 (2021-01-13) 803 | 804 | **Note:** Version bump only for package eslint-config-sentry-app 805 | 806 | 807 | 808 | 809 | 810 | # 1.48.0 (2021-01-13) 811 | 812 | **Note:** Version bump only for package eslint-config-sentry-app 813 | 814 | 815 | 816 | 817 | 818 | # 1.47.0 (2020-12-02) 819 | 820 | **Note:** Version bump only for package eslint-config-sentry-app 821 | 822 | 823 | 824 | 825 | 826 | # 1.46.0 (2020-11-21) 827 | 828 | **Note:** Version bump only for package eslint-config-sentry-app 829 | 830 | 831 | 832 | 833 | 834 | # 1.45.0 (2020-11-17) 835 | 836 | **Note:** Version bump only for package eslint-config-sentry-app 837 | 838 | 839 | 840 | 841 | 842 | # 1.44.0 (2020-09-11) 843 | 844 | **Note:** Version bump only for package eslint-config-sentry-app 845 | 846 | 847 | 848 | 849 | 850 | # 1.43.0 (2020-07-06) 851 | 852 | **Note:** Version bump only for package eslint-config-sentry-app 853 | 854 | 855 | 856 | 857 | 858 | # 1.42.0 (2020-07-02) 859 | 860 | **Note:** Version bump only for package eslint-config-sentry-app 861 | 862 | 863 | 864 | 865 | 866 | # 1.41.0 (2020-06-18) 867 | 868 | **Note:** Version bump only for package eslint-config-sentry-app 869 | 870 | 871 | 872 | 873 | 874 | # 1.40.0 (2020-06-16) 875 | 876 | **Note:** Version bump only for package eslint-config-sentry-app 877 | 878 | 879 | 880 | 881 | 882 | # 1.39.0 (2020-06-12) 883 | 884 | **Note:** Version bump only for package eslint-config-sentry-app 885 | 886 | 887 | 888 | 889 | 890 | # 1.38.0 (2020-05-26) 891 | 892 | **Note:** Version bump only for package eslint-config-sentry-app 893 | 894 | 895 | 896 | 897 | 898 | # [1.37.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.36.0...v1.37.0) (2020-05-19) 899 | 900 | 901 | ### Features 902 | 903 | * **rule:** Group `sentry`, `getsentry`, and `admin` separately ([9027667](https://github.com/getsentry/eslint-config-sentry/commit/9027667d250ba3f448df942097591dcc829647c8)) 904 | 905 | 906 | 907 | 908 | 909 | # [1.36.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.35.0...v1.36.0) (2020-03-27) 910 | 911 | 912 | ### Features 913 | 914 | * **rule:** Restrict usage of `lodash/get`... ([b72a446](https://github.com/getsentry/eslint-config-sentry/commit/b72a4467ab2bee0abe5567d708a1b064f703eda4)) 915 | 916 | 917 | 918 | 919 | 920 | # [1.35.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.34.0...v1.35.0) (2020-03-17) 921 | 922 | 923 | ### Features 924 | 925 | * **sentry-app:** Move typescript eslint parser and plugin into app config ([4a8374e](https://github.com/getsentry/eslint-config-sentry/commit/4a8374ef6d4da78306ffdcf057808f2b61185736)) 926 | 927 | 928 | 929 | 930 | 931 | # [1.34.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.33.0...v1.34.0) (2020-02-28) 932 | 933 | **Note:** Version bump only for package eslint-config-sentry-app 934 | 935 | 936 | 937 | 938 | 939 | # [1.33.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.32.0...v1.33.0) (2020-02-28) 940 | 941 | 942 | ### Features 943 | 944 | * **rule:** added import/order rule ([01c44d1](https://github.com/getsentry/eslint-config-sentry/commit/01c44d116d7fc90cb686f35c3b3f0c781b70c78f)) 945 | 946 | 947 | 948 | 949 | 950 | # [1.32.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.31.0...v1.32.0) (2020-02-27) 951 | 952 | **Note:** Version bump only for package eslint-config-sentry-app 953 | 954 | 955 | 956 | 957 | 958 | # [1.31.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.30.0...v1.31.0) (2020-02-13) 959 | 960 | **Note:** Version bump only for package eslint-config-sentry-app 961 | 962 | 963 | 964 | 965 | 966 | # [1.30.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.30.0) (2020-01-27) 967 | 968 | 969 | ### Features 970 | 971 | * **rule:** Adds rule to disallow %d within tn() ([#50](https://github.com/getsentry/eslint-config-sentry/issues/50)) ([b9edec3](https://github.com/getsentry/eslint-config-sentry/commit/b9edec3)) 972 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 973 | 974 | 975 | 976 | 977 | 978 | # [1.29.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.29.0) (2020-01-22) 979 | 980 | 981 | ### Features 982 | 983 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 984 | 985 | 986 | 987 | 988 | 989 | # [1.28.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.26.0...v1.28.0) (2020-01-10) 990 | 991 | 992 | ### Features 993 | 994 | * **rule:** Forbid importing directly from main module ([f9ff56f](https://github.com/getsentry/eslint-config-sentry/commit/f9ff56f)) 995 | * **rule:** Update `grid-emotion` rule to new library: `reflexbox` ([f6a5764](https://github.com/getsentry/eslint-config-sentry/commit/f6a5764)) 996 | 997 | 998 | 999 | 1000 | 1001 | # [1.27.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.26.0...v1.27.0) (2019-11-12) 1002 | 1003 | 1004 | ### Features 1005 | 1006 | * **rule:** Forbid importing directly from main module ([4160fef](https://github.com/getsentry/eslint-config-sentry/commit/4160fef)) 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | # [1.26.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.25.0...v1.26.0) (2019-11-05) 1013 | 1014 | 1015 | ### Features 1016 | 1017 | * **rule:** Restrict import of `marked` ([f337b14](https://github.com/getsentry/eslint-config-sentry/commit/f337b14)) 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | # [1.25.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.24.0...v1.25.0) (2019-10-23) 1024 | 1025 | 1026 | ### Features 1027 | 1028 | * **docs:** Add link to `grid-emotion` migration guide ([a21975b](https://github.com/getsentry/eslint-config-sentry/commit/a21975b)) 1029 | 1030 | # [1.25.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.25.0) (2019-10-23) 1031 | 1032 | 1033 | # [1.24.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.23.0...v1.24.0) (2019-10-18) 1034 | 1035 | 1036 | ### Features 1037 | 1038 | * **rule:** Restrict `grid-emotion` in strict ruleset ([#41](https://github.com/getsentry/eslint-config-sentry/issues/41)) ([dfe84ea](https://github.com/getsentry/eslint-config-sentry/commit/dfe84ea)) 1039 | 1040 | 1041 | 1042 | 1043 | # [1.23.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.22.0...v1.23.0) (2019-10-16) 1044 | 1045 | 1046 | ### Features 1047 | 1048 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 1049 | 1050 | 1051 | 1052 | 1053 | # [1.22.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.21.0...v1.22.0) (2019-10-15) 1054 | 1055 | 1056 | ### Features 1057 | 1058 | * **plugin:** Remove `eslint-plugin-getsentry` ([#34](https://github.com/getsentry/eslint-config-sentry/issues/34)) ([6f1a13b](https://github.com/getsentry/eslint-config-sentry/commit/6f1a13b)) 1059 | 1060 | 1061 | 1062 | 1063 | # [1.21.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.21.0) (2019-10-14) 1064 | 1065 | 1066 | ### Features 1067 | 1068 | * **rule:** Add rule to restrict importing from `enzyme` ([#32](https://github.com/getsentry/eslint-config-sentry/issues/32)) ([8895154](https://github.com/getsentry/eslint-config-sentry/commit/8895154)) 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | ## [1.16.1](https://github.com/getsentry/eslint-config-sentry/compare/v1.16.0...v1.16.1) (2019-10-04) 1076 | 1077 | **Note:** Version bump only for package eslint-config-sentry-app 1078 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-app/README.md: -------------------------------------------------------------------------------- 1 | # Install 2 | `yarn add -D eslint-config-sentry` 3 | 4 | ## Configuration 5 | In your `.eslintrc` (or equivalent config file) 6 | 7 | Use `sentry` for base rules, `sentry/app` contains rules for [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) 8 | and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). 9 | 10 | ```json 11 | { 12 | "extends": [ 13 | "sentry/app" 14 | ], 15 | } 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-app/index.js: -------------------------------------------------------------------------------- 1 | // Default: sentry app 2 | module.exports = { 3 | extends: ['sentry-react', 'plugin:import/typescript'], 4 | 5 | parser: '@typescript-eslint/parser', 6 | 7 | parserOptions: { 8 | warnOnUnsupportedTypeScriptVersion: false, 9 | ecmaVersion: 6, 10 | sourceType: 'module', 11 | ecmaFeatures: { 12 | jsx: true, 13 | modules: true, 14 | legacyDecorators: true, 15 | }, 16 | }, 17 | 18 | env: { 19 | browser: true, 20 | es6: true, 21 | jest: true, 22 | jquery: true, // hard-loaded into vendor.js 23 | }, 24 | 25 | plugins: [ 26 | '@typescript-eslint', 27 | '@emotion', 28 | 'import', 29 | 'react', 30 | 'sentry', 31 | 'simple-import-sort', 32 | 'no-lookahead-lookbehind-regexp', 33 | ], 34 | 35 | settings: { 36 | 'import/parsers': { 37 | '@typescript-eslint/parser': ['.ts', '.tsx'], 38 | }, 39 | 'import/resolver': { 40 | typescript: {}, 41 | }, 42 | 'import/extensions': ['.js', '.jsx'], 43 | }, 44 | 45 | /** 46 | * Rules 47 | */ 48 | rules: { 49 | /** 50 | * emotion rules for v10 51 | * 52 | * This probably aren't as necessary anymore, but let's remove when we move to v11 53 | */ 54 | '@emotion/jsx-import': 'off', 55 | '@emotion/no-vanilla': 'error', 56 | '@emotion/import-from-emotion': 'error', 57 | '@emotion/styled-import': 'error', 58 | 59 | // no-undef is redundant with typescript as tsc will complain 60 | // A downside is that we won't get eslint errors about it, but your editors should 61 | // support tsc errors so.... 62 | 'no-undef': 'off', 63 | 64 | // Let formatter handle this 65 | 'arrow-body-style': 'off', 66 | 67 | /** 68 | * Need to use typescript version of these rules 69 | */ 70 | 'no-shadow': 'off', 71 | '@typescript-eslint/no-shadow': 'error', 72 | 73 | // This only override the `args` rule (which is "none"). There are too many errors and it's difficult to manually 74 | // fix them all, so we'll have to incrementally update. 75 | 'no-unused-vars': 'off', 76 | '@typescript-eslint/no-unused-vars': [ 77 | 'error', 78 | { 79 | vars: 'all', 80 | args: 'all', 81 | // TODO(scttcper): We could enable this to enforce catch (error) 82 | // https://eslint.org/docs/latest/rules/no-unused-vars#caughterrors 83 | caughtErrors: 'none', 84 | 85 | // Ignore vars that start with an underscore 86 | // e.g. if you want to omit a property using object spread: 87 | // 88 | // const {name: _name, ...props} = this.props; 89 | // 90 | varsIgnorePattern: '^_', 91 | argsIgnorePattern: '^_', 92 | argsIgnorePattern: '^_', 93 | destructuredArrayIgnorePattern: '^_', 94 | }, 95 | ], 96 | 97 | 'no-use-before-define': 'off', 98 | // This seems to have been turned on while previously it had been off 99 | '@typescript-eslint/no-use-before-define': ['off'], 100 | 101 | /** 102 | * Restricted imports, e.g. deprecated libraries, etc 103 | * 104 | * See: https://eslint.org/docs/rules/no-restricted-imports 105 | */ 106 | 'no-restricted-imports': [ 107 | 'error', 108 | { 109 | paths: [ 110 | { 111 | name: 'enzyme', 112 | message: 113 | 'Please import from `sentry-test/enzyme` instead. See: https://github.com/getsentry/frontend-handbook#undefined-theme-properties-in-tests for more information', 114 | }, 115 | { 116 | name: '@testing-library/react', 117 | message: 118 | 'Please import from `sentry-test/reactTestingLibrary` instead so that we can ensure consistency throughout the codebase', 119 | }, 120 | { 121 | name: '@testing-library/react-hooks', 122 | message: 123 | 'Please import from `sentry-test/reactTestingLibrary` instead so that we can ensure consistency throughout the codebase', 124 | }, 125 | { 126 | name: '@testing-library/user-event', 127 | message: 128 | 'Please import from `sentry-test/reactTestingLibrary` instead so that we can ensure consistency throughout the codebase', 129 | }, 130 | { 131 | name: '@sentry/browser', 132 | message: 133 | 'Please import from `@sentry/react` to ensure consistency throughout the codebase.', 134 | }, 135 | { 136 | name: 'marked', 137 | message: 138 | "Please import marked from 'app/utils/marked' so that we can ensure sanitation of marked output", 139 | }, 140 | 141 | { 142 | name: 'lodash', 143 | message: 144 | "Please import lodash utilities individually. e.g. `import isEqual from 'lodash/isEqual';`. See https://github.com/getsentry/frontend-handbook#lodash from for information", 145 | }, 146 | { 147 | name: 'lodash/get', 148 | message: 149 | 'Optional chaining `?.` and nullish coalescing operators `??` are available and preferred over using `lodash/get`. See https://github.com/getsentry/frontend-handbook#new-syntax for more information', 150 | }, 151 | { 152 | name: 'react-bootstrap', 153 | message: 154 | 'Avoid usage of any react-bootstrap components as it will soon be removed', 155 | }, 156 | { 157 | name: 'sentry/utils/theme', 158 | importNames: ['lightColors', 'darkColors'], 159 | message: 160 | "'lightColors' and 'darkColors' exports intended for use in Storybook only. Instead, use theme prop from emotion or the useTheme hook.", 161 | }, 162 | { 163 | name: 'react-router', 164 | importNames: ['withRouter'], 165 | message: 166 | "Use 'useLocation', 'useParams', 'useNavigate', 'useRoutes' from sentry/utils instead.", 167 | }, 168 | { 169 | name: 'sentry/utils/withSentryRouter', 170 | importNames: ['withSentryRouter'], 171 | message: 172 | "Use 'useLocation', 'useParams', 'useNavigate', 'useRoutes' from sentry/utils instead.", 173 | }, 174 | ], 175 | }, 176 | ], 177 | 178 | /** 179 | * Better import sorting 180 | */ 181 | 'sort-imports': 'off', 182 | 'import/order': 'off', 183 | 'simple-import-sort/imports': [ 184 | 'error', 185 | { 186 | groups: [ 187 | // Side effect imports. 188 | ['^\\u0000'], 189 | 190 | // Node.js builtins. 191 | [`^(${require('module').builtinModules.join('|')})(/|$)`], 192 | 193 | // Packages. `react` related packages come first. 194 | ['^react', '^@?\\w'], 195 | 196 | // Test should be separate from the app 197 | ['^(sentry-test|getsentry-test)(/.*|$)'], 198 | 199 | // Internal packages. 200 | ['^(sentry-locale|sentry-images)(/.*|$)'], 201 | 202 | ['^(getsentry-images)(/.*|$)'], 203 | 204 | ['^(app|sentry)(/.*|$)'], 205 | 206 | // Getsentry packages. 207 | ['^(admin|getsentry)(/.*|$)'], 208 | 209 | // Style imports. 210 | ['^.+\\.less$'], 211 | 212 | // Parent imports. Put `..` last. 213 | ['^\\.\\.(?!/?$)', '^\\.\\./?$'], 214 | 215 | // Other relative imports. Put same-folder imports and `.` last. 216 | ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], 217 | ], 218 | }, 219 | ], 220 | 221 | 'sentry/no-digits-in-tn': ['error'], 222 | 223 | 'sentry/no-dynamic-translations': ['error'], 224 | 225 | // https://github.com/xojs/eslint-config-xo-typescript/blob/9791a067d6a119a21a4db72c02f1da95e25ffbb6/index.js#L95 226 | '@typescript-eslint/no-restricted-types': [ 227 | 'error', 228 | { 229 | types: { 230 | // TODO(scttcper): Turn object on to make our types more strict 231 | // object: { 232 | // message: 'The `object` type is hard to use. Use `Record` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848', 233 | // fixWith: 'Record' 234 | // }, 235 | Buffer: { 236 | message: 237 | 'Use Uint8Array instead. See: https://sindresorhus.com/blog/goodbye-nodejs-buffer', 238 | suggest: ['Uint8Array'], 239 | }, 240 | '[]': "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.", 241 | '[[]]': 242 | "Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.", 243 | '[[[]]]': "Don't use `[[[]]]`. Use `SomeType[][][]` instead.", 244 | }, 245 | }, 246 | ], 247 | // TODO(scttcper): Turn no-empty-object-type on to make our types more strict 248 | // '@typescript-eslint/no-empty-object-type': 'error', 249 | // TODO(scttcper): Turn no-function on to make our types more strict 250 | // '@typescript-eslint/no-unsafe-function-type': 'error', 251 | '@typescript-eslint/no-wrapper-object-types': 'error', 252 | 253 | // Naming convention enforcements 254 | '@typescript-eslint/naming-convention': [ 255 | 'error', 256 | { 257 | selector: 'typeLike', 258 | format: ['PascalCase'], 259 | leadingUnderscore: 'allow', 260 | }, 261 | { 262 | selector: 'enumMember', 263 | format: ['UPPER_CASE'], 264 | }, 265 | ], 266 | 267 | // Don't allow lookbehind expressions in regexp as they crash safari 268 | // We've accidentally used lookbehinds a few times and caused problems. 269 | 'no-lookahead-lookbehind-regexp/no-lookahead-lookbehind-regexp': [ 270 | 'error', 271 | 'no-lookbehind', 272 | 'no-negative-lookbehind', 273 | ], 274 | }, 275 | 276 | overrides: [ 277 | { 278 | files: ['*.ts', '*.tsx'], 279 | /** 280 | * Override rules for typescript files 281 | */ 282 | rules: {}, 283 | }, 284 | ], 285 | }; 286 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-sentry-app", 3 | "version": "2.10.0", 4 | "description": "sentry.io eslint config", 5 | "main": "index.js", 6 | "scripts": {}, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/getsentry/eslint-config-sentry.git" 10 | }, 11 | "keywords": [ 12 | "eslint", 13 | "eslint-config", 14 | "sentry" 15 | ], 16 | "author": "Billy Vong ", 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/getsentry/eslint-config-sentry/issues" 20 | }, 21 | "peerDependencies": { 22 | "eslint": ">=8" 23 | }, 24 | "homepage": "https://github.com/getsentry/eslint-config-sentry#readme", 25 | "dependencies": { 26 | "@emotion/eslint-plugin": "^11.12.0", 27 | "@typescript-eslint/eslint-plugin": "^8.8.1", 28 | "@typescript-eslint/parser": "^8.8.1", 29 | "eslint-config-sentry": "^2.10.0", 30 | "eslint-config-sentry-react": "^2.10.0", 31 | "eslint-import-resolver-typescript": "^3.6.3", 32 | "eslint-plugin-import": "^2.31.0", 33 | "eslint-plugin-jest": "^28.8.3", 34 | "eslint-plugin-no-lookahead-lookbehind-regexp": "0.1.0", 35 | "eslint-plugin-react": "^7.37.1", 36 | "eslint-plugin-sentry": "^2.10.0", 37 | "eslint-plugin-simple-import-sort": "^12.1.1" 38 | }, 39 | "volta": { 40 | "node": "20.10.0", 41 | "yarn": "1.22.5" 42 | }, 43 | "publishConfig": { 44 | "access": "public" 45 | }, 46 | "gitHead": "d5134c426450b2a297686c9c8a139bba61ba1153" 47 | } 48 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-app/strict.js: -------------------------------------------------------------------------------- 1 | const relaxedRules = require('.'); 2 | 3 | module.exports = { 4 | extends: ['sentry-app'], 5 | 6 | rules: { 7 | 'no-console': ['error'], 8 | 9 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md 10 | 'react/no-is-mounted': ['error'], 11 | 12 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md 13 | // Recommended to use callback refs instead 14 | 'react/no-find-dom-node': ['error'], 15 | 16 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md 17 | // This is now considered legacy, callback refs preferred 18 | 'react/no-string-refs': ['error'], 19 | 20 | 'jest/no-large-snapshots': ['error', {maxSize: 2000}], 21 | 22 | 'sentry/no-styled-shortcut': ['error'], 23 | 24 | 'no-restricted-imports': [ 25 | 'error', 26 | { 27 | paths: [ 28 | ...relaxedRules.rules['no-restricted-imports'][1].paths, 29 | // Additional Strict import restrictions go here 30 | ], 31 | }, 32 | ], 33 | }, 34 | 35 | overrides: [ 36 | { 37 | files: ['*.ts', '*.tsx'], 38 | /** 39 | * Override rules for typescript files 40 | */ 41 | rules: {}, 42 | }, 43 | ], 44 | }; 45 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-config-sentry-docs 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-config-sentry-docs 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-config-sentry-docs 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-config-sentry-docs 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-config-sentry-docs 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-config-sentry-docs 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-config-sentry-docs 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-config-sentry-docs 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-config-sentry-docs 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-config-sentry-docs 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-config-sentry-docs 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-config-sentry-docs 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-config-sentry-docs 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-config-sentry-docs 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-config-sentry-docs 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-config-sentry-docs 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-config-sentry-docs 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-config-sentry-docs 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-config-sentry-docs 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-config-sentry-docs 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-config-sentry-docs 290 | 291 | 292 | 293 | 294 | 295 | # Change Log 296 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-docs/README.md: -------------------------------------------------------------------------------- 1 | # Install 2 | `yarn add -D eslint-config-sentry` 3 | 4 | ## Configuration 5 | In your `.eslintrc` (or equivalent config file) 6 | 7 | Use `sentry` for base rules, `sentry/app` contains rules for [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) 8 | and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). 9 | 10 | ```json 11 | { 12 | "extends": [ 13 | "sentry/app" 14 | ], 15 | } 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-docs/index.js: -------------------------------------------------------------------------------- 1 | // Default: sentry app 2 | module.exports = { 3 | extends: ['sentry-react', 'plugin:import/typescript'], 4 | 5 | parser: '@typescript-eslint/parser', 6 | 7 | parserOptions: { 8 | ecmaVersion: 6, 9 | sourceType: 'module', 10 | ecmaFeatures: { 11 | jsx: true, 12 | modules: true, 13 | legacyDecorators: true, 14 | }, 15 | }, 16 | 17 | env: { 18 | browser: true, 19 | es6: true, 20 | jest: true, 21 | jquery: true, // hard-loaded into vendor.js 22 | }, 23 | 24 | plugins: [ 25 | '@typescript-eslint', 26 | '@emotion', 27 | 'import', 28 | 'react', 29 | 'simple-import-sort', 30 | 'no-lookahead-lookbehind-regexp', 31 | ], 32 | 33 | settings: { 34 | 'import/parsers': { 35 | '@typescript-eslint/parser': ['.ts', '.tsx'], 36 | }, 37 | 'import/resolver': { 38 | typescript: {}, 39 | }, 40 | 'import/extensions': ['.js', '.jsx'], 41 | }, 42 | 43 | /** 44 | * Rules 45 | */ 46 | rules: { 47 | /** 48 | * emotion rules for v10 49 | * 50 | * This probably aren't as necessary anymore, but let's remove when we move to v11 51 | */ 52 | '@emotion/jsx-import': 'off', 53 | '@emotion/no-vanilla': 'error', 54 | '@emotion/import-from-emotion': 'error', 55 | '@emotion/styled-import': 'error', 56 | 57 | // no-undef is redundant with typescript as tsc will complain 58 | // A downside is that we won't get eslint errors about it, but your editors should 59 | // support tsc errors so.... 60 | 'no-undef': 'off', 61 | 62 | // Let formatter handle this 63 | 'arrow-body-style': 'off', 64 | 65 | /** 66 | * Need to use typescript version of these rules 67 | */ 68 | 'no-shadow': 'off', 69 | '@typescript-eslint/no-shadow': 'error', 70 | 71 | 'no-redeclare': 'off', 72 | '@typescript-eslint/no-redeclare': 'error', 73 | 74 | // This only override the `args` rule (which is "none"). There are too many errors and it's difficult to manually 75 | // fix them all, so we'll have to incrementally update. 76 | 'no-unused-vars': 'off', 77 | '@typescript-eslint/no-unused-vars': [ 78 | 'error', 79 | { 80 | vars: 'all', 81 | args: 'all', 82 | 83 | // Ignore vars that start with an underscore 84 | // e.g. if you want to omit a property using object spread: 85 | // 86 | // const {name: _name, ...props} = this.props; 87 | // 88 | varsIgnorePattern: '^_', 89 | argsIgnorePattern: '^_', 90 | }, 91 | ], 92 | 93 | 'no-use-before-define': 'off', 94 | // This seems to have been turned on while previously it had been off 95 | '@typescript-eslint/no-use-before-define': ['off'], 96 | 97 | /** 98 | * Better import sorting 99 | */ 100 | 'sort-imports': 'off', 101 | 'import/order': 'off', 102 | 'simple-import-sort/imports': [ 103 | 'error', 104 | { 105 | groups: [ 106 | // Side effect imports. 107 | ['^\\u0000'], 108 | 109 | // Node.js builtins. 110 | [`^(${require('module').builtinModules.join('|')})(/|$)`], 111 | 112 | // Packages. `react` related packages come first. 113 | ['^react', '^@?\\w'], 114 | 115 | // Internal packages. 116 | ['^(sentry-docs)(/.*|$)'], 117 | 118 | // Style imports. 119 | ['^.+\\.scss$'], 120 | 121 | // Parent imports. Put `..` last. 122 | ['^\\.\\.(?!/?$)', '^\\.\\./?$'], 123 | 124 | // Other relative imports. Put same-folder imports and `.` last. 125 | ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'], 126 | ], 127 | }, 128 | ], 129 | 130 | // XXX: Duplicated from eslint-config-sentry-app, we should pull out 131 | // 132 | // Based on https://github.com/xojs/eslint-config-xo-typescript/blob/2a7e3b0b3c28b0c25866721298e67947a95767ab/index.js#L123 133 | '@typescript-eslint/ban-types': [ 134 | 'error', 135 | { 136 | extendDefaults: false, 137 | types: { 138 | String: { 139 | message: 'Use `string` instead.', 140 | fixWith: 'string', 141 | }, 142 | Number: { 143 | message: 'Use `number` instead.', 144 | fixWith: 'number', 145 | }, 146 | Boolean: { 147 | message: 'Use `boolean` instead.', 148 | fixWith: 'boolean', 149 | }, 150 | Symbol: { 151 | message: 'Use `symbol` instead.', 152 | fixWith: 'symbol', 153 | }, 154 | BigInt: { 155 | message: 'Use `bigint` instead.', 156 | fixWith: 'bigint', 157 | }, 158 | Object: { 159 | message: 160 | 'The `Object` type is mostly the same as `unknown`. You probably want `Record` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848', 161 | fixWith: 'Record', 162 | }, 163 | // TODO(scttcper): Turn these on to make our types more strict 164 | // object: { 165 | // message: 'The `object` type is hard to use. Use `Record` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848', 166 | // fixWith: 'Record' 167 | // }, 168 | // Function: 'Use a specific function type instead, like `() => void`.', 169 | '[]': "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.", 170 | '[[]]': 171 | "Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.", 172 | '[[[]]]': "Don't use `[[[]]]`. Use `SomeType[][][]` instead.", 173 | }, 174 | }, 175 | ], 176 | 177 | // Don't allow lookbehind expressions in regexp as they crash safari 178 | // We've accidentally used lookbehinds a few times and caused problems. 179 | 'no-lookahead-lookbehind-regexp/no-lookahead-lookbehind-regexp': [ 180 | 'error', 181 | 'no-lookbehind', 182 | 'no-negative-lookbehind', 183 | ], 184 | }, 185 | 186 | overrides: [ 187 | { 188 | files: ['*.ts', '*.tsx'], 189 | /** 190 | * Override rules for typescript files 191 | */ 192 | rules: {}, 193 | }, 194 | ], 195 | }; 196 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-sentry-docs", 3 | "version": "2.10.0", 4 | "description": "sentry.io eslint config", 5 | "main": "index.js", 6 | "scripts": {}, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/getsentry/eslint-config-sentry.git" 10 | }, 11 | "keywords": [ 12 | "eslint", 13 | "eslint-config", 14 | "sentry" 15 | ], 16 | "author": "Billy Vong ", 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/getsentry/eslint-config-sentry/issues" 20 | }, 21 | "peerDependencies": { 22 | "eslint": ">=8" 23 | }, 24 | "homepage": "https://github.com/getsentry/eslint-config-sentry#readme", 25 | "dependencies": { 26 | "@emotion/eslint-plugin": "^11.11.0", 27 | "@typescript-eslint/eslint-plugin": "^6.19.0", 28 | "@typescript-eslint/parser": "^6.19.0", 29 | "eslint-config-sentry": "^2.10.0", 30 | "eslint-config-sentry-react": "^2.10.0", 31 | "eslint-import-resolver-typescript": "^3.6.1", 32 | "eslint-plugin-import": "^2.29.1", 33 | "eslint-plugin-jest": "^27.6.3", 34 | "eslint-plugin-no-lookahead-lookbehind-regexp": "0.3.0", 35 | "eslint-plugin-react": "^7.33.2", 36 | "eslint-plugin-simple-import-sort": "^10.0.0" 37 | }, 38 | "volta": { 39 | "node": "20.10.0", 40 | "yarn": "1.22.5" 41 | }, 42 | "publishConfig": { 43 | "access": "public" 44 | }, 45 | "gitHead": "d5134c426450b2a297686c9c8a139bba61ba1153" 46 | } 47 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-docs/strict.js: -------------------------------------------------------------------------------- 1 | const relaxedRules = require('.'); 2 | 3 | module.exports = { 4 | extends: ['sentry-docs'], 5 | 6 | rules: { 7 | 'no-console': ['error'], 8 | 'no-debugger': ['error'], 9 | 10 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md 11 | 'react/no-is-mounted': ['error'], 12 | 13 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md 14 | // Recommended to use callback refs instead 15 | 'react/no-find-dom-node': ['error'], 16 | 17 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md 18 | // This is now considered legacy, callback refs preferred 19 | 'react/no-string-refs': ['error'], 20 | 21 | 'jest/no-large-snapshots': ['error', {maxSize: 2000}], 22 | 23 | 'no-restricted-imports': [ 24 | 'error', 25 | { 26 | paths: [ 27 | ...relaxedRules.rules['no-restricted-imports'][1].paths, 28 | // Additional Strict import restrictions go here 29 | ], 30 | }, 31 | ], 32 | }, 33 | 34 | overrides: [ 35 | { 36 | files: ['*.ts', '*.tsx'], 37 | /** 38 | * Override rules for typescript files 39 | */ 40 | rules: {}, 41 | }, 42 | ], 43 | }; 44 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-config-sentry-react 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-config-sentry-react 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-config-sentry-react 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-config-sentry-react 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-config-sentry-react 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-config-sentry-react 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-config-sentry-react 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-config-sentry-react 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-config-sentry-react 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-config-sentry-react 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-config-sentry-react 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-config-sentry-react 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-config-sentry-react 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-config-sentry-react 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-config-sentry-react 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-config-sentry-react 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-config-sentry-react 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-config-sentry-react 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-config-sentry-react 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-config-sentry-react 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-config-sentry-react 290 | 291 | 292 | 293 | 294 | 295 | # 1.112.0 (2023-04-13) 296 | 297 | **Note:** Version bump only for package eslint-config-sentry-react 298 | 299 | 300 | 301 | 302 | 303 | # 1.111.0 (2023-03-31) 304 | 305 | **Note:** Version bump only for package eslint-config-sentry-react 306 | 307 | 308 | 309 | 310 | 311 | # 1.110.0 (2023-02-21) 312 | 313 | **Note:** Version bump only for package eslint-config-sentry-react 314 | 315 | 316 | 317 | 318 | 319 | # 1.109.0 (2022-11-29) 320 | 321 | **Note:** Version bump only for package eslint-config-sentry-react 322 | 323 | 324 | 325 | 326 | 327 | # 1.108.0 (2022-11-29) 328 | 329 | **Note:** Version bump only for package eslint-config-sentry-react 330 | 331 | 332 | 333 | 334 | 335 | # 1.107.0 (2022-10-24) 336 | 337 | **Note:** Version bump only for package eslint-config-sentry-react 338 | 339 | 340 | 341 | 342 | 343 | # 1.106.0 (2022-10-24) 344 | 345 | **Note:** Version bump only for package eslint-config-sentry-react 346 | 347 | 348 | 349 | 350 | 351 | # 1.105.0 (2022-10-24) 352 | 353 | **Note:** Version bump only for package eslint-config-sentry-react 354 | 355 | 356 | 357 | 358 | 359 | # 1.104.0 (2022-10-20) 360 | 361 | **Note:** Version bump only for package eslint-config-sentry-react 362 | 363 | 364 | 365 | 366 | 367 | # 1.103.0 (2022-10-20) 368 | 369 | **Note:** Version bump only for package eslint-config-sentry-react 370 | 371 | 372 | 373 | 374 | 375 | # 1.102.0 (2022-10-20) 376 | 377 | **Note:** Version bump only for package eslint-config-sentry-react 378 | 379 | 380 | 381 | 382 | 383 | # 1.101.0 (2022-10-20) 384 | 385 | **Note:** Version bump only for package eslint-config-sentry-react 386 | 387 | 388 | 389 | 390 | 391 | # 1.100.0 (2022-09-13) 392 | 393 | **Note:** Version bump only for package eslint-config-sentry-react 394 | 395 | 396 | 397 | 398 | 399 | # 1.99.0 (2022-09-13) 400 | 401 | **Note:** Version bump only for package eslint-config-sentry-react 402 | 403 | 404 | 405 | 406 | 407 | # 1.98.0 (2022-09-12) 408 | 409 | **Note:** Version bump only for package eslint-config-sentry-react 410 | 411 | 412 | 413 | 414 | 415 | # 1.97.0 (2022-08-29) 416 | 417 | **Note:** Version bump only for package eslint-config-sentry-react 418 | 419 | 420 | 421 | 422 | 423 | # 1.96.0 (2022-08-11) 424 | 425 | **Note:** Version bump only for package eslint-config-sentry-react 426 | 427 | 428 | 429 | 430 | 431 | # 1.95.0 (2022-07-14) 432 | 433 | 434 | ### Features 435 | 436 | * **rules:** Prevent imports of the withRouter HOC ([8b5f846](https://github.com/getsentry/eslint-config-sentry/commit/8b5f8460e38241b27f227aa867034bfb8d859aae)) 437 | 438 | 439 | 440 | 441 | 442 | # 1.94.0 (2022-06-03) 443 | 444 | **Note:** Version bump only for package eslint-config-sentry-react 445 | 446 | 447 | 448 | 449 | 450 | # 1.93.0 (2022-04-25) 451 | 452 | **Note:** Version bump only for package eslint-config-sentry-react 453 | 454 | 455 | 456 | 457 | 458 | # 1.92.0 (2022-04-06) 459 | 460 | **Note:** Version bump only for package eslint-config-sentry-react 461 | 462 | 463 | 464 | 465 | 466 | # 1.91.0 (2022-04-04) 467 | 468 | **Note:** Version bump only for package eslint-config-sentry-react 469 | 470 | 471 | 472 | 473 | 474 | # 1.90.0 (2022-04-04) 475 | 476 | **Note:** Version bump only for package eslint-config-sentry-react 477 | 478 | 479 | 480 | 481 | 482 | # 1.89.0 (2022-04-04) 483 | 484 | **Note:** Version bump only for package eslint-config-sentry-react 485 | 486 | 487 | 488 | 489 | 490 | # 1.88.0 (2022-04-04) 491 | 492 | **Note:** Version bump only for package eslint-config-sentry-react 493 | 494 | 495 | 496 | 497 | 498 | # 1.87.0 (2022-04-04) 499 | 500 | **Note:** Version bump only for package eslint-config-sentry-react 501 | 502 | 503 | 504 | 505 | 506 | # 1.86.0 (2022-04-04) 507 | 508 | **Note:** Version bump only for package eslint-config-sentry-react 509 | 510 | 511 | 512 | 513 | 514 | # 1.85.0 (2022-04-04) 515 | 516 | **Note:** Version bump only for package eslint-config-sentry-react 517 | 518 | 519 | 520 | 521 | 522 | # 1.84.0 (2022-04-04) 523 | 524 | **Note:** Version bump only for package eslint-config-sentry-react 525 | 526 | 527 | 528 | 529 | 530 | # 1.83.0 (2022-04-01) 531 | 532 | **Note:** Version bump only for package eslint-config-sentry-react 533 | 534 | 535 | 536 | 537 | 538 | # 1.82.0 (2022-03-30) 539 | 540 | **Note:** Version bump only for package eslint-config-sentry-react 541 | 542 | 543 | 544 | 545 | 546 | # 1.81.0 (2022-03-30) 547 | 548 | **Note:** Version bump only for package eslint-config-sentry-react 549 | 550 | 551 | 552 | 553 | 554 | # 1.80.0 (2022-03-30) 555 | 556 | **Note:** Version bump only for package eslint-config-sentry-react 557 | 558 | 559 | 560 | 561 | 562 | # 1.79.0 (2022-03-18) 563 | 564 | **Note:** Version bump only for package eslint-config-sentry-react 565 | 566 | 567 | 568 | 569 | 570 | # 1.78.0 (2022-03-08) 571 | 572 | **Note:** Version bump only for package eslint-config-sentry-react 573 | 574 | 575 | 576 | 577 | 578 | # 1.77.0 (2022-02-25) 579 | 580 | **Note:** Version bump only for package eslint-config-sentry-react 581 | 582 | 583 | 584 | 585 | 586 | # 1.76.0 (2022-02-21) 587 | 588 | **Note:** Version bump only for package eslint-config-sentry-react 589 | 590 | 591 | 592 | 593 | 594 | # 1.75.0 (2022-02-21) 595 | 596 | **Note:** Version bump only for package eslint-config-sentry-react 597 | 598 | 599 | 600 | 601 | 602 | # 1.74.0 (2022-01-31) 603 | 604 | **Note:** Version bump only for package eslint-config-sentry-react 605 | 606 | 607 | 608 | 609 | 610 | # 1.73.0 (2022-01-18) 611 | 612 | **Note:** Version bump only for package eslint-config-sentry-react 613 | 614 | 615 | 616 | 617 | 618 | # 1.72.0 (2022-01-14) 619 | 620 | **Note:** Version bump only for package eslint-config-sentry-react 621 | 622 | 623 | 624 | 625 | 626 | # 1.71.0 (2022-01-14) 627 | 628 | **Note:** Version bump only for package eslint-config-sentry-react 629 | 630 | 631 | 632 | 633 | 634 | # 1.70.0 (2022-01-05) 635 | 636 | **Note:** Version bump only for package eslint-config-sentry-react 637 | 638 | 639 | 640 | 641 | 642 | # 1.69.0 (2021-12-06) 643 | 644 | **Note:** Version bump only for package eslint-config-sentry-react 645 | 646 | 647 | 648 | 649 | 650 | # 1.68.0 (2021-11-12) 651 | 652 | **Note:** Version bump only for package eslint-config-sentry-react 653 | 654 | 655 | 656 | 657 | 658 | # 1.67.0 (2021-11-04) 659 | 660 | **Note:** Version bump only for package eslint-config-sentry-react 661 | 662 | 663 | 664 | 665 | 666 | # 1.66.0 (2021-11-04) 667 | 668 | **Note:** Version bump only for package eslint-config-sentry-react 669 | 670 | 671 | 672 | 673 | 674 | # 1.65.0 (2021-11-03) 675 | 676 | **Note:** Version bump only for package eslint-config-sentry-react 677 | 678 | 679 | 680 | 681 | 682 | # 1.64.0 (2021-10-29) 683 | 684 | **Note:** Version bump only for package eslint-config-sentry-react 685 | 686 | 687 | 688 | 689 | 690 | # 1.63.0 (2021-10-25) 691 | 692 | **Note:** Version bump only for package eslint-config-sentry-react 693 | 694 | 695 | 696 | 697 | 698 | # 1.62.0 (2021-09-14) 699 | 700 | **Note:** Version bump only for package eslint-config-sentry-react 701 | 702 | 703 | 704 | 705 | 706 | # 1.61.0 (2021-08-31) 707 | 708 | **Note:** Version bump only for package eslint-config-sentry-react 709 | 710 | 711 | 712 | 713 | 714 | # 1.60.0 (2021-08-04) 715 | 716 | **Note:** Version bump only for package eslint-config-sentry-react 717 | 718 | 719 | 720 | 721 | 722 | # 1.59.0 (2021-08-04) 723 | 724 | **Note:** Version bump only for package eslint-config-sentry-react 725 | 726 | 727 | 728 | 729 | 730 | # 1.58.0 (2021-06-21) 731 | 732 | **Note:** Version bump only for package eslint-config-sentry-react 733 | 734 | 735 | 736 | 737 | 738 | # 1.57.0 (2021-06-21) 739 | 740 | **Note:** Version bump only for package eslint-config-sentry-react 741 | 742 | 743 | 744 | 745 | 746 | # 1.56.0 (2021-06-21) 747 | 748 | **Note:** Version bump only for package eslint-config-sentry-react 749 | 750 | 751 | 752 | 753 | 754 | # 1.55.0 (2021-05-12) 755 | 756 | **Note:** Version bump only for package eslint-config-sentry-react 757 | 758 | 759 | 760 | 761 | 762 | # 1.54.0 (2021-05-10) 763 | 764 | **Note:** Version bump only for package eslint-config-sentry-react 765 | 766 | 767 | 768 | 769 | 770 | # 1.53.0 (2021-05-05) 771 | 772 | **Note:** Version bump only for package eslint-config-sentry-react 773 | 774 | 775 | 776 | 777 | 778 | # 1.52.0 (2021-05-04) 779 | 780 | **Note:** Version bump only for package eslint-config-sentry-react 781 | 782 | 783 | 784 | 785 | 786 | # 1.51.0 (2021-04-07) 787 | 788 | **Note:** Version bump only for package eslint-config-sentry-react 789 | 790 | 791 | 792 | 793 | 794 | # 1.50.0 (2021-01-25) 795 | 796 | **Note:** Version bump only for package eslint-config-sentry-react 797 | 798 | 799 | 800 | 801 | 802 | # 1.49.0 (2021-01-13) 803 | 804 | **Note:** Version bump only for package eslint-config-sentry-react 805 | 806 | 807 | 808 | 809 | 810 | # 1.48.0 (2021-01-13) 811 | 812 | **Note:** Version bump only for package eslint-config-sentry-react 813 | 814 | 815 | 816 | 817 | 818 | # 1.47.0 (2020-12-02) 819 | 820 | **Note:** Version bump only for package eslint-config-sentry-react 821 | 822 | 823 | 824 | 825 | 826 | # 1.46.0 (2020-11-21) 827 | 828 | **Note:** Version bump only for package eslint-config-sentry-react 829 | 830 | 831 | 832 | 833 | 834 | # 1.45.0 (2020-11-17) 835 | 836 | **Note:** Version bump only for package eslint-config-sentry-react 837 | 838 | 839 | 840 | 841 | 842 | # 1.44.0 (2020-09-11) 843 | 844 | **Note:** Version bump only for package eslint-config-sentry-react 845 | 846 | 847 | 848 | 849 | 850 | # 1.43.0 (2020-07-06) 851 | 852 | **Note:** Version bump only for package eslint-config-sentry-react 853 | 854 | 855 | 856 | 857 | 858 | # 1.42.0 (2020-07-02) 859 | 860 | **Note:** Version bump only for package eslint-config-sentry-react 861 | 862 | 863 | 864 | 865 | 866 | # 1.41.0 (2020-06-18) 867 | 868 | **Note:** Version bump only for package eslint-config-sentry-react 869 | 870 | 871 | 872 | 873 | 874 | # 1.40.0 (2020-06-16) 875 | 876 | **Note:** Version bump only for package eslint-config-sentry-react 877 | 878 | 879 | 880 | 881 | 882 | # 1.39.0 (2020-06-12) 883 | 884 | **Note:** Version bump only for package eslint-config-sentry-react 885 | 886 | 887 | 888 | 889 | 890 | # 1.38.0 (2020-05-26) 891 | 892 | **Note:** Version bump only for package eslint-config-sentry-react 893 | 894 | 895 | 896 | 897 | 898 | # [1.35.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.34.0...v1.35.0) (2020-03-17) 899 | 900 | 901 | ### Features 902 | 903 | * **sentry-app:** Move typescript eslint parser and plugin into app config ([4a8374e](https://github.com/getsentry/eslint-config-sentry/commit/4a8374ef6d4da78306ffdcf057808f2b61185736)) 904 | 905 | 906 | 907 | 908 | 909 | # [1.34.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.33.0...v1.34.0) (2020-02-28) 910 | 911 | **Note:** Version bump only for package eslint-config-sentry-react 912 | 913 | 914 | 915 | 916 | 917 | # [1.32.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.31.0...v1.32.0) (2020-02-27) 918 | 919 | 920 | ### Bug Fixes 921 | 922 | * **yarn:** fixed yarn ([a9f5694](https://github.com/getsentry/eslint-config-sentry/commit/a9f5694fc3de2ce9c4b8d745f44312997c7a5ece)) 923 | 924 | 925 | 926 | 927 | 928 | # [1.31.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.30.0...v1.31.0) (2020-02-13) 929 | 930 | **Note:** Version bump only for package eslint-config-sentry-react 931 | 932 | 933 | 934 | 935 | 936 | # [1.23.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.22.0...v1.23.0) (2019-10-16) 937 | 938 | 939 | ### Features 940 | 941 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 942 | 943 | 944 | 945 | 946 | 947 | # [1.22.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.21.0...v1.22.0) (2019-10-15) 948 | 949 | 950 | ### Features 951 | 952 | * **rule:** Downgrade `react/sort-comp` to a warning instead of error ([#36](https://github.com/getsentry/eslint-config-sentry/issues/36)) ([5866d6a](https://github.com/getsentry/eslint-config-sentry/commit/5866d6a)) 953 | 954 | 955 | 956 | 957 | 958 | # [1.21.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.21.0) (2019-10-14) 959 | 960 | 961 | ### Bug Fixes 962 | 963 | * **react:** Fix react version settings ([#31](https://github.com/getsentry/eslint-config-sentry/issues/31)) ([c7936ad](https://github.com/getsentry/eslint-config-sentry/commit/c7936ad)) 964 | 965 | 966 | 967 | 968 | 969 | 970 | ## [1.16.1](https://github.com/getsentry/eslint-config-sentry/compare/v1.16.0...v1.16.1) (2019-10-04) 971 | 972 | **Note:** Version bump only for package eslint-config-sentry-react 973 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/README.md: -------------------------------------------------------------------------------- 1 | # Install 2 | 3 | `yarn add -D eslint-config-sentry` 4 | 5 | ## Configuration 6 | 7 | In your `.eslintrc` (or equivalent config file) 8 | 9 | Use `sentry` for base rules, `sentry/app` contains rules for [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) 10 | and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). 11 | 12 | ```json 13 | { 14 | "extends": ["sentry/app"] 15 | } 16 | ``` 17 | 18 | ## Updating React Version 19 | 20 | Is react being updated in sentry/getsentry? Update the version in react.js settings to match. 21 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/index.js: -------------------------------------------------------------------------------- 1 | // Default: sentry react app 2 | module.exports = { 3 | extends: [ 4 | 'sentry', 5 | 'sentry-react/rules/react', 6 | 'sentry-react/rules/imports', 7 | 'plugin:jest/recommended', 8 | 'sentry-react/rules/jest', 9 | 'plugin:jest-dom/recommended', 10 | ], 11 | 12 | plugins: ['jest-dom', 'testing-library', 'typescript-sort-keys', 'react-hooks'], 13 | 14 | rules: { 15 | /** 16 | * React hooks 17 | */ 18 | 'react-hooks/exhaustive-deps': 'error', 19 | // Biome not yet enforcing all parts of this rule https://github.com/biomejs/biome/issues/1984 20 | 'react-hooks/rules-of-hooks': 'error', 21 | 22 | /** 23 | * Custom 24 | */ 25 | // highlights literals in JSX components w/o translation tags 26 | 'getsentry/jsx-needs-il8n': ['off'], 27 | 'testing-library/render-result-naming-convention': 'off', 28 | 'testing-library/no-unnecessary-act': 'off', 29 | 30 | // Disabled as we have many tests which render as simple validations 31 | 'jest/expect-expect': 'off', 32 | 33 | // Disabled as we have some comment out tests that cannot be 34 | // uncommented due to typescript errors. 35 | 'jest/no-commented-out-tests': 'off', 36 | 37 | // Disabled as we do sometimes have conditional expects 38 | 'jest/no-conditional-expect': 'off', 39 | 40 | // Useful for exporting some test utilities 41 | 'jest/no-export': 'off', 42 | 43 | 'typescript-sort-keys/interface': [ 44 | 'error', 45 | 'asc', 46 | {caseSensitive: true, natural: false, requiredFirst: true}, 47 | ], 48 | 49 | // Disallow importing `import React from 'react'`. This is not needed since 50 | // React 17. We prefer the named imports for potential tree-shaking gains 51 | // in the future. 52 | 'no-restricted-imports': [ 53 | 'error', 54 | { 55 | paths: [ 56 | { 57 | name: 'react', 58 | importNames: ['default'], 59 | message: 'Prefer named React imports (React types DO NOT need imported!)', 60 | }, 61 | ], 62 | }, 63 | ], 64 | }, 65 | 66 | /** 67 | * Our current version of eslint unfortunately does not support extends in 68 | * overrides. Once we upgrade we can uncomment this and remove local 69 | * .eslintrc.js files in test folders. It is there to ensure that 70 | * testing-library rules run only against test files. 71 | */ 72 | // overrides: [ 73 | // { 74 | // files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'], 75 | // extends: ['plugin:testing-library/react'], 76 | // }, 77 | // ], 78 | }; 79 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-sentry-react", 3 | "version": "2.10.0", 4 | "description": "sentry.io eslint config", 5 | "main": "index.js", 6 | "scripts": {}, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/getsentry/eslint-config-sentry.git" 10 | }, 11 | "keywords": [ 12 | "eslint", 13 | "eslint-config", 14 | "sentry" 15 | ], 16 | "author": "Billy Vong ", 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/getsentry/eslint-config-sentry/issues" 20 | }, 21 | "peerDependencies": { 22 | "eslint": ">=8", 23 | "eslint-plugin-import": "^2.26.0", 24 | "eslint-plugin-jest": "^27.1.3", 25 | "eslint-plugin-react": "^7.31.10" 26 | }, 27 | "homepage": "https://github.com/getsentry/eslint-config-sentry#readme", 28 | "dependencies": { 29 | "eslint-config-sentry": "^2.10.0", 30 | "eslint-plugin-jest-dom": "^5.4.0", 31 | "eslint-plugin-react-hooks": "^4.6.2", 32 | "eslint-plugin-testing-library": "^6.3.0", 33 | "eslint-plugin-typescript-sort-keys": "^3.3.0" 34 | }, 35 | "volta": { 36 | "node": "20.10.0", 37 | "yarn": "1.22.5" 38 | }, 39 | "gitHead": "7ea9fe88aead7b4d6e86e5aeea1391a80fbb08d0" 40 | } 41 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/rules/imports.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Imports (defaults from airbnb guide unless noted) 3 | * https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js 4 | */ 5 | 6 | module.exports = { 7 | rules: { 8 | // Not recommended to be enabled with typescript-eslint 9 | // https://typescript-eslint.io/linting/troubleshooting/performance-troubleshooting/#eslint-plugin-import 10 | 'import/no-unresolved': ['off'], 11 | 'import/named': ['off'], 12 | 'import/default': ['off'], 13 | 'import/export': ['off'], 14 | 'import/no-named-as-default-member': ['off'], 15 | 16 | // Redflags 17 | // do not allow a default import name to match a named export (airbnb: error) 18 | // Issue with `DefaultIssuePlugin` and `app/plugins/index` 19 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md 20 | 'import/no-named-as-default': ['off'], 21 | 22 | // disallow use of jsdoc-marked-deprecated imports 23 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md 24 | 'import/no-deprecated': ['off'], 25 | 26 | // Forbid mutable exports (airbnb: error) 27 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-mutable-exports.md 28 | // TODO: enable? 29 | 'import/no-mutable-exports': ['off'], 30 | 31 | // disallow require() 32 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md 33 | 'import/no-commonjs': ['off'], 34 | 35 | // disallow AMD require/define 36 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-amd.md 37 | 'import/no-amd': ['error'], 38 | 39 | // disallow duplicate imports 40 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md 41 | 'import/no-duplicates': ['error'], 42 | 43 | // disallow namespace imports 44 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-namespace.md 45 | 'import/no-namespace': ['off'], 46 | 47 | // Ensure consistent use of file extension within the import path 48 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md 49 | // TODO this fucks up getsentry 50 | 'import/extensions': [ 51 | 'off', 52 | 'always', 53 | { 54 | js: 'never', 55 | jsx: 'never', 56 | }, 57 | ], 58 | 59 | // Enforce a convention in module import order 60 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md 61 | 'import/order': [ 62 | 'error', 63 | { 64 | groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']], 65 | 'newlines-between': 'always', 66 | }, 67 | ], 68 | 69 | // Require a newline after the last import/require in a group 70 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/newline-after-import.md 71 | 'import/newline-after-import': ['error'], 72 | 73 | // Require modules with a single export to use a default export (airbnb: error) 74 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md 75 | 'import/prefer-default-export': ['off'], 76 | 77 | // Restrict which files can be imported in a given folder 78 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md 79 | 'import/no-restricted-paths': ['off'], 80 | 81 | // Forbid modules to have too many dependencies 82 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/max-dependencies.md 83 | 'import/max-dependencies': ['off', {max: 10}], 84 | 85 | // Forbid import of modules using absolute paths 86 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md 87 | 'import/no-absolute-path': ['error'], 88 | 89 | // Forbid require() calls with expressions (airbnb: error) 90 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md 91 | 'import/no-dynamic-require': ['off'], 92 | 93 | // Use webpack default chunk names 94 | 'import/dynamic-import-chunkname': ['off'], 95 | 96 | // prevent importing the submodules of other modules 97 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md 98 | 'import/no-internal-modules': [ 99 | 'off', 100 | { 101 | allow: [], 102 | }, 103 | ], 104 | 105 | // Warn if a module could be mistakenly parsed as a script by a consumer 106 | // leveraging Unambiguous JavaScript Grammar 107 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/unambiguous.md 108 | // this should not be enabled until this proposal has at least been *presented* to TC39. 109 | // At the moment, it"s not a thing. 110 | 'import/unambiguous': ['off'], 111 | 112 | // Forbid Webpack loader syntax in imports 113 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-webpack-loader-syntax.md 114 | 'import/no-webpack-loader-syntax': ['error'], 115 | 116 | // Prevent unassigned imports 117 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md 118 | // importing for side effects is perfectly acceptable, if you need side effects. 119 | 'import/no-unassigned-import': ['off'], 120 | 121 | // Prevent importing the default as if it were named 122 | // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-default.md 123 | 'import/no-named-default': ['error'], 124 | 125 | // Reports if a module"s default export is unnamed 126 | // https://github.com/benmosher/eslint-plugin-import/blob/d9b712ac7fd1fddc391f7b234827925c160d956f/docs/rules/no-anonymous-default-export.md 127 | 'import/no-anonymous-default-export': [ 128 | 'error', 129 | { 130 | allowArray: false, 131 | allowArrowFunction: false, 132 | allowAnonymousClass: false, 133 | allowAnonymousFunction: false, 134 | allowCallExpression: true, 135 | allowLiteral: false, 136 | allowObject: false, 137 | }, 138 | ], 139 | }, 140 | }; 141 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/rules/jest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Jest 3 | */ 4 | 5 | module.exports = { 6 | rules: { 7 | 'jest/no-large-snapshots': ['warn', {maxSize: 2000}], 8 | 'jest/no-disabled-tests': 'error', 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/rules/react.js: -------------------------------------------------------------------------------- 1 | /** 2 | * React 3 | */ 4 | 5 | module.exports = { 6 | settings: { 7 | react: { 8 | version: '17.0.2', // React version, can not `detect` because of getsentry 9 | }, 10 | }, 11 | rules: { 12 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md 13 | 'react/display-name': ['off'], 14 | 15 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md 16 | 'react/no-multi-comp': [ 17 | 'off', 18 | { 19 | ignoreStateless: true, 20 | }, 21 | ], 22 | 23 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md 24 | 'react/jsx-fragments': ['error', 'element'], 25 | 26 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md 27 | // Ensures that any component or prop methods used to handle events are correctly prefixed. 28 | 'react/jsx-handler-names': [ 29 | 'off', 30 | { 31 | eventHandlerPrefix: 'handle', 32 | eventHandlerPropPrefix: 'on', 33 | }, 34 | ], 35 | 36 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md 37 | 'react/jsx-key': ['error'], 38 | 39 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md 40 | 'react/jsx-no-undef': ['error'], 41 | 42 | // Disabled as we use the newer JSX transform babel plugin. 43 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md 44 | 'react/jsx-uses-react': ['off'], 45 | 46 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md 47 | 'react/jsx-uses-vars': ['error'], 48 | 49 | /** 50 | * Deprecation related rules 51 | */ 52 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md 53 | 'react/no-deprecated': ['error'], 54 | 55 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md 56 | 'react/no-is-mounted': ['warn'], 57 | 58 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md 59 | // Recommended to use callback refs instead 60 | // TODO: Upgrade sentry to use callback refs 61 | 'react/no-find-dom-node': ['warn'], 62 | 63 | // Prevent usage of the return value of React.render 64 | // deprecation: https://facebook.github.io/react/docs/react-dom.html#render 65 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md 66 | 'react/no-render-return-value': ['error'], 67 | 68 | // Children should always be actual children, not passed in as a prop. 69 | // When using JSX, the children should be nested between the opening and closing tags. When not using JSX, the children should be passed as additional arguments to React.createElement. 70 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md 71 | 'react/no-children-prop': ['error'], 72 | 73 | // This rule helps prevent problems caused by using children and the dangerouslySetInnerHTML prop at the same time. 74 | // React will throw a warning if this rule is ignored. 75 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md 76 | 'react/no-danger-with-children': ['error'], 77 | 78 | // Prevent direct mutation of this.state 79 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md 80 | 'react/no-direct-mutation-state': ['error'], 81 | 82 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md 83 | 'react/no-did-mount-set-state': ['error'], 84 | 85 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md" 86 | 'react/no-did-update-set-state': ['error'], 87 | 88 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md 89 | 'react/no-redundant-should-component-update': ['error'], 90 | 91 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-typos.md 92 | 'react/no-typos': ['error'], 93 | 94 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md 95 | // This is now considered legacy, callback refs preferred 96 | 'react/no-string-refs': ['warn'], 97 | 98 | // Prevent invalid characters from appearing in markup 99 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md 100 | 'react/no-unescaped-entities': ['off'], 101 | 102 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md 103 | 'react/no-unknown-property': ['error', {ignore: ['css']}], 104 | 105 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md 106 | // Disabled since this currently fails to correctly detect a lot of 107 | // typescript prop type usage. 108 | 'react/no-unused-prop-types': ['off'], 109 | 110 | // We do not need proptypes since we're using typescript 111 | 'react/prop-types': ['off'], 112 | 113 | // When writing the render method in a component it is easy to forget to return the JSX content. 114 | // This rule will warn if the return statement is missing. 115 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md 116 | 'react/require-render-return': ['error'], 117 | 118 | // Disabled as we are using the newer JSX transform babel plugin. 119 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md 120 | 'react/react-in-jsx-scope': ['off'], 121 | 122 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md 123 | 'react/self-closing-comp': ['error'], 124 | 125 | // This also causes issues with typescript 126 | // See: https://github.com/yannickcr/eslint-plugin-react/issues/2066 127 | // 128 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-comp.md 129 | 'react/sort-comp': ['warn'], 130 | 131 | // Disabled because of prettier 132 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/wrap-multilines.md 133 | 'react/jsx-wrap-multilines': ['off'], 134 | 135 | // Consistent (never add ={true}) 136 | // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md 137 | 'react/jsx-boolean-value': ['error', 'never'], 138 | 139 | // Consistent function component declaration styles 140 | // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md 141 | 'react/function-component-definition': [ 142 | 'error', 143 | {namedComponents: 'function-declaration'}, 144 | ], 145 | }, 146 | }; 147 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry-react/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/runtime@^7.16.3": 6 | version "7.22.15" 7 | resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.15.tgz#38f46494ccf6cf020bd4eed7124b425e83e523b8" 8 | integrity sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA== 9 | dependencies: 10 | regenerator-runtime "^0.14.0" 11 | 12 | "@eslint-community/eslint-utils@^4.2.0": 13 | version "4.4.0" 14 | resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" 15 | integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== 16 | dependencies: 17 | eslint-visitor-keys "^3.3.0" 18 | 19 | "@nodelib/fs.scandir@2.1.5": 20 | version "2.1.5" 21 | resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" 22 | integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== 23 | dependencies: 24 | "@nodelib/fs.stat" "2.0.5" 25 | run-parallel "^1.1.9" 26 | 27 | "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": 28 | version "2.0.5" 29 | resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" 30 | integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== 31 | 32 | "@nodelib/fs.walk@^1.2.3": 33 | version "1.2.8" 34 | resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" 35 | integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== 36 | dependencies: 37 | "@nodelib/fs.scandir" "2.1.5" 38 | fastq "^1.6.0" 39 | 40 | "@types/json-schema@^7.0.9": 41 | version "7.0.12" 42 | resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" 43 | integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== 44 | 45 | "@types/semver@^7.3.12": 46 | version "7.5.1" 47 | resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.1.tgz#0480eeb7221eb9bc398ad7432c9d7e14b1a5a367" 48 | integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== 49 | 50 | "@typescript-eslint/experimental-utils@^5.0.0": 51 | version "5.62.0" 52 | resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz#14559bf73383a308026b427a4a6129bae2146741" 53 | integrity sha512-RTXpeB3eMkpoclG3ZHft6vG/Z30azNHuqY6wKPBHlVMZFuEvrtlEDe8gMqDb+SO+9hjC/pLekeSCryf9vMZlCw== 54 | dependencies: 55 | "@typescript-eslint/utils" "5.62.0" 56 | 57 | "@typescript-eslint/scope-manager@5.62.0": 58 | version "5.62.0" 59 | resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" 60 | integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== 61 | dependencies: 62 | "@typescript-eslint/types" "5.62.0" 63 | "@typescript-eslint/visitor-keys" "5.62.0" 64 | 65 | "@typescript-eslint/types@5.62.0": 66 | version "5.62.0" 67 | resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" 68 | integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== 69 | 70 | "@typescript-eslint/typescript-estree@5.62.0": 71 | version "5.62.0" 72 | resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" 73 | integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== 74 | dependencies: 75 | "@typescript-eslint/types" "5.62.0" 76 | "@typescript-eslint/visitor-keys" "5.62.0" 77 | debug "^4.3.4" 78 | globby "^11.1.0" 79 | is-glob "^4.0.3" 80 | semver "^7.3.7" 81 | tsutils "^3.21.0" 82 | 83 | "@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.58.0": 84 | version "5.62.0" 85 | resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" 86 | integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== 87 | dependencies: 88 | "@eslint-community/eslint-utils" "^4.2.0" 89 | "@types/json-schema" "^7.0.9" 90 | "@types/semver" "^7.3.12" 91 | "@typescript-eslint/scope-manager" "5.62.0" 92 | "@typescript-eslint/types" "5.62.0" 93 | "@typescript-eslint/typescript-estree" "5.62.0" 94 | eslint-scope "^5.1.1" 95 | semver "^7.3.7" 96 | 97 | "@typescript-eslint/visitor-keys@5.62.0": 98 | version "5.62.0" 99 | resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" 100 | integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== 101 | dependencies: 102 | "@typescript-eslint/types" "5.62.0" 103 | eslint-visitor-keys "^3.3.0" 104 | 105 | array-union@^2.1.0: 106 | version "2.1.0" 107 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" 108 | integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== 109 | 110 | braces@^3.0.2: 111 | version "3.0.2" 112 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" 113 | integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== 114 | dependencies: 115 | fill-range "^7.0.1" 116 | 117 | debug@^4.3.4: 118 | version "4.3.4" 119 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" 120 | integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== 121 | dependencies: 122 | ms "2.1.2" 123 | 124 | dir-glob@^3.0.1: 125 | version "3.0.1" 126 | resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" 127 | integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== 128 | dependencies: 129 | path-type "^4.0.0" 130 | 131 | eslint-plugin-jest-dom@^5.4.0: 132 | version "5.4.0" 133 | resolved "https://registry.yarnpkg.com/eslint-plugin-jest-dom/-/eslint-plugin-jest-dom-5.4.0.tgz#03a5ea600f8af63f4fcd5de49ae83dc0e6aca325" 134 | integrity sha512-yBqvFsnpS5Sybjoq61cJiUsenRkC9K32hYQBFS9doBR7nbQZZ5FyO+X7MlmfM1C48Ejx/qTuOCgukDUNyzKZ7A== 135 | dependencies: 136 | "@babel/runtime" "^7.16.3" 137 | requireindex "^1.2.0" 138 | 139 | eslint-plugin-react-hooks@^4.6.2: 140 | version "4.6.2" 141 | resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" 142 | integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== 143 | 144 | eslint-plugin-testing-library@^6.3.0: 145 | version "6.3.0" 146 | resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-6.3.0.tgz#9c31a9941a860efdff3c06180151ab9c8142f685" 147 | integrity sha512-GYcEErTt6EGwE0bPDY+4aehfEBpB2gDBFKohir8jlATSUvzStEyzCx8QWB/14xeKc/AwyXkzScSzMHnFojkWrA== 148 | dependencies: 149 | "@typescript-eslint/utils" "^5.58.0" 150 | 151 | eslint-plugin-typescript-sort-keys@^3.3.0: 152 | version "3.3.0" 153 | resolved "https://registry.yarnpkg.com/eslint-plugin-typescript-sort-keys/-/eslint-plugin-typescript-sort-keys-3.3.0.tgz#a3ba29e5d6b7f3e5e66ad898347fa9142d3596d1" 154 | integrity sha512-bRW3Rc/VNdrSP9OoY5wgjjaXCOOkZKpzvl/Mk6l8Sg8CMehVIcg9K4y33l+ZcZiknpl0aR6rKusxuCJNGZWmVw== 155 | dependencies: 156 | "@typescript-eslint/experimental-utils" "^5.0.0" 157 | json-schema "^0.4.0" 158 | natural-compare-lite "^1.4.0" 159 | 160 | eslint-scope@^5.1.1: 161 | version "5.1.1" 162 | resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" 163 | integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== 164 | dependencies: 165 | esrecurse "^4.3.0" 166 | estraverse "^4.1.1" 167 | 168 | eslint-visitor-keys@^3.3.0: 169 | version "3.4.3" 170 | resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" 171 | integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== 172 | 173 | esrecurse@^4.3.0: 174 | version "4.3.0" 175 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" 176 | integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== 177 | dependencies: 178 | estraverse "^5.2.0" 179 | 180 | estraverse@^4.1.1: 181 | version "4.3.0" 182 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" 183 | integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== 184 | 185 | estraverse@^5.2.0: 186 | version "5.3.0" 187 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" 188 | integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== 189 | 190 | fast-glob@^3.2.9: 191 | version "3.3.1" 192 | resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" 193 | integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== 194 | dependencies: 195 | "@nodelib/fs.stat" "^2.0.2" 196 | "@nodelib/fs.walk" "^1.2.3" 197 | glob-parent "^5.1.2" 198 | merge2 "^1.3.0" 199 | micromatch "^4.0.4" 200 | 201 | fastq@^1.6.0: 202 | version "1.15.0" 203 | resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" 204 | integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== 205 | dependencies: 206 | reusify "^1.0.4" 207 | 208 | fill-range@^7.0.1: 209 | version "7.0.1" 210 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" 211 | integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== 212 | dependencies: 213 | to-regex-range "^5.0.1" 214 | 215 | glob-parent@^5.1.2: 216 | version "5.1.2" 217 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 218 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 219 | dependencies: 220 | is-glob "^4.0.1" 221 | 222 | globby@^11.1.0: 223 | version "11.1.0" 224 | resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" 225 | integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== 226 | dependencies: 227 | array-union "^2.1.0" 228 | dir-glob "^3.0.1" 229 | fast-glob "^3.2.9" 230 | ignore "^5.2.0" 231 | merge2 "^1.4.1" 232 | slash "^3.0.0" 233 | 234 | ignore@^5.2.0: 235 | version "5.2.4" 236 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" 237 | integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== 238 | 239 | is-extglob@^2.1.1: 240 | version "2.1.1" 241 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 242 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 243 | 244 | is-glob@^4.0.1, is-glob@^4.0.3: 245 | version "4.0.3" 246 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 247 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 248 | dependencies: 249 | is-extglob "^2.1.1" 250 | 251 | is-number@^7.0.0: 252 | version "7.0.0" 253 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 254 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 255 | 256 | json-schema@^0.4.0: 257 | version "0.4.0" 258 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" 259 | integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== 260 | 261 | lru-cache@^6.0.0: 262 | version "6.0.0" 263 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" 264 | integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== 265 | dependencies: 266 | yallist "^4.0.0" 267 | 268 | merge2@^1.3.0, merge2@^1.4.1: 269 | version "1.4.1" 270 | resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" 271 | integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== 272 | 273 | micromatch@^4.0.4: 274 | version "4.0.5" 275 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" 276 | integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== 277 | dependencies: 278 | braces "^3.0.2" 279 | picomatch "^2.3.1" 280 | 281 | ms@2.1.2: 282 | version "2.1.2" 283 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" 284 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== 285 | 286 | natural-compare-lite@^1.4.0: 287 | version "1.4.0" 288 | resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" 289 | integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== 290 | 291 | path-type@^4.0.0: 292 | version "4.0.0" 293 | resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" 294 | integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== 295 | 296 | picomatch@^2.3.1: 297 | version "2.3.1" 298 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 299 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 300 | 301 | queue-microtask@^1.2.2: 302 | version "1.2.3" 303 | resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" 304 | integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== 305 | 306 | regenerator-runtime@^0.14.0: 307 | version "0.14.0" 308 | resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" 309 | integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== 310 | 311 | requireindex@^1.2.0: 312 | version "1.2.0" 313 | resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" 314 | integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== 315 | 316 | reusify@^1.0.4: 317 | version "1.0.4" 318 | resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" 319 | integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== 320 | 321 | run-parallel@^1.1.9: 322 | version "1.2.0" 323 | resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" 324 | integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== 325 | dependencies: 326 | queue-microtask "^1.2.2" 327 | 328 | semver@^7.3.7: 329 | version "7.5.4" 330 | resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" 331 | integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== 332 | dependencies: 333 | lru-cache "^6.0.0" 334 | 335 | slash@^3.0.0: 336 | version "3.0.0" 337 | resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" 338 | integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== 339 | 340 | to-regex-range@^5.0.1: 341 | version "5.0.1" 342 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 343 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 344 | dependencies: 345 | is-number "^7.0.0" 346 | 347 | tslib@^1.8.1: 348 | version "1.14.1" 349 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" 350 | integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== 351 | 352 | tsutils@^3.21.0: 353 | version "3.21.0" 354 | resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" 355 | integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== 356 | dependencies: 357 | tslib "^1.8.1" 358 | 359 | yallist@^4.0.0: 360 | version "4.0.0" 361 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" 362 | integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== 363 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-config-sentry 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-config-sentry 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-config-sentry 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-config-sentry 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-config-sentry 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-config-sentry 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-config-sentry 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-config-sentry 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-config-sentry 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-config-sentry 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-config-sentry 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-config-sentry 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-config-sentry 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-config-sentry 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-config-sentry 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-config-sentry 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-config-sentry 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-config-sentry 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-config-sentry 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-config-sentry 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-config-sentry 290 | 291 | 292 | 293 | 294 | 295 | # 1.112.0 (2023-04-13) 296 | 297 | **Note:** Version bump only for package eslint-config-sentry 298 | 299 | 300 | 301 | 302 | 303 | # 1.111.0 (2023-03-31) 304 | 305 | **Note:** Version bump only for package eslint-config-sentry 306 | 307 | 308 | 309 | 310 | 311 | # 1.110.0 (2023-02-21) 312 | 313 | **Note:** Version bump only for package eslint-config-sentry 314 | 315 | 316 | 317 | 318 | 319 | # 1.109.0 (2022-11-29) 320 | 321 | **Note:** Version bump only for package eslint-config-sentry 322 | 323 | 324 | 325 | 326 | 327 | # 1.108.0 (2022-11-29) 328 | 329 | **Note:** Version bump only for package eslint-config-sentry 330 | 331 | 332 | 333 | 334 | 335 | # 1.107.0 (2022-10-24) 336 | 337 | **Note:** Version bump only for package eslint-config-sentry 338 | 339 | 340 | 341 | 342 | 343 | # 1.106.0 (2022-10-24) 344 | 345 | **Note:** Version bump only for package eslint-config-sentry 346 | 347 | 348 | 349 | 350 | 351 | # 1.105.0 (2022-10-24) 352 | 353 | **Note:** Version bump only for package eslint-config-sentry 354 | 355 | 356 | 357 | 358 | 359 | # 1.104.0 (2022-10-20) 360 | 361 | **Note:** Version bump only for package eslint-config-sentry 362 | 363 | 364 | 365 | 366 | 367 | # 1.103.0 (2022-10-20) 368 | 369 | **Note:** Version bump only for package eslint-config-sentry 370 | 371 | 372 | 373 | 374 | 375 | # 1.102.0 (2022-10-20) 376 | 377 | **Note:** Version bump only for package eslint-config-sentry 378 | 379 | 380 | 381 | 382 | 383 | # 1.101.0 (2022-10-20) 384 | 385 | **Note:** Version bump only for package eslint-config-sentry 386 | 387 | 388 | 389 | 390 | 391 | # 1.100.0 (2022-09-13) 392 | 393 | **Note:** Version bump only for package eslint-config-sentry 394 | 395 | 396 | 397 | 398 | 399 | # 1.99.0 (2022-09-13) 400 | 401 | **Note:** Version bump only for package eslint-config-sentry 402 | 403 | 404 | 405 | 406 | 407 | # 1.98.0 (2022-09-12) 408 | 409 | **Note:** Version bump only for package eslint-config-sentry 410 | 411 | 412 | 413 | 414 | 415 | # 1.97.0 (2022-08-29) 416 | 417 | **Note:** Version bump only for package eslint-config-sentry 418 | 419 | 420 | 421 | 422 | 423 | # 1.96.0 (2022-08-11) 424 | 425 | **Note:** Version bump only for package eslint-config-sentry 426 | 427 | 428 | 429 | 430 | 431 | # 1.95.0 (2022-07-14) 432 | 433 | 434 | ### Features 435 | 436 | * **rules:** Prevent imports of the withRouter HOC ([8b5f846](https://github.com/getsentry/eslint-config-sentry/commit/8b5f8460e38241b27f227aa867034bfb8d859aae)) 437 | 438 | 439 | 440 | 441 | 442 | # 1.94.0 (2022-06-03) 443 | 444 | **Note:** Version bump only for package eslint-config-sentry 445 | 446 | 447 | 448 | 449 | 450 | # 1.93.0 (2022-04-25) 451 | 452 | **Note:** Version bump only for package eslint-config-sentry 453 | 454 | 455 | 456 | 457 | 458 | # 1.92.0 (2022-04-06) 459 | 460 | **Note:** Version bump only for package eslint-config-sentry 461 | 462 | 463 | 464 | 465 | 466 | # 1.91.0 (2022-04-04) 467 | 468 | **Note:** Version bump only for package eslint-config-sentry 469 | 470 | 471 | 472 | 473 | 474 | # 1.90.0 (2022-04-04) 475 | 476 | **Note:** Version bump only for package eslint-config-sentry 477 | 478 | 479 | 480 | 481 | 482 | # 1.89.0 (2022-04-04) 483 | 484 | **Note:** Version bump only for package eslint-config-sentry 485 | 486 | 487 | 488 | 489 | 490 | # 1.88.0 (2022-04-04) 491 | 492 | **Note:** Version bump only for package eslint-config-sentry 493 | 494 | 495 | 496 | 497 | 498 | # 1.87.0 (2022-04-04) 499 | 500 | **Note:** Version bump only for package eslint-config-sentry 501 | 502 | 503 | 504 | 505 | 506 | # 1.86.0 (2022-04-04) 507 | 508 | **Note:** Version bump only for package eslint-config-sentry 509 | 510 | 511 | 512 | 513 | 514 | # 1.85.0 (2022-04-04) 515 | 516 | **Note:** Version bump only for package eslint-config-sentry 517 | 518 | 519 | 520 | 521 | 522 | # 1.84.0 (2022-04-04) 523 | 524 | **Note:** Version bump only for package eslint-config-sentry 525 | 526 | 527 | 528 | 529 | 530 | # 1.83.0 (2022-04-01) 531 | 532 | **Note:** Version bump only for package eslint-config-sentry 533 | 534 | 535 | 536 | 537 | 538 | # 1.82.0 (2022-03-30) 539 | 540 | **Note:** Version bump only for package eslint-config-sentry 541 | 542 | 543 | 544 | 545 | 546 | # 1.81.0 (2022-03-30) 547 | 548 | **Note:** Version bump only for package eslint-config-sentry 549 | 550 | 551 | 552 | 553 | 554 | # 1.80.0 (2022-03-30) 555 | 556 | **Note:** Version bump only for package eslint-config-sentry 557 | 558 | 559 | 560 | 561 | 562 | # 1.79.0 (2022-03-18) 563 | 564 | **Note:** Version bump only for package eslint-config-sentry 565 | 566 | 567 | 568 | 569 | 570 | # 1.78.0 (2022-03-08) 571 | 572 | **Note:** Version bump only for package eslint-config-sentry 573 | 574 | 575 | 576 | 577 | 578 | # 1.77.0 (2022-02-25) 579 | 580 | **Note:** Version bump only for package eslint-config-sentry 581 | 582 | 583 | 584 | 585 | 586 | # 1.76.0 (2022-02-21) 587 | 588 | **Note:** Version bump only for package eslint-config-sentry 589 | 590 | 591 | 592 | 593 | 594 | # 1.75.0 (2022-02-21) 595 | 596 | **Note:** Version bump only for package eslint-config-sentry 597 | 598 | 599 | 600 | 601 | 602 | # 1.74.0 (2022-01-31) 603 | 604 | **Note:** Version bump only for package eslint-config-sentry 605 | 606 | 607 | 608 | 609 | 610 | # 1.73.0 (2022-01-18) 611 | 612 | **Note:** Version bump only for package eslint-config-sentry 613 | 614 | 615 | 616 | 617 | 618 | # 1.72.0 (2022-01-14) 619 | 620 | **Note:** Version bump only for package eslint-config-sentry 621 | 622 | 623 | 624 | 625 | 626 | # 1.71.0 (2022-01-14) 627 | 628 | **Note:** Version bump only for package eslint-config-sentry 629 | 630 | 631 | 632 | 633 | 634 | # 1.70.0 (2022-01-05) 635 | 636 | **Note:** Version bump only for package eslint-config-sentry 637 | 638 | 639 | 640 | 641 | 642 | # 1.69.0 (2021-12-06) 643 | 644 | **Note:** Version bump only for package eslint-config-sentry 645 | 646 | 647 | 648 | 649 | 650 | # 1.68.0 (2021-11-12) 651 | 652 | **Note:** Version bump only for package eslint-config-sentry 653 | 654 | 655 | 656 | 657 | 658 | # 1.67.0 (2021-11-04) 659 | 660 | **Note:** Version bump only for package eslint-config-sentry 661 | 662 | 663 | 664 | 665 | 666 | # 1.66.0 (2021-11-04) 667 | 668 | **Note:** Version bump only for package eslint-config-sentry 669 | 670 | 671 | 672 | 673 | 674 | # 1.65.0 (2021-11-03) 675 | 676 | **Note:** Version bump only for package eslint-config-sentry 677 | 678 | 679 | 680 | 681 | 682 | # 1.64.0 (2021-10-29) 683 | 684 | **Note:** Version bump only for package eslint-config-sentry 685 | 686 | 687 | 688 | 689 | 690 | # 1.63.0 (2021-10-25) 691 | 692 | **Note:** Version bump only for package eslint-config-sentry 693 | 694 | 695 | 696 | 697 | 698 | # 1.62.0 (2021-09-14) 699 | 700 | **Note:** Version bump only for package eslint-config-sentry 701 | 702 | 703 | 704 | 705 | 706 | # 1.61.0 (2021-08-31) 707 | 708 | **Note:** Version bump only for package eslint-config-sentry 709 | 710 | 711 | 712 | 713 | 714 | # 1.60.0 (2021-08-04) 715 | 716 | **Note:** Version bump only for package eslint-config-sentry 717 | 718 | 719 | 720 | 721 | 722 | # 1.59.0 (2021-08-04) 723 | 724 | **Note:** Version bump only for package eslint-config-sentry 725 | 726 | 727 | 728 | 729 | 730 | # 1.58.0 (2021-06-21) 731 | 732 | **Note:** Version bump only for package eslint-config-sentry 733 | 734 | 735 | 736 | 737 | 738 | # 1.57.0 (2021-06-21) 739 | 740 | **Note:** Version bump only for package eslint-config-sentry 741 | 742 | 743 | 744 | 745 | 746 | # 1.56.0 (2021-06-21) 747 | 748 | **Note:** Version bump only for package eslint-config-sentry 749 | 750 | 751 | 752 | 753 | 754 | # 1.55.0 (2021-05-12) 755 | 756 | **Note:** Version bump only for package eslint-config-sentry 757 | 758 | 759 | 760 | 761 | 762 | # 1.54.0 (2021-05-10) 763 | 764 | **Note:** Version bump only for package eslint-config-sentry 765 | 766 | 767 | 768 | 769 | 770 | # 1.53.0 (2021-05-05) 771 | 772 | **Note:** Version bump only for package eslint-config-sentry 773 | 774 | 775 | 776 | 777 | 778 | # 1.52.0 (2021-05-04) 779 | 780 | **Note:** Version bump only for package eslint-config-sentry 781 | 782 | 783 | 784 | 785 | 786 | # 1.51.0 (2021-04-07) 787 | 788 | **Note:** Version bump only for package eslint-config-sentry 789 | 790 | 791 | 792 | 793 | 794 | # 1.50.0 (2021-01-25) 795 | 796 | **Note:** Version bump only for package eslint-config-sentry 797 | 798 | 799 | 800 | 801 | 802 | # 1.49.0 (2021-01-13) 803 | 804 | **Note:** Version bump only for package eslint-config-sentry 805 | 806 | 807 | 808 | 809 | 810 | # 1.48.0 (2021-01-13) 811 | 812 | **Note:** Version bump only for package eslint-config-sentry 813 | 814 | 815 | 816 | 817 | 818 | # 1.47.0 (2020-12-02) 819 | 820 | **Note:** Version bump only for package eslint-config-sentry 821 | 822 | 823 | 824 | 825 | 826 | # 1.46.0 (2020-11-21) 827 | 828 | **Note:** Version bump only for package eslint-config-sentry 829 | 830 | 831 | 832 | 833 | 834 | # 1.45.0 (2020-11-17) 835 | 836 | **Note:** Version bump only for package eslint-config-sentry 837 | 838 | 839 | 840 | 841 | 842 | # 1.44.0 (2020-09-11) 843 | 844 | **Note:** Version bump only for package eslint-config-sentry 845 | 846 | 847 | 848 | 849 | 850 | # 1.43.0 (2020-07-06) 851 | 852 | **Note:** Version bump only for package eslint-config-sentry 853 | 854 | 855 | 856 | 857 | 858 | # 1.42.0 (2020-07-02) 859 | 860 | **Note:** Version bump only for package eslint-config-sentry 861 | 862 | 863 | 864 | 865 | 866 | # 1.41.0 (2020-06-18) 867 | 868 | **Note:** Version bump only for package eslint-config-sentry 869 | 870 | 871 | 872 | 873 | 874 | # 1.40.0 (2020-06-16) 875 | 876 | **Note:** Version bump only for package eslint-config-sentry 877 | 878 | 879 | 880 | 881 | 882 | # 1.39.0 (2020-06-12) 883 | 884 | **Note:** Version bump only for package eslint-config-sentry 885 | 886 | 887 | 888 | 889 | 890 | # 1.38.0 (2020-05-26) 891 | 892 | **Note:** Version bump only for package eslint-config-sentry 893 | 894 | 895 | 896 | 897 | 898 | # [1.34.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.33.0...v1.34.0) (2020-02-28) 899 | 900 | 901 | ### Features 902 | 903 | * **rule:** Enable arrow-body-style ([7013601](https://github.com/getsentry/eslint-config-sentry/commit/7013601)) 904 | 905 | 906 | 907 | 908 | 909 | # [1.31.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.30.0...v1.31.0) (2020-02-13) 910 | 911 | **Note:** Version bump only for package eslint-config-sentry 912 | 913 | 914 | 915 | 916 | 917 | # [1.25.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.25.0) (2019-10-23) 918 | 919 | 920 | ### Features 921 | 922 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 923 | 924 | 925 | 926 | 927 | 928 | # [1.24.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.24.0) (2019-10-18) 929 | 930 | 931 | ### Features 932 | 933 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 934 | 935 | 936 | 937 | 938 | 939 | # [1.23.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.23.0) (2019-10-16) 940 | 941 | 942 | ### Features 943 | 944 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 945 | 946 | 947 | 948 | 949 | 950 | # [1.22.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.22.0) (2019-10-15) 951 | 952 | **Note:** Version bump only for package eslint-config-sentry 953 | 954 | 955 | 956 | 957 | 958 | # [1.21.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.21.0) (2019-10-14) 959 | 960 | **Note:** Version bump only for package eslint-config-sentry 961 | 962 | 963 | 964 | 965 | 966 | ## [1.16.1](https://github.com/getsentry/eslint-config-sentry/compare/v1.16.0...v1.16.1) (2019-10-04) 967 | 968 | **Note:** Version bump only for package eslint-config-sentry 969 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/README.md: -------------------------------------------------------------------------------- 1 | # Install 2 | `yarn add -D eslint-config-sentry` 3 | 4 | ## Configuration 5 | In your `.eslintrc` (or equivalent config file) 6 | 7 | Use `sentry` for base rules, `sentry/app` contains rules for [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) 8 | and [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react). 9 | 10 | ```json 11 | { 12 | "extends": [ 13 | "sentry/app" 14 | ], 15 | } 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/index.js: -------------------------------------------------------------------------------- 1 | // Default: base 2 | module.exports = { 3 | extends: ['sentry/rules/base'], 4 | }; 5 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-config-sentry", 3 | "version": "2.10.0", 4 | "description": "sentry.io eslint config", 5 | "main": "index.js", 6 | "scripts": {}, 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/getsentry/eslint-config-sentry.git" 10 | }, 11 | "keywords": [ 12 | "eslint", 13 | "eslint-config", 14 | "sentry" 15 | ], 16 | "author": "Billy Vong ", 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/getsentry/eslint-config-sentry/issues" 20 | }, 21 | "peerDependencies": { 22 | "eslint": ">=8" 23 | }, 24 | "homepage": "https://github.com/getsentry/eslint-config-sentry#readme", 25 | "gitHead": "7ea9fe88aead7b4d6e86e5aeea1391a80fbb08d0", 26 | "volta": { 27 | "node": "20.10.0", 28 | "yarn": "1.22.5" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/rules/base.js: -------------------------------------------------------------------------------- 1 | // Test 2 | module.exports = { 3 | rules: { 4 | /** 5 | * Strict mode 6 | */ 7 | // https://eslint.org/docs/rules/strict 8 | strict: ['error', 'global'], 9 | 10 | /** 11 | * Variables 12 | */ 13 | // https://eslint.org/docs/rules/no-shadow 14 | 'no-shadow': ['error'], 15 | 16 | // https://eslint.org/docs/rules/no-shadow-restricted-names 17 | 'no-shadow-restricted-names': ['error'], 18 | 19 | // https://eslint.org/docs/rules/no-undef 20 | 'no-undef': ['error'], 21 | 22 | // https://eslint.org/docs/rules/no-unused-vars 23 | 'no-unused-vars': [ 24 | 'error', 25 | { 26 | vars: 'all', 27 | args: 'none', 28 | 29 | // Ignore vars that start with an underscore 30 | // e.g. if you want to omit a property using object spread: 31 | // 32 | // const {name: _name, ...props} = this.props; 33 | // 34 | varsIgnorePattern: '^_', 35 | argsIgnorePattern: '^_', 36 | }, 37 | ], 38 | 39 | // https://eslint.org/docs/rules/no-use-before-define 40 | 'no-use-before-define': ['error', {functions: false}], 41 | 42 | /** 43 | * Possible errors 44 | */ 45 | // https://eslint.org/docs/rules/no-cond-assign 46 | 'no-cond-assign': ['error', 'always'], 47 | 48 | // https://eslint.org/docs/rules/no-console 49 | 'no-console': ['warn'], 50 | 51 | // https://eslint.org/docs/rules/no-alert 52 | 'no-alert': ['error'], 53 | 54 | // https://eslint.org/docs/rules/no-constant-condition 55 | 'no-constant-condition': ['warn'], 56 | 57 | // https://eslint.org/docs/rules/no-empty 58 | 'no-empty': ['error'], 59 | 60 | // https://eslint.org/docs/rules/no-ex-assign 61 | 'no-ex-assign': ['error'], 62 | 63 | // https://eslint.org/docs/rules/no-extra-boolean-cast 64 | 'no-extra-boolean-cast': ['error'], 65 | 66 | // https://eslint.org/docs/rules/no-func-assign 67 | 'no-func-assign': ['error'], 68 | 69 | // https://eslint.org/docs/rules/no-inner-declarations 70 | 'no-inner-declarations': ['error'], 71 | 72 | // https://eslint.org/docs/rules/no-invalid-regexp 73 | 'no-invalid-regexp': ['error'], 74 | 75 | // https://eslint.org/docs/rules/no-irregular-whitespace 76 | 'no-irregular-whitespace': ['error'], 77 | 78 | // https://eslint.org/docs/rules/no-obj-calls 79 | 'no-obj-calls': ['error'], 80 | 81 | // https://eslint.org/docs/rules/no-sparse-arrays 82 | 'no-sparse-arrays': ['error'], 83 | 84 | // https://eslint.org/docs/rules/block-scoped-var 85 | 'block-scoped-var': ['error'], 86 | 87 | /** 88 | * Best practices 89 | */ 90 | // https://eslint.org/docs/rules/consistent-return 91 | 'consistent-return': ['error'], 92 | 93 | // https://eslint.org/docs/rules/default-case 94 | 'default-case': ['error'], 95 | 96 | // https://eslint.org/docs/rules/dot-notation 97 | 'dot-notation': [ 98 | 'error', 99 | { 100 | allowKeywords: true, 101 | }, 102 | ], 103 | 104 | // https://eslint.org/docs/rules/guard-for-in [REVISIT ME] 105 | 'guard-for-in': ['off'], 106 | 107 | // https://eslint.org/docs/rules/no-caller 108 | 'no-caller': ['error'], 109 | 110 | // https://eslint.org/docs/rules/no-else-return [REVISIT ME] 111 | 'no-else-return': ['off'], 112 | 113 | // https://eslint.org/docs/rules/no-eval 114 | 'no-eval': ['error'], 115 | 116 | // https://eslint.org/docs/rules/no-extend-native 117 | 'no-extend-native': ['error'], 118 | 119 | // https://eslint.org/docs/rules/no-extra-bind 120 | 'no-extra-bind': ['error'], 121 | 122 | // https://eslint.org/docs/rules/no-fallthrough 123 | 'no-fallthrough': ['error'], 124 | 125 | // https://eslint.org/docs/rules/no-floating-decimal 126 | 'no-floating-decimal': ['error'], 127 | 128 | // https://eslint.org/docs/rules/no-implied-eval 129 | 'no-implied-eval': ['error'], 130 | 131 | // https://eslint.org/docs/rules/no-lone-blocks 132 | 'no-lone-blocks': ['error'], 133 | 134 | // https://eslint.org/docs/rules/no-loop-func 135 | 'no-loop-func': ['error'], 136 | 137 | // https://eslint.org/docs/rules/no-multi-str 138 | 'no-multi-str': ['error'], 139 | 140 | // https://eslint.org/docs/rules/no-native-reassign 141 | 'no-native-reassign': ['error'], 142 | 143 | // https://eslint.org/docs/rules/no-new 144 | 'no-new': ['error'], 145 | 146 | // https://eslint.org/docs/rules/no-new-func 147 | 'no-new-func': ['error'], 148 | 149 | // https://eslint.org/docs/rules/no-new-wrappers 150 | 'no-new-wrappers': ['error'], 151 | 152 | // https://eslint.org/docs/rules/no-octal 153 | 'no-octal': ['error'], 154 | 155 | // https://eslint.org/docs/rules/no-octal-escape 156 | 'no-octal-escape': ['error'], 157 | 158 | // https://eslint.org/docs/rules/no-param-reassign [REVISIT ME] 159 | 'no-param-reassign': ['off'], 160 | 161 | // https://eslint.org/docs/rules/no-proto 162 | 'no-proto': ['error'], 163 | 164 | // https://eslint.org/docs/rules/no-return-assign 165 | 'no-return-assign': ['error'], 166 | 167 | // https://eslint.org/docs/rules/no-script-url 168 | 'no-script-url': ['error'], 169 | 170 | // https://eslint.org/docs/rules/no-self-compare 171 | 'no-self-compare': ['error'], 172 | 173 | // https://eslint.org/docs/rules/no-sequences 174 | 'no-sequences': ['error'], 175 | 176 | // https://eslint.org/docs/rules/no-throw-literal 177 | 'no-throw-literal': ['error'], 178 | 179 | // https://eslint.org/docs/rules/no-with 180 | 'no-with': ['error'], 181 | 182 | // https://eslint.org/docs/rules/radix 183 | radix: ['error'], 184 | 185 | // https://eslint.org/docs/rules/space-in-brackets.html 186 | 'computed-property-spacing': ['error', 'never'], 187 | 188 | // https://eslint.org/docs/rules/space-in-brackets.html 189 | 'array-bracket-spacing': ['error', 'never'], 190 | 191 | // https://eslint.org/docs/rules/space-in-brackets.html 192 | 'object-curly-spacing': ['error', 'never'], 193 | 194 | // https://eslint.org/docs/rules/object-shorthand 195 | 'object-shorthand': ['error', 'properties'], 196 | 197 | // https://eslint.org/docs/rules/space-infix-ops.html 198 | 'space-infix-ops': ['error'], 199 | 200 | // https://eslint.org/docs/rules/vars-on-top 201 | 'vars-on-top': ['off'], 202 | 203 | // https://eslint.org/docs/rules/wrap-iife 204 | 'wrap-iife': ['error', 'any'], 205 | 206 | // https://eslint.org/docs/rules/array-callback-return 207 | 'array-callback-return': ['error'], 208 | 209 | // https://eslint.org/docs/rules/yoda 210 | yoda: ['error'], 211 | 212 | // https://eslint.org/docs/rules/no-else-return 213 | 'no-else-return': ['error', {allowElseIf: false}], 214 | 215 | // https://eslint.org/docs/rules/require-await 216 | 'require-await': ['error'], 217 | 218 | // https://eslint.org/docs/rules/multiline-comment-style 219 | 'multiline-comment-style': ['error', 'separate-lines'], 220 | 221 | // https://eslint.org/docs/rules/spaced-comment 222 | 'spaced-comment': [ 223 | 'error', 224 | 'always', 225 | { 226 | line: {markers: ['/'], exceptions: ['-', '+']}, 227 | block: {exceptions: ['*'], balanced: true}, 228 | }, 229 | ], 230 | }, 231 | }; 232 | -------------------------------------------------------------------------------- /packages/eslint-config-sentry/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. 5 | 6 | # 2.10.0 (2024-11-12) 7 | 8 | 9 | ### Features 10 | 11 | * Add back rules of hooks ([#209](https://github.com/getsentry/eslint-config-sentry/issues/209)) ([e3121c1](https://github.com/getsentry/eslint-config-sentry/commit/e3121c1a1a2b1b7d1045b051e433f373b0f0eca8)) 12 | 13 | 14 | 15 | 16 | 17 | # 2.9.0 (2024-10-10) 18 | 19 | 20 | ### Features 21 | 22 | * Upgrade various packages ([#208](https://github.com/getsentry/eslint-config-sentry/issues/208)) ([5cdbe25](https://github.com/getsentry/eslint-config-sentry/commit/5cdbe257332d7c184d732e3003ece19adc781cbe)) 23 | 24 | 25 | 26 | 27 | 28 | # 2.8.0 (2024-06-27) 29 | 30 | 31 | ### Features 32 | 33 | * upgrade eslint-typescript, other dependencies ([60e0423](https://github.com/getsentry/eslint-config-sentry/commit/60e0423bcca6c7aa1154108634bd9277acc84378)) 34 | 35 | 36 | 37 | 38 | 39 | # 2.7.0 (2024-04-09) 40 | 41 | 42 | ### Features 43 | 44 | * Remove webpack resolver ([#205](https://github.com/getsentry/eslint-config-sentry/issues/205)) ([f49389c](https://github.com/getsentry/eslint-config-sentry/commit/f49389c6c319ea4613a88b598456fd811ae910b5)) 45 | 46 | 47 | 48 | 49 | 50 | # 2.6.0 (2024-04-08) 51 | 52 | 53 | ### Features 54 | 55 | * upgrade dep, unblock typescript 5.4 ([#204](https://github.com/getsentry/eslint-config-sentry/issues/204)) ([f34371a](https://github.com/getsentry/eslint-config-sentry/commit/f34371a31d99a953c4849522e15d81b741f84537)) 56 | 57 | 58 | 59 | 60 | 61 | # 2.5.0 (2024-02-13) 62 | 63 | **Note:** Version bump only for package eslint-plugin-sentry 64 | 65 | 66 | 67 | 68 | 69 | # 2.4.0 (2024-02-13) 70 | 71 | 72 | ### Performance Improvements 73 | 74 | * get rid of `eslint-plugin-import` rules ([#202](https://github.com/getsentry/eslint-config-sentry/issues/202)) ([f7127db](https://github.com/getsentry/eslint-config-sentry/commit/f7127db2ad6449a05f7d14b6b43a7761312bc128)) 75 | 76 | 77 | 78 | 79 | 80 | # 2.3.0 (2024-02-12) 81 | 82 | 83 | ### Bug Fixes 84 | 85 | * add missing react-hooks plugin ([#201](https://github.com/getsentry/eslint-config-sentry/issues/201)) ([087a3ba](https://github.com/getsentry/eslint-config-sentry/commit/087a3bac987c5f483c65dc73f736f4b27bf2f790)) 86 | 87 | 88 | 89 | 90 | 91 | # 2.2.0 (2024-02-12) 92 | 93 | 94 | ### Features 95 | 96 | * remove unnecessary linting rules ([#200](https://github.com/getsentry/eslint-config-sentry/issues/200)) ([24d7208](https://github.com/getsentry/eslint-config-sentry/commit/24d720842939eb18548bcab2ff99027738c03cb5)) 97 | 98 | 99 | 100 | 101 | 102 | # 2.1.0 (2024-01-16) 103 | 104 | **Note:** Version bump only for package eslint-plugin-sentry 105 | 106 | 107 | 108 | 109 | 110 | # 2.0.0 (2024-01-16) 111 | 112 | **Note:** Version bump only for package eslint-plugin-sentry 113 | 114 | 115 | 116 | 117 | 118 | # 1.133.0 (2024-01-16) 119 | 120 | **Note:** Version bump only for package eslint-plugin-sentry 121 | 122 | 123 | 124 | 125 | 126 | # 1.132.0 (2024-01-02) 127 | 128 | 129 | ### Features 130 | 131 | * Update react version to 17 ([#195](https://github.com/getsentry/eslint-config-sentry/issues/195)) ([ca077a7](https://github.com/getsentry/eslint-config-sentry/commit/ca077a715222d9c01171b160b077424ce982173b)) 132 | 133 | 134 | 135 | 136 | 137 | # 1.131.0 (2024-01-02) 138 | 139 | **Note:** Version bump only for package eslint-plugin-sentry 140 | 141 | 142 | 143 | 144 | 145 | # 1.130.0 (2023-12-29) 146 | 147 | **Note:** Version bump only for package eslint-plugin-sentry 148 | 149 | 150 | 151 | 152 | 153 | # 1.129.0 (2023-12-20) 154 | 155 | 156 | ### Bug Fixes 157 | 158 | * remove style related rules ([#196](https://github.com/getsentry/eslint-config-sentry/issues/196)) ([afc1739](https://github.com/getsentry/eslint-config-sentry/commit/afc17391f7625c7a57fcd5fb3f5caf33fc96369f)) 159 | 160 | 161 | 162 | 163 | 164 | # 1.128.0 (2023-12-19) 165 | 166 | 167 | ### Features 168 | 169 | * remove prettier and add rome as dev-deps ([#194](https://github.com/getsentry/eslint-config-sentry/issues/194)) ([f91fac4](https://github.com/getsentry/eslint-config-sentry/commit/f91fac49a5b1d1f0b6f668dc4d53c564368ff650)) 170 | 171 | 172 | 173 | 174 | 175 | # 1.127.0 (2023-12-13) 176 | 177 | **Note:** Version bump only for package eslint-plugin-sentry 178 | 179 | 180 | 181 | 182 | 183 | # 1.126.0 (2023-09-21) 184 | 185 | **Note:** Version bump only for package eslint-plugin-sentry 186 | 187 | 188 | 189 | 190 | 191 | # 1.125.0 (2023-09-20) 192 | 193 | **Note:** Version bump only for package eslint-plugin-sentry 194 | 195 | 196 | 197 | 198 | 199 | # 1.124.0 (2023-09-15) 200 | 201 | **Note:** Version bump only for package eslint-plugin-sentry 202 | 203 | 204 | 205 | 206 | 207 | # 1.123.0 (2023-08-28) 208 | 209 | **Note:** Version bump only for package eslint-plugin-sentry 210 | 211 | 212 | 213 | 214 | 215 | # 1.122.0 (2023-07-31) 216 | 217 | **Note:** Version bump only for package eslint-plugin-sentry 218 | 219 | 220 | 221 | 222 | 223 | # 1.121.0 (2023-07-28) 224 | 225 | **Note:** Version bump only for package eslint-plugin-sentry 226 | 227 | 228 | 229 | 230 | 231 | # 1.120.0 (2023-07-26) 232 | 233 | **Note:** Version bump only for package eslint-plugin-sentry 234 | 235 | 236 | 237 | 238 | 239 | # 1.119.0 (2023-07-05) 240 | 241 | **Note:** Version bump only for package eslint-plugin-sentry 242 | 243 | 244 | 245 | 246 | 247 | # 1.118.0 (2023-06-13) 248 | 249 | **Note:** Version bump only for package eslint-plugin-sentry 250 | 251 | 252 | 253 | 254 | 255 | # 1.117.0 (2023-05-11) 256 | 257 | **Note:** Version bump only for package eslint-plugin-sentry 258 | 259 | 260 | 261 | 262 | 263 | # 1.116.0 (2023-05-03) 264 | 265 | **Note:** Version bump only for package eslint-plugin-sentry 266 | 267 | 268 | 269 | 270 | 271 | # 1.115.0 (2023-05-02) 272 | 273 | **Note:** Version bump only for package eslint-plugin-sentry 274 | 275 | 276 | 277 | 278 | 279 | # 1.114.0 (2023-04-20) 280 | 281 | **Note:** Version bump only for package eslint-plugin-sentry 282 | 283 | 284 | 285 | 286 | 287 | # 1.113.0 (2023-04-20) 288 | 289 | **Note:** Version bump only for package eslint-plugin-sentry 290 | 291 | 292 | 293 | 294 | 295 | # 1.112.0 (2023-04-13) 296 | 297 | **Note:** Version bump only for package eslint-plugin-sentry 298 | 299 | 300 | 301 | 302 | 303 | # 1.111.0 (2023-03-31) 304 | 305 | **Note:** Version bump only for package eslint-plugin-sentry 306 | 307 | 308 | 309 | 310 | 311 | # 1.110.0 (2023-02-21) 312 | 313 | **Note:** Version bump only for package eslint-plugin-sentry 314 | 315 | 316 | 317 | 318 | 319 | # 1.109.0 (2022-11-29) 320 | 321 | **Note:** Version bump only for package eslint-plugin-sentry 322 | 323 | 324 | 325 | 326 | 327 | # 1.108.0 (2022-11-29) 328 | 329 | **Note:** Version bump only for package eslint-plugin-sentry 330 | 331 | 332 | 333 | 334 | 335 | # 1.107.0 (2022-10-24) 336 | 337 | **Note:** Version bump only for package eslint-plugin-sentry 338 | 339 | 340 | 341 | 342 | 343 | # 1.106.0 (2022-10-24) 344 | 345 | **Note:** Version bump only for package eslint-plugin-sentry 346 | 347 | 348 | 349 | 350 | 351 | # 1.105.0 (2022-10-24) 352 | 353 | **Note:** Version bump only for package eslint-plugin-sentry 354 | 355 | 356 | 357 | 358 | 359 | # 1.104.0 (2022-10-20) 360 | 361 | **Note:** Version bump only for package eslint-plugin-sentry 362 | 363 | 364 | 365 | 366 | 367 | # 1.103.0 (2022-10-20) 368 | 369 | **Note:** Version bump only for package eslint-plugin-sentry 370 | 371 | 372 | 373 | 374 | 375 | # 1.102.0 (2022-10-20) 376 | 377 | **Note:** Version bump only for package eslint-plugin-sentry 378 | 379 | 380 | 381 | 382 | 383 | # 1.101.0 (2022-10-20) 384 | 385 | **Note:** Version bump only for package eslint-plugin-sentry 386 | 387 | 388 | 389 | 390 | 391 | # 1.100.0 (2022-09-13) 392 | 393 | **Note:** Version bump only for package eslint-plugin-sentry 394 | 395 | 396 | 397 | 398 | 399 | # 1.99.0 (2022-09-13) 400 | 401 | **Note:** Version bump only for package eslint-plugin-sentry 402 | 403 | 404 | 405 | 406 | 407 | # 1.98.0 (2022-09-12) 408 | 409 | **Note:** Version bump only for package eslint-plugin-sentry 410 | 411 | 412 | 413 | 414 | 415 | # 1.97.0 (2022-08-29) 416 | 417 | **Note:** Version bump only for package eslint-plugin-sentry 418 | 419 | 420 | 421 | 422 | 423 | # 1.96.0 (2022-08-11) 424 | 425 | **Note:** Version bump only for package eslint-plugin-sentry 426 | 427 | 428 | 429 | 430 | 431 | # 1.95.0 (2022-07-14) 432 | 433 | 434 | ### Features 435 | 436 | * **rules:** Prevent imports of the withRouter HOC ([8b5f846](https://github.com/getsentry/eslint-config-sentry/commit/8b5f8460e38241b27f227aa867034bfb8d859aae)) 437 | 438 | 439 | 440 | 441 | 442 | # 1.94.0 (2022-06-03) 443 | 444 | **Note:** Version bump only for package eslint-plugin-sentry 445 | 446 | 447 | 448 | 449 | 450 | # 1.93.0 (2022-04-25) 451 | 452 | **Note:** Version bump only for package eslint-plugin-sentry 453 | 454 | 455 | 456 | 457 | 458 | # 1.92.0 (2022-04-06) 459 | 460 | **Note:** Version bump only for package eslint-plugin-sentry 461 | 462 | 463 | 464 | 465 | 466 | # 1.91.0 (2022-04-04) 467 | 468 | **Note:** Version bump only for package eslint-plugin-sentry 469 | 470 | 471 | 472 | 473 | 474 | # 1.90.0 (2022-04-04) 475 | 476 | **Note:** Version bump only for package eslint-plugin-sentry 477 | 478 | 479 | 480 | 481 | 482 | # 1.89.0 (2022-04-04) 483 | 484 | **Note:** Version bump only for package eslint-plugin-sentry 485 | 486 | 487 | 488 | 489 | 490 | # 1.88.0 (2022-04-04) 491 | 492 | **Note:** Version bump only for package eslint-plugin-sentry 493 | 494 | 495 | 496 | 497 | 498 | # 1.87.0 (2022-04-04) 499 | 500 | **Note:** Version bump only for package eslint-plugin-sentry 501 | 502 | 503 | 504 | 505 | 506 | # 1.86.0 (2022-04-04) 507 | 508 | **Note:** Version bump only for package eslint-plugin-sentry 509 | 510 | 511 | 512 | 513 | 514 | # 1.85.0 (2022-04-04) 515 | 516 | **Note:** Version bump only for package eslint-plugin-sentry 517 | 518 | 519 | 520 | 521 | 522 | # 1.84.0 (2022-04-04) 523 | 524 | **Note:** Version bump only for package eslint-plugin-sentry 525 | 526 | 527 | 528 | 529 | 530 | # 1.83.0 (2022-04-01) 531 | 532 | **Note:** Version bump only for package eslint-plugin-sentry 533 | 534 | 535 | 536 | 537 | 538 | # 1.82.0 (2022-03-30) 539 | 540 | **Note:** Version bump only for package eslint-plugin-sentry 541 | 542 | 543 | 544 | 545 | 546 | # 1.81.0 (2022-03-30) 547 | 548 | **Note:** Version bump only for package eslint-plugin-sentry 549 | 550 | 551 | 552 | 553 | 554 | # 1.80.0 (2022-03-30) 555 | 556 | **Note:** Version bump only for package eslint-plugin-sentry 557 | 558 | 559 | 560 | 561 | 562 | # 1.79.0 (2022-03-18) 563 | 564 | **Note:** Version bump only for package eslint-plugin-sentry 565 | 566 | 567 | 568 | 569 | 570 | # 1.78.0 (2022-03-08) 571 | 572 | **Note:** Version bump only for package eslint-plugin-sentry 573 | 574 | 575 | 576 | 577 | 578 | # 1.77.0 (2022-02-25) 579 | 580 | **Note:** Version bump only for package eslint-plugin-sentry 581 | 582 | 583 | 584 | 585 | 586 | # 1.76.0 (2022-02-21) 587 | 588 | **Note:** Version bump only for package eslint-plugin-sentry 589 | 590 | 591 | 592 | 593 | 594 | # 1.75.0 (2022-02-21) 595 | 596 | **Note:** Version bump only for package eslint-plugin-sentry 597 | 598 | 599 | 600 | 601 | 602 | # 1.74.0 (2022-01-31) 603 | 604 | **Note:** Version bump only for package eslint-plugin-sentry 605 | 606 | 607 | 608 | 609 | 610 | # 1.73.0 (2022-01-18) 611 | 612 | **Note:** Version bump only for package eslint-plugin-sentry 613 | 614 | 615 | 616 | 617 | 618 | # 1.72.0 (2022-01-14) 619 | 620 | **Note:** Version bump only for package eslint-plugin-sentry 621 | 622 | 623 | 624 | 625 | 626 | # 1.71.0 (2022-01-14) 627 | 628 | **Note:** Version bump only for package eslint-plugin-sentry 629 | 630 | 631 | 632 | 633 | 634 | # 1.70.0 (2022-01-05) 635 | 636 | **Note:** Version bump only for package eslint-plugin-sentry 637 | 638 | 639 | 640 | 641 | 642 | # 1.69.0 (2021-12-06) 643 | 644 | **Note:** Version bump only for package eslint-plugin-sentry 645 | 646 | 647 | 648 | 649 | 650 | # 1.68.0 (2021-11-12) 651 | 652 | **Note:** Version bump only for package eslint-plugin-sentry 653 | 654 | 655 | 656 | 657 | 658 | # 1.67.0 (2021-11-04) 659 | 660 | **Note:** Version bump only for package eslint-plugin-sentry 661 | 662 | 663 | 664 | 665 | 666 | # 1.66.0 (2021-11-04) 667 | 668 | **Note:** Version bump only for package eslint-plugin-sentry 669 | 670 | 671 | 672 | 673 | 674 | # 1.65.0 (2021-11-03) 675 | 676 | **Note:** Version bump only for package eslint-plugin-sentry 677 | 678 | 679 | 680 | 681 | 682 | # 1.64.0 (2021-10-29) 683 | 684 | **Note:** Version bump only for package eslint-plugin-sentry 685 | 686 | 687 | 688 | 689 | 690 | # 1.63.0 (2021-10-25) 691 | 692 | **Note:** Version bump only for package eslint-plugin-sentry 693 | 694 | 695 | 696 | 697 | 698 | # 1.62.0 (2021-09-14) 699 | 700 | **Note:** Version bump only for package eslint-plugin-sentry 701 | 702 | 703 | 704 | 705 | 706 | # 1.61.0 (2021-08-31) 707 | 708 | **Note:** Version bump only for package eslint-plugin-sentry 709 | 710 | 711 | 712 | 713 | 714 | # 1.60.0 (2021-08-04) 715 | 716 | **Note:** Version bump only for package eslint-plugin-sentry 717 | 718 | 719 | 720 | 721 | 722 | # 1.59.0 (2021-08-04) 723 | 724 | **Note:** Version bump only for package eslint-plugin-sentry 725 | 726 | 727 | 728 | 729 | 730 | # 1.58.0 (2021-06-21) 731 | 732 | **Note:** Version bump only for package eslint-plugin-sentry 733 | 734 | 735 | 736 | 737 | 738 | # 1.57.0 (2021-06-21) 739 | 740 | **Note:** Version bump only for package eslint-plugin-sentry 741 | 742 | 743 | 744 | 745 | 746 | # 1.56.0 (2021-06-21) 747 | 748 | **Note:** Version bump only for package eslint-plugin-sentry 749 | 750 | 751 | 752 | 753 | 754 | # 1.55.0 (2021-05-12) 755 | 756 | **Note:** Version bump only for package eslint-plugin-sentry 757 | 758 | 759 | 760 | 761 | 762 | # 1.54.0 (2021-05-10) 763 | 764 | **Note:** Version bump only for package eslint-plugin-sentry 765 | 766 | 767 | 768 | 769 | 770 | # 1.53.0 (2021-05-05) 771 | 772 | **Note:** Version bump only for package eslint-plugin-sentry 773 | 774 | 775 | 776 | 777 | 778 | # 1.52.0 (2021-05-04) 779 | 780 | **Note:** Version bump only for package eslint-plugin-sentry 781 | 782 | 783 | 784 | 785 | 786 | # 1.51.0 (2021-04-07) 787 | 788 | **Note:** Version bump only for package eslint-plugin-sentry 789 | 790 | 791 | 792 | 793 | 794 | # 1.50.0 (2021-01-25) 795 | 796 | **Note:** Version bump only for package eslint-plugin-sentry 797 | 798 | 799 | 800 | 801 | 802 | # 1.49.0 (2021-01-13) 803 | 804 | **Note:** Version bump only for package eslint-plugin-sentry 805 | 806 | 807 | 808 | 809 | 810 | # 1.48.0 (2021-01-13) 811 | 812 | **Note:** Version bump only for package eslint-plugin-sentry 813 | 814 | 815 | 816 | 817 | 818 | # 1.47.0 (2020-12-02) 819 | 820 | **Note:** Version bump only for package eslint-plugin-sentry 821 | 822 | 823 | 824 | 825 | 826 | # 1.46.0 (2020-11-21) 827 | 828 | **Note:** Version bump only for package eslint-plugin-sentry 829 | 830 | 831 | 832 | 833 | 834 | # 1.45.0 (2020-11-17) 835 | 836 | **Note:** Version bump only for package eslint-plugin-sentry 837 | 838 | 839 | 840 | 841 | 842 | # 1.44.0 (2020-09-11) 843 | 844 | **Note:** Version bump only for package eslint-plugin-sentry 845 | 846 | 847 | 848 | 849 | 850 | # 1.43.0 (2020-07-06) 851 | 852 | **Note:** Version bump only for package eslint-plugin-sentry 853 | 854 | 855 | 856 | 857 | 858 | # 1.42.0 (2020-07-02) 859 | 860 | **Note:** Version bump only for package eslint-plugin-sentry 861 | 862 | 863 | 864 | 865 | 866 | # 1.41.0 (2020-06-18) 867 | 868 | **Note:** Version bump only for package eslint-plugin-sentry 869 | 870 | 871 | 872 | 873 | 874 | # 1.40.0 (2020-06-16) 875 | 876 | **Note:** Version bump only for package eslint-plugin-sentry 877 | 878 | 879 | 880 | 881 | 882 | # 1.39.0 (2020-06-12) 883 | 884 | **Note:** Version bump only for package eslint-plugin-sentry 885 | 886 | 887 | 888 | 889 | 890 | # 1.38.0 (2020-05-26) 891 | 892 | **Note:** Version bump only for package eslint-plugin-sentry 893 | 894 | 895 | 896 | 897 | 898 | # [1.35.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.34.0...v1.35.0) (2020-03-17) 899 | 900 | **Note:** Version bump only for package eslint-plugin-sentry 901 | 902 | 903 | 904 | 905 | 906 | # [1.30.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.30.0) (2020-01-27) 907 | 908 | 909 | ### Features 910 | 911 | * **rule:** Adds rule to disallow %d within tn() ([#50](https://github.com/getsentry/eslint-config-sentry/issues/50)) ([b9edec3](https://github.com/getsentry/eslint-config-sentry/commit/b9edec3)) 912 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 913 | 914 | 915 | 916 | 917 | 918 | # [1.29.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.28.1...v1.29.0) (2020-01-22) 919 | 920 | 921 | ### Features 922 | 923 | * **rule:** Adds rule to disallow React Hooks ([0375789](https://github.com/getsentry/eslint-config-sentry/commit/0375789)) 924 | 925 | 926 | 927 | 928 | 929 | # [1.25.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.25.0) (2019-10-23) 930 | 931 | 932 | ### Features 933 | 934 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 935 | 936 | 937 | 938 | 939 | 940 | # [1.24.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.24.0) (2019-10-18) 941 | 942 | 943 | ### Features 944 | 945 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 946 | 947 | 948 | 949 | 950 | 951 | # [1.23.0](https://github.com/getsentry/eslint-config-sentry/compare/v1.19.1...v1.23.0) (2019-10-16) 952 | 953 | 954 | ### Features 955 | 956 | * **plugin:** Add a plugin for custom rules ([#25](https://github.com/getsentry/eslint-config-sentry/issues/25)) ([52e28f3](https://github.com/getsentry/eslint-config-sentry/commit/52e28f3)) 957 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/README.md: -------------------------------------------------------------------------------- 1 | # eslint-plugin-sentry 2 | 3 | sentry.io eslint plugin 4 | 5 | ## Installation 6 | 7 | You'll first need to install [ESLint](https://eslint.org): 8 | 9 | ``` 10 | $ npm i eslint --save-dev 11 | ``` 12 | 13 | Next, install `eslint-plugin-sentry`: 14 | 15 | ``` 16 | $ npm install eslint-plugin-sentry --save-dev 17 | ``` 18 | 19 | **Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-sentry` globally. 20 | 21 | ## Usage 22 | 23 | Add `sentry` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix: 24 | 25 | ```json 26 | { 27 | "plugins": [ 28 | "sentry" 29 | ] 30 | } 31 | ``` 32 | 33 | 34 | Then configure the rules you want to use under the rules section. 35 | 36 | ```json 37 | { 38 | "rules": { 39 | "sentry/rule-name": 2 40 | } 41 | } 42 | ``` 43 | 44 | ## Supported Rules 45 | 46 | * Fill in provided rules here 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/docs/rules/no-digits-in-tn.md: -------------------------------------------------------------------------------- 1 | # disallow using %d within tn() (no-digits-in-tn) 2 | 3 | This rule prevents %d being used within tn(). 4 | We should use %s instead. 5 | 6 | 7 | ## Rule Details 8 | 9 | Underlying function of tn() called `ngettext` cannot format numbers > 999 because of a call to `toLocaleString`. 10 | `toLocaleString` will render `999` as `"999"` but `9999` as `"9,999"`. This means that any call with `tn` or `ngettext` cannot use `%d` in the codebase but has to use `%s`. 11 | This means a string is always being passed in as an argument, but `sprintf-js` implicitly coerces strings that can be parsed as integers into an integer. 12 | This would break under any locale that used different formatting and other undesirable behaviors. 13 | 14 | Examples of **correct** code for this rule: 15 | 16 | ```js 17 | tn('%s project', '%s projects', 5); 18 | ``` 19 | 20 | Examples of **incorrect** code for this rule: 21 | 22 | ```js 23 | tn('%d project', '%d projects', 5); 24 | ``` -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/docs/rules/no-styled-shortcut.md: -------------------------------------------------------------------------------- 1 | # disallow styled shorthand (no-styled-shortcut) 2 | 3 | There are two ways to define styled components for native elements, but only one way to style a custom component. 4 | 5 | 6 | ## Rule Details 7 | 8 | This rule aims to have a uniform way to define styled components. 9 | 10 | Examples of **incorrect** code for this rule: 11 | 12 | ```js 13 | 14 | styled.div` 15 | display: flex; 16 | ` 17 | 18 | ``` 19 | 20 | Examples of **correct** code for this rule: 21 | 22 | ```js 23 | 24 | styled('div')` 25 | display: flex; 26 | ` 27 | 28 | ``` 29 | 30 | ## When Not To Use It 31 | 32 | If you want to be able to use the shorthand to style a native element. 33 | 34 | ## Further Reading 35 | 36 | * https://emotion.sh/docs/styled 37 | 38 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/lib/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview sentry.io eslint plugin 3 | * @author billy vong 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Requirements 9 | //------------------------------------------------------------------------------ 10 | 11 | var requireIndex = require('requireindex'); 12 | 13 | //------------------------------------------------------------------------------ 14 | // Plugin Definition 15 | //------------------------------------------------------------------------------ 16 | 17 | // import all rules in lib/rules 18 | module.exports.rules = requireIndex(__dirname + '/rules'); 19 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/lib/rules/no-digits-in-tn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Rule to disallow using %d within tn() 3 | * @author Matej Minar 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Rule Definition 9 | //------------------------------------------------------------------------------ 10 | 11 | module.exports = { 12 | meta: { 13 | docs: { 14 | description: 'disallow using %d within tn()', 15 | category: 'Best Practices', 16 | recommended: true, 17 | }, 18 | fixable: 'code', 19 | schema: [], 20 | }, 21 | create: function (context) { 22 | // variables should be defined here 23 | 24 | //---------------------------------------------------------------------- 25 | // Helpers 26 | //---------------------------------------------------------------------- 27 | 28 | // any helper functions should go here or else delete this section 29 | 30 | //---------------------------------------------------------------------- 31 | // Public 32 | //---------------------------------------------------------------------- 33 | 34 | return { 35 | CallExpression(node) { 36 | if (node.callee.name === 'tn') { 37 | node.arguments.forEach(argument => { 38 | if ( 39 | argument.value && 40 | argument.value.includes && 41 | argument.value.includes('%d') 42 | ) { 43 | context.report({ 44 | node, 45 | message: `Do not use '%d' within 'tn()'. Use '%s' instead.`, 46 | fix(fixer) { 47 | return [ 48 | fixer.replaceTextRange( 49 | [argument.range[0] + 1, argument.range[1] - 1], 50 | argument.value.replace(/%d/g, '%s') 51 | ), 52 | ]; 53 | }, 54 | }); 55 | } 56 | }); 57 | } 58 | }, 59 | }; 60 | }, 61 | }; 62 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/lib/rules/no-dynamic-translations.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Rule to disallow using anything but strings in `t`, `tn`, and `tct` 3 | * @author Evan Purkhiser 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Rule Definition 9 | //------------------------------------------------------------------------------ 10 | 11 | const TRANSLATION_FNS = ['t', 'tn', 'tct']; 12 | 13 | module.exports = { 14 | meta: { 15 | docs: { 16 | description: 'disallow using non string literals in t(), tn(), and tct()', 17 | category: 'Best Practices', 18 | recommended: true, 19 | }, 20 | schema: [], 21 | }, 22 | create: function (context) { 23 | // variables should be defined here 24 | 25 | //---------------------------------------------------------------------- 26 | // Helpers 27 | //---------------------------------------------------------------------- 28 | 29 | // any helper functions should go here or else delete this section 30 | 31 | //---------------------------------------------------------------------- 32 | // Public 33 | //---------------------------------------------------------------------- 34 | 35 | return { 36 | CallExpression(node) { 37 | if (!TRANSLATION_FNS.includes(node.callee.name)) { 38 | return; 39 | } 40 | 41 | if (node.arguments.length === 0) { 42 | return; 43 | } 44 | 45 | function checkTranslationArg(arg) { 46 | // Template literals should not be used 47 | if (arg.type === 'TemplateLiteral') { 48 | // Nothing to do if there are no expressions. That's fine 49 | if (arg.expressions.length === 0) { 50 | return; 51 | } 52 | 53 | context.report({ 54 | node: arg, 55 | message: 56 | 'Dynamic value interpolation cannot be used in translation functions. Use a parameterized string literal instead.', 57 | }); 58 | 59 | return; 60 | } 61 | 62 | // Anything that's not a string is no good 63 | if (arg.type !== 'Literal') { 64 | context.report({ 65 | node: arg, 66 | message: `${node.callee.name}() cannot be used to translate dynamic values. Use a parameterized string literal instead.`, 67 | }); 68 | 69 | return; 70 | } 71 | } 72 | 73 | checkTranslationArg(node.arguments[0]); 74 | 75 | // We need to check both args for `tn` 76 | if (node.callee.name === 'tn' && node.arguments.length > 1) { 77 | checkTranslationArg(node.arguments[1]); 78 | } 79 | }, 80 | }; 81 | }, 82 | }; 83 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/lib/rules/no-styled-shortcut.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview Rule to disallow styled (emotion) shortcut e.g. styled.div 3 | * @author Billy Vong 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Rule Definition 9 | //------------------------------------------------------------------------------ 10 | 11 | module.exports = { 12 | meta: { 13 | type: 'suggestion', 14 | 15 | docs: { 16 | description: 'disallow styled shorthand', 17 | category: 'Best Practices', 18 | recommended: true, 19 | }, 20 | fixable: 'code', 21 | schema: [], // no options 22 | }, 23 | create: function (context) { 24 | // variables should be defined here 25 | 26 | //---------------------------------------------------------------------- 27 | // Helpers 28 | //---------------------------------------------------------------------- 29 | 30 | // any helper functions should go here or else delete this section 31 | 32 | //---------------------------------------------------------------------- 33 | // Public 34 | //---------------------------------------------------------------------- 35 | 36 | return { 37 | TaggedTemplateExpression(node) { 38 | if (node.tag.type === 'MemberExpression' && node.tag.object.name === 'styled') { 39 | context.report({ 40 | node, 41 | message: `Do not use the shorthand/member expression style of styled. Use the function call syntax instead: styled(${node.tag.property.name}).`, 42 | 43 | fix(fixer) { 44 | return [ 45 | fixer.replaceTextRange( 46 | [node.tag.object.range[1], node.tag.property.range[1]], 47 | `('${node.tag.property.name}')` 48 | ), 49 | ]; 50 | }, 51 | }); 52 | } 53 | }, 54 | }; 55 | }, 56 | }; 57 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "eslint-plugin-sentry", 3 | "version": "2.10.0", 4 | "description": "sentry.io eslint plugin", 5 | "keywords": [ 6 | "eslint", 7 | "eslintplugin", 8 | "eslint-plugin" 9 | ], 10 | "author": "billy vong", 11 | "main": "lib/index.js", 12 | "scripts": { 13 | "test": "mocha tests --recursive" 14 | }, 15 | "dependencies": { 16 | "requireindex": "~1.2.0" 17 | }, 18 | "devDependencies": { 19 | "eslint": "^8.57.0", 20 | "mocha": "^10.5.2" 21 | }, 22 | "engines": { 23 | "node": ">=0.10.0" 24 | }, 25 | "license": "ISC", 26 | "volta": { 27 | "node": "20.10.0", 28 | "yarn": "1.22.5" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/tests/lib/rules/no-digits-in-tn.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview disallow using %d within tn() 3 | * @author matej minar 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Requirements 9 | //------------------------------------------------------------------------------ 10 | 11 | var rule = require('../../../lib/rules/no-digits-in-tn'), 12 | path = require('path'), 13 | RuleTester = require('eslint').RuleTester; 14 | 15 | //------------------------------------------------------------------------------ 16 | // Tests 17 | //------------------------------------------------------------------------------ 18 | 19 | RuleTester.setDefaultConfig({ 20 | parserOptions: { 21 | ecmaVersion: 6, 22 | }, 23 | }); 24 | var ruleTester = new RuleTester(); 25 | 26 | ruleTester.run('no-digits-in-tn', rule, { 27 | valid: [ 28 | // give me some code that won't trigger a warning 29 | { 30 | code: "tn('%s project', '%s projects', 5)", 31 | }, 32 | ], 33 | 34 | invalid: [ 35 | { 36 | code: "tn('%s project', '%d projects', 5)", 37 | output: "tn('%s project', '%s projects', 5)", 38 | errors: [ 39 | { 40 | message: `Do not use '%d' within 'tn()'. Use '%s' instead.`, 41 | type: 'CallExpression', 42 | }, 43 | ], 44 | }, 45 | ], 46 | }); 47 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/tests/lib/rules/no-dynamic-translations.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview disallow using %d within tn() 3 | * @author matej minar 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Requirements 9 | //------------------------------------------------------------------------------ 10 | 11 | var rule = require('../../../lib/rules/no-dynamic-translations'), 12 | path = require('path'), 13 | RuleTester = require('eslint').RuleTester; 14 | 15 | //------------------------------------------------------------------------------ 16 | // Tests 17 | //------------------------------------------------------------------------------ 18 | 19 | RuleTester.setDefaultConfig({ 20 | parserOptions: { 21 | ecmaVersion: 6, 22 | }, 23 | }); 24 | var ruleTester = new RuleTester(); 25 | 26 | ruleTester.run('no-dynmaic-translations', rule, { 27 | valid: [ 28 | {code: "t('This is fine')"}, 29 | {code: 't(`This is fine`)'}, 30 | {code: "t('This is %s', status)"}, 31 | {code: "tn('%s project', '%s projects', 5)"}, 32 | {code: "tct('This is [status]', {status})"}, 33 | ], 34 | 35 | invalid: [ 36 | { 37 | code: 't(`Your project name is ${project.name}!`)', 38 | errors: [ 39 | { 40 | message: `Dynamic value interpolation cannot be used in translation functions. Use a parameterized string literal instead.`, 41 | type: 'TemplateLiteral', 42 | }, 43 | ], 44 | }, 45 | { 46 | code: 'tn(`thing %s`, `thing ${two} %s`, value)', 47 | errors: [ 48 | { 49 | message: `Dynamic value interpolation cannot be used in translation functions. Use a parameterized string literal instead.`, 50 | type: 'TemplateLiteral', 51 | }, 52 | ], 53 | }, 54 | { 55 | code: 't(someStringVariable)', 56 | errors: [ 57 | { 58 | message: `t() cannot be used to translate dynamic values. Use a parameterized string literal instead.`, 59 | type: 'Identifier', 60 | }, 61 | ], 62 | }, 63 | { 64 | code: "t('string ' + variable + ' string')", 65 | errors: [ 66 | { 67 | message: `t() cannot be used to translate dynamic values. Use a parameterized string literal instead.`, 68 | type: 'BinaryExpression', 69 | }, 70 | ], 71 | }, 72 | { 73 | code: 'tct(someStringVariable, {project: key})', 74 | errors: [ 75 | { 76 | message: `tct() cannot be used to translate dynamic values. Use a parameterized string literal instead.`, 77 | type: 'Identifier', 78 | }, 79 | ], 80 | }, 81 | ], 82 | }); 83 | -------------------------------------------------------------------------------- /packages/eslint-plugin-sentry/tests/lib/rules/no-styled-shortcut.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileoverview disallow styled shorthand 3 | * @author billy vong 4 | */ 5 | 'use strict'; 6 | 7 | //------------------------------------------------------------------------------ 8 | // Requirements 9 | //------------------------------------------------------------------------------ 10 | 11 | var rule = require('../../../lib/rules/no-styled-shortcut'), 12 | path = require('path'), 13 | RuleTester = require('eslint').RuleTester; 14 | 15 | //------------------------------------------------------------------------------ 16 | // Tests 17 | //------------------------------------------------------------------------------ 18 | 19 | RuleTester.setDefaultConfig({ 20 | parserOptions: { 21 | ecmaVersion: 6, 22 | }, 23 | }); 24 | var ruleTester = new RuleTester(); 25 | 26 | ruleTester.run('no-styled-shortcut', rule, { 27 | valid: [ 28 | // give me some code that won't trigger a warning 29 | { 30 | code: "var Test = styled('div')", 31 | }, 32 | ], 33 | 34 | invalid: [ 35 | { 36 | code: 'var Test = styled.div``;', 37 | output: "var Test = styled('div')``;", 38 | errors: [ 39 | { 40 | message: 41 | 'Do not use the shorthand/member expression style of styled. Use the function call syntax instead: styled(div).', 42 | type: 'TaggedTemplateExpression', 43 | }, 44 | ], 45 | }, 46 | ], 47 | }); 48 | --------------------------------------------------------------------------------