Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
'*.{ts,js,mjs}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{json,css,md}': ['prettier --write'],
};
4 changes: 4 additions & 0 deletions apps/backend/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
'*.{ts,js}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{json,css,md}': ['prettier --write'],
};
54 changes: 4 additions & 50 deletions apps/backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,52 +1,6 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import baseConfig from '../../eslint.config.mjs';
import { defineConfig, globalIgnores } from 'eslint/config';

export default [
js.configs.recommended,
const eslintConfig = defineConfig([...baseConfig, globalIgnores(['dist/**'])]);

{
ignores: ['dist', 'jest.config.ts'],
},

// TypeScript
{
files: ['**/*.ts'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
},
globals: {
...globals.node,
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/consistent-type-imports': 'error',
},
},

// Test files
{
files: ['**/*.spec.ts', '**/*.test.ts'],
languageOptions: {
globals: {
describe: 'readonly',
it: 'readonly',
expect: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
jest: 'readonly',
},
},
rules: {
'@typescript-eslint/consistent-type-imports': 'off',
},
},
];
export default eslintConfig;
4 changes: 4 additions & 0 deletions apps/frontend/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {

Check warning on line 1 in apps/frontend/.lintstagedrc.mjs

View workflow job for this annotation

GitHub Actions / frontend

Assign object to a variable before exporting as module default
'*.{ts,tsx,js,jsx,mjs}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{json,css,md}': ['prettier --write'],
};
9 changes: 1 addition & 8 deletions apps/frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,7 @@ const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
...pluginQuery.configs['flat/recommended'],
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
]),
globalIgnores(['.next/**', 'out/**', 'build/**', 'next-env.d.ts']),
]);

export default eslintConfig;
42 changes: 4 additions & 38 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
import js from '@eslint/js';
import eslint from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import importPlugin from 'eslint-plugin-import';
import unusedImports from 'eslint-plugin-unused-imports';
import prettier from 'eslint-plugin-prettier';
import globals from 'globals'; // Добавили для работы окружений
import prettier from 'eslint-config-prettier';

export default [
js.configs.recommended,
...tseslint.configs.recommended,

{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: ['./tsconfig.json'],
},
globals: {
...globals.es2021,
},
},
},
{
plugins: {
import: importPlugin,
'unused-imports': unusedImports,
prettier,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
},
},

{
ignores: ['node_modules', 'dist', '.next', 'build', '**/jest.config.ts', '**/*.config.ts'],
},
];
export default defineConfig(eslint.configs.recommended, tseslint.configs.recommended, prettier);
16 changes: 0 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,11 @@
"prisma:migrate:deploy:backend": "pnpm --filter @task-tracker/backend prisma:migrate:deploy",
"prepare": "husky"
},
"lint-staged": {
"*.{ts,tsx,js,mjs}": [
"eslint --fix --no-warn-ignored",
"prettier --write"
],
"*.{json,css,md}": [
"prettier --write"
]
},
"devDependencies": {
"@eslint/js": "9.39.2",
"@types/node": "^25.0.0",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-n": "^17.24.0",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-unused-imports": "^4.4.1",
"globals": "^17.3.0",
"husky": "^9.1.7",
"lint-staged": "^16.3.1",
"prettier": "^3.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/shared-types/.lintstagedrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
'*.{ts,js}': ['eslint --fix --no-warn-ignored', 'prettier --write'],
'*.{json,css,md}': ['prettier --write'],
};
6 changes: 6 additions & 0 deletions packages/shared-types/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import baseConfig from '../../eslint.config.mjs';
import { defineConfig, globalIgnores } from 'eslint/config';

const eslintConfig = defineConfig([...baseConfig, globalIgnores(['dist/**'])]);

export default eslintConfig;
6 changes: 6 additions & 0 deletions packages/shared-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
"description": "",
"main": "index.js",
"scripts": {
"build": "echo 'No build step'",
"typecheck": "tsc --noEmit",
"lint": "eslint",
"lint:fix": "eslint --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
Expand Down
Loading
Loading