-
Notifications
You must be signed in to change notification settings - Fork 26.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5,424 changed files
with
835,355 additions
and
554,741 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
.config/ast-grep/rule-tests/__snapshots__/no-context-snapshot.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
id: no-context | ||
valid: | ||
- 'let chunking_context = ChunkingContext::new();' | ||
- 'struct Foo { chunking_context: Context };' | ||
- 'foo(|chunking_context| context)' | ||
- 'fn foo(chunking_context: ChunkingContext) -> u32 { 5 };' | ||
invalid: | ||
- 'let context = ChunkingContext::new();' | ||
- 'struct Foo { context: Context };' | ||
- 'foo(|context| context)' | ||
- 'fn foo(context: ChunkingContext) -> u32 { 5 };' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# yaml-language-server: $schema=https://github.com/raw/ast-grep/ast-grep/main/schemas/rule.json | ||
|
||
id: no-context | ||
message: Don't name variables `context`. | ||
note: Use a more specific name, such as chunking_context, asset_context, etc. | ||
severity: error | ||
language: Rust | ||
rule: | ||
regex: \bcontext\b | ||
any: | ||
- all: | ||
- inside: | ||
any: | ||
- kind: closure_parameters | ||
- kind: parameter | ||
- kind: function_item | ||
- kind: let_declaration | ||
- kind: identifier | ||
- all: | ||
- kind: field_identifier | ||
- inside: | ||
kind: field_declaration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[profile.tp-test-linux.junit] | ||
path = "junit.xml" | ||
report-name = "Turbopack tests (Linux)" | ||
store-success-output = true | ||
store-failure-output = true | ||
|
||
[profile.tp-test-mac.junit] | ||
path = "junit.xml" | ||
report-name = "Turbopack tests (Mac)" | ||
store-success-output = true | ||
store-failure-output = true | ||
|
||
[profile.tp-test-win.junit] | ||
path = "junit.xml" | ||
report-name = "Turbopack tests (Windows)" | ||
store-success-output = true | ||
store-failure-output = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/eslintrc", | ||
"extends": [".eslintrc.json"], | ||
"overrides": [ | ||
{ | ||
// This override adds type-checked rules. | ||
"files": ["**/*.ts", "**/*.tsx"], | ||
// Linting with type-checked rules is very slow and needs a lot of memory, | ||
// so we exclude non-essential files. | ||
"excludedFiles": [ | ||
"examples/**/*", | ||
"test/**/*", | ||
"**/*.d.ts", | ||
"turbopack/**/*" | ||
], | ||
"parserOptions": { | ||
"project": true | ||
}, | ||
"rules": { | ||
// TODO: enable in follow-up PR | ||
"@typescript-eslint/no-floating-promises": "off" | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.