Skip to content

Commit

Permalink
fix: merge dev and use networkSelectorModel
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut committed Aug 9, 2024
2 parents a0b9513 + e70993a commit 0d0f90f
Show file tree
Hide file tree
Showing 413 changed files with 2,592 additions and 2,076 deletions.
32 changes: 19 additions & 13 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
const fs = require('fs');
const path = require('path');

const prettierConfig = fs.readFileSync('./.prettierrc', 'utf8');
const prettierOptions = JSON.parse(prettierConfig);
const localesPath = './src/renderer/shared/api/translation/locales';
const defaultLocalePath = path.join(localesPath, 'en.json');

Expand All @@ -23,9 +20,9 @@ module.exports = {
'plugin:import-x/recommended',
'plugin:import-x/errors',
'plugin:import-x/warnings',
'prettier',
'plugin:prettier/recommended',
],
plugins: ['prettier', 'import-x'],
plugins: ['prettier', 'import-x', 'unused-imports'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2022,
Expand All @@ -35,6 +32,7 @@ module.exports = {
'import-x/no-unresolved': 'off',
'import-x/named': 'off',
'import-x/namespace': 'off',
'import-x/no-named-as-default': 'error',
'import-x/consistent-type-specifier-style': ['error', 'prefer-inline'],
'import-x/order': [
'error',
Expand All @@ -50,9 +48,21 @@ module.exports = {
distinctGroup: false,
},
],

'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],

'no-irregular-whitespace': 'off',
'newline-before-return': 'error',
'prettier/prettier': ['error', prettierOptions],
'prettier/prettier': 'error',
},
overrides: [
{
Expand Down Expand Up @@ -115,8 +125,7 @@ module.exports = {
JSX: 'readonly',
},
rules: {
// TODO make error
'react/jsx-no-useless-fragment': 'warn',
'react/jsx-no-useless-fragment': 'error',
'react/jsx-no-constructed-context-values': 'error',
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'ignore' }],
'react/no-array-index-key': 'warn',
Expand All @@ -136,7 +145,7 @@ module.exports = {
},
{
files: ['*.ts', '*.tsx'],
plugins: ['@typescript-eslint', 'effector', 'unused-imports', 'boundaries'],
plugins: ['@typescript-eslint', 'effector', 'boundaries'],
extends: [
'plugin:import-x/typescript',
'plugin:effector/recommended',
Expand All @@ -154,7 +163,6 @@ module.exports = {
},
rules: {
// Imports
'unused-imports/no-unused-imports': 'error',
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
Expand All @@ -165,13 +173,11 @@ module.exports = {
'import-x/default': 'off',
'import-x/no-useless-path-segments': 'error',

// TODO enable noUnusedParameters in tsconfig.json and turn of this rule afterwards.
'@typescript-eslint/no-unused-vars': 'warn',

// Validated by typescript
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unnecessary-type-constraint': 'error',

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install docker compose
run: sudo apt-get install -y docker-compose
- name: Build compose
run: docker-compose up -d
- name: ⚙️ Install dependencies
Expand Down
9 changes: 8 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
"useTabs": false,
"trailingComma": "all",
"arrowParens": "always",
"endOfLine": "lf"
"endOfLine": "lf",
"plugins": ["prettier-plugin-jsdoc", "prettier-plugin-css-order", "prettier-plugin-tailwindcss"],
"tailwindConfig": "./tailwind.config.ts",
"tailwindFunctions": ["cnTw"],
"jsdocCommentLineStrategy": "keep",
"jsdocPreferCodeFences": true,
"jsdocSeparateTagGroups": true,
"jsdocPrintWidth": 80
}
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
"test:system-generator": "npx playwright codegen --ignore-https-errors https://localhost:3000",
"test:system:ui-mod": "npx playwright test --ui",
"types": "tsc -p tsconfig.json --noEmit",
"lint": "pnpm lint:generic ./src",
"lint:generic": "eslint --cache --cache-location ./node_modules/.cache/eslint",
"lint": "pnpm lint:generic ./src",
"lint:tests": "pnpm lint:generic ./tests",
"lint:webpack": "pnpm lint:generic ./webpack",
"lint:fix": "pnpm lint --fix",
"lint:i18n-locale": "eslint src/renderer/shared/api/translation/locales/ --ext=json --plugin i18n-json",
"lint:i18n-fix": "pnpm lint:i18n-locale --fix",
Expand Down Expand Up @@ -166,9 +168,9 @@
"@types/react-dom": "^18.0.5",
"@types/react-lottie": "^1.2.6",
"@types/request": "^2.48.8",
"@typescript-eslint/eslint-plugin": "7.16.1",
"@typescript-eslint/parser": "7.16.1",
"autoprefixer": "^10.4.13",
"@typescript-eslint/eslint-plugin": "8.0.1",
"@typescript-eslint/parser": "8.0.1",
"autoprefixer": "10.4.20",
"axios": "^0.28.0",
"camelcase": "6.3.0",
"child_process": "^1.0.2",
Expand All @@ -182,18 +184,17 @@
"electron-devtools-installer": "^3.2.0",
"electron-react-devtools": "^0.5.3",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-boundaries": "4.2.2",
"eslint-plugin-effector": "0.14.0",
"eslint-plugin-i18n-json": "4.0.0",
"eslint-plugin-i18next": "6.0.9",
"eslint-plugin-import-x": "3.0.1",
"eslint-plugin-import-x": "3.1.0",
"eslint-plugin-jest-dom": "5.4.0",
"eslint-plugin-json": "3.1.0",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-react": "7.34.4",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-unused-imports": "3.2.0",
"fake-indexeddb": "^4.0.0",
"file-loader": "^6.2.0",
Expand All @@ -213,6 +214,9 @@
"postcss": "^8.4.31",
"postcss-loader": "^7.3.3",
"prettier": "3.3.3",
"prettier-plugin-css-order": "2.1.2",
"prettier-plugin-jsdoc": "1.3.0",
"prettier-plugin-tailwindcss": "0.6.5",
"pretty-quick": "4.0.0",
"react-refresh": "^0.14.0",
"regenerator-runtime": "^0.13.9",
Expand Down
Loading

0 comments on commit 0d0f90f

Please sign in to comment.