Skip to content

Commit 11c436c

Browse files
authored
add no-undef rule to linting (#912)
1 parent e08924b commit 11c436c

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

bootstrap/src/component/Main.jsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* global DEFAULT_LOCALE */
2+
13
import { Children, StrictMode, useState, useCallback, useEffect } from "react";
24
import { Provider as ReduxProvider, useSelector } from "react-redux";
35

bootstrap/src/store/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* global BUILD_ID */
2+
13
import { applyMiddleware, compose, createStore, combineReducers } from "redux";
24
import { all, fork } from "redux-saga/effects";
35

cli/helpers/eslint.mjs

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import babelConfig from "../../babel/index.js";
66
export const config = {
77
env: {
88
es6: true,
9+
browser: true,
10+
node: true,
11+
jest: true,
912
},
1013
parser: "@babel/eslint-parser",
1114
parserOptions: {
@@ -20,6 +23,7 @@ export const config = {
2023
plugins: ["import"],
2124
rules: {
2225
"no-debugger": "error",
26+
"no-undef": "error",
2327
eqeqeq: ["error", "always"],
2428
"import/first": "error",
2529
"import/consistent-type-specifier-style": ["warn", "prefer-top-level"],

jest/setupTests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jest.mock("@linaria/core", () => ({
2222
css: jest.fn(() => ""),
2323
}));
2424

25-
globalThis.DEFAULT_LOCALE = "en-US";
25+
global.DEFAULT_LOCALE = "en-US";

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lastui/rocker",
3-
"version": "0.19.9",
3+
"version": "0.19.10",
44
"license": "Apache-2.0",
55
"author": "[email protected]",
66
"homepage": "https://github.com/lastui/rocker#readme",

0 commit comments

Comments
 (0)