Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
506e273
Fixed pre-commit eslint configuration
olgenn Jun 3, 2025
3c50a5e
Fixed pre-commit eslint configuration
olgenn Jun 3, 2025
a3ede8d
Fixed pre-commit eslint configuration
olgenn Jun 3, 2025
95a4815
Fixed pre-commit eslint configuration
olgenn Jun 3, 2025
989c249
Merge branch 'master' into 2705_fix_pre-commit
olgenn Jun 3, 2025
f9b3b33
Fixed pre-commit eslint configuration
olgenn Jun 3, 2025
5621c47
Fixed pre-commit eslint configuration
olgenn Jun 4, 2025
ab496e5
Merge branch 'master' into 2705_fix_pre-commit
olgenn Jul 1, 2025
eba4ddb
Test commit
olgenn Jul 1, 2025
60b9b97
test
olgenn Jul 1, 2025
3bd58a3
test
olgenn Jul 1, 2025
b4cce7e
test
olgenn Jul 1, 2025
359f2fd
Test commit
olgenn Jul 1, 2025
0ada141
Test commit
olgenn Jul 1, 2025
ccd6d15
Test commit
olgenn Jul 1, 2025
2aeab47
Test commit
olgenn Jul 1, 2025
4a04a39
Test commit
olgenn Jul 1, 2025
6228f39
Test commit
olgenn Jul 1, 2025
fb1269b
Test commit
olgenn Jul 1, 2025
37df0b1
Test commit
olgenn Jul 1, 2025
8575878
Test commit
olgenn Jul 1, 2025
867093a
Test commit
olgenn Jul 1, 2025
01d5733
Test commit
olgenn Jul 1, 2025
62a2c27
Test commit
olgenn Jul 1, 2025
6f71cd0
Test commit
olgenn Jul 1, 2025
a576e92
Test commit
olgenn Jul 1, 2025
7931bd3
test
olgenn Jul 2, 2025
10a0bbf
test
olgenn Jul 2, 2025
e07674f
[Feature]: Update git hooks and package json #2705
olgenn Jul 2, 2025
372eb12
[Feature]: Update git hooks and package json #2705
olgenn Jul 2, 2025
86369ea
[Feature]: Update git hooks and package json #2705
olgenn Jul 3, 2025
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
19 changes: 0 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,3 @@ repos:
rev: v5.0.0
hooks:
- id: end-of-file-fixer

# TODO(oleg): fix ESLint warnings
# - repo: https://github.com/pre-commit/mirrors-eslint
# rev: 'v8.31.0'
# hooks:
# - id: eslint
# name: ESLint
# entry: eslint --fix --config frontend/.eslintrc --ignore-path frontend/.eslintignore
# language: node
# pass_filenames: false
# cwd: "frontend/"
# additional_dependencies:
# - eslint@8.31.0
# - eslint-config-prettier@8.10.0
# - eslint-plugin-i18n@2.4.0
# - eslint-plugin-prettier@4.2.1
# - eslint-plugin-simple-import-sort@10.0.0
# - '@typescript-eslint/eslint-plugin@5.48.1'
# - '@typescript-eslint/parser@5.48.1'
12 changes: 0 additions & 12 deletions frontend/.eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions frontend/.eslintrc

This file was deleted.

2 changes: 2 additions & 0 deletions frontend/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd frontend
npm run precommit
71 changes: 71 additions & 0 deletions frontend/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
const { defineConfig, globalIgnores } = require('eslint/config');
const i18N = require('eslint-plugin-i18n');
const simpleImportSort = require('eslint-plugin-simple-import-sort');
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
const tsParser = require('@typescript-eslint/parser');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

const BASE_CONFIG = {
extends: compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended'
),

plugins: {
'@typescript-eslint': typescriptEslint,
i18n: i18N,
'simple-import-sort': simpleImportSort,
},

languageOptions: {
parser: tsParser,
},

rules: {
'i18n/no-russian-character': 1,

'simple-import-sort/imports': [
'error',
{
groups: [
['^react', 'lodash', '^\\w', '^@?\\w'],
['^components', '^layouts'],
['^consts', '^hooks', '^libs', '^routes', '^services', '^types'],
['^App', '^pages'],
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
['./constants/.'],
['./definitions/.', './types'],
['^.+\\.svg', '^.+\\.png$', '^.+\\.jpg', '^.+\\.s?css$'],
],
},
],
},
};

module.exports = defineConfig([
globalIgnores([
'node_modules',
'build',
'server.js',
'src/locale',
'src/types',
'src/setupProxy.js',
'webpack/**/*',
'webpack/env.js',
'webpack/prod.js',
'public',
'staticServer.js',
'webpack.config.js',
]),
{ ...BASE_CONFIG },
]);
Loading
Loading