Skip to content

Commit 5b1b722

Browse files
committed
Add @__PURE__ annotations for @reduxjs/eslint-config
1 parent 4da7391 commit 5b1b722

File tree

1 file changed

+70
-69
lines changed

1 file changed

+70
-69
lines changed

packages/configs/eslint/src/index.mts

Lines changed: 70 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -96,80 +96,81 @@ export const vitestGlobals: VitestGlobals = {
9696
* @since 0.0.1
9797
* @public
9898
*/
99-
export const reduxESLintConfig: TSESLint.FlatConfig.Config[] = config(
100-
// `ignores` must be first.
101-
// config with just `ignores` is the replacement for `.eslintignore`
102-
{ name: 'ignores', ignores: ['**/dist/'] },
103-
{ name: 'javascript', ...js.configs.recommended },
104-
...configs.recommended,
105-
...configs.stylistic,
106-
{ name: 'prettier-config', ...prettierConfig },
107-
{
108-
name: 'main',
109-
languageOptions: {
110-
globals: {
111-
...vitestGlobals,
112-
},
113-
parser,
114-
parserOptions: {
115-
projectService: {
116-
allowDefaultProject: ['.size-limit.cjs'],
117-
defaultProject: './tsconfig.json',
99+
export const reduxESLintConfig: TSESLint.FlatConfig.Config[] =
100+
/* @__PURE__ */ config(
101+
// `ignores` must be first.
102+
// config with just `ignores` is the replacement for `.eslintignore`
103+
{ name: 'ignores', ignores: ['**/dist/'] },
104+
{ name: 'javascript', ...js.configs.recommended },
105+
...configs.recommended,
106+
...configs.stylistic,
107+
{ name: 'prettier-config', ...prettierConfig },
108+
{
109+
name: 'main',
110+
languageOptions: {
111+
globals: {
112+
...vitestGlobals,
113+
},
114+
parser,
115+
parserOptions: {
116+
projectService: {
117+
allowDefaultProject: ['.size-limit.cjs'],
118+
defaultProject: './tsconfig.json',
119+
},
120+
ecmaVersion: 'latest',
118121
},
119-
ecmaVersion: 'latest',
120122
},
121-
},
122-
rules: {
123-
'no-undef': [0],
124-
'@typescript-eslint/consistent-type-imports': [
125-
2,
126-
{ fixStyle: 'separate-type-imports', disallowTypeAnnotations: false },
127-
],
128-
'@typescript-eslint/consistent-type-exports': [2],
129-
'@typescript-eslint/no-unused-vars': [0],
130-
'@typescript-eslint/no-explicit-any': [0],
131-
'@typescript-eslint/no-empty-object-type': [
132-
2,
133-
{ allowInterfaces: 'with-single-extends' },
134-
],
135-
'@typescript-eslint/no-restricted-types': [
136-
2,
137-
{
138-
types: {
139-
'{}': {
140-
suggest: ['AnyNonNullishValue', 'EmptyObject', 'AnyObject'],
123+
rules: {
124+
'no-undef': [0],
125+
'@typescript-eslint/consistent-type-imports': [
126+
2,
127+
{ fixStyle: 'separate-type-imports', disallowTypeAnnotations: false },
128+
],
129+
'@typescript-eslint/consistent-type-exports': [2],
130+
'@typescript-eslint/no-unused-vars': [0],
131+
'@typescript-eslint/no-explicit-any': [0],
132+
'@typescript-eslint/no-empty-object-type': [
133+
2,
134+
{ allowInterfaces: 'with-single-extends' },
135+
],
136+
'@typescript-eslint/no-restricted-types': [
137+
2,
138+
{
139+
types: {
140+
'{}': {
141+
suggest: ['AnyNonNullishValue', 'EmptyObject', 'AnyObject'],
142+
},
141143
},
142144
},
143-
},
144-
],
145-
'@typescript-eslint/no-namespace': [
146-
2,
147-
{ allowDeclarations: true, allowDefinitionFiles: true },
148-
],
149-
'@typescript-eslint/ban-ts-comment': [0],
150-
'@typescript-eslint/consistent-type-definitions': [0, 'type'],
151-
'sort-imports': [
152-
2,
153-
{
154-
ignoreCase: false,
155-
ignoreDeclarationSort: true,
156-
ignoreMemberSort: false,
157-
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
158-
allowSeparatedGroups: true,
159-
},
160-
],
145+
],
146+
'@typescript-eslint/no-namespace': [
147+
2,
148+
{ allowDeclarations: true, allowDefinitionFiles: true },
149+
],
150+
'@typescript-eslint/ban-ts-comment': [0],
151+
'@typescript-eslint/consistent-type-definitions': [0, 'type'],
152+
'sort-imports': [
153+
2,
154+
{
155+
ignoreCase: false,
156+
ignoreDeclarationSort: true,
157+
ignoreMemberSort: false,
158+
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
159+
allowSeparatedGroups: true,
160+
},
161+
],
162+
},
163+
linterOptions: { reportUnusedDisableDirectives: 2 },
161164
},
162-
linterOptions: { reportUnusedDisableDirectives: 2 },
163-
},
164-
{
165-
name: 'commonjs',
166-
files: ['**/*.c[jt]s'],
167-
languageOptions: { sourceType: 'commonjs' },
168-
rules: {
169-
'@typescript-eslint/no-require-imports': [0],
165+
{
166+
name: 'commonjs',
167+
files: ['**/*.c[jt]s'],
168+
languageOptions: { sourceType: 'commonjs' },
169+
rules: {
170+
'@typescript-eslint/no-require-imports': [0],
171+
},
170172
},
171-
},
172-
)
173+
)
173174

174175
/**
175176
* A function that returns {@linkcode reduxESLintConfig}
@@ -258,4 +259,4 @@ export const reduxESLintConfig: TSESLint.FlatConfig.Config[] = config(
258259
export const createESLintConfig = (
259260
additionalOverrides: ConfigWithExtends[] = [],
260261
): TSESLint.FlatConfig.ConfigFile =>
261-
config(...reduxESLintConfig, ...additionalOverrides)
262+
/* @__PURE__ */ config(...reduxESLintConfig, ...additionalOverrides)

0 commit comments

Comments
 (0)