Skip to content

Commit

Permalink
fix(eslint-config): turns on rule for error when no key in map
Browse files Browse the repository at this point in the history
  • Loading branch information
akashgupta-tc committed Mar 18, 2024
1 parent ee44ae5 commit dc42e38
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"projectOwner": "tablecheck",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"files": ["README.md"],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
Expand All @@ -15,31 +13,21 @@
"name": "Simeon Cheeseman",
"avatar_url": "https://avatars.githubusercontent.com/u/1085899?v=4",
"profile": "https://github.com/SimeonC",
"contributions": [
"doc",
"infra",
"test",
"code",
"example"
]
"contributions": ["doc", "infra", "test", "code", "example"]
},
{
"login": "SashaShostyr",
"name": "Alex",
"avatar_url": "https://avatars.githubusercontent.com/u/19342294?v=4",
"profile": "https://github.com/SashaShostyr",
"contributions": [
"test"
]
"contributions": ["test"]
},
{
"login": "tablecheck-ci",
"name": "tablecheck-ci",
"avatar_url": "https://avatars.githubusercontent.com/u/54097918?v=4",
"profile": "https://github.com/tablecheck-ci",
"contributions": [
"doc"
]
"contributions": ["doc"]
}
],
"contributorsPerLine": 6,
Expand Down
73 changes: 73 additions & 0 deletions auditjs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,70 @@
"reference": "https://ossindex.sonatype.org/vulnerability/CVE-2023-49293?component-type=npm&component-name=vite&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41"
}
]
},
{
"coordinates": "pkg:npm/[email protected]",
"description": "HTTP and HTTPS modules that follow redirects.",
"reference": "https://ossindex.sonatype.org/component/pkg:npm/[email protected]?utm_source=auditjs&utm_medium=integration&utm_content=4.0.41",
"vulnerabilities": [
{
"id": "CVE-2024-28849",
"title": "[CVE-2024-28849] CWE-200: Information Exposure",
"description": "follow-redirects is an open source, drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. In affected versions follow-redirects only clears authorization header during cross-domain redirect, but keep the proxy-authentication header which contains credentials too. This vulnerability may lead to credentials leak, but has been addressed in version 1.15.6. Users are advised to upgrade. There are no known workarounds for this vulnerability.\n\nSonatype's research suggests that this CVE's details differ from those defined at NVD. See https://ossindex.sonatype.org/vulnerability/CVE-2024-28849 for details",
"cvssScore": 6.5,
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"cve": "CVE-2024-28849",
"reference": "https://ossindex.sonatype.org/vulnerability/CVE-2024-28849?component-type=npm&component-name=follow-redirects&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41"
}
]
},
{
"coordinates": "pkg:npm/[email protected]",
"description": "[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)",
"reference": "https://ossindex.sonatype.org/component/pkg:npm/[email protected]?utm_source=auditjs&utm_medium=integration&utm_content=4.0.41",
"vulnerabilities": [
{
"id": "CVE-2023-42282",
"title": "[CVE-2023-42282] CWE-918: Server-Side Request Forgery (SSRF)",
"description": "The ip package before 1.1.9 for Node.js might allow SSRF because some IP addresses (such as 0x7f.1) are improperly categorized as globally routable via isPublic.",
"cvssScore": 9.8,
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"cve": "CVE-2023-42282",
"reference": "https://ossindex.sonatype.org/vulnerability/CVE-2023-42282?component-type=npm&component-name=ip&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41"
}
]
},
{
"coordinates": "pkg:npm/[email protected]",
"description": "[![npm][npm-img]][npm-url] [![node][node-img]][node-url] [![unix CI status][unix-ci-img]][unix-ci-url] [![windows CI status][windows-ci-img]][windows-ci-url]",
"reference": "https://ossindex.sonatype.org/component/pkg:npm/[email protected]?utm_source=auditjs&utm_medium=integration&utm_content=4.0.41",
"vulnerabilities": [
{
"id": "CVE-2024-23331",
"title": "[CVE-2024-23331] CWE-178: Improper Handling of Case Sensitivity",
"description": "Vite is a frontend tooling framework for javascript. The Vite dev server option `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows. This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems. Since `picomatch` defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible. By requesting raw filesystem paths using augmented casing, the matcher derived from `config.server.fs.deny` fails to block access to sensitive files. This issue has been addressed in [email protected], [email protected], [email protected], and [email protected]. Users are advised to upgrade. Users unable to upgrade should restrict access to dev servers.",
"cvssScore": 7.5,
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"cve": "CVE-2024-23331",
"reference": "https://ossindex.sonatype.org/vulnerability/CVE-2024-23331?component-type=npm&component-name=vite&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41"
}
]
},
{
"coordinates": "pkg:npm/[email protected]",
"description": "[![npm][npm-img]][npm-url] [![node][node-img]][node-url] [![unix CI status][unix-ci-img]][unix-ci-url] [![windows CI status][windows-ci-img]][windows-ci-url]",
"reference": "https://ossindex.sonatype.org/component/pkg:npm/[email protected]?utm_source=auditjs&utm_medium=integration&utm_content=4.0.41",
"vulnerabilities": [
{
"id": "CVE-2024-23331",
"title": "[CVE-2024-23331] CWE-178: Improper Handling of Case Sensitivity",
"description": "Vite is a frontend tooling framework for javascript. The Vite dev server option `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows. This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems. Since `picomatch` defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible. By requesting raw filesystem paths using augmented casing, the matcher derived from `config.server.fs.deny` fails to block access to sensitive files. This issue has been addressed in [email protected], [email protected], [email protected], and [email protected]. Users are advised to upgrade. Users unable to upgrade should restrict access to dev servers.",
"cvssScore": 7.5,
"cvssVector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"cve": "CVE-2024-23331",
"reference": "https://ossindex.sonatype.org/vulnerability/CVE-2024-23331?component-type=npm&component-name=vite&utm_source=auditjs&utm_medium=integration&utm_content=4.0.41"
}
]
}
],
"ignore": [
Expand Down Expand Up @@ -1576,6 +1640,15 @@
},
{
"id": "CVE-2023-49293"
},
{
"id": "CVE-2024-28849"
},
{
"id": "CVE-2023-42282"
},
{
"id": "CVE-2024-23331"
}
]
}
9 changes: 9 additions & 0 deletions packages/eslint-config/src/rules/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ export const reactRules: Linter.RulesRecord = {
'react/no-find-dom-node': 'error',
'react/jsx-fragments': 'error',
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
'react/jsx-key': [
'error',
{
checkFragmentShorthand: true,
checkKeyMustBeforeSpread: true,
warnOnDuplicates: true,
},
],

'@tablecheck/consistent-react-import': 'error',
'react-refresh/only-export-components': [
'warn',
Expand Down

0 comments on commit dc42e38

Please sign in to comment.