@droplit/eslint-config
v0.1.3
Published
Droplit ESLint Config for Typescript and/or Vue Projects
Downloads
18
Keywords
Readme
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.