@smg-automotive/eslint-config

5.0.3 • Public • Published

SMG-Automotive ESLint Config

Usage

npm install @smg-automotive/eslint-config

Add a lint script to package.json:

  "lint": "eslint ."

Add a format script to package.json to be able to use auto fix:

  "format": "npm run lint -- --fix",

ESLint configuration

Create eslint.config.mjs in the root of the project:

import nextConfig from '@smg-automotive/eslint-config/next';

export default [
  ...nextConfig, 
  {
    // overwrite or add rules here
  }
];
  • For plain TypeScript project, use the default one: "@smg-automotive/eslint-config/default"
  • For React project, use "@smg-automotive/eslint-config/react"
  • For Next.js project, use "@smg-automotive/eslint-config/next"

EditorConfig configuration

Create/Update your .editorconfig by this content.

Prettier configuration

Create .prettierrc.mjs in the root of the project:

import prettierConfig from '@smg-automotive/eslint-config/prettier';

export default prettierConfig;

Readme

Keywords

none

Package Sidebar

Install

npm i @smg-automotive/eslint-config

Weekly Downloads

416

Version

5.0.3

License

MIT

Unpacked Size

19.5 kB

Total Files

54

Last publish

Collaborators

  • smg-automotive-engineering