Skip to content

Instantly share code, notes, and snippets.

@1isten
Last active March 27, 2022 16:14
Show Gist options
  • Save 1isten/d6f3563c999feb752971fb9989241007 to your computer and use it in GitHub Desktop.
Save 1isten/d6f3563c999feb752971fb9989241007 to your computer and use it in GitHub Desktop.
VS Code settings
{
"editor.tabSize": 2,
"editor.cursorStyle": "block",
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": true,
"editor.bracketPairColorization.enabled": true,
"editor.detectIndentation": true,
"editor.formatOnPaste": true,
"editor.formatOnSave": false,
"explorer.compactFolders": false,
"explorer.autoReveal": false,
"eslint.packageManager": "yarn",
"terminal.external.osxExec": "iTerm2.app"
}
@1isten
Copy link
Author

1isten commented Dec 15, 2019

yarn global add \
  eslint eslint-loader babel-eslint prettier \
  eslint-config-prettier eslint-plugin-prettier \
  eslint-plugin-vue eslint-plugin-nuxt eslint-plugin-html \
  @nuxtjs/eslint-config @nuxtjs/eslint-module

.eslintrc.js

module.exports = {
  root: true,
  env: {
    browser: true,
    node: true,
  },
  parserOptions: {
    ecmaVersion: 6,
    parser: 'babel-eslint',
    sourceType: 'module', // default is 'script'
  },
  extends: [
    '@nuxtjs',
    'prettier',
    // 'prettier/vue',
    'plugin:prettier/recommended',
    'plugin:vue/essential',
    'plugin:nuxt/recommended',
    'eslint:recommended',
  ],
  plugins: [
    'prettier',
    'vue',
    'nuxt',
    'html',
  ],
  // add your custom rules here
  rules: {
    'no-alert': 'off',
    'no-console': 'off',
    'no-debugger': 'off',
    'prettier/prettier': ['warn', {}, {
      usePrettierrc: true,
    }], // or just 'warn',
  },
};

.prettierrc

{
  "printWidth": 100,
  "tabWidth": 2,
  "semi": true,
  "singleQuote": true,
  "quoteProps": "preserve",
  "trailingComma": "es5",
  "arrowParens": "avoid"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment