JSPM

  • Created
  • Published
  • Downloads 1830
  • Score
    100M100P100Q117113F
  • License MIT

Pequity's ESLint config

Package Exports

  • @pequity/eslint-config
  • @pequity/eslint-config/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@pequity/eslint-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@pequity/eslint-config

Custom ESLint and Prettier config with sensible defaults

Installation

npm i -D @pequity/eslint-config eslint prettier

Usage

There are 4 ESLint config presets that you can use:

  • @pequity/eslint-config/javascript for JavaScript / TypeScript projects
  • @pequity/eslint-config/vue2 for Vue.js 2 projects
  • @pequity/eslint-config/vue3 for Vue.js 3 projects
  • @pequity/eslint-config/vue3-typescript for Vue.js 3 / TypeScript projects

Add the desired config preset into your .eslintrc.js file:

module.exports = {
  extends: ['@pequity/eslint-config/vue2']
};

Add a prettier.config.js file with contents:

module.exports = require('@pequity/eslint-config/prettier.config.js');

You can add ESLint commands to .package-json

{
  "lint": "eslint \"**/*.{vue,ts,js}\"",
  "lint-fix": "eslint --fix \"**/*.{vue,ts,js}\""
}

and VS Code settings for autofix on save

.vscode/settings.json

{
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

Features

License

MIT