-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
9 changed files
with
139 additions
and
162 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
// @ts-check | ||
import antfu from '@antfu/eslint-config' | ||
|
||
const keysOrders = [ | ||
'name', | ||
'displayName', | ||
'aliases', | ||
'source', | ||
'marketplace', | ||
'embeddedIn', | ||
'injectTo', | ||
] | ||
|
||
export default antfu( | ||
{ | ||
ignores: [ | ||
'packages/tm-grammars/grammars/**', | ||
], | ||
}, | ||
{ | ||
files: ['sources-grammars.ts', 'sources-themes.ts'], | ||
rules: { | ||
// overrides | ||
'perfectionist/sort-objects': ['error', { | ||
'groups': keysOrders, | ||
'custom-groups': Object.fromEntries(keysOrders.map(key => [key, [key]])), | ||
}], | ||
}, | ||
}, | ||
) |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
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,7 @@ | ||
import type { TemplateOnlyComponent } from '@glimmer/component'; | ||
|
||
const Greet: TemplateOnlyComponent<{ name: string }> = <template> | ||
<p>Hello, {{@name}}!</p> | ||
</template> | ||
|
||
# From https://rfcs.emberjs.com/id/0779-first-class-component-templates |
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,24 @@ | ||
import { basename } from 'node:path' | ||
import fg from 'fast-glob' | ||
|
||
export async function checkSamples() { | ||
const samples = await fg('samples/*.sample', { | ||
onlyFiles: true, | ||
}).then(r => r.map(f => basename(f).replace(/\.sample$/, ''))) | ||
|
||
const grammars = await import('../packages/tm-grammars/index.js') | ||
.then(m => m.grammars.map(i => i.name)) | ||
|
||
const allGrammars = await import('../packages/tm-grammars/index.js') | ||
.then(m => m.grammars.flatMap(i => [i.name, ...i.aliases || []])) | ||
|
||
const missingSamples = grammars.filter(g => !samples.includes(g)) | ||
const extraSamples = samples.filter(s => !allGrammars.includes(s)) | ||
|
||
console.log({ | ||
missingSamples, | ||
extraSamples, | ||
}) | ||
} | ||
|
||
await checkSamples() |
Oops, something went wrong.