eslint-plugin-th-rules 2.7.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +171 -11
  2. package/dist/configs/bundles/recommended-react.d.ts +199 -0
  3. package/dist/configs/bundles/recommended-react.js +11 -0
  4. package/dist/configs/bundles/recommended-typescript.d.ts +190 -0
  5. package/dist/configs/bundles/recommended-typescript.js +6 -0
  6. package/dist/configs/bundles/recommended.d.ts +190 -0
  7. package/dist/configs/bundles/recommended.js +8 -0
  8. package/dist/configs/core/base.d.ts +170 -0
  9. package/dist/configs/core/base.js +23 -0
  10. package/dist/configs/core/react.d.ts +6 -0
  11. package/dist/configs/core/react.js +8 -0
  12. package/dist/configs/core/typescript.d.ts +2 -0
  13. package/dist/configs/core/typescript.js +19 -0
  14. package/dist/configs/externals/base.d.ts +15 -0
  15. package/dist/configs/externals/base.js +16 -0
  16. package/dist/configs/externals/opinionated.d.ts +10 -0
  17. package/dist/configs/externals/opinionated.js +12 -0
  18. package/dist/index.d.ts +1170 -0
  19. package/dist/index.js +21 -0
  20. package/dist/plugin.d.ts +5 -0
  21. package/dist/plugin.js +14 -0
  22. package/dist/rules/no-boolean-coercion.d.ts +5 -0
  23. package/dist/rules/no-boolean-coercion.js +98 -0
  24. package/dist/rules/no-comments.d.ts +11 -0
  25. package/dist/rules/no-comments.js +83 -0
  26. package/dist/rules/no-default-export.d.ts +5 -0
  27. package/dist/rules/no-default-export.js +61 -0
  28. package/dist/rules/no-destructuring.d.ts +8 -0
  29. package/dist/rules/no-destructuring.js +121 -0
  30. package/dist/rules/prefer-is-empty.d.ts +5 -0
  31. package/dist/rules/prefer-is-empty.js +101 -0
  32. package/dist/rules/schemas-in-schemas-file.d.ts +9 -0
  33. package/dist/rules/schemas-in-schemas-file.js +141 -0
  34. package/dist/rules/top-level-functions.d.ts +5 -0
  35. package/dist/rules/top-level-functions.js +153 -0
  36. package/dist/rules/types-in-dts.d.ts +8 -0
  37. package/dist/rules/types-in-dts.js +76 -0
  38. package/package.json +25 -14
  39. package/.github/dependabot.yml +0 -15
  40. package/.github/workflows/codecov.yml +0 -26
  41. package/.github/workflows/codeql.yml +0 -82
  42. package/.github/workflows/dependency-review.yml +0 -20
  43. package/.github/workflows/main.yml +0 -43
  44. package/.github/workflows/scorecard.yml +0 -72
  45. package/.github/workflows/snyk-security.yml +0 -67
  46. package/.releaserc +0 -13
  47. package/.vscode/settings.json +0 -8
  48. package/.yarn/releases/yarn-4.12.0.cjs +0 -942
  49. package/.yarnrc.yml +0 -3
  50. package/CHANGELOG.md +0 -621
  51. package/SECURITY.md +0 -48
  52. package/docs/rules/no-boolean-coercion.md +0 -9
  53. package/docs/rules/no-comments.md +0 -50
  54. package/docs/rules/no-default-export.md +0 -26
  55. package/docs/rules/no-destructuring.md +0 -40
  56. package/docs/rules/prefer-is-empty.md +0 -9
  57. package/docs/rules/schemas-in-schemas-file.md +0 -170
  58. package/docs/rules/top-level-functions.md +0 -48
  59. package/docs/rules/types-in-dts.md +0 -112
  60. package/renovate.json +0 -3
  61. package/scripts/verify.mjs +0 -16
  62. package/src/index.js +0 -144
  63. package/src/rules/no-boolean-coercion.js +0 -125
  64. package/src/rules/no-comments.js +0 -94
  65. package/src/rules/no-default-export.js +0 -64
  66. package/src/rules/no-destructuring.js +0 -114
  67. package/src/rules/prefer-is-empty.js +0 -104
  68. package/src/rules/schemas-in-schemas-file.js +0 -191
  69. package/src/rules/top-level-functions.js +0 -200
  70. package/src/rules/types-in-dts.js +0 -94
  71. package/tests/no-boolean-coercion.test.ts +0 -83
  72. package/tests/prefer-is-empty.test.ts +0 -148
  73. package/tsconfig.json +0 -22
  74. package/xo.config.ts +0 -2
@@ -1,72 +0,0 @@
1
- # This workflow uses actions that are not certified by GitHub. They are provided
2
- # by a third-party and are governed by separate terms of service, privacy
3
- # policy, and support documentation.
4
-
5
- name: Scorecard supply-chain security
6
- on:
7
- # For Branch-Protection check. Only the default branch is supported. See
8
- # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9
- branch_protection_rule:
10
- # To guarantee Maintained check is occasionally updated. See
11
- # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12
- schedule:
13
- - cron: '15 2 * * 1'
14
- push:
15
- branches: [ "main" ]
16
-
17
- # Declare default permissions as read only.
18
- permissions: read-all
19
-
20
- jobs:
21
- analysis:
22
- name: Scorecard analysis
23
- runs-on: ubuntu-latest
24
- permissions:
25
- # Needed to upload the results to code-scanning dashboard.
26
- security-events: write
27
- # Needed to publish results and get a badge (see publish_results below).
28
- id-token: write
29
- # Uncomment the permissions below if installing in a private repository.
30
- # contents: read
31
- # actions: read
32
-
33
- steps:
34
- - name: "Checkout code"
35
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
36
- with:
37
- persist-credentials: false
38
-
39
- - name: "Run analysis"
40
- uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
41
- with:
42
- results_file: results.sarif
43
- results_format: sarif
44
- # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
45
- # - you want to enable the Branch-Protection check on a *public* repository, or
46
- # - you are installing Scorecard on a *private* repository
47
- # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
48
- # repo_token: ${{ secrets.SCORECARD_TOKEN }}
49
-
50
- # Public repositories:
51
- # - Publish results to OpenSSF REST API for easy access by consumers
52
- # - Allows the repository to include the Scorecard badge.
53
- # - See https://github.com/ossf/scorecard-action#publishing-results.
54
- # For private repositories:
55
- # - `publish_results` will always be set to `false`, regardless
56
- # of the value entered here.
57
- publish_results: true
58
-
59
- # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
60
- # format to the repository Actions tab.
61
- - name: "Upload artifact"
62
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
63
- with:
64
- name: SARIF file
65
- path: results.sarif
66
- retention-days: 5
67
-
68
- # Upload the results to GitHub's code scanning dashboard.
69
- - name: "Upload to code-scanning"
70
- uses: github/codeql-action/upload-sarif@e2e140ad1441662206e8f97754b166877dfa1c73 # v3.24.4
71
- with:
72
- sarif_file: results.sarif
@@ -1,67 +0,0 @@
1
- # In order to use the Snyk Action you will need to have a Snyk API token.
2
- # More details in https://github.com/snyk/actions#getting-your-snyk-token
3
- # or you can signup for free at https://snyk.io/login
4
-
5
- name: Snyk Security
6
-
7
- on:
8
- push:
9
- branches: ["main" ]
10
- pull_request:
11
- branches: ["main"]
12
-
13
- permissions:
14
- contents: read
15
-
16
- jobs:
17
- snyk:
18
- permissions:
19
- contents: read # for actions/checkout to fetch code
20
- security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
21
- actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
22
- runs-on: ubuntu-latest
23
- steps:
24
- - uses: actions/checkout@v4
25
-
26
- - uses: actions/setup-node@v4
27
- with:
28
- node-version: 20
29
-
30
- - name: Setup Bun
31
- uses: oven-sh/setup-bun@v1
32
-
33
- - name: Install Dependencies
34
- run: bun i --dev
35
-
36
- - name: Set up Snyk CLI to check for security issues
37
- uses: snyk/actions/setup@1d672a455ab3339ef0a0021e1ec809165ee12fad
38
- env:
39
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
40
-
41
- - name: Snyk version
42
- run: echo "${{ steps.snyk.outputs.version }}"
43
-
44
- - name: Snyk Test
45
- run: snyk test
46
- env:
47
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
48
-
49
- - name: Build a Docker image
50
- run: docker build -t your/image-to-test .
51
- - name: Run Snyk to check Docker image for vulnerabilities
52
- # Snyk can be used to break the build when it detects vulnerabilities.
53
- # In this case we want to upload the issues to GitHub Code Scanning
54
- continue-on-error: true
55
- uses: snyk/actions/docker@master
56
- env:
57
- # In order to use the Snyk Action you will need to have a Snyk API token.
58
- # More details in https://github.com/snyk/actions#getting-your-snyk-token
59
- # or you can signup for free at https://snyk.io/login
60
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
61
- with:
62
- image: your/image-to-test
63
- args: --file=Dockerfile
64
- - name: Upload result to GitHub Code Scanning
65
- uses: github/codeql-action/upload-sarif@v3
66
- with:
67
- sarif_file: snyk.sarif
package/.releaserc DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "branches": [
3
- "main"
4
- ],
5
- "plugins": [
6
- "@semantic-release/commit-analyzer",
7
- "@semantic-release/release-notes-generator",
8
- "@semantic-release/npm",
9
- "@semantic-release/changelog",
10
- "@semantic-release/git",
11
- "@semantic-release/github"
12
- ]
13
- }
@@ -1,8 +0,0 @@
1
- {
2
- "cSpell.words": [
3
- "sonarjs"
4
- ],
5
- "conventionalCommits.scopes": [
6
- "eslint"
7
- ]
8
- }