Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from slotovi4/dev
Browse files Browse the repository at this point in the history
refactor: delete not used packages & fix dblclick bug
  • Loading branch information
slotovi4 committed Dec 1, 2020
2 parents b9e29f5 + 09b37bd commit 16b2b8a
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 264 deletions.
257 changes: 130 additions & 127 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,131 +1,134 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"PascalCase",
"camelCase"
]
},
// правило для булевых констант
{
"selector": "variable",
"modifiers": [
"const"
],
"types": [
"boolean"
],
"format": [
// "UPPER_CASE"
],
"prefix": [
"is",
"should",
"has",
"can",
"did",
"will"
]
},
// правило для массивов
{
"selector": "variable",
"types": [
"array"
],
"format": [
"camelCase"
],
"suffix": [
"List"
]
},
// правило для type
{
"selector": "typeAlias",
"format": [
"PascalCase"
],
"prefix": [
"T"
]
},
// правило для interface
{
"selector": "interface",
"format": [
"PascalCase"
],
"prefix": [
"I"
]
},
// правило для enum
{
"selector": "enum",
"format": [
"PascalCase"
],
"prefix": [
"E"
]
}
],
"prefer-arrow-callback": "error",
"prefer-destructuring": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"curly": "error",
"no-extra-semi": "error",
"react/self-closing-comp": "error",
"max-params": ["error", 3],
"no-shadow": "off",
"quotes": [
"error",
"single"
],
"spaced-comment": [
"error",
"always"
],
"semi": [
2,
"always"
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": [
"@typescript-eslint"
],
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": [
"PascalCase",
"camelCase"
]
},
// правило для булевых констант
{
"selector": "variable",
"modifiers": [
"const"
],
"types": [
"boolean"
],
"format": [
// "UPPER_CASE"
],
"prefix": [
"is",
"should",
"has",
"can",
"did",
"will"
]
},
// правило для массивов
{
"selector": "variable",
"types": [
"array"
],
"format": [
"camelCase"
],
"suffix": [
"List"
]
},
// правило для type
{
"selector": "typeAlias",
"format": [
"PascalCase"
],
"prefix": [
"T"
]
},
// правило для interface
{
"selector": "interface",
"format": [
"PascalCase"
],
"prefix": [
"I"
]
},
// правило для enum
{
"selector": "enum",
"format": [
"PascalCase"
],
"prefix": [
"E"
]
}
],
"prefer-arrow-callback": "error",
"prefer-destructuring": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"curly": "error",
"no-extra-semi": "error",
"react/self-closing-comp": "error",
"max-params": [
"error",
3
],
"no-shadow": "off",
"quotes": [
"error",
"single"
],
"spaced-comment": [
"error",
"always"
],
"semi": [
2,
"always"
],
"radix": "error",
"react/jsx-wrap-multilines": "warn",
"react/no-unused-prop-types": "warn",
"no-use-before-define": "off"
}
"react/jsx-wrap-multilines": "warn",
"react/no-unused-prop-types": "warn",
"no-use-before-define": "off"
}
}
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
TS(react-scripts-ts), rematch, router, bem-react/classname, sass<br>
<br>
yarn<br>
<br>
build setup: create-react-app react-typescript-scss-new --scripts-version=react-scripts-scss-ts<br>
23 changes: 7 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,21 @@
"homepage": "./",
"scripts": {
"start": "react-scripts-ts start",
"compile": "yarn compile:react && yarn compile:electron",
"compile:react": "GENERATE_SOURCEMAP=false react-scripts-ts build",
"compile:electron": "tsc ./src/electron/** --outDir ./build",
"start:electron": "yarn compile:react && yarn compile:electron && electron ./build/main.js",
"build:mac": "electron-builder --mac",
"build:win": "electron-builder --win --x64 --ia32",
"build:lin": "electron-builder --linux",
"start:electron": "yarn compile && electron ./build/main.js",
"build:mac": "yarn compile && electron-builder --mac",
"build:win": "yarn compile && electron-builder --win --x64 --ia32",
"build:lin": "yarn compile && electron-builder --linux",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject"
},
"dependencies": {
"@rematch/core": "^1.4.0",
"connected-react-router": "^6.8.0",
"electron-is-dev": "^1.2.0",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-redux": "^7.2.1",
"react-router": "^5.1.2",
"react-router-dom": "^5.1.2",
"react-scripts-scss-ts": "2.17.1",
"redux": "^4.0.1"
"react-scripts-scss-ts": "2.17.1"
},
"devDependencies": {
"@bem-react/classname": "^1.5.8",
Expand All @@ -36,15 +31,11 @@
"@types/node": "^14.10.1",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.11",
"@types/react-router-dom": "^5.1.6",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"electron": "^11.0.3",
"electron-builder": "22.2.0",
"electron-builder": "^22.9.1",
"eslint": "^7.14.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-airbnb-typescript": "^12.0.0",
"eslint-plugin-react": "^7.19.0",
"husky": "^4.3.0",
"lint-staged": "^10.5.1",
Expand Down
16 changes: 2 additions & 14 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
import React from 'react';
import { Route, Switch } from 'react-router';
import { ConnectedRouter } from 'connected-react-router';
import { Provider } from 'react-redux';
import { HomeContainer } from './containers';
import { store, browserHistory } from './redux/store';
import { Home } from './components';

const App = () => (
<Provider store={store}>
<ConnectedRouter history={browserHistory}>
<Switch>
<Route path="/" component={HomeContainer} />
</Switch>
</ConnectedRouter>
</Provider>
);
const App = () => <Home />;

export default App;
8 changes: 1 addition & 7 deletions src/components/Home/Home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
}

&-Image {
user-select: none;
background-size: contain;
background-repeat: no-repeat;

Expand All @@ -49,14 +48,12 @@
border: none;
border-radius: 4px;
cursor: pointer;
outline: none;
}

&-RangeSection {
margin-left: 20px;

&-Label {
user-select: none;
&-Title {
font-size: 12px;
}

Expand All @@ -78,7 +75,6 @@

&-Label {
cursor: pointer;
user-select: none;
font-size: 12px;
}
}
Expand All @@ -87,7 +83,6 @@
margin-left: 20px;

&-Title {
user-select: none;
text-align: center;
font-size: 12px;
margin-bottom: 4px;
Expand All @@ -101,7 +96,6 @@
cursor: pointer;
border: none;
border-radius: 3px;
outline: none;

&_active {
background-color: #0075ff;
Expand Down
Loading

0 comments on commit 16b2b8a

Please sign in to comment.