0.0.6 • Published 2 years ago
eslint-config-zzjtnb-basic v0.0.6
eslint-config-zzjtnb-basic
ESLint suggestions configuration aimed to have balanced aspects. A part of eslint-config-zzjtnb.
- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Designed to work with json, yaml, markdown out-of-box
- Sorted imports, dangling commas for cleaner commit diff
- Reasonable defaults, best practices, only one-line of config
Usage
Install
pnpm add -D eslint eslint-define-config eslint-config-zzjtnb-basic.eslintrc.js
/* eslint-env node */
// @ts-check
const { defineConfig } = require('eslint-define-config')
module.exports = defineConfig({
  root: true,
  extends: [
    'zzjtnb-basic',
  ],
})You don't need
.eslintignorenormally as it has been provided by the preset.
Add script for package.json
For example:
{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}Config VS Code auto fix
Install VS Code ESLint extension and create .vscode/settings.json
{
  "prettier.enable": false,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "eslint.validate": [
    "javascript",
    "typescript",
    "html",
    "vue",
    "markdown",
    "json",
    "jsonc",
    "yaml",
    "yml"
  ]
}Related
License
0.0.5
2 years ago
0.0.4
2 years ago
0.0.6
2 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.2-beta.1
3 years ago
0.0.2-beta.0
3 years ago
0.0.1
3 years ago
0.0.1-beta.3
3 years ago
0.0.1-beta.2
3 years ago
0.0.1-beta.1
3 years ago
0.0.1-beta.0
3 years ago