@droplit/eslint-config

0.1.3 • Public • Published

About

ESLint settings for JavaScript, Typescript and Vue projects.

eslint-plugin-vue and @typescript-eslint/eslint-plugin are optional and not required. If either or both are installed, then Vue/Typescript rules will be applied accordingly.

Setup

Add @droplit/eslint-config to your dev dependencies:

{
    "devDependencies": {
        "@droplit/eslint-config": "^0.0.2",
    }
}

Add required peer dependencies:

npm install --save-dev eslint
# or
yarn add -D eslint

Add any or all optional peer dependencies:

npm install --save-dev @typescript-eslint/eslint-plugin eslint-plugin-vue typescript
# or
yarn add -D @typescript-eslint/eslint-plugin eslint-plugin-vue typescript

Usage

In you eslint config for typescript projects:

{
    parser: "@typescript-eslint/parser",
    parserOptions: {
        project: "./tsconfig.json",
        sourceType: "module",
    },
    extends: [
        "@droplit/eslint-config",
    ],
    rules: {
        // Override settings here
    }
}

In you eslint config for typescript/vue projects:

{
    parser: "vue-eslint-parser",
    parserOptions: {
        parser: "@typescript-eslint/parser",
        project: "./tsconfig.json",
        sourceType: "module",
        extraFileExtensions: [".vue"]
    },
    extends: [
        "@droplit/eslint-config",
    ],
    rules: {
        // Override settings here
    }
}

Development

Clone repo and use npm link to test changes to a local project.

Linting rules:

Readme

Keywords

none

Package Sidebar

Install

npm i @droplit/eslint-config

Weekly Downloads

0

Version

0.1.3

License

ISC

Unpacked Size

15.4 kB

Total Files

3

Last publish

Collaborators

  • ferrantejake
  • boats
  • droplit-admin
  • chriswoodle