0.2.0 • Published 4 months ago
@m-social/eslint-config-react v0.2.0
@m-social/eslint-config-react
ESLint config for React used at M-Social
Installation
Install the package via pnpm
(or use any other package manager):
pnpm i -D @m-social/eslint-config-react
Also don't forget to install eslint
peer dependency
Usage
Create an eslint.config.js
(or eslint.config.mjs
) file in your project root with the following content:
import reactConfig from "@m-social/eslint-config-react";
import { defineConfig } from "eslint/config";
export default defineConfig(reactConfig, {
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
});
If you're not using React Compiler, add noCompiler
config instead of default:
import reactConfig from "@m-social/eslint-config-react";
import { defineConfig } from "eslint/config";
export default defineConfig(reactConfig.noCompiler, {
languageOptions: {
parserOptions: {
tsconfigRootDir: import.meta.dirname,
},
},
});