Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"ignorePatterns": ["src/external"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
"project": "./tsconfig.eslint.json"
},
"plugins": ["@typescript-eslint", "prettier"],
"reportUnusedDisableDirectives": true,
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ jobs:
- run: npm run lint
- run: npm run build
- run: npm run test
- run: npm run grammars-test
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dist
.DS_Store
runners
.yalc
*.md
*.md
language/syntaxes/test/**/*
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"github-actions.workflows.pinned.workflows": [".github/workflows/build.yml"],
"editor.formatOnSave": true,
"[typescript]": {
"js/ts.tsdk.path": "node_modules/typescript/lib",
"[typescript][javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ src/
tsconfig.json
webpack.config.js
media
dist/*.map
dist/*.map
language/syntaxes/test/
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ module.exports = {
}
]
},
moduleFileExtensions: ["ts", "js"]
moduleFileExtensions: ["ts", "js"],
// Exclude the language tests so that Jest doesn't think
// that the snapshot files belong to Jest and are obsolete.
testPathIgnorePatterns: ["^<rootDir>/language/"]
};
188 changes: 188 additions & 0 deletions language/syntaxes/actions-github-script.tmGrammar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"information_for_contributors": [
"This file has been generated by 'script/grammars/generate.mjs'.",
"Any changes should be made in that script, then use `npm run grammars-generate` to regenerate this file."
],
"scopeName": "source.github-actions-workflow.actions-github-script",
"injectionSelector": "L:source.github-actions-workflow",
"patterns": [
{
"include": "#actions-github-script.uses"
},
{
"include": "#actions-github-script.uses-sequence-item"
}
],
"repository": {
"actions-github-script.uses": {
"begin": "^([ ]+)(uses)[ ]*(:)[ ]+(actions/github-script@(?:\\S+))([ ]+.*)?$",
"beginCaptures": {
"2": {
"name": "entity.name.tag.yaml"
},
"3": {
"name": "punctuation.separator.key-value.mapping.yaml"
},
"4": {
"name": "string.unquoted.plain.out.yaml"
},
"5": {
"patterns": [
{
"include": "source.github-actions-workflow#comment"
},
{
"match": ".+",
"name": "invalid.illegal.expected-comment-or-newline.yaml"
}
]
}
},
"end": "^(?!\\1|[ ]*$|[ ]*#.*$)",
"patterns": [
{
"include": "#actions-github-script.with"
},
{
"include": "source.github-actions-workflow"
}
]
},
"actions-github-script.uses-sequence-item": {
"begin": "^([ ]+)(-)([ ]+)(uses)[ ]*(:)[ ]+(actions\\/github-script@\\S+)([ ]+.*)?$",
"beginCaptures": {
"2": {
"name": "punctuation.definition.block.sequence.item.yaml"
},
"4": {
"name": "entity.name.tag.yaml"
},
"5": {
"name": "punctuation.separator.key-value.mapping.yaml"
},
"6": {
"name": "string.unquoted.plain.out.yaml"
},
"7": {
"patterns": [
{
"include": "source.github-actions-workflow#comment"
},
{
"match": ".+",
"name": "invalid.illegal.expected-comment-or-newline.yaml"
}
]
}
},
"end": "^(?!\\1 \\3|[ ]*$|[ ]*#.*$)",
"patterns": [
{
"include": "#actions-github-script.with"
},
{
"include": "source.github-actions-workflow"
}
]
},
"actions-github-script.with": {
"begin": "^([ ]+)(with)[ ]*(:)([ ]+.*)?$",
"beginCaptures": {
"2": {
"name": "entity.name.tag.yaml"
},
"3": {
"name": "punctuation.separator.key-value.mapping.yaml"
},
"4": {
"patterns": [
{
"include": "source.github-actions-workflow#comment"
},
{
"match": ".+",
"name": "invalid.illegal.expected-comment-or-newline.yaml"
}
]
}
},
"end": "^(?!\\1 |[ ]*$|[ ]*#.*$)",
"patterns": [
{
"include": "#actions-github-script.script.block"
},
{
"include": "#actions-github-script.script.plain"
},
{
"include": "source.github-actions-workflow"
}
]
},
"actions-github-script.script.block": {
"begin": "^([ ]+)(script)[ ]*(:)[ ]+(?:(\\|)|(>))([1-9])?([-+])?([ ]+.*)?$",
"beginCaptures": {
"2": {
"name": "entity.name.tag.yaml"
},
"3": {
"name": "punctuation.separator.key-value.mapping.yaml"
},
"4": {
"name": "keyword.control.flow.block-scalar.literal.yaml"
},
"5": {
"name": "keyword.control.flow.block-scalar.folded.yaml"
},
"6": {
"name": "constant.numeric.indentation-indicator.yaml"
},
"7": {
"name": "storage.modifier.chomping-indicator.yaml"
},
"8": {
"patterns": [
{
"include": "source.github-actions-workflow#comment"
},
{
"match": ".+",
"name": "invalid.illegal.expected-comment-or-newline.yaml"
}
]
}
},
"end": "^(?!\\1 |[ ]*$)",
"patterns": [
{
"begin": "^([ ]+)(?! )",
"end": "^(?!\\1|[ ]*$)",
"name": "meta.embedded.inline.javascript",
"patterns": [
{
"include": "source.js"
}
]
}
]
},
"actions-github-script.script.plain": {
"begin": "^([ ]+)(script)[ ]*(:)[ ]+",
"beginCaptures": {
"2": {
"name": "entity.name.tag.yaml"
},
"3": {
"name": "punctuation.separator.key-value.mapping.yaml"
}
},
"end": "^(?!\\1 |[ ]*$)",
"name": "meta.embedded.inline.javascript",
"patterns": [
{
"include": "source.js"
}
]
}
}
}
12 changes: 6 additions & 6 deletions language/syntaxes/expressions.tmGrammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
{
"include": "#function-call"
},
{
"include": "#context"
},
{
"include": "#string"
},
Expand All @@ -33,6 +30,9 @@
},
{
"include": "#null"
},
{
"include": "#context"
}
]
}
Expand All @@ -54,9 +54,6 @@
{
"include": "#function-call"
},
{
"include": "#context"
},
{
"include": "#string"
},
Expand All @@ -68,6 +65,9 @@
},
{
"include": "#null"
},
{
"include": "#context"
}
]
}
Expand Down
Loading