JSPM

  • Created
  • Published
  • Downloads 283
  • Score
    100M100P100Q86862F
  • License ISC

Lint JavaScript, free of weariness and confusion

Package Exports

  • @zazen/eslint-config
  • @zazen/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 (@zazen/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

zazen-eslint-config

npm version npm downloads

ESLint configuration for zazen-generated projects.

Usage

Install the conventions by running:

npm install --save-dev eslint @zazen/eslint-config

Add the extends to your .eslintrc.js:

{
    extends: ['@zazen'],
    rules: { /* … */ },
}

Add the Prettier settings to your package.json:

"prettier": {
    "semi": false,
    "singleQuote": true,
    "trailingComma": "all"
},

Node projects

Extend the base config as well as the Node-specific rules:

{
    extends: ['@zazen', '@zazen/eslint-config/node'],
    rules: { /* … */ },
}

TypeScript projects

Extend the base config as well as the TypeScript-specific rules:

{
    extends: ['@zazen', '@zazen/eslint-config/typescript'],
    rules: { /* … */ },
}

This can be used for JavaScript code as well, but will require a tsconfig.json file to be present.

Vue.js projects

Removed for now until/unless I get more opinionated about Vue code. For now, install eslint-plugin-vue per-project, and extend the recommended config in addition to the base config here.

{
    extends: [
        'plugin:vue/[vue3-]recommended',
        '@zazen',
        'plugin:prettier/recommended',
    ],
    rules: { /* … */ },
}

The TypeScript rules can be included as well, but remember to set the parser option correctly.