diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index de85b43..ab89517 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -11,9 +11,10 @@ jobs: with: node-version: "18" - run: npm i - - run: node extension.js -dev + - run: node run generate - run: "[[ -z $(git status --porcelain) ]]" - - run: npx eslint + - run: npm run lint:check + - run: npm run format:check release: runs-on: ubuntu-latest needs: check diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..2d45df9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +syntaxes/injection.json +package.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 0e191b5..4058e69 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -3,15 +3,13 @@ // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 { - "version": "0.2.0", - "configurations": [ - { - "name": "Extension", - "type": "extensionHost", - "request": "launch", - "args": [ - "--extensionDevelopmentPath=${workspaceFolder}" - ] - } - ] -} \ No newline at end of file + "version": "0.2.0", + "configurations": [ + { + "name": "Extension", + "type": "extensionHost", + "request": "launch", + "args": ["--extensionDevelopmentPath=${workspaceFolder}"] + } + ] +} diff --git a/README.md b/README.md index 65a64b0..d9a7880 100644 --- a/README.md +++ b/README.md @@ -92,9 +92,9 @@ None ## Extension Settings -| Name | Description | -| --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `yaml-embedded-languages.include` | Allows the user to include their own languages, the languages of other extensions, or aliases for existing languages. Use the key to define the language identifier with regex. Use the value to specify the language TextMate `scopeName`. By default the language identifier will be used as the language name. To change this, an object can be specified with the properties `name` and `scopeName`. | +| Name | Description | +| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `yaml-embedded-languages.include` | Allows the user to include their own languages, the languages of other extensions, or aliases for existing languages. Use the key to define the language identifier with regex. Use the value to specify the language TextMate `scopeName`. By default the language identifier will be used as the language name. To change this, an object can be specified with the properties `name` and `scopeName` (required). | ## Known Issues diff --git a/package-lock.json b/package-lock.json index f44706a..9e86ef1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "@eslint/js": "^9.9.0", "@vscode/vsce": "^2.29.0", "eslint": "^9.9.0", - "globals": "^15.9.0" + "globals": "^15.9.0", + "prettier": "^3.3.3" }, "engines": { "vscode": "^1.74.0" @@ -2459,6 +2460,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", diff --git a/package.json b/package.json index 88d59be..8a5df2f 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ } }, "default": {}, - "description": "Use the key to define the language identifier with regex. Use the value to specify the language TextMate `scopeName`. By default the language identifier will be used as the language name. To change this, an object can be specified with the properties `name` and `scopeName`." + "description": "Use the key to define the language identifier with regex. Use the value to specify the language TextMate `scopeName`. By default the language identifier will be used as the language name. To change this, an object can be specified with the properties `name` and `scopeName` (required)." } } } @@ -143,6 +143,14 @@ "@eslint/js": "^9.9.0", "@vscode/vsce": "^2.29.0", "eslint": "^9.9.0", - "globals": "^15.9.0" + "globals": "^15.9.0", + "prettier": "^3.3.3" + }, + "scripts": { + "generate": "node extension.js -dev", + "lint:check": "eslint", + "lint:fix": "eslint --fix", + "format:check": "prettier . --check", + "format:fix": "prettier . --write" } } \ No newline at end of file