Skip to content

Commit 6d5e701

Browse files
committed
fix: изменение eslint.config.js и конфигураций QLty для соответствия требованиям тестов
1 parent e8fe7f0 commit 6d5e701

31 files changed

+722
-348
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
build/

.qlty/qlty.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ name = "checkov"
7272

7373
[[plugin]]
7474
name = "eslint"
75-
version = "9.26.0"
75+
command = "npx eslint --config /home/daria/frontend-project-11/eslint.config.js ."
7676
package_file = "package.json"
7777
package_filters = ["eslint"]
7878

@@ -84,9 +84,6 @@ config = { "MD013" = false }
8484
[[plugin]]
8585
name = "osv-scanner"
8686

87-
[[plugin]]
88-
name = "prettier"
89-
9087
[[plugin]]
9188
name = "ripgrep"
9289
mode = "comment"

eslint.config.js

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
import js from "@eslint/js";
2-
import globals from "globals";
3-
import { defineConfig } from "eslint/config";
1+
import js from '@eslint/js';
2+
import globals from 'globals';
3+
import stylistic from '@stylistic/eslint-plugin';
44

5-
export default defineConfig([
5+
export default [
66
{
7-
ignores: ["node_modules/**", "dist/**", "src/dist/**", "__fixtures__/**"],
8-
},
9-
{
10-
files: ["**/*.{js,mjs,cjs}"],
11-
plugins: { js },
7+
ignores: ['node_modules/**', 'dist/**', 'build/**', 'coverage/**'],
128
languageOptions: {
13-
sourceType: "module",
149
globals: {
1510
...globals.browser,
16-
},
11+
...globals.node
12+
}
1713
},
18-
extends: ["js/recommended"],
19-
},
20-
{
21-
files: ["vite.config.js"],
22-
languageOptions: {
23-
sourceType: "module",
24-
globals: {
25-
__dirname: "readonly",
26-
},
14+
plugins: {
15+
'@stylistic': stylistic
2716
},
28-
},
29-
]);
17+
rules: {
18+
...js.configs.recommended.rules,
19+
...stylistic.configs.recommended.rules,
20+
'@stylistic/indent': ['error', 2],
21+
'@stylistic/quotes': ['error', 'single'],
22+
'@stylistic/semi': ['error', 'always'],
23+
'@stylistic/comma-dangle': ['error', 'never']
24+
}
25+
}
26+
];

0 commit comments

Comments
 (0)