Skip to content

Commit 0bc38e9

Browse files
authored
Pull request update/250110
fe2bae3 OS-7823. Update eslint to v9 effaa52 OS-3010. Set custom background color for autocompleted authorization fields 1d94690 OS-8096. Enhance MlTaskExecutorsContainer and MlExecutorsContainer containers to include organizationId in data fetching
2 parents 83b62d8 + fe2bae3 commit 0bc38e9

29 files changed

+7923
-11403
lines changed

jira_ui/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ WORKDIR /usr/src/app/ui
1212
COPY jira_ui/ui/package*.json ./
1313
RUN npm ci --ignore-scripts --legacy-peer-deps
1414
COPY jira_ui/ui/ ./
15-
# .eslintrc.json on build step will produce an error, but it is still needed on testing
16-
RUN mv .eslintrc.json .disabled.eslintrc.json
15+
RUN mv eslint.config.mjs eslint.config.mjs
1716
RUN npm run build && rm -rf node_modules
1817

1918
# -------- Server --------

jira_ui/Dockerfile_tests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ FROM jira_ui:${BUILDTAG}
55
WORKDIR "/usr/src/app/ui"
66
USER root
77

8-
RUN mv .disabled.eslintrc.json .eslintrc.json
98
RUN npm ci --legacy-peer-deps --ignore-scripts -D

jira_ui/ui/.eslintignore

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

jira_ui/ui/.eslintrc.json

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

jira_ui/ui/eslint.config.mjs

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
import babelParser from "@babel/eslint-parser";
2+
import js from "@eslint/js";
3+
import eslintConfigPrettier from "eslint-config-prettier";
4+
import eslintPluginImport from "eslint-plugin-import";
5+
import eslintPluginPrettier from "eslint-plugin-prettier";
6+
import reactPlugin from "eslint-plugin-react";
7+
import reactHooksPlugin from "eslint-plugin-react-hooks";
8+
import unusedImportsPlugin from "eslint-plugin-unused-imports";
9+
import globals from "globals";
10+
11+
const extensions = ["js", "jsx"];
12+
13+
export default [
14+
{
15+
files: [`src/**/*.{${extensions.join(",")}}`],
16+
plugins: {
17+
react: reactPlugin,
18+
"react-hooks": reactHooksPlugin,
19+
import: eslintPluginImport,
20+
"unused-imports": unusedImportsPlugin,
21+
prettier: eslintPluginPrettier
22+
},
23+
languageOptions: {
24+
parser: babelParser,
25+
parserOptions: {
26+
requireConfigFile: false,
27+
babelOptions: {
28+
babelrc: false,
29+
configFile: false,
30+
presets: ["@babel/preset-react"]
31+
}
32+
},
33+
ecmaVersion: "latest",
34+
sourceType: "module",
35+
globals: {
36+
...globals.browser,
37+
...globals.builtin
38+
}
39+
},
40+
settings: {
41+
"import/resolver": {
42+
node: {
43+
extensions: extensions.map((extension) => `.${extension}`),
44+
moduleDirectory: ["node_modules", "src/"]
45+
}
46+
},
47+
react: {
48+
version: "detect"
49+
}
50+
},
51+
rules: {
52+
...js.configs.recommended.rules,
53+
...reactPlugin.configs.flat.recommended.rules,
54+
...reactHooksPlugin.configs.recommended.rules,
55+
"class-methods-use-this": "error",
56+
"no-param-reassign": [
57+
"error",
58+
{
59+
props: true,
60+
ignorePropertyModificationsFor: [
61+
"acc", // for reduce accumulators
62+
"accumulator", // for reduce accumulators
63+
"ctx" // for canvas context
64+
]
65+
}
66+
],
67+
"no-underscore-dangle": [
68+
"error",
69+
{
70+
allowAfterThis: true,
71+
allowAfterThisConstructor: true
72+
}
73+
],
74+
"jsx-quotes": "warn",
75+
"no-multi-spaces": "warn",
76+
"no-const-assign": "warn",
77+
"constructor-super": "warn",
78+
"valid-typeof": "warn",
79+
"no-extra-semi": "warn",
80+
"comma-dangle": [
81+
"warn",
82+
{
83+
arrays: "never",
84+
objects: "never"
85+
}
86+
],
87+
"max-params": ["warn", 3],
88+
"no-this-before-super": "warn",
89+
"no-undef": "warn",
90+
"no-unreachable": "warn",
91+
"no-bitwise": "off",
92+
"no-console": "off",
93+
"default-param-last": "off",
94+
95+
"unused-imports/no-unused-imports": "warn",
96+
97+
"react/jsx-uses-vars": "error",
98+
"react/no-typos": "warn",
99+
"react/jsx-tag-spacing": "warn",
100+
"react/jsx-boolean-value": "warn",
101+
"react/no-array-index-key": "warn",
102+
"react/jsx-wrap-multilines": "warn",
103+
"react/self-closing-comp": "warn",
104+
"react/jsx-closing-bracket-location": "warn",
105+
"react/require-render-return": "warn",
106+
"react/prefer-es6-class": "warn",
107+
"react/prefer-stateless-function": "warn",
108+
"react/jsx-uses-react": "warn",
109+
"react/no-multi-comp": "off",
110+
"react/display-name": "off",
111+
"react/react-in-jsx-scope": "off",
112+
"react/prop-types": "off",
113+
114+
"import/order": [
115+
"warn",
116+
{
117+
groups: ["builtin", "external", "internal", "parent", "sibling", "index"],
118+
119+
pathGroups: [
120+
{
121+
pattern: "react",
122+
group: "builtin",
123+
position: "before"
124+
}
125+
],
126+
127+
pathGroupsExcludedImportTypes: ["react"],
128+
129+
alphabetize: {
130+
order: "asc",
131+
caseInsensitive: true
132+
}
133+
}
134+
],
135+
"import/no-extraneous-dependencies": "off",
136+
"import/prefer-default-export": "off",
137+
138+
"prettier/prettier": "error",
139+
...eslintConfigPrettier.rules
140+
}
141+
}
142+
];

0 commit comments

Comments
 (0)