@rnzeus/themis
v0.1.2
Published
Shared ESLint, Prettier, TypeScript and optional Babel configs used across RNZeus projects
Maintainers
Readme
@rnzeus/themis
Shared ESLint, Prettier, TypeScript and optional Babel configuration presets used across RNZeus projects.
The goal of Themis is to provide a clean, predictable base configuration that can be reused across multiple projects, while keeping project-specific structure decisions opt-in.
Installation
npm install -D @rnzeus/themisESLint
Base config
// eslint.config.js
import base from "@rnzeus/themis/eslint";
export default [...base];FSD / team preset
// eslint.config.js
import base from "@rnzeus/themis/eslint";
import fsd from "@rnzeus/themis/eslint/fsd";
export default [...base, ...fsd];Prettier
// prettier.config.cjs
module.exports = require("@rnzeus/themis/prettier");TypeScript
Base
{
"extends": "@rnzeus/themis/tsconfig/base"
}React Native
{
"extends": "@rnzeus/themis/tsconfig/react-native"
}FSD / team preset
{
"extends": "@rnzeus/themis/tsconfig/rnfsd"
}⚠️ Important: baseUrl and paths
The presets provided by Themis intentionally do NOT define baseUrl.
This is a conscious design decision:
baseUrlinside a shared preset breaks resolution when used viaextends- the value becomes relative to
node_modules/@rnzeus/themis, not your project - this causes subtle and hard-to-debug TypeScript resolution issues
What this means for FSD presets
If you use rnfsd.json (or any preset that defines paths):
👉 you must define baseUrl in your project tsconfig
Example:
{
"extends": "@rnzeus/themis/tsconfig/rnfsd.json",
"compilerOptions": {
"baseUrl": "./src"
}
}Babel (optional)
Babel configuration is optional and provided as opt-in presets. It is useful mainly for React Native projects to keep module aliases in sync with FSD structure.
Base Babel config
// babel.config.js
const base = require("@rnzeus/themis/babel/base");
module.exports = {
...base,
};FSD module resolver
// babel.config.js
const base = require("@rnzeus/themis/babel/base");
const rnfsd = require("@rnzeus/themis/babel/rnfsd-module-resolver");
module.exports = {
...base,
plugins: [...(base.plugins ?? []), ["module-resolver", rnfsd]],
};Why aliases are defined in Babel
TypeScript paths are used only for type-checking and editor support.
They do not rewrite import paths in emitted JavaScript.
Babel (together with Metro) must also understand aliases, otherwise React Native will fail to resolve modules at runtime.
Peer dependencies
@rnzeus/themis is a configuration-only package.
It expects ESLint, Prettier and TypeScript to be installed in your project.
Refer to peerDependencies in package.json for the full list.
License
MIT
