Sort lint categories
MODIFY
packages/@romejs/diagnostics/categories.ts
packages/@romejs/diagnostics/categories.ts
@@ -12,21 +12,17 @@ export type DiagnosticCategory =
| 'analyzeDependencies/cjsExportInES'
| 'args/fileNotFound'
| 'args/invalid'
- | 'bundler/topLevelAwait'
| 'bundler/moduleCycle'
- | 'compile/jsx'
+ | 'bundler/topLevelAwait'
| 'compile/classes'
+ | 'compile/jsx'
| 'flags/invalid'
| 'format/disabled'
- | 'internalError/request'
| 'internalError/httpServer'
+ | 'internalError/request'
+ | 'lint/defaultExportSameBasename'
| 'lint/disabled'
| 'lint/duplicateImportSource'
- | 'lint/pendingFixes'
- | 'lint/defaultExportSameBasename'
- | 'lint/noMultipleSpacesInRegularExpressionLiterals'
- | 'lint/noDuplicateGroupNamesInRegularExpressions'
- | 'lint/noVar'
| 'lint/emptyBlocks'
| 'lint/getterReturn'
| 'lint/noAsyncPromiseExecutor'
@@ -36,6 +32,7 @@ export type DiagnosticCategory =
| 'lint/noDeleteVars'
| 'lint/noDupeArgs'
| 'lint/noDuplicateCase'
+ | 'lint/noDuplicateGroupNamesInRegularExpressions'
| 'lint/noDuplicateKeys'
| 'lint/noEmptyCharacterClass'
| 'lint/noExplicitAny'
@@ -43,61 +40,64 @@ export type DiagnosticCategory =
| 'lint/noFunctionAssign'
| 'lint/noImportAssign'
| 'lint/noLabelVar'
+ | 'lint/noMultipleSpacesInRegularExpressionLiterals'
| 'lint/noReferenceToNonExistingGroup'
| 'lint/noSetterReturn'
| 'lint/noShadowRestrictedNames'
| 'lint/noShorthandArrayType'
| 'lint/noTemplateCurlyInString'
| 'lint/noUnsafeFinally'
+ | 'lint/noVar'
+ | 'lint/pendingFixes'
| 'lint/preferFunctionDeclarations'
| 'lint/preferTemplate'
+ | 'lint/singleVarDeclarator'
| 'lint/sparseArray'
| 'lint/undeclaredVariables'
| 'lint/unsafeNegation'
| 'lint/unusedVariables'
- | 'lint/singleVarDeclarator'
| 'lsp/parse'
- | 'parse/url/query'
- | 'parse/url'
| 'parse/js'
+ | 'parse/json'
+ | 'parse/manifest'
| 'parse/patchMatch'
- | 'parse/stringMarkup'
| 'parse/regex'
- | 'parse/json'
| 'parse/semver'
- | 'parse/manifest'
- | 'parse/spdxLicense'
| 'parse/snapshots'
- | 'projectManager/nameCollision'
- | 'projectManager/missing'
+ | 'parse/spdxLicense'
+ | 'parse/stringMarkup'
+ | 'parse/url'
+ | 'parse/url/query'
| 'projectManager/incorrectConfigFilename'
+ | 'projectManager/missing'
+ | 'projectManager/nameCollision'
| 'projectManager/vscMissing'
- | 'resolver/notFound'
- | 'resolver/unsupported'
| 'resolver/fetchFailed'
| 'resolver/importTypeMismatch'
+ | 'resolver/notFound'
| 'resolver/unknownExport'
- | 'suppressions/unused'
- | 'suppressions/incorrectPrefix'
+ | 'resolver/unsupported'
| 'suppressions/duplicate'
+ | 'suppressions/incorrectPrefix'
| 'suppressions/missingSpace'
+ | 'suppressions/unused'
+ | 'tests/cancelled'
| 'tests/disabled'
+ | 'tests/failure'
+ | 'tests/fixtureOptions'
| 'tests/noneDeclared'
- | 'tests/timeout'
+ | 'tests/snapshots/incorrect'
| 'tests/snapshots/missing'
| 'tests/snapshots/redundant'
- | 'tests/snapshots/incorrect'
+ | 'tests/timeout'
| 'tests/unhandledRejection'
- | 'tests/fixtureOptions'
- | 'tests/failure'
- | 'tests/cancelled'
| 'typeCheck/incompatible'
+ | 'typeCheck/missingCondition'
+ | 'typeCheck/notExhaustive'
| 'typeCheck/uncallable'
| 'typeCheck/undeclaredVariable'
| 'typeCheck/unknownImport'
| 'typeCheck/unknownProperty'
- | 'typeCheck/notExhaustive'
- | 'typeCheck/missingCondition'
| 'v8/syntaxError';
export type DiagnosticCategoryPrefix =

MODIFY
packages/@romejs/js-compiler/transforms/lint/noSetterReturn.test.ts
packages/@romejs/js-compiler/transforms/lint/noSetterReturn.test.ts
@@ -9,7 +9,7 @@ import test from '@romejs/test';
import {testLint} from '../../api/lint.test';
test('no setter return', async (t) => {
- const badClass = await testLint(`
+ t.snapshot(await testLint(`
class p {
set name(value) {
if (!value) {
@@ -18,11 +18,9 @@ test('no setter return', async (t) => {
}
}
console.log(new p());
- `);
+ `));
- t.snapshot(badClass);
-
- const badStaticClass = await testLint(`
+ t.snapshot(await testLint(`
class p {
static set name(value) {
if (!value) {
@@ -31,11 +29,9 @@ test('no setter return', async (t) => {
}
}
console.log(p);
- `);
-
- t.snapshot(badStaticClass);
+ `));
- const badObject = await testLint(`
+ t.snapshot(await testLint(`
let p = {
set name(value) {
if (!value) {
@@ -44,11 +40,9 @@ test('no setter return', async (t) => {
}
};
console.log(p);
- `);
+ `));
- t.snapshot(badObject);
-
- const blankReturn = await testLint(`
+ t.snapshot(await testLint(`
class p {
set name(value) {
if (!value) {
@@ -57,7 +51,5 @@ test('no setter return', async (t) => {
}
};
console.log(p);
- `);
-
- t.snapshot(blankReturn);
+ `));
});

Sort lint categories