Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8717509909 | |||
| b1465077a1 | |||
| 31fa528fe2 | |||
| 71a054b964 | |||
| 15c05b5667 | |||
| 9d0fb0901e | |||
| 87cc7b7e38 | |||
| 8f802c4574 | |||
| 942b4a3865 | |||
| c8d79ef509 | |||
| 8bd362922a | |||
| cb4d1366bf | |||
| e5cde7df45 | |||
| 50b051e155 | |||
| efe9250969 | |||
| 39e4e03b29 | |||
| eb97144726 | |||
| b695d0ff1f | |||
| c004b7c70a | |||
| b15be4bf7c | |||
| 5a3fd218bc | |||
| 9a33fc258f | |||
| 1781912d3f | |||
| 2a494213ff | |||
| 9cc4bb48fc | |||
| f67562c8ac | |||
| e4682d493e | |||
| e4afa91517 | |||
| 9b8134441c | |||
| d16bc0a1ef | |||
| 3a54763a53 | |||
| 81177f27ce | |||
| f1e5244ee2 | |||
| e30bdcd6cf | |||
| 0615d39c61 | |||
| d3bb430a98 | |||
| 3eac7da736 | |||
| 1f16dcdbf0 | |||
| fe433ad929 | |||
| 96c172c1ff | |||
| 6fd2ba027c | |||
| 85d50e183f | |||
| aa3fd27451 | |||
| c15d443595 | |||
| cdc9e40d0b | |||
| e3fd433c9b | |||
| 3969b22310 | |||
| 58ff5ccc5a | |||
| 74533cc9b9 | |||
| 0cd8d6c0d1 | |||
| 7a654ffad8 |
@@ -12,13 +12,6 @@ trigger:
|
|||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
|
|
||||||
# kind: pipeline
|
|
||||||
# name: default
|
|
||||||
|
|
||||||
# trigger:
|
|
||||||
# event:
|
|
||||||
# - tag
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: node
|
image: node
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
{
|
|
||||||
"root": true,
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": 6,
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/naming-convention": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
"selector": "import",
|
|
||||||
"format": [ "camelCase", "PascalCase" ]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/semi": "warn",
|
|
||||||
"curly": "warn",
|
|
||||||
"eqeqeq": "warn",
|
|
||||||
"no-throw-literal": "warn",
|
|
||||||
"semi": "off"
|
|
||||||
},
|
|
||||||
"ignorePatterns": [
|
|
||||||
"out",
|
|
||||||
"dist",
|
|
||||||
"**/*.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
_
|
||||||
9
.husky/commit-msg
Executable file
9
.husky/commit-msg
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
if [ -z "$(cat "$1" | grep -E '(^fix:)|(^feature:)|(^up$)|^Merge branch .+$')" ] ; then
|
||||||
|
echo ""
|
||||||
|
echo respecte le format de commit ❤
|
||||||
|
echo " fix: xxx"
|
||||||
|
echo " feature: xxx"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
7
.husky/post-merge
Executable file
7
.husky/post-merge
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
if git diff --name-only HEAD@{1} HEAD | grep package-lock.json ; then
|
||||||
|
echo "📦 package-lock.json changed. Running npm ci to update your dependencies..."
|
||||||
|
npm ci
|
||||||
|
else
|
||||||
|
echo "📦 no need to update dependencies"
|
||||||
|
fi
|
||||||
13
.husky/pre-commit
Executable file
13
.husky/pre-commit
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# prevent commits on master
|
||||||
|
branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
if [ "$branch" = "master" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "You can't commit directly to master branch"
|
||||||
|
echo "please create a pull request"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# run linters
|
||||||
|
npx lint-staged
|
||||||
11
.lintstagedrc
Normal file
11
.lintstagedrc
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"*.js": ["eslint --fix", "prettier --write"],
|
||||||
|
"*.css": ["prettier --write"],
|
||||||
|
"*.jsx": ["prettier --write"],
|
||||||
|
"*.html.twig": ["twig-cs-fixer lint --fix", "myhtmlvalidate -q"],
|
||||||
|
"*.php": ["php-cs-fixer fix --config .php-cs-fixer.php"],
|
||||||
|
"Dockerfile": ["hadolint --ignore DL3002 --ignore DL3003 --ignore DL3008 --ignore DL3013 --ignore DL3016 --ignore DL3022"],
|
||||||
|
"*.md": ["markdownlint --fix"],
|
||||||
|
"*openapi.json": ["spectral lint"],
|
||||||
|
"*.tf": ["tflint"]
|
||||||
|
}
|
||||||
6
.prettierignore
Normal file
6
.prettierignore
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
web/*
|
||||||
|
views/*
|
||||||
|
log/*
|
||||||
|
node_modules/*
|
||||||
|
coverage/*
|
||||||
|
data/*
|
||||||
7
.prettierrc.js
Normal file
7
.prettierrc.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
export default {
|
||||||
|
tabWidth: 4,
|
||||||
|
singleQuote: true,
|
||||||
|
trailingComma: 'es5',
|
||||||
|
printWidth: 150,
|
||||||
|
arrowParens: 'always',
|
||||||
|
};
|
||||||
66
eslint.config.js
Normal file
66
eslint.config.js
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
import js from '@eslint/js';
|
||||||
|
import tsparser from '@typescript-eslint/parser';
|
||||||
|
import tsplugin from '@typescript-eslint/eslint-plugin';
|
||||||
|
import globals from 'globals';
|
||||||
|
|
||||||
|
export default [
|
||||||
|
js.configs.recommended,
|
||||||
|
{
|
||||||
|
files: ['**/*.ts'],
|
||||||
|
languageOptions: {
|
||||||
|
parser: tsparser,
|
||||||
|
parserOptions: {
|
||||||
|
ecmaVersion: 6,
|
||||||
|
sourceType: 'module',
|
||||||
|
},
|
||||||
|
globals: {
|
||||||
|
...globals.browser,
|
||||||
|
...globals.node,
|
||||||
|
...globals.mocha,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'@typescript-eslint': tsplugin,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/naming-convention': [
|
||||||
|
'warn',
|
||||||
|
{
|
||||||
|
selector: 'import',
|
||||||
|
format: ['camelCase', 'PascalCase'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'curly': 'warn',
|
||||||
|
'eqeqeq': 'warn',
|
||||||
|
'no-throw-literal': 'warn',
|
||||||
|
'semi': 'off',
|
||||||
|
// Règles générales réutilisées de flatbay
|
||||||
|
'prefer-const': ['error', { destructuring: 'all' }],
|
||||||
|
'no-var': 'error',
|
||||||
|
'object-shorthand': ['error', 'properties'],
|
||||||
|
'prefer-template': 'error',
|
||||||
|
'dot-notation': 'error',
|
||||||
|
'no-unused-expressions': 'error',
|
||||||
|
'no-nested-ternary': 'error',
|
||||||
|
'one-var-declaration-per-line': ['error', 'always'],
|
||||||
|
'one-var': ['error', 'never'],
|
||||||
|
'vars-on-top': 'error',
|
||||||
|
'yoda': 'error',
|
||||||
|
'prefer-arrow-callback': 'error',
|
||||||
|
'no-implicit-globals': 'error',
|
||||||
|
'no-labels': 'error',
|
||||||
|
'no-new-func': 'error',
|
||||||
|
'no-script-url': 'error',
|
||||||
|
'no-sequences': 'error',
|
||||||
|
'no-unused-labels': 'error',
|
||||||
|
'prefer-spread': 'error',
|
||||||
|
'no-console': 0, // Garder les console.log pour debug
|
||||||
|
'no-empty': 0,
|
||||||
|
'no-redeclare': 0,
|
||||||
|
'no-useless-escape': 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ignores: ['out/', 'dist/', '**/*.d.ts'],
|
||||||
|
},
|
||||||
|
];
|
||||||
1395
package-lock.json
generated
1395
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
24
package.json
24
package.json
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "vscodestat",
|
"name": "vscodestat",
|
||||||
"displayName": "vscodestat",
|
"displayName": "vscodestat",
|
||||||
"version": "1.1.131",
|
"version": "1.1.152",
|
||||||
"description": "",
|
"description": "",
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"author": "Raphael Piccolo",
|
"author": "Raphael Piccolo",
|
||||||
|
"type": "module",
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile": "tsc -p ./",
|
"compile": "tsc -p ./",
|
||||||
@@ -19,7 +20,8 @@
|
|||||||
"pretest": "npm run compile && npm run lint",
|
"pretest": "npm run compile && npm run lint",
|
||||||
"test": "vscode-test",
|
"test": "vscode-test",
|
||||||
"vscode:prepublish": "npm run compile",
|
"vscode:prepublish": "npm run compile",
|
||||||
"watch": "tsc -watch -p ./"
|
"watch": "tsc -watch -p ./",
|
||||||
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [
|
"commands": [
|
||||||
@@ -52,17 +54,21 @@
|
|||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/mocha": "^10.0.10",
|
"@types/mocha": "^10.0.10",
|
||||||
"@types/node": "24.x",
|
"@types/node": "25.x",
|
||||||
"@types/vscode": "^1.106.1",
|
"@types/vscode": "^1.110.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
"@typescript-eslint/eslint-plugin": "^8.58.1",
|
||||||
"@typescript-eslint/parser": "^8.47.0",
|
"@typescript-eslint/parser": "^8.58.1",
|
||||||
"@vscode/test-cli": "^0.0.12",
|
"@vscode/test-cli": "^0.0.12",
|
||||||
"@vscode/test-electron": "^2.5.2",
|
"@vscode/test-electron": "^2.5.2",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^10.1.0",
|
||||||
"typescript": "^5.9.3"
|
"husky": "^9.1.7",
|
||||||
|
"lint-staged": "^16.4.0",
|
||||||
|
"prettier": "^3.8.1",
|
||||||
|
"ts-api-utils": "^2.5.0",
|
||||||
|
"typescript": "^6.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.106.1"
|
"vscode": "^1.110.0"
|
||||||
},
|
},
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"extensionKind": [
|
"extensionKind": [
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
console.log('Congratulations, your extension "vscodestat" is now active!');
|
console.log('Congratulations, your extension "vscodestat" is now active!');
|
||||||
|
|
||||||
// crée une commande de test
|
// crée une commande de test
|
||||||
let disposable = vscode.commands.registerCommand('vscodestat.helloWorld', () => {
|
const disposable = vscode.commands.registerCommand('vscodestat.helloWorld', () => {
|
||||||
vscode.window.showInformationMessage('Hello World from vscodestat!');
|
vscode.window.showInformationMessage('Hello World from vscodestat!');
|
||||||
});
|
});
|
||||||
context.subscriptions.push(disposable);
|
context.subscriptions.push(disposable);
|
||||||
|
|
||||||
// commande pour definir l'url
|
// commande pour definir l'url
|
||||||
let disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
|
const disposable2 = vscode.commands.registerCommand('vscodestat.setUrl', async () => {
|
||||||
const url = await vscode.window.showInputBox({
|
const url = await vscode.window.showInputBox({
|
||||||
prompt: 'Enter the URL:',
|
prompt: 'Enter the URL:',
|
||||||
placeHolder: ''
|
placeHolder: ''
|
||||||
@@ -24,7 +24,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||||||
context.subscriptions.push(disposable2);
|
context.subscriptions.push(disposable2);
|
||||||
|
|
||||||
// commande pour tester l'url
|
// commande pour tester l'url
|
||||||
let disposable3 = vscode.commands.registerCommand('vscodestat.callUrl', async () => {
|
const disposable3 = vscode.commands.registerCommand('vscodestat.callUrl', async () => {
|
||||||
const storedUrl = vscode.workspace.getConfiguration().get('vscodestat.url') as string;
|
const storedUrl = vscode.workspace.getConfiguration().get('vscodestat.url') as string;
|
||||||
if (!storedUrl) {
|
if (!storedUrl) {
|
||||||
vscode.window.showWarningMessage('URL is not set. Please set the URL first.');
|
vscode.window.showWarningMessage('URL is not set. Please set the URL first.');
|
||||||
|
|||||||
Reference in New Issue
Block a user