Releases: seek-oss/eslint-config-seek
v15.0.4
v15.0.3
v15.0.2
v15.0.1
v15.0.0
Major Changes
-
Configure explicit exports for all entrypoints (#248)
This package now configures explicit exports in its
package.jsonfile for all entrypoints. Consumers previously importing fromeslint-config-seek/base.jsoreslint-config-seek/extensions.jsshould update their import statements to use the new explicit entrypoints:- import 'eslint-config-seek/base.js'; + import 'eslint-config-seek/base'; - import 'eslint-config-seek/extensions.js'; + import 'eslint-config-seek/extensions';
-
Upgrade
@typescript-eslint/naming-conventionrule fromwarntoerror(#248)This rule enforces using PascalCase for
typeLikedeclarations excluding enums (allowing leading underscores). -
Update
eslintpeer depenedency to^9.22.0(#248) -
Remove
no-unused-varsrule exception forReactnamespace import (#248)The
no-unused-varsrule exception for theReactnamespace import has been removed. This means that if you import the entire React namespace but do not use it in your code, ESLint will now flag it as an unused variable.This exception was originally added to accommodate older versions of React (prior to v17) where JSX syntax required the React namespace to be in scope. However, with the introduction of the new JSX Transform in React 17, this was no longer necessary. A temporary exception was made to ease the transition, but it has now been removed to encourage cleaner code.
MIGRATION GUIDE:
-import React from 'react'; -import React, { useState } from 'react'; +import { useState } from 'react';
Minor Changes
-
Expose 2 Vitest-specific entrypoints: (#248)
eslint-config-seek/vitest: for general Vitest projectseslint-config-seek/vitest/base: for Vitest projects not using React
These are equivalent to the existing
eslint-config-seekandeslint-config-seek/baseentrypoints, but with Vitest-specific rules and settings applied instead of Jest-specific ones.
v14.7.0
Minor Changes
-
Add types for root,
/baseand/extensionsentrypoints (#247) -
Add
eslint-plugin-import-zodto re-write Zod imports (#224)This plugin adds rules for rewriting Zod imports such as
import { z } from "zod";toimport * as z from 'zod';in order to reduce bundle sizes when using a bundler.
Patch Changes
- Publish with provenance (#241)
v14.6.0
Minor Changes
-
Error on custom getters and setters (#227)
The
no-restricted-syntaxrule is now preconfigured to ban custom getters and setters. Engineers typically expect property access to be a safer operation than method or function invocation. Throwing an error from a getter can cause confusion and unhandled promise rejections, which can lead to a crash on the server side if not appropriately configured. See the PR for more information.const obj = { - get prop() { + prop() { throw new Error('Badness!'); }, };A custom getter may be occasionally prescribed as the recommended approach to achieve desired behaviour. For example, this syntax can define a recursive object in Zod. In these rare scenarios, add an inline ignore and ensure that you do not throw an error within the getter.
import * as z from 'zod'; const Category = z.object({ name: z.string(), // eslint-disable-next-line no-restricted-syntax -- Zod recursive type get subcategories() { return z.array(Category); }, });
v14.5.3
v14.5.2
v14.5.1
Patch Changes
- Disable
@typescript-eslint/naming-conventionrule for enums. (#212)