@hypeapp/eslint-config
v1.0.1
Published
Hype's ESLint and Prettier presets: Google TypeScript Style via gts.
Downloads
270
Readme
@hypeapp/eslint-config
ESLint and Prettier presets for Hype repos: Google TypeScript Style, via Google's own gts, with the few rules the guide states that gts leaves off.
Presets
| Import | For |
| --- | --- |
| @hypeapp/eslint-config | Any TypeScript or JavaScript (the base the others build on) |
| @hypeapp/eslint-config/node | Node services and workers |
| @hypeapp/eslint-config/react | Vite apps and React libraries |
| @hypeapp/eslint-config/next | Next.js apps; needs eslint-config-next 16 or later |
| @hypeapp/eslint-config/expo | Expo apps; needs eslint-config-expo |
| @hypeapp/eslint-config/prettier | The Prettier options, for editors |
Each preset is an array of flat-config objects:
import {defineConfig} from 'eslint/config';
import {node} from '@hypeapp/eslint-config/node';
export default defineConfig([...node]);What it adds on top of gts
@typescript-eslint/no-explicit-any,ban-ts-comment,consistent-type-definitions(interface) andconsistent-type-importsas errors.eqeqeqallows== nulland!= null, which the guide permits to match both null and undefined and gts's plaineqeqeqrejects.- Type-aware rules use typescript-eslint's project service, so files in any tsconfig project lint without extra parser config.
- Formatting options are passed to ESLint directly, so a repo's own Prettier file can't drift from Google style.
- Next.js and Expo presets allow default exports only in the files those frameworks load that way.
gts 7.0.0's published eslint.config.js requires a path missing from the
package, so the presets import its built config directly. Revisit when that's
fixed upstream. gts 7 also pins ESLint 9, which is past end of support; move to
ESLint 10 when gts supports it.
