Skip to content
Merged
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
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

# Trailing whitespace is significant in Markdown (two spaces = line break).
[*.md]
trim_trailing_whitespace = false
268 changes: 134 additions & 134 deletions .eslintrc.mjs
Original file line number Diff line number Diff line change
@@ -1,135 +1,135 @@
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import jsdoc from 'eslint-plugin-jsdoc';
import preferArrow from 'eslint-plugin-prefer-arrow';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
export default [
js.configs.recommended,
{
files: ['**/*.{js,ts,tsx}'],
ignores: [
'**/*.test*',
'**/test/**/*'
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
globals: {
...globals.browser,
...globals.node,
...globals.es2022,
}
},
plugins: {
'@typescript-eslint': typescript,
'jsdoc': jsdoc,
'prefer-arrow': preferArrow,
'import': importPlugin
},
rules: {
// Apply TypeScript recommended rules manually
...typescript.configs.recommended.rules,
...typescript.configs['recommended-requiring-type-checking'].rules,
// Let TypeScript handle undefined variables
'no-undef': 'off',
// syntax preferences
'quotes': ['error', 'single', {'avoidEscape': true, 'allowTemplateLiterals': true}],
'semi': 'error',
'no-extra-semi': 'error',
'comma-style': ['error', 'last'],
'wrap-iife': ['error', 'inside'],
'spaced-comment': ['error', 'always', {'markers': ['*']}],
'eqeqeq': ['error'],
'accessor-pairs': ['error', {'getWithoutSet': false, 'setWithoutGet': false}],
'curly': 'error',
'new-parens': 'error',
'func-call-spacing': 'error',
'arrow-parens': ['error', 'as-needed'],
'eol-last': 'error',
// anti-patterns
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': ['error', {'allow': ['assert', 'context', 'error', 'timeStamp', 'time', 'timeEnd', 'warn']}],
'no-debugger': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-else-return': ['error', {'allowElseIf': false}],
'no-empty-character-class': 'error',
'no-global-assign': 'error',
'no-implied-eval': 'error',
'no-labels': 'error',
'no-multi-str': 'error',
'no-new-object': 'error',
'no-octal-escape': 'error',
'no-self-compare': 'error',
'no-shadow-restricted-names': 'error',
'no-unreachable': 'error',
'no-unsafe-negation': 'error',
'no-var': 'error',
'no-with': 'error',
'prefer-const': 'error',
'radix': 'error',
'valid-typeof': 'error',
'no-return-assign': ['error', 'always'],
// es2015 features
'require-yield': 'error',
'template-curly-spacing': ['error', 'never'],
// spacing details
'space-infix-ops': 'error',
'space-in-parens': ['error', 'never'],
'space-before-function-paren': ['error', {'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always'}],
'no-whitespace-before-property': 'error',
'keyword-spacing': [
'error', {
'overrides': {
'if': {'after': true},
'else': {'after': true},
'for': {'after': true},
'while': {'after': true},
'do': {'after': true},
'switch': {'after': true},
'return': {'after': true}
}
}
],
'arrow-spacing': ['error', {'after': true, 'before': true}],
// file whitespace
'no-multiple-empty-lines': ['error', {'max': 2}],
'no-mixed-spaces-and-tabs': 'error',
'no-trailing-spaces': 'error',
'linebreak-style': ['error', process.platform === 'win32' ? 'windows' : 'unix'],
// Disabled rules
'indent': 'off',
'brace-style': 'off',
'key-spacing': 'off',
'quote-props': 'off',
'no-implicit-globals': 'off',
// TypeScript rules (overrides to the recommended configs)
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
// skiping variables that start with underscore
'no-unused-vars': 'off', // Turn off for TypeScript files
'@typescript-eslint/no-unused-vars': ['error', {'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_'}],
// Import rules
'import/no-default-export': 'error'
}
}
import js from '@eslint/js';
import typescript from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import jsdoc from 'eslint-plugin-jsdoc';
import preferArrow from 'eslint-plugin-prefer-arrow';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';

export default [
js.configs.recommended,
{
files: ['**/*.{js,ts,tsx}'],
ignores: [
'**/*.test*',
'**/test/**/*'
],
languageOptions: {
parser: typescriptParser,
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
globals: {
...globals.browser,
...globals.node,
...globals.es2022,
}
},
plugins: {
'@typescript-eslint': typescript,
'jsdoc': jsdoc,
'prefer-arrow': preferArrow,
'import': importPlugin
},
rules: {
// Apply TypeScript recommended rules manually
...typescript.configs.recommended.rules,
...typescript.configs['recommended-requiring-type-checking'].rules,

// Let TypeScript handle undefined variables
'no-undef': 'off',

// syntax preferences
'quotes': ['error', 'single', {'avoidEscape': true, 'allowTemplateLiterals': true}],
'semi': 'error',
'no-extra-semi': 'error',
'comma-style': ['error', 'last'],
'wrap-iife': ['error', 'inside'],
'spaced-comment': ['error', 'always', {'markers': ['*']}],
'eqeqeq': ['error'],
'accessor-pairs': ['error', {'getWithoutSet': false, 'setWithoutGet': false}],
'curly': 'error',
'new-parens': 'error',
'func-call-spacing': 'error',
'arrow-parens': ['error', 'as-needed'],
'eol-last': 'error',

// anti-patterns
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': ['error', {'allow': ['assert', 'context', 'error', 'timeStamp', 'time', 'timeEnd', 'warn']}],
'no-debugger': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-else-return': ['error', {'allowElseIf': false}],
'no-empty-character-class': 'error',
'no-global-assign': 'error',
'no-implied-eval': 'error',
'no-labels': 'error',
'no-multi-str': 'error',
'no-new-object': 'error',
'no-octal-escape': 'error',
'no-self-compare': 'error',
'no-shadow-restricted-names': 'error',
'no-unreachable': 'error',
'no-unsafe-negation': 'error',
'no-var': 'error',
'no-with': 'error',
'prefer-const': 'error',
'radix': 'error',
'valid-typeof': 'error',
'no-return-assign': ['error', 'always'],

// es2015 features
'require-yield': 'error',
'template-curly-spacing': ['error', 'never'],

// spacing details
'space-infix-ops': 'error',
'space-in-parens': ['error', 'never'],
'space-before-function-paren': ['error', {'anonymous': 'never', 'named': 'never', 'asyncArrow': 'always'}],
'no-whitespace-before-property': 'error',
'keyword-spacing': [
'error', {
'overrides': {
'if': {'after': true},
'else': {'after': true},
'for': {'after': true},
'while': {'after': true},
'do': {'after': true},
'switch': {'after': true},
'return': {'after': true}
}
}
],
'arrow-spacing': ['error', {'after': true, 'before': true}],

// file whitespace
'no-multiple-empty-lines': ['error', {'max': 2}],
'no-mixed-spaces-and-tabs': 'error',
'no-trailing-spaces': 'error',
'linebreak-style': ['error', 'unix'],

// Disabled rules
'indent': 'off',
'brace-style': 'off',
'key-spacing': 'off',
'quote-props': 'off',
'no-implicit-globals': 'off',

// TypeScript rules (overrides to the recommended configs)
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',

// skiping variables that start with underscore
'no-unused-vars': 'off', // Turn off for TypeScript files
'@typescript-eslint/no-unused-vars': ['error', {'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_'}],

// Import rules
'import/no-default-export': 'error'
}
}
];
26 changes: 26 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Normalize line endings for this repository.
#
# Without this file, the line endings of a committed file depend on the
# contributor's local core.autocrlf setting, which caused files to flip
# between LF and CRLF and broke the `linebreak-style` lint rule on CI.
#
# `text=auto eol=lf` means: detect text files automatically, store them with
# LF in the repository, and check them out with LF on every platform.
* text=auto eol=lf

# Binary files must never be line-ending converted.
*.png binary
*.gif binary
*.jpg binary
*.jpeg binary
*.ico binary
*.woff binary
*.woff2 binary
*.ttf binary
*.vsix binary

# SVGs are left byte-for-byte as authored, since many are generated or
# optimized assets. `-text` disables end-of-line conversion while keeping
# them diffable as text (unlike `binary`, which would hide the diff).
*.svg -text
*.svg binary
80 changes: 40 additions & 40 deletions .github/workflows/CI_linux.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
name: CI_Integration_Linux
permissions:
contents: read
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- name: Configuring Git LF Settings
run: |
git config --global core.autocrlf false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build and Test
run: |
npm install
npm run build-and-lint
npm run test
- name: Creating .vsix
run: |
npm run package
name: CI_Integration_Linux

permissions:
contents: read

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- uses: actions/checkout@v3

- name: Configuring Git LF Settings
run: |
git config --global core.autocrlf false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build and Test
run: |
npm install
npm run build-and-lint
npm run test

- name: Creating .vsix
run: |
npm run package
Loading
Loading