Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-zal committed Jul 2, 2024
2 parents 8508a70 + 48bd052 commit acbb6c1
Show file tree
Hide file tree
Showing 185 changed files with 13,617 additions and 8,081 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ indent_style = tab
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[settings.json]
indent_style = space
indent_size = 4
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/imljson-language-features/
61 changes: 51 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,62 @@
{
"root": true,
"env": {
"node": true
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": "latest"
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"eslint:recommended"
],
"rules": {
"semi": [2, "always"],
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-non-null-assertion": 0
}
},
"overrides": [
// Be more strict to new TypeScript files.
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"google",
"eslint-config-prettier"
],
"rules": {
"max-len": ["warn", 120, { "ignoreStrings": true, "ignoreComments": true, "ignoreTemplateLiterals": true }], // Line width 80 -> 120
"no-tabs": "off", // This project uses tabs instead of spaces as default.
"quote-props": ["error", "as-needed"],
// "object-curly-spacing" is not aligned in Google with Typescript default used style
"object-curly-spacing": ["error", "always", { "objectsInObjects": true }],
"require-jsdoc": "off",
"valid-jsdoc":"off",
"quotes": ["error", "single", { "avoidEscape": true }], // Allow to used double-quotes if inner string has single-quote.
"block-spacing": ["error", "always"], // Rollback from Google style to ESLint default.
"padded-blocks": "off", // Allow to start and end block ith blank lines.
"no-multi-spaces": ["error", { "ignoreEOLComments": true }], // Ignore multiple spaces before comments that occur at the end of lines
"operator-linebreak": ["error", "after", { "overrides": { "?": "before", ":": "before" } }], // Align with Prettier
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], // Add ignoring the `_paramName`
"camelcase": ["error", { "allow": ["^testsOnly_"] }]
}
},
// For old JSfiles add couple of additional rules, which are included also in "google".
{
"files": ["**/*.js"],
"rules": {
"indent": ["error", "tab", {
"FunctionDeclaration": { "body": 1, "parameters": 1 },
"SwitchCase": 1
}],
"no-unused-vars": "error"
}
}
]
}
26 changes: 20 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,32 @@

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: npm
directory: "/"
schedule:
interval: 'weekly'
target-branch: 'development'
interval: monthly
target-branch: development
commit-message:
prefix: 'build'
prefix: build
ignore:
# Reason: Depends on the minimal supported VS Code version specified in package.json
- dependency-name: "@types/vscode"
# Reason: Depends on the Node.js version used in VS Code
- dependency-name: "@types/node"
# Reason: Tempy 2+ is written as ESM module, which is not directly supported by CommonJS
- dependency-name: "tempy"
update-types: ["version-update:semver-major"]
update-types:
- "version-update:semver-major"
groups:
"devDeps minor update":
dependency-type: "development"
update-types:
- minor
- patch
"deps minor update":
dependency-type: "production"
update-types:
- minor
- patch
# Others:
# Major dependencies are not grouped, because they should be resolved one by one.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: CI

on:
push:
branches:
- "development"
- "master"
pull_request:
branches:
- "**"
workflow_dispatch:

# push:
# branches:
# - "**"

# Cancel the previously running job when new Git commit has been received.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -19,6 +19,7 @@ jobs:
test:
name: "Integration tests"
runs-on: ubuntu-latest
timeout-minutes: 10 # minutes
permissions:
checks: write
steps:
Expand All @@ -27,7 +28,7 @@ jobs:
# See https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
- uses: actions/setup-node@v3
with:
node-version: '16.x'
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Install modules
Expand All @@ -36,6 +37,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run tests
timeout-minutes: 5 # minutes
run: |
xvfb-run npm run testToJsonFile
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ node_modules
.DS_Store
local
out
src/__is-pre-release-build.ts
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 120,
"useTabs": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSameLine": true,
"arrowParens": "always"
}
6 changes: 4 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"dozerg.tsimportsorter"
]
}
}
6 changes: 2 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: compile",
"postDebugTask": "npm: cleanup"
},
{
"name": "Test Extension",
Expand All @@ -31,14 +30,13 @@
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: compile",
"postDebugTask": "npm: cleanup"
},
{
"type": "node",
"request": "attach",
"name": "Language Server",
"name": "Attach Language Server",
"port": 6009
}
]
Expand Down
40 changes: 38 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.surveys.enabled": false
}
"typescript.surveys.enabled": false,
"editor.rulers": [120],
"typescript.preferences.quoteStyle": "single",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},

"editor.codeActionsOnSave": [],
// "editor.codeActionsOnSave": ["source.organizeImports.sortImports"],
// Grouping rules for path patterns for imports. {} is the fall-back group.
// Wiki: https://github.com/daidodo/format-imports/wiki/Grouping-Rules
"tsImportSorter.configuration.groupRules": [
"^node:",
{},
"^\\./",
"^\\.\\./",
"^\\.\\./\\.\\./",
],
// Disable formatting for files matching regular expressions.
"tsImportSorter.configuration.exclude": [
"imljson-language-features/"
],
// Number of empty lines between groups (NOT sub-groups).
"tsImportSorter.configuration.emptyLinesBetweenGroups": 0,
// Line wrapping style. Valid values are 'prettier' or an object.
// Wiki: https://github.com/daidodo/format-imports/wiki/Line-Wrapping-Style
"tsImportSorter.configuration.wrappingStyle": "prettier",

// Global Sorting rules. Valid values are 'none' or an object.
// Wiki: https://github.com/daidodo/format-imports/wiki/Sorting-Rules
"tsImportSorter.configuration.sortRules": "none",

"markdownlint.config": {
"MD003": false,
"MD024": false
},
}
31 changes: 30 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Watch for all Typescript problems",
"command": "tsc",
"type": "shell",
"args": ["-w", "-p", ".", "--noEmit"],
"presentation": {
"revealProblems": "onProblem"
},
"options": {
"cwd": "${workspaceRoot}",
},
"isBackground": true,
"problemMatcher": {
"base": "$tsc-watch",
"fileLocation": ["relative", "${workspaceRoot}"],
}
},
{
"label": "Check for all ESLint problems in *.ts",
"command": "eslint",
"type": "shell",
"args": ["-c", "./.eslintrc.json", "${workspaceRoot}/src/**/*.ts"],
"options": {
"cwd": "${workspaceRoot}",
},
"problemMatcher": {
"base": "$eslint-stylish",
}
},
{
"type": "npm",
"script": "watch",
Expand All @@ -15,4 +44,4 @@
}
}
]
}
}
9 changes: 8 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ vsc-extension-quickstart.md
**/*.ts
**/tsconfig.json
src/**
resources/readme/**
resources/readme/not-used/**
resources/extension-icon.png
resources/imt-icon.svg
# imljson-language-features is compiled into /out by `tsc`. Src files not needed.
syntaxes/imljson-language-features
!README.md
!LICENSE.md
!CHANGELOG.md
*.md
*.vsix
Loading

0 comments on commit acbb6c1

Please sign in to comment.