1.9.1 • Published 7 months ago

@okatechnology/eslint-config v1.9.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 months ago

ESLint / Prettier / TypeScript Config

Install

npm install --save-dev @okatechnology/eslint-config

Usage

Config ESLint

create eslint.config.js at your project root.

Project TypeExported Config NameConfig File Path
ReacteslintConfigReacteslintConfig/eslint.config.react.js
React NativeeslintConfigReactNativeeslintConfig/eslint.config.reactNative.js
ExpoeslintConfigReactNativeExpoeslintConfig/eslint.config.reactNativeExpo.js
Next.jseslintConfigReactNexteslintConfig/eslint.config.reactNext.js
Node.jseslintConfigNodeeslintConfig/eslint.config.node.js

If you want to config eslint for React project, write the following.

import { eslintConfigReact } from '@okatechnology/eslint-config/eslintConfig/eslint.config.react.js';

export default [
  ...eslintConfigReact,
  /* your config */
];

Config Prettier

create .prettierrc.js at your project root and write the following.

module.exports = {
  ...require('@okatechnology/eslint-config/prettierrc/prettierrc'),
}

Config TypeScript

create tsconfig.json at your project root.

Project TypeConfig File Path
React / Next.jstsconfig/tsconfig.react.json
React Native / Expotsconfig/tsconfig.react-native.json
Node.jstsconfig/tsconfig.node.json

If you want to config tsconfig for React project, write the following.

{
  "extends": "@okatechnology/eslint-config/tsconfig/tsconfig.react.json",
  /* your config */
}