-
Notifications
You must be signed in to change notification settings - Fork 269
feat(plugins): bump eslint to 10, oxlint to 1.x, and prisma to 7 #2825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
qlty-plugins/plugins/linters/eslint/fixtures/__snapshots__/basic_9_v10.5.0.shot
This file contains hidden or 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,80 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`linter=eslint fixture=basic_9 version=10.5.0 1`] = ` | ||
| { | ||
| "issues": [ | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "documentationUrl": "https://eslint.org/docs/rules/no-cond-assign", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.js", | ||
| "range": { | ||
| "endColumn": 10, | ||
| "endLine": 3, | ||
| "startColumn": 5, | ||
| "startLine": 3, | ||
| }, | ||
| }, | ||
| "message": "Expected a conditional expression and instead saw an assignment.", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "no-cond-assign", | ||
| "snippet": "if (x = 2) {", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| }", | ||
| "tool": "eslint", | ||
| }, | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "documentationUrl": "https://eslint.org/docs/rules/no-constant-condition", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.js", | ||
| "range": { | ||
| "endColumn": 10, | ||
| "endLine": 3, | ||
| "startColumn": 5, | ||
| "startLine": 3, | ||
| }, | ||
| }, | ||
| "message": "Unexpected constant condition.", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "no-constant-condition", | ||
| "snippet": "if (x = 2) {", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| }", | ||
| "tool": "eslint", | ||
| }, | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "documentationUrl": "https://eslint.org/docs/rules/no-unused-vars", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.js", | ||
| "range": { | ||
| "endColumn": 6, | ||
| "endLine": 3, | ||
| "startColumn": 5, | ||
| "startLine": 3, | ||
| }, | ||
| }, | ||
| "message": "'x' is assigned a value but never used.", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "no-unused-vars", | ||
| "snippet": "if (x = 2) {", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| }", | ||
| "tool": "eslint", | ||
| }, | ||
| ], | ||
| } | ||
| `; |
This file contains hidden or 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 hidden or 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
108 changes: 108 additions & 0 deletions
108
qlty-plugins/plugins/linters/oxc/fixtures/__snapshots__/basic_v1.70.0.shot
This file contains hidden or 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,108 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`linter=oxc fixture=basic version=1.70.0 1`] = ` | ||
| { | ||
| "issues": [ | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.in.js", | ||
| "range": { | ||
| "endColumn": 8, | ||
| "endLine": 3, | ||
| "startColumn": 7, | ||
| "startLine": 3, | ||
| }, | ||
| }, | ||
| "message": "Expected a conditional expression and instead saw an assignment", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "eslint(no-cond-assign)", | ||
| "snippet": "if (x = 2) {", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| } | ||
|
|
||
| debugger;", | ||
| "tool": "oxc", | ||
| }, | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.in.js", | ||
| "range": { | ||
| "endColumn": 10, | ||
| "endLine": 3, | ||
| "startColumn": 5, | ||
| "startLine": 3, | ||
| }, | ||
| }, | ||
| "message": "Unexpected constant condition", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "eslint(no-constant-condition)", | ||
| "snippet": "if (x = 2) {", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| } | ||
|
|
||
| debugger;", | ||
| "tool": "oxc", | ||
| }, | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.in.js", | ||
| "range": { | ||
| "endColumn": 10, | ||
| "endLine": 7, | ||
| "startColumn": 1, | ||
| "startLine": 7, | ||
| }, | ||
| }, | ||
| "message": "\`debugger\` statement is not allowed", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "eslint(no-debugger)", | ||
| "snippet": "debugger;", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| } | ||
|
|
||
| debugger;", | ||
| "tool": "oxc", | ||
| }, | ||
| { | ||
| "category": "CATEGORY_LINT", | ||
| "level": "LEVEL_MEDIUM", | ||
| "location": { | ||
| "path": "basic.in.js", | ||
| "range": { | ||
| "endColumn": 6, | ||
| "endLine": 1, | ||
| "startColumn": 5, | ||
| "startLine": 1, | ||
| }, | ||
| }, | ||
| "message": "Variable 'x' is assigned a value but never used. Unused variables should start with a '_'.", | ||
| "mode": "MODE_BLOCK", | ||
| "ruleKey": "eslint(no-unused-vars)", | ||
| "snippet": "let x = 1;", | ||
| "snippetWithContext": "let x = 1; | ||
|
|
||
| if (x = 2) { | ||
| console.log('hi'); | ||
| } | ||
|
|
||
| debugger;", | ||
| "tool": "oxc", | ||
| }, | ||
| ], | ||
| } | ||
| `; |
This file contains hidden or 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
20 changes: 20 additions & 0 deletions
20
qlty-plugins/plugins/linters/prisma/fixtures/__snapshots__/basic_7_v7.8.0.shot
This file contains hidden or 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,20 @@ | ||
| // Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
|
||
| exports[`linter=prisma fixture=basic_7 version=7.8.0 1`] = ` | ||
| { | ||
| "issues": [ | ||
| { | ||
| "category": "CATEGORY_STYLE", | ||
| "level": "LEVEL_FMT", | ||
| "location": { | ||
| "path": "basic_7.in.prisma", | ||
| }, | ||
| "message": "Incorrect formatting, autoformat by running \`qlty fmt\`.", | ||
| "mode": "MODE_BLOCK", | ||
| "onAddedLine": true, | ||
| "ruleKey": "fmt", | ||
| "tool": "prisma", | ||
| }, | ||
| ], | ||
| } | ||
| `; |
31 changes: 31 additions & 0 deletions
31
qlty-plugins/plugins/linters/prisma/fixtures/basic_7.in.prisma
This file contains hidden or 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,31 @@ | ||
| datasource db { | ||
| provider = "postgresql" | ||
| } | ||
|
|
||
| generator client { | ||
| provider = "prisma-client-js" | ||
| } | ||
|
|
||
| model User { | ||
| id Int @id @default(autoincrement()) | ||
| createdAt DateTime @default(now()) | ||
| email String @unique | ||
| name String? | ||
| role Role @default(USER) | ||
| posts Post[] | ||
| } | ||
|
|
||
| model Post { | ||
| id Int @id @default(autoincrement()) | ||
| createdAt DateTime @default(now()) | ||
| updatedAt DateTime @updatedAt | ||
| published Boolean @default(false) | ||
| title String @db.VarChar(255) | ||
| author User? @relation(fields: [authorId], references: [id]) | ||
| authorId Int? | ||
| } | ||
|
|
||
| enum Role { | ||
| USER | ||
| ADMIN | ||
| } |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.