Skip to content

Commit f2dbbdc

Browse files
authored
Merge pull request GreedyBear-Project#1340 from GreedyBear-Project/develop
3.5.0
2 parents 6dd6cdf + 78eae80 commit f2dbbdc

119 files changed

Lines changed: 3116 additions & 4832 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/configurations/node_linters/eslint/.eslintrc.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/configurations/node_linters/eslint/eslint-config-certego-react.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/configurations/node_linters/eslint/eslint-config-certego.json

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
import { defineConfig } from "eslint/config";
2+
import globals from "globals";
3+
import js from "@eslint/js";
4+
import react from "eslint-plugin-react";
5+
import reactHooks from "eslint-plugin-react-hooks";
6+
import importPlugin from "eslint-plugin-import";
7+
import jsxA11y from "eslint-plugin-jsx-a11y";
8+
9+
export default defineConfig([
10+
js.configs.recommended,
11+
{
12+
languageOptions: {
13+
globals: {
14+
...globals.browser,
15+
...globals.node,
16+
process: "readonly",
17+
global: "readonly",
18+
},
19+
20+
ecmaVersion: "latest",
21+
sourceType: "module",
22+
23+
parserOptions: {
24+
ecmaFeatures: {
25+
jsx: true,
26+
},
27+
},
28+
},
29+
30+
plugins: {
31+
react,
32+
"react-hooks": reactHooks,
33+
import: importPlugin,
34+
"jsx-a11y": jsxA11y,
35+
},
36+
37+
rules: {
38+
// --- Logic / quality rules (from certego configs) ---
39+
"prefer-destructuring": ["error", { object: true, array: false }],
40+
"guard-for-in": "off",
41+
"no-plusplus": "off",
42+
"no-param-reassign": "off",
43+
"no-console": "off",
44+
"no-unused-vars": "off",
45+
"no-underscore-dangle": ["error", { allowAfterThis: true }],
46+
"no-bitwise": "off",
47+
"no-nested-ternary": "off",
48+
"no-restricted-syntax": ["error", "WithStatement"],
49+
"no-multiple-empty-lines": ["error", { max: 2, maxBOF: 0, maxEOF: 0 }],
50+
"max-len": ["error", {
51+
code: 160,
52+
ignoreStrings: true,
53+
ignoreUrls: true,
54+
ignoreTemplateLiterals: true,
55+
ignoreRegExpLiterals: true,
56+
ignoreComments: true,
57+
}],
58+
59+
// --- React rules ---
60+
"react/jsx-props-no-spreading": "off",
61+
"react/jsx-key": "error",
62+
"react/forbid-prop-types": "off",
63+
"react/react-in-jsx-scope": "off",
64+
"react/prop-types": "off",
65+
"react/display-name": "off",
66+
67+
// --- React hooks ---
68+
"react-hooks/rules-of-hooks": "error",
69+
"react-hooks/exhaustive-deps": "warn",
70+
71+
// --- Import rules ---
72+
"import/prefer-default-export": "off",
73+
74+
// --- jsx-a11y rules (certego overrides) ---
75+
"jsx-a11y/control-has-associated-label": "off",
76+
"jsx-a11y/alt-text": "off",
77+
"jsx-a11y/click-events-have-key-events": "off",
78+
"jsx-a11y/no-static-element-interactions": "off",
79+
"jsx-a11y/interactive-supports-focus": "off",
80+
"jsx-a11y/anchor-has-content": "off",
81+
"jsx-a11y/no-noninteractive-element-interactions": "off",
82+
},
83+
},
84+
85+
// Test file globals
86+
{
87+
files: ["tests/**/*.{js,jsx}"],
88+
89+
languageOptions: {
90+
globals: {
91+
describe: "readonly",
92+
it: "readonly",
93+
expect: "readonly",
94+
beforeEach: "readonly",
95+
afterEach: "readonly",
96+
test: "readonly",
97+
afterAll: "readonly",
98+
beforeAll: "readonly",
99+
vi: "readonly",
100+
},
101+
},
102+
},
103+
{
104+
ignores: ["node_modules/**", "dist/**", "build/**", ".snapshots/**", "**/*.min.js"],
105+
},
106+
]);

0 commit comments

Comments
 (0)