mirror of
https://github.com/DigiLive/mushroom-strategy.git
synced 2025-08-04 20:14:28 +02:00
Refactor tool configurations
This commit is contained in:
@@ -15,7 +15,7 @@ ij_visual_guides = 120
|
|||||||
ij_wrap_on_typing = false
|
ij_wrap_on_typing = false
|
||||||
|
|
||||||
[.editorconfig]
|
[.editorconfig]
|
||||||
ij_visual_guides =
|
ij_visual_guides =
|
||||||
ij_editorconfig_align_group_field_declarations = false
|
ij_editorconfig_align_group_field_declarations = false
|
||||||
ij_editorconfig_space_after_colon = false
|
ij_editorconfig_space_after_colon = false
|
||||||
ij_editorconfig_space_after_comma = true
|
ij_editorconfig_space_after_comma = true
|
||||||
@@ -35,9 +35,9 @@ ij_typescript_align_multiline_chained_methods = true
|
|||||||
ij_typescript_align_multiline_extends_list = false
|
ij_typescript_align_multiline_extends_list = false
|
||||||
ij_typescript_align_multiline_for = true
|
ij_typescript_align_multiline_for = true
|
||||||
ij_typescript_align_multiline_parameters = false
|
ij_typescript_align_multiline_parameters = false
|
||||||
ij_typescript_align_multiline_parameters_in_calls = true
|
ij_typescript_align_multiline_parameters_in_calls = false
|
||||||
ij_typescript_align_multiline_ternary_operation = true
|
ij_typescript_align_multiline_ternary_operation = true
|
||||||
ij_typescript_align_object_properties = 1
|
ij_typescript_align_object_properties = 0
|
||||||
ij_typescript_align_union_types = true
|
ij_typescript_align_union_types = true
|
||||||
ij_typescript_align_var_statements = 1
|
ij_typescript_align_var_statements = 1
|
||||||
ij_typescript_array_initializer_new_line_after_left_brace = true
|
ij_typescript_array_initializer_new_line_after_left_brace = true
|
||||||
@@ -46,7 +46,7 @@ ij_typescript_array_initializer_wrap = on_every_item
|
|||||||
ij_typescript_assignment_wrap = normal
|
ij_typescript_assignment_wrap = normal
|
||||||
ij_typescript_binary_operation_sign_on_next_line = true
|
ij_typescript_binary_operation_sign_on_next_line = true
|
||||||
ij_typescript_binary_operation_wrap = normal
|
ij_typescript_binary_operation_wrap = normal
|
||||||
ij_typescript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
|
ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
|
||||||
ij_typescript_blank_lines_after_imports = 1
|
ij_typescript_blank_lines_after_imports = 1
|
||||||
ij_typescript_blank_lines_around_class = 1
|
ij_typescript_blank_lines_around_class = 1
|
||||||
ij_typescript_blank_lines_around_field = 0
|
ij_typescript_blank_lines_around_field = 0
|
||||||
@@ -205,7 +205,7 @@ ij_typescript_while_on_new_line = false
|
|||||||
ij_typescript_wrap_comments = true
|
ij_typescript_wrap_comments = true
|
||||||
|
|
||||||
[{*.markdown,*.md}]
|
[{*.markdown,*.md}]
|
||||||
ij_visual_guides =
|
ij_visual_guides =
|
||||||
ij_markdown_force_one_space_after_blockquote_symbol = true
|
ij_markdown_force_one_space_after_blockquote_symbol = true
|
||||||
ij_markdown_force_one_space_after_header_symbol = true
|
ij_markdown_force_one_space_after_header_symbol = true
|
||||||
ij_markdown_force_one_space_after_list_bullet = true
|
ij_markdown_force_one_space_after_list_bullet = true
|
||||||
@@ -225,7 +225,7 @@ ij_markdown_wrap_text_inside_blockquotes = true
|
|||||||
|
|
||||||
[{*.yaml,*.yml}]
|
[{*.yaml,*.yml}]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
ij_visual_guides =
|
ij_visual_guides =
|
||||||
ij_yaml_align_values_properties = do_not_align
|
ij_yaml_align_values_properties = do_not_align
|
||||||
ij_yaml_autoinsert_sequence_marker = true
|
ij_yaml_autoinsert_sequence_marker = true
|
||||||
ij_yaml_block_mapping_on_new_line = false
|
ij_yaml_block_mapping_on_new_line = false
|
||||||
@@ -239,3 +239,23 @@ ij_yaml_sequence_on_new_line = false
|
|||||||
ij_yaml_space_before_colon = false
|
ij_yaml_space_before_colon = false
|
||||||
ij_yaml_spaces_within_braces = true
|
ij_yaml_spaces_within_braces = true
|
||||||
ij_yaml_spaces_within_brackets = true
|
ij_yaml_spaces_within_brackets = true
|
||||||
|
|
||||||
|
[{*.json,.eslintrc}]
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_visual_guides =
|
||||||
|
ij_json_array_wrapping = split_into_lines
|
||||||
|
ij_json_keep_blank_lines_in_code = 0
|
||||||
|
ij_json_keep_indents_on_empty_lines = false
|
||||||
|
ij_json_keep_line_breaks = true
|
||||||
|
ij_json_keep_trailing_comma = false
|
||||||
|
ij_json_object_wrapping = split_into_lines
|
||||||
|
ij_json_property_alignment = do_not_align
|
||||||
|
ij_json_space_after_colon = true
|
||||||
|
ij_json_space_after_comma = true
|
||||||
|
ij_json_space_before_colon = false
|
||||||
|
ij_json_space_before_comma = false
|
||||||
|
ij_json_spaces_within_braces = false
|
||||||
|
ij_json_spaces_within_brackets = false
|
||||||
|
ij_json_wrap_long_lines = false
|
59
.eslintrc
59
.eslintrc
@@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"root": true,
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:prettier/recommended"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"es2020": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2020,
|
||||||
|
"sourceType": "module",
|
||||||
|
"project": "./tsconfig.json"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"no-unused-vars": "off",
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"warn",
|
||||||
|
{
|
||||||
|
"argsIgnorePattern": "^_"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"no-empty-function": "off",
|
||||||
|
"@typescript-eslint/no-empty-function": "warn",
|
||||||
|
"semi": [
|
||||||
|
"error",
|
||||||
|
"always"
|
||||||
|
],
|
||||||
|
"quotes": [
|
||||||
|
"error",
|
||||||
|
"single"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ignorePatterns": [
|
||||||
|
"dist/",
|
||||||
|
"node_modules/",
|
||||||
|
"*.js",
|
||||||
|
"src/types/homeassistant/",
|
||||||
|
"src/types/lovelace-mushroom/"
|
||||||
|
],
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"webpack.config.ts",
|
||||||
|
"webpack.dev.config.ts"
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"project": null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
|
/dist/
|
12
.prettierrc
Normal file
12
.prettierrc
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": true,
|
||||||
|
"printWidth": 120,
|
||||||
|
"tabWidth": 2,
|
||||||
|
"trailingComma": "all",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"endOfLine": "lf",
|
||||||
|
"proseWrap": "preserve",
|
||||||
|
"embeddedLanguageFormatting": "auto"
|
||||||
|
}
|
@@ -3,39 +3,33 @@
|
|||||||
"src/**/*"
|
"src/**/*"
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
/* Visit https://aka.ms/tsconfig to read more about this file */
|
// 1. Language and Environment
|
||||||
|
|
||||||
/* Language and Environment */
|
|
||||||
"target": "ES2020",
|
"target": "ES2020",
|
||||||
"jsx": "react",
|
"jsx": "react",
|
||||||
|
// 2. Module System
|
||||||
/* Modules */
|
|
||||||
"module": "ES2020",
|
"module": "ES2020",
|
||||||
"moduleResolution": "Node",
|
"moduleResolution": "Node",
|
||||||
|
"outDir": "./dist",
|
||||||
/* JavaScript Support */
|
"resolveJsonModule": true,
|
||||||
|
// 3. JavaScript and Source Maps
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"outDir": "./dist",
|
// 4. Interop and Imports
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
// 5. Type Checking and Strictness
|
||||||
|
|
||||||
/* Type Checking */
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
|
// 6. Project Structure and Build Integrity
|
||||||
/* Completeness */
|
"forceConsistentCasingInFileNames": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true
|
||||||
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
},
|
},
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "CommonJS"
|
"module": "CommonJS"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -4,21 +4,21 @@ import path from 'path';
|
|||||||
import webpack from 'webpack';
|
import webpack from 'webpack';
|
||||||
|
|
||||||
const config: webpack.Configuration = {
|
const config: webpack.Configuration = {
|
||||||
entry: "./src/mushroom-strategy.ts",
|
mode: 'production',
|
||||||
mode: "production",
|
entry: './src/mushroom-strategy.ts',
|
||||||
output: {
|
output: {
|
||||||
filename: "mushroom-strategy.js",
|
|
||||||
path: path.resolve(__dirname, "dist"),
|
|
||||||
clean: true,
|
clean: true,
|
||||||
|
filename: 'mushroom-strategy.js',
|
||||||
|
path: path.resolve(__dirname, 'dist'),
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".ts", ".tsx", ".js"],
|
extensions: ['.ts', '.js'],
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.ts$/,
|
||||||
use: "ts-loader",
|
use: 'ts-loader',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@@ -4,24 +4,21 @@ import path from 'path';
|
|||||||
import webpack from 'webpack';
|
import webpack from 'webpack';
|
||||||
|
|
||||||
const config: webpack.Configuration = {
|
const config: webpack.Configuration = {
|
||||||
entry: "./src/mushroom-strategy.ts",
|
mode: 'development',
|
||||||
mode: "development",
|
entry: './src/mushroom-strategy.ts',
|
||||||
devtool: "source-map",
|
|
||||||
output: {
|
output: {
|
||||||
filename: "mushroom-strategy.js",
|
filename: 'mushroom-strategy.js',
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, 'dist'),
|
||||||
},
|
},
|
||||||
|
devtool: 'source-map',
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: [".ts", ".tsx", ".js"],
|
extensions: ['.ts', '.js'],
|
||||||
},
|
|
||||||
optimization: {
|
|
||||||
minimize: false,
|
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.ts$/,
|
||||||
use: "ts-loader",
|
use: 'ts-loader',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user