Skip to content

Commit

Permalink
Merge pull request #44 from blacklabel/typescript-migration
Browse files Browse the repository at this point in the history
Typescript migration & code refactor
  • Loading branch information
pawelfus authored Nov 18, 2024
2 parents 64c06f7 + b346119 commit bd20312
Show file tree
Hide file tree
Showing 36 changed files with 13,800 additions and 1,248 deletions.
106 changes: 0 additions & 106 deletions .eslint-default-config.yml

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc

This file was deleted.

103 changes: 103 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"env": {
"browser": true
},
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"parserOptions": {
"project": "./tsconfig.json"
},
"ignorePatterns": ["dist"],
"rules": {
"camelcase": [
2,
{
"properties": "always"
}
],
"capitalized-comments": ["warn", "always", { "ignoreConsecutiveComments": true }],
"class-methods-use-this": 0,
"comma-dangle": [
2,
"never"
],
"consistent-return": 1,
"default-case": 1,
"default-param-last": 1,
"dot-notation": 0,
"function-paren-newline": 0,
"func-style": 0,
"indent": 2,
"max-len": [
"error",
{
"code": 80,
"comments": 80,
"ignoreUrls": true,
"ignoreComments": true
}
],
"no-dupe-class-members": 2,
"no-inner-declarations": 2,
"no-invalid-this": 0,
"no-shadow": 2,
"no-undef": 0,
"no-underscore-dangle": 2,
"no-unused-expressions": 0,
"no-use-before-define": 2,
"no-useless-constructor": 2,
"no-useless-escape": 2,
"no-useless-return": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": 2,
"prefer-const": 1,
"prefer-spread": 0,
"prefer-rest-params": 0,
"require-unicode-regexp": 2,
"quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],
"semi": 2,
"@typescript-eslint/array-type": [2, { "default": "array-simple" }],
"@typescript-eslint/consistent-type-assertions": 2,
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": false,
"allowTypedFunctionExpressions": false
}
],
"@typescript-eslint/indent": [
"error",
4,
{
"FunctionExpression": { "parameters": 1 },
"SwitchCase": 1
}
],
"@typescript-eslint/no-empty-function": 2,
"@typescript-eslint/no-empty-interface": 2,
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-floating-promises": 1,
"@typescript-eslint/no-inferrable-types": 1,
"@typescript-eslint/no-namespace": 2,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-unnecessary-type-assertion": 2,
"@typescript-eslint/no-unsafe-argument": 2,
"@typescript-eslint/no-unsafe-assignment": 2,
"@typescript-eslint/no-unsafe-call": 2,
"@typescript-eslint/no-unsafe-member-access": 2,
"@typescript-eslint/no-unsafe-return": 2,
"@typescript-eslint/no-unsafe-declaration-merging": 2,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/no-use-before-define": 2,
"@typescript-eslint/no-useless-constructor": 2,
"@typescript-eslint/prefer-as-const": 1,
"@typescript-eslint/prefer-includes": 2,
"@typescript-eslint/prefer-regexp-exec": 2,
"@typescript-eslint/prefer-string-starts-ends-with": 0,
"@typescript-eslint/restrict-plus-operands": 1,
"@typescript-eslint/restrict-template-expressions": 1,
"@typescript-eslint/semi": 2,
"@typescript-eslint/unbound-method": 0
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dependency directories
node_modules/
.vscode/*
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint
npm run test-dot
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [3.0.0](https://github.com/blacklabel/multicolor_series/pull/44) (2024-11-18)

### Features

* Refactored to Typescript-compatible version.
* Removed unused, legacy code related to the old Highcharts versions.
* Added snapshot testing for both coloredline/coloredarea series.
Loading

0 comments on commit bd20312

Please sign in to comment.