@tidio/eslint-plugin-tidio
v7.0.2
Published
Tidio eslint ruleset
Readme
@tidio/eslint-plugin-tidio
This package provides custom ESLint configs for different uses.
v7.0.0 requires ESLint 9+ and uses the flat config format. For legacy
.eslintrcsupport, use v6.x.
Installation
yarn add -D @tidio/eslint-plugin-tidio eslintUsage
Create an eslint.config.js (or eslint.config.mjs) at the root of your project:
import tidio from "@tidio/eslint-plugin-tidio";
export default [
...tidio.configs.react,
...tidio.configs.translations,
...tidio.configs.jest,
// Other configs...
];All plugin dependencies are bundled — no additional ESLint plugins need to be installed separately. The @rushstack/eslint-patch workaround from v6.x is no longer needed.
Available configs
basic
...tidio.configs.basicExtends airbnb-base and TypeScript ESLint recommended rules. Includes import, prettier, and eslint-comments plugins along with custom Tidio rules. Suitable for any kind of repo (Node.js, non-React repos, etc).
This config is interchangeable with react — do not use both at the same time.
react
...tidio.configs.reactA superset of basic with additional React-only rules. Extends airbnb (instead of airbnb-base) and includes React Hooks rules with React Compiler support and JSX-a11y plugins. Suitable for repos that use React.
This config is interchangeable with basic — do not use both at the same time.
emotion
...tidio.configs.emotionRules for the CSS-in-JS Emotion package.
translations
...tidio.configs.translationsDisallows using strings as direct JSX children and requires always importing from lang as trans.
jest
...tidio.configs.jestJest recommended and style rules.
redux
...tidio.configs.reduxCustom Redux rules for action files.
storybook
...tidio.configs.storybookOverrides for Storybook stories files.
testingLibrary
...tidio.configs.testingLibraryTesting Library rules scoped to test files.
Migration from v6.x
v7.0.0 is a breaking change. Key differences:
- Flat config only — replace your
.eslintrc.jswitheslint.config.js(or.mjs/.cjs) - No
@rushstack/eslint-patch— flat config resolves plugins natively; remove this dependency - Spread syntax — configs are now arrays; use
...tidio.configs.reactinstead ofextends: ["plugin:@tidio/eslint-plugin-tidio/react"] - No parser config needed — TypeScript parser is configured automatically
