Skip to content

Commit 7926852

Browse files
authoredFeb 4, 2025
fix eslint
1 parent c93552f commit 7926852

File tree

4 files changed

+196
-185
lines changed

4 files changed

+196
-185
lines changed
 

‎bootstrap/src/saga/localisation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function downloadBatchLocales(names, language) {
2727
const promise = downloadAsset(uri)
2828
.then((data) => data.json())
2929
.then((data) => {
30-
for (const _prop in data) {
30+
for (const prop in data) {
3131
return { module: name, data };
3232
}
3333
return null;

‎cli/helpers/eslint.mjs

+15-20
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import { config as prettierConfig } from "./prettier.mjs";
1515
export const config = [
1616
{
1717
languageOptions: {
18-
sourceType: "module",
1918
globals: {
2019
...globals.browser,
2120
...globals.node,
22-
...globals.jest,
2321
BUILD_ID: true,
2422
},
23+
ecmaVersion: "latest",
24+
sourceType: "module",
2525
},
2626
plugins: {
2727
import: pluginImport,
@@ -34,6 +34,7 @@ export const config = [
3434
parserOptions: {
3535
ecmaFeatures: {
3636
globalReturn: false,
37+
jsx: true,
3738
},
3839
requireConfigFile: false,
3940
babelOptions: babelConfig.env.development,
@@ -42,6 +43,12 @@ export const config = [
4243
plugins: {
4344
react: pluginReact,
4445
},
46+
settings: {
47+
react: {
48+
pragma: "React",
49+
version: "18.3.1",
50+
},
51+
},
4552
rules: {
4653
"no-debugger": "error",
4754
"no-undef": "error",
@@ -52,6 +59,7 @@ export const config = [
5259
varsIgnorePattern: "^_",
5360
argsIgnorePattern: "^_",
5461
caughtErrorsIgnorePattern: "^_",
62+
reportUsedIgnorePattern: true,
5563
ignoreRestSiblings: true,
5664
},
5765
],
@@ -89,30 +97,17 @@ export const config = [
8997
distinctGroup: false,
9098
},
9199
],
100+
"react/jsx-uses-react": "error",
101+
"react/jsx-uses-vars": "error",
92102
},
93103
},
94104
{
95-
files: ["**/*.{jsx,tsx}"],
105+
files: ["**/*.test.*", "**/__tests__/*", "**/setupTests.*"],
96106
languageOptions: {
97-
parserOptions: {
98-
ecmaFeatures: {
99-
jsx: true,
100-
},
101-
},
102-
},
103-
settings: {
104-
react: {
105-
pragma: "React",
106-
version: "18.3.1",
107+
globals: {
108+
...globals.jest,
107109
},
108110
},
109-
rules: {
110-
"react/jsx-uses-react": "error",
111-
"react/jsx-uses-vars": "error",
112-
},
113-
},
114-
{
115-
files: ["**/*.test.*", "**/__tests__/*"],
116111
settings: {
117112
jest: {
118113
version: "29.7.0",

0 commit comments

Comments
 (0)