Skip to content
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

init commit #1

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
18 changes: 18 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
dist
*.vsix
.DS_Store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts = true
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}


17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": [
"${workspaceFolder}/dist/**/*.js",
"${workspaceFolder}/dist/*.js"
],
"preLaunchTask": "npm: dev"
}
]
}
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"eslint.format.enable": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "typescript"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.tsserver.enableTracing": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
21 changes: 21 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": ["$tsup"],
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
6 changes: 6 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vscode/**
.vscode-test/**
.gitignore
src
node_modules
test
149 changes: 149 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"name": "package-json5",
"displayName": "Package JSON5",
"description": "A plugin that supports writing JSON5 file extension",
"version": "0.0.1",
"publisher": "",
"icon": "",
"repository": {},
"keywords": [
"vscode",
"extension",
"json5",
"json5 code formatter",
"json5 syntaxes",
"package"
],
"engines": {
"vscode": "^1.73.x"
},
"scripts": {
"build": "esno ./scripts/build.ts",
"dev": "esno ./scripts/dev.ts",
"package": "vsce package --no-dependencies",
"publish": "vsce publish --no-dependencies"
},
"categories": [
"Other",
"Formatters",
"Programming Languages"
],
"main": "./dist/index.js",
"type": "commonjs",
"activationEvents": [
"onLanguage:json5",
"onLanguage:json",
"onTaskType:pnpm",
"workspaceContains:package.json5"
],
"dependencies": {
"json5": "^2.2.3",
"jju": "^1.4.0",
"json-schema": "^0.4.0",
"json-schema-library": "^9.1.2",
"request-light": "^0.7.0",
"which": "^4.0.0",
"json5-parser": "^0.0.2",
"find-yarn-workspace-root": "^2.0.0",
"which-pm": "^2.1.1",
"find-up": "^6.3.0",
"minimatch": "^9.0.3",
"vscode-uri": "^3.0.8",
"strip-comments-strings": "^1.2.0",
"vscode-languageclient": "^9.0.1"
},
"devDependencies": {
"eslint": "^8.51.0",
"@typescript-eslint/parser": "^5.57.0",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@vscode/test-electron": "^2.3.4",
"@types/vscode": "^1.73.1",
"typescript": "^5.2.2",
"@vscode/vsce": "^2.21.0",
"esbuild": "^0.19.4",
"@types/json5": "^2.2.0",
"@types/node": "18",
"@types/jju": "^1.4.3",
"@types/json-schema": "^7.0.13",
"@types/which": "^3.0.0",
"esno": "^0.17.0"
},
"contributes": {
"languages": [
{
"id": "json5",
"aliases": [
"JSON5",
"json5"
],
"extensions": [
".json5"
],
"configuration": "./syntaxes/language-configuration.json"
}
],
"grammars": [
{
"language": "json5",
"scopeName": "source.json5",
"path": "./syntaxes/json5.tmLanguage.json"
}
],
"menus": {
"editor/context": [
{
"command": "vs.json5.jsonToJson5",
"when": "resourceLangId == json",
"title": "JSON TO JSON5"
},
{
"command": "vs.json5.formatter",
"when": "resourceLangId == json5",
"title": "JSON5 Formatter"
}
]
},
"commands": [
{
"command": "vs.json5.formatter",
"title": "JSON5 Formatter"
},
{
"command": "vs.json5.jsonToJson5",
"title": "JSON TO JSON5"
}
],
"configuration": {
"id": "json5",
"order": 0,
"type": "object",
"title": "JSON5",
"properties": {
"json5.validate.enable": {
"type": "boolean",
"scope": "window",
"default": true,
"description": "enable json5 validate"
},
"json5.format.enable": {
"type": "boolean",
"scope": "window",
"default": true,
"description": "enable json5 format"
},
"json5.format.singleQuote": {
"type": "boolean",
"scope": "window",
"default": false,
"description": "the formatted json5 file is in single quotes"
},
"json5.format.space": {
"type": "number",
"scope": "window",
"default": 2,
"description": "format json5 file indentation amount"
}
}
}
}
}
Loading