Skip to content

Commit

Permalink
Merge pull request #2869 from ben-elttam/b-lang-should-be-javascript-…
Browse files Browse the repository at this point in the history
…not-js

Fix languages to long names
  • Loading branch information
0xDC0DE committed Apr 17, 2023
2 parents 5a539dd + fb5c5eb commit 1ba829a
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 34 deletions.
4 changes: 2 additions & 2 deletions javascript/ajv/security/audit/ajv-allerrors-true.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ rules:
impact: LOW
confidence: LOW
languages:
- js
- ts
- javascript
- typescript
severity: WARNING
pattern-either:
- pattern: |
Expand Down
2 changes: 1 addition & 1 deletion javascript/apollo/security/apollo-axios-ssrf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rules:
impact: MEDIUM
confidence: LOW
languages:
- js
- javascript
severity: WARNING
patterns:
- pattern: const $RESPONSE = await axios.request($INNERARG,...)
Expand Down
4 changes: 2 additions & 2 deletions javascript/dompurify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ rules:
impact: MEDIUM
confidence: MEDIUM
languages:
- js
- ts
- javascript
- typescript
severity: ERROR
patterns:
- pattern: DOMPurify.sanitize($X, ...)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ rules:
impact: MEDIUM
confidence: MEDIUM
languages:
- js
- javascript
- typescript
severity: WARNING
mode: taint
Expand Down
2 changes: 1 addition & 1 deletion javascript/lang/best-practice/lazy-load-module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rules:
handled at a more critical time.
The best practice is to `require` modules at the beginning of each file, before
and outside of any functions.
languages: [js, ts]
languages: [javascript, typescript]
severity: WARNING
metadata:
category: best-practice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rules:
- metavariable-regex:
metavariable: $STR
regex: .*[^$]+{[^{}]*}.*
languages: [js, ts]
languages: [javascript, typescript]
message: >-
This looks like a JavaScript template string. Are you missing a '$' in front of
'{...}'?
Expand Down
4 changes: 2 additions & 2 deletions javascript/lang/correctness/no-stringify-keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ rules:
be relied on for producing object keys. Consider using json-stable-stringify
instead.
languages:
- js
- ts
- javascript
- typescript
severity: WARNING
metadata:
category: correctness
Expand Down
6 changes: 3 additions & 3 deletions javascript/lang/security/audit/incomplete-sanitization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ rules:
references:
- https://owasp.org/Top10/A03_2021-Injection
languages:
- js
- ts
- javascript
- typescript
severity: WARNING
patterns:
- pattern: |
$STR.replace(($CHAR: string), ...)
- metavariable-regex:
metavariable: $CHAR
regex: ^[\"\']([\'\"\<\>\*\|\{\}\[\]\%\$]{1}|\\n|\\r|\\t|\\&)[\"\']$
regex: ^[\"\']([\'\"\<\>\*\|\{\}\[\]\%\$]{1}|\\n|\\r|\\t|\\&)[\"\']$
4 changes: 2 additions & 2 deletions javascript/lang/security/audit/unsafe-dynamic-method.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ rules:
references:
- https://owasp.org/Top10/A03_2021-Injection
languages:
- js
- ts
- javascript
- typescript
severity: WARNING
patterns:
- pattern-either:
Expand Down
2 changes: 1 addition & 1 deletion javascript/react/correctness/hooks/set-state-no-op.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rules:
message: >-
Calling setState on the current state is always a no-op. Did you mean to change the state like $Y(!$X) instead?
languages:
- js
- javascript
severity: ERROR
metadata:
technology:
Expand Down
4 changes: 2 additions & 2 deletions typescript/lang/best-practice/moment-deprecated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ rules:
import 'moment'
message: Moment is a legacy project in maintenance mode. Consider using libraries that are actively supported, e.g. `dayjs`.
languages:
- ts
- js
- typescript
- javascript
severity: INFO
metadata:
category: best-practice
Expand Down
4 changes: 2 additions & 2 deletions typescript/lang/correctness/useless-ternary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ rules:
It looks like no matter how $CONDITION is evaluated, this expression returns $ANS. This is probably a copy-paste
error.
languages:
- ts
- js
- typescript
- javascript
metadata:
category: correctness
technology:
Expand Down
5 changes: 2 additions & 3 deletions typescript/react/best-practice/react-props-spreading.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ rules:
The spread operator risks passing invalid HTML props to an HTML element,
which can cause console warnings or worse, give malicious actors a way
to inject unexpected attributes.
languages: [js]
languages: [javascript]
severity: WARNING
metadata:
metadata:
source-rule-url: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
references:
- https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
category: best-practice
technology:
- react
license: Commons Clause License Condition v1.0[LGPL-2.1-only]

4 changes: 2 additions & 2 deletions typescript/react/portability/i18next/i18next-key-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ rules:
regex: (?!^[`][a-z0-9-]+[.][a-z0-9-]+[.]\S+$)
message: Translation key '$KEY' should match format 'MODULE.FEATURE.*'
languages:
- ts
- js
- typescript
- javascript
severity: WARNING
metadata:
category: portability
Expand Down
4 changes: 2 additions & 2 deletions typescript/react/portability/i18next/jsx-label-not-i18n.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ rules:
- pattern-not: <$ELEMENT ... label={t($KEY, ...)} ... />
message: "JSX Component label not internationalized: '$MESSAGE'"
languages:
- ts
- js
- typescript
- javascript
severity: WARNING
metadata:
category: portability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ rules:
You should support different languages in your website or app with internationalization.
Instead, use packages such as `i18next` in order to internationalize your elements.
languages:
- ts
- js
- typescript
- javascript
severity: WARNING
metadata:
category: portability
Expand All @@ -23,4 +23,4 @@ rules:
references:
- https://www.notion.so/hendyirawan/Internationalization-Localization-Policy-318c21674e5f44c48d6f136a6eb2e024
- https://mui.com/
- https://react.i18next.com/
- https://react.i18next.com/
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ rules:
- pattern-not: enqueueSnackbar(t($KEY), $X2)
message: 'React MUI enqueueSnackbar() title is not internationalized: ''$MESSAGE'''
languages:
- ts
- js
- typescript
- javascript
severity: WARNING
metadata:
category: portability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ rules:
You should support different langauges in your website or app with internationalization.
Instead, use packages such as `i18next` to internationalize your elements.
languages:
- ts
- js
- typescript
- javascript
severity: WARNING
metadata:
category: portability
Expand Down

0 comments on commit 1ba829a

Please sign in to comment.