1.0.1 • Published 2 years ago

@techmely/eslint-config-ts v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Eslint base config with typescript in practice

Basically, this base on air-bnb-style for typescript enterprise projects. It's good for DX and might be strict for consistency and professionalism.

Let's try this and it will never let you down! Hope you enjoy this with your team!

Install and Use

Package ManagerCommand
npmnpm i --save-dev @techmely/eslint-config-ts
npm i --save-dev @techmely/eslint-config-vue-ts
npm i --save-dev @techmely/eslint-config-react-ts
npm i --save-dev @techmely/eslint-config-svelte-ts
yarnyarn add -D @techmely/eslint-config-ts
yarn add -D @techmely/eslint-config-vue-ts
yarn add -D @techmely/eslint-config-react-ts
yarn add -D @techmely/eslint-config-svelte-ts
pnpmpnpm add -D @techmely/eslint-config-ts
pnpm add -D @techmely/eslint-config-vue-ts
pnpm add -D @techmely/eslint-config-react-ts
pnpm add -D @techmely/eslint-config-svelte-ts

In your .eslintrc.js. Just copy and paste this

module.exports = {
  extends: ['@techmely/eslint-config-ts'],
  parserOptions: {
    tsconfigRootDir: __dirname,
    parser: '@typescript-eslint/parser',
    // Depends on your project use whatever tsconfig.json file
    project: ['tsconfig.json'],
    ecmaFeatures: {
      modules: true,
    },
  },
};

For .eslintrc json file

{
  "extends": ["@techmely/eslint-config-ts"],
  "parserOptions": {
    "tsconfigRootDir": "__dirname",
    "parser": "@typescript-eslint/parser",
    "project": ["tsconfig.json"],
    "ecmaFeatures": {
      "modules": true
    }
  }
}

Note: You can change any rules which you want